aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.Designer.cs22
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.resx20
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs40
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/finger3.pngbin0 -> 1005 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/tap.pngbin0 -> 1316 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj8
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs2
7 files changed, 83 insertions, 9 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.Designer.cs
index 60e2bdb01..30828af87 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.Designer.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.Designer.cs
@@ -19,7 +19,7 @@ namespace Tango.PPC.Common.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -59,5 +59,25 @@ namespace Tango.PPC.Common.Properties {
resourceCulture = value;
}
}
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ internal static System.Drawing.Bitmap finger3 {
+ get {
+ object obj = ResourceManager.GetObject("finger3", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
+ internal static System.Drawing.Bitmap tap {
+ get {
+ object obj = ResourceManager.GetObject("tap", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.resx b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.resx
index af7dbebba..ca6197f54 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.resx
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.resx
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
@@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
@@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@@ -109,9 +112,16 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="finger3" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\finger3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="tap" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\tap.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
</root> \ No newline at end of file
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 b118dcdda..9a815df11 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs
@@ -6,6 +6,7 @@ using System.Linq;
using System.Security.Authentication;
using System.Text;
using System.Threading.Tasks;
+using System.Windows;
using System.Windows.Input;
using Tango.Core;
using Tango.Core.DI;
@@ -38,6 +39,9 @@ namespace Tango.PPC.Common.RemoteDesktop
private JsonSerializerSettings _jsonSettings;
private IOperationSystemManager _osManager;
private IPPCApplicationManager _appManager;
+ private bool _drawCursor;
+ private bool _isMouseDown;
+ private bool _ensureMouseDown;
/// <summary>
/// Gets or sets a value indicating whether this <see cref="IPPCService" /> is enabled.
@@ -137,6 +141,17 @@ namespace Tango.PPC.Common.RemoteDesktop
//}
}
+ mainWindow.PreviewMouseDown += (_, __) =>
+ {
+ _isMouseDown = true;
+ _ensureMouseDown = true;
+ };
+
+ mainWindow.PreviewMouseUp += (_, __) =>
+ {
+ _isMouseDown = false;
+ };
+
_engine.Comparer.MaxDifferencesThrow = _engine.CaptureRegion.Width * _engine.CaptureRegion.Height / 2;
}
@@ -300,6 +315,10 @@ namespace Tango.PPC.Common.RemoteDesktop
{
MouseController.DoubleClick();
}
+ else if (request.EventType == MouseEventType.Scroll)
+ {
+ MouseController.Scroll(request.ScrollDelta);
+ }
if (receiver != null)
{
@@ -339,8 +358,21 @@ namespace Tango.PPC.Common.RemoteDesktop
await receiver.SendGenericResponse(new RemoteDesktopCommandResponse(), token);
}
+ [ExternalBridgeRequestHandlerMethod(typeof(SetCursorVisibilityRequest), RequestHandlerLoggingMode.LogRequestName)]
+ public async Task OnSetCursorVisibilityRequest(SetCursorVisibilityRequest request, String token, ExternalBridgeReceiver receiver)
+ {
+ _drawCursor = request.Visible;
+ await receiver.SendGenericResponse(new SetCursorVisibilityResponse(), token);
+ }
+
private async void _engine_FrameReceived(object sender, ScreenCaptureFrameReceivedEventArgs<RasterFrame> e)
{
+ if (_drawCursor)
+ {
+ e.Frame.DrawImage((_isMouseDown || _ensureMouseDown) ? Properties.Resources.tap : Properties.Resources.finger3, new System.Drawing.Point(System.Windows.Forms.Cursor.Position.X - 5, System.Windows.Forms.Cursor.Position.Y - 4));
+ _ensureMouseDown = false;
+ }
+
_initialPacket = new RemoteDesktopPacket()
{
Bitmap = e.Frame.ToEncoder<PngEncoder>().ToArray(),
@@ -396,11 +428,15 @@ namespace Tango.PPC.Common.RemoteDesktop
{
RemoteDesktopPacket packet = null;
+ Point mousePosition = new Point(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
+
if (!e.Frame.DifferenceAvailable)
{
packet = new RemoteDesktopPacket()
{
- Bitmap = e.Frame.ToEncoder<TurboJpegEncoder>().ToArray(30)
+ Bitmap = e.Frame.ToEncoder<TurboJpegEncoder>().ToArray(30),
+ MousePosition = mousePosition,
+ CursorVisible = _drawCursor
};
}
else
@@ -413,6 +449,8 @@ namespace Tango.PPC.Common.RemoteDesktop
Bitmap = diffFrame.ToEncoder<PngEncoder>().ToArray(),
IsPartial = true,
PartialRegion = new CaptureRegion(diffFrame.Left, diffFrame.Top, diffFrame.Width, diffFrame.Height),
+ MousePosition = mousePosition,
+ CursorVisible = _drawCursor
};
diffFrame.Dispose();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/finger3.png b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/finger3.png
new file mode 100644
index 000000000..c0a6ce9cd
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/finger3.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/tap.png b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/tap.png
new file mode 100644
index 000000000..4fa679b81
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/tap.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
index 47b5e310b..6fc24e22a 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
@@ -458,6 +458,12 @@
<ItemGroup>
<Folder Include="Scripting\" />
</ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\finger3.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Resources\tap.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
@@ -468,7 +474,7 @@
</Target>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
index 23fecdf0e..aff093b15 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
@@ -8,4 +8,4 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango PPC Application")]
-[assembly: AssemblyVersion("1.1.16.0")]
+[assembly: AssemblyVersion("1.1.17.0")]