aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-02-16 23:46:11 +0200
committerRoy <Roy.mail.net@gmail.com>2023-02-16 23:46:11 +0200
commitb8dd2f3dac6aefe2d14992085a131d961938ee1f (patch)
tree1263e38c7440c26ba5a12421e8803d71ed27b8ff
parentdc31b68a5403ed108e61dd15cef52f0d0683cb09 (diff)
downloadTango-b8dd2f3dac6aefe2d14992085a131d961938ee1f.tar.gz
Tango-b8dd2f3dac6aefe2d14992085a131d961938ee1f.zip
Working on machines icons
-rw-r--r--Software/Graphics/Eureka/embedded.pngbin0 -> 560 bytes
-rw-r--r--Software/Graphics/Eureka/emulator.pngbin0 -> 1131 bytes
-rw-r--r--Software/Graphics/Eureka/eureka.pngbin0 -> 55317 bytes
-rw-r--r--Software/Graphics/Eureka/machine-eureka.pngbin0 -> 191903 bytes
-rw-r--r--Software/Graphics/Eureka/signalr.pngbin0 -> 2739 bytes
-rw-r--r--Software/Graphics/Eureka/ts1800.pngbin0 -> 43275 bytes
-rw-r--r--Software/Graphics/Eureka/wifi.pngbin0 -> 743 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineConnectionIcon.xaml13
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MachineConnectionIcon.xaml.cs79
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj13
10 files changed, 104 insertions, 1 deletions
diff --git a/Software/Graphics/Eureka/embedded.png b/Software/Graphics/Eureka/embedded.png
new file mode 100644
index 000000000..d0b917b44
--- /dev/null
+++ b/Software/Graphics/Eureka/embedded.png
Binary files differ
diff --git a/Software/Graphics/Eureka/emulator.png b/Software/Graphics/Eureka/emulator.png
new file mode 100644
index 000000000..cd3478ab2
--- /dev/null
+++ b/Software/Graphics/Eureka/emulator.png
Binary files differ
diff --git a/Software/Graphics/Eureka/eureka.png b/Software/Graphics/Eureka/eureka.png
new file mode 100644
index 000000000..c93e262c6
--- /dev/null
+++ b/Software/Graphics/Eureka/eureka.png
Binary files differ
diff --git a/Software/Graphics/Eureka/machine-eureka.png b/Software/Graphics/Eureka/machine-eureka.png
new file mode 100644
index 000000000..ff1377a9b
--- /dev/null
+++ b/Software/Graphics/Eureka/machine-eureka.png
Binary files differ
diff --git a/Software/Graphics/Eureka/signalr.png b/Software/Graphics/Eureka/signalr.png
new file mode 100644
index 000000000..20d329640
--- /dev/null
+++ b/Software/Graphics/Eureka/signalr.png
Binary files differ
diff --git a/Software/Graphics/Eureka/ts1800.png b/Software/Graphics/Eureka/ts1800.png
new file mode 100644
index 000000000..116e1e9c7
--- /dev/null
+++ b/Software/Graphics/Eureka/ts1800.png
Binary files differ
diff --git a/Software/Graphics/Eureka/wifi.png b/Software/Graphics/Eureka/wifi.png
new file mode 100644
index 000000000..8c4bfebc4
--- /dev/null
+++ b/Software/Graphics/Eureka/wifi.png
Binary files 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 @@
+<UserControl x:Class="Tango.MachineStudio.Common.Controls.MachineConnectionIcon"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls"
+ mc:Ignorable="d"
+ d:DesignHeight="45" d:DesignWidth="45">
+ <Grid>
+ <Image Margin="0 5 5 0" Source="../Images/machine_new_small.png" RenderOptions.BitmapScalingMode="Fant"></Image>
+
+ </Grid>
+</UserControl>
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,
+ }
+
+ /// <summary>
+ /// Interaction logic for MachineConnectionIcon.xaml
+ /// </summary>
+ 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 @@
<Link>GlobalVersionInfo.cs</Link>
</Compile>
<Compile Include="Authentication\AuthenticationLoginResult.cs" />
+ <Compile Include="Controls\MachineConnectionIcon.xaml.cs">
+ <DependentUpon>MachineConnectionIcon.xaml</DependentUpon>
+ </Compile>
<Compile Include="Controls\MachineView.xaml.cs">
<DependentUpon>MachineView.xaml</DependentUpon>
</Compile>
@@ -189,6 +192,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Controls\MachineConnectionIcon.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Controls\MachineView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -298,6 +305,10 @@
<Project>{de2f2b86-025b-4f26-83a4-38bd48224ed5}</Project>
<Name>Tango.Editors</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\Tango.Emulations\Tango.Emulations.csproj">
+ <Project>{63561e19-ff5a-414b-a5ef-e30711543e1d}</Project>
+ <Name>Tango.Emulations</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\Tango.Git\Tango.Git.csproj">
<Project>{99081c0e-065c-4d68-bf60-f82330cca02d}</Project>
<Name>Tango.Git</Name>
@@ -431,7 +442,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
<PropertyGroup>