aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-05-14 15:37:22 +0300
committerRoy <Roy.mail.net@gmail.com>2023-05-14 15:37:22 +0300
commitcf456972fa5df09ef32f43469d4c23c59d518e05 (patch)
treed043ceaf74ce6d13fed8f9c3719be785d67b5e00 /Software/Visual_Studio/PPC
parent8eb72d9864f9c07ce78f2e569b5fdd17803dc553 (diff)
downloadTango-cf456972fa5df09ef32f43469d4c23c59d518e05.tar.gz
Tango-cf456972fa5df09ef32f43469d4c23c59d518e05.zip
Adjustment for Twine X4 and FSE Remote Desktop.
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs26
1 files changed, 19 insertions, 7 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs
index 411fd5252..51c78e0f0 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs
@@ -14,6 +14,7 @@ using Tango.Core.Threading;
using Tango.Integration.ExternalBridge;
using Tango.Logging;
using Tango.PPC.Common.Application;
+using Tango.PPC.Common.Build;
using Tango.PPC.Common.ExternalBridge;
using Tango.PPC.Common.OS;
using Tango.PPC.Common.Printing;
@@ -46,6 +47,7 @@ namespace Tango.PPC.Common.RemoteDesktop
private bool _isMouseDown;
private bool _ensureMouseDown;
private ActionTimer _resetTimer;
+ private IBuildProvider _buildProvider;
/// <summary>
/// Gets or sets a value indicating whether this <see cref="IPPCService" /> is enabled.
@@ -79,11 +81,12 @@ namespace Tango.PPC.Common.RemoteDesktop
/// <param name="applicationManager">The application manager.</param>
/// <param name="externalBridge">The external bridge.</param>
/// <param name="osManager">The os manager.</param>
- public DefaultRemoteDesktopService(IPPCApplicationManager applicationManager, IPPCExternalBridgeService externalBridge, IOperationSystemManager osManager, IPrintingManager printingManager)
+ public DefaultRemoteDesktopService(IPPCApplicationManager applicationManager, IPPCExternalBridgeService externalBridge, IOperationSystemManager osManager, IPrintingManager printingManager, IBuildProvider buildProvider)
{
_osManager = osManager;
_appManager = applicationManager;
_printingManager = printingManager;
+ _buildProvider = buildProvider;
_jsonSettings = new JsonSerializerSettings()
{
@@ -110,10 +113,19 @@ namespace Tango.PPC.Common.RemoteDesktop
private void ApplicationManager_ApplicationReady(object sender, EventArgs e)
{
-
-
var mainWindow = System.Windows.Application.Current.MainWindow;
+ if (_buildProvider.IsEureka)
+ {
+ _engine.CaptureRegion = new CaptureRegion()
+ {
+ Left = (int)mainWindow.Left,
+ Top = 0,
+ Width = 1920,
+ Height = 1080
+ };
+ }
+
if (mainWindow.WindowStyle != System.Windows.WindowStyle.None)
{
mainWindow.LocationChanged += (_, __) =>
@@ -325,7 +337,7 @@ namespace Tango.PPC.Common.RemoteDesktop
MouseController.MouseEvent(flag);
- _resetTimer.ResetReplace(() =>
+ _resetTimer.ResetReplace(() =>
{
_printingManager.PreventPrintingByRemoteDesktop = false;
Debug.WriteLine("ALLOW PRINT");
@@ -468,7 +480,7 @@ namespace Tango.PPC.Common.RemoteDesktop
}
else
{
- _engine.EnableComparer = true;
+ _engine.EnableComparer = !_buildProvider.IsEureka;
foreach (var client in _clients.ToList().Where(x => !x.InitialPacketSent))
{
@@ -490,13 +502,13 @@ namespace Tango.PPC.Common.RemoteDesktop
}
}
- if (e.Frame.DifferenceCount > 0)
+ if (e.Frame.DifferenceCount > 0 || _buildProvider.IsEureka)
{
RemoteDesktopPacket packet = null;
Point mousePosition = new Point(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
- if (!e.Frame.DifferenceAvailable)
+ if (!e.Frame.DifferenceAvailable || _buildProvider.IsEureka)
{
packet = new RemoteDesktopPacket()
{