From b8dd2f3dac6aefe2d14992085a131d961938ee1f Mon Sep 17 00:00:00 2001 From: Roy Date: Thu, 16 Feb 2023 23:46:11 +0200 Subject: Working on machines icons --- Software/Graphics/Eureka/embedded.png | Bin 0 -> 560 bytes Software/Graphics/Eureka/emulator.png | Bin 0 -> 1131 bytes Software/Graphics/Eureka/eureka.png | Bin 0 -> 55317 bytes Software/Graphics/Eureka/machine-eureka.png | Bin 0 -> 191903 bytes Software/Graphics/Eureka/signalr.png | Bin 0 -> 2739 bytes Software/Graphics/Eureka/ts1800.png | Bin 0 -> 43275 bytes Software/Graphics/Eureka/wifi.png | Bin 0 -> 743 bytes .../Controls/MachineConnectionIcon.xaml | 13 ++++ .../Controls/MachineConnectionIcon.xaml.cs | 79 +++++++++++++++++++++ .../Tango.MachineStudio.Common.csproj | 13 +++- 10 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 Software/Graphics/Eureka/embedded.png create mode 100644 Software/Graphics/Eureka/emulator.png create mode 100644 Software/Graphics/Eureka/eureka.png create mode 100644 Software/Graphics/Eureka/machine-eureka.png create mode 100644 Software/Graphics/Eureka/signalr.png create mode 100644 Software/Graphics/Eureka/ts1800.png create mode 100644 Software/Graphics/Eureka/wifi.png create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineConnectionIcon.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineConnectionIcon.xaml.cs (limited to 'Software') diff --git a/Software/Graphics/Eureka/embedded.png b/Software/Graphics/Eureka/embedded.png new file mode 100644 index 000000000..d0b917b44 Binary files /dev/null and b/Software/Graphics/Eureka/embedded.png differ diff --git a/Software/Graphics/Eureka/emulator.png b/Software/Graphics/Eureka/emulator.png new file mode 100644 index 000000000..cd3478ab2 Binary files /dev/null and b/Software/Graphics/Eureka/emulator.png differ diff --git a/Software/Graphics/Eureka/eureka.png b/Software/Graphics/Eureka/eureka.png new file mode 100644 index 000000000..c93e262c6 Binary files /dev/null and b/Software/Graphics/Eureka/eureka.png differ diff --git a/Software/Graphics/Eureka/machine-eureka.png b/Software/Graphics/Eureka/machine-eureka.png new file mode 100644 index 000000000..ff1377a9b Binary files /dev/null and b/Software/Graphics/Eureka/machine-eureka.png differ diff --git a/Software/Graphics/Eureka/signalr.png b/Software/Graphics/Eureka/signalr.png new file mode 100644 index 000000000..20d329640 Binary files /dev/null and b/Software/Graphics/Eureka/signalr.png differ diff --git a/Software/Graphics/Eureka/ts1800.png b/Software/Graphics/Eureka/ts1800.png new file mode 100644 index 000000000..116e1e9c7 Binary files /dev/null and b/Software/Graphics/Eureka/ts1800.png differ diff --git a/Software/Graphics/Eureka/wifi.png b/Software/Graphics/Eureka/wifi.png new file mode 100644 index 000000000..8c4bfebc4 Binary files /dev/null and b/Software/Graphics/Eureka/wifi.png differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineConnectionIcon.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineConnectionIcon.xaml new file mode 100644 index 000000000..e43a30e6d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineConnectionIcon.xaml @@ -0,0 +1,13 @@ + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineConnectionIcon.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineConnectionIcon.xaml.cs new file mode 100644 index 000000000..72b9af55f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineConnectionIcon.xaml.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.BL.Enumerations; +using Tango.Emulations.ExternalBridge; +using Tango.Integration.ExternalBridge; + +namespace Tango.MachineStudio.Common.Controls +{ + public enum ExternalBridgeClientType + { + Usb, + Tcp, + Wifi, + SignalR, + Emulator, + } + + /// + /// Interaction logic for MachineConnectionIcon.xaml + /// + public partial class MachineConnectionIcon : UserControl + { + public IExternalBridgeClient ExternalBridgeClient + { + get { return (IExternalBridgeClient)GetValue(ExternalBridgeClientProperty); } + set { SetValue(ExternalBridgeClientProperty, value); } + } + public static readonly DependencyProperty ExternalBridgeClientProperty = + DependencyProperty.Register("ExternalBridgeClient", typeof(IExternalBridgeClient), typeof(MachineConnectionIcon), new PropertyMetadata((d,e) => (d as MachineConnectionIcon).OnExternalBridgeClientChanged())); + + public ExternalBridgeClientType ExternalBridgeClientType + { + get { return (ExternalBridgeClientType)GetValue(ExternalBridgeClientTypeProperty); } + set { SetValue(ExternalBridgeClientTypeProperty, value); } + } + public static readonly DependencyProperty ExternalBridgeClientTypeProperty = + DependencyProperty.Register("ExternalBridgeClientType", typeof(ExternalBridgeClientType), typeof(MachineConnectionIcon), new PropertyMetadata(ExternalBridgeClientType.Usb)); + + private void OnExternalBridgeClientChanged() + { + if (ExternalBridgeClient != null) + { + if (ExternalBridgeClient.GetType() == typeof(ExternalBridgeUsbClient)) + { + ExternalBridgeClientType = ExternalBridgeClientType.Usb; + } + else if (ExternalBridgeClient.GetType() == typeof(ExternalBridgeTcpClient)) + { + ExternalBridgeClientType = ExternalBridgeClientType.Tcp; + } + else if (ExternalBridgeClient.GetType() == typeof(ExternalBridgeSignalRClient)) + { + ExternalBridgeClientType = ExternalBridgeClientType.SignalR; + } + else if (ExternalBridgeClient.GetType() == typeof(EmulatorExternalBridge)) + { + ExternalBridgeClientType = ExternalBridgeClientType.Emulator; + } + } + } + + public MachineConnectionIcon() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index a14bb4e2a..345c5f627 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -93,6 +93,9 @@ GlobalVersionInfo.cs + + MachineConnectionIcon.xaml + MachineView.xaml @@ -189,6 +192,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + MSBuild:Compile Designer @@ -298,6 +305,10 @@ {de2f2b86-025b-4f26-83a4-38bd48224ed5} Tango.Editors + + {63561e19-ff5a-414b-a5ef-e30711543e1d} + Tango.Emulations + {99081c0e-065c-4d68-bf60-f82330cca02d} Tango.Git @@ -431,7 +442,7 @@ - + -- cgit v1.3.1