diff options
| author | Roy <Roy.mail.net@gmail.com> | 2023-02-19 00:13:53 +0200 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2023-02-19 00:13:53 +0200 |
| commit | a054f1ab36fe3cbe816f78fa5ea68b30cde1bd43 (patch) | |
| tree | 2cdcfb86f298ba32e28b4f29c9b31d1faa05d5da /Software/Visual_Studio/FSE/Tango.FSE.Common | |
| parent | a4cd972fd023425fa9414e56748665cb2821f412 (diff) | |
| download | Tango-a054f1ab36fe3cbe816f78fa5ea68b30cde1bd43.tar.gz Tango-a054f1ab36fe3cbe816f78fa5ea68b30cde1bd43.zip | |
FSE Eureka Design Support.
Diffstat (limited to 'Software/Visual_Studio/FSE/Tango.FSE.Common')
25 files changed, 716 insertions, 211 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Connection/MachineConnectionTypes.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Connection/MachineConnectionTypes.cs index ef233dda8..5b585533e 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Connection/MachineConnectionTypes.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Connection/MachineConnectionTypes.cs @@ -17,6 +17,10 @@ namespace Tango.FSE.Common.Connection /// </summary> USB, /// <summary> + /// Local TCP connection. + /// </summary> + TCP, + /// <summary> /// Local area network. /// </summary> Wifi, diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ConnectedMachineIcon.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ConnectedMachineIcon.xaml index f6be93ec9..98d9dc13d 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ConnectedMachineIcon.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ConnectedMachineIcon.xaml @@ -9,24 +9,6 @@ mc:Ignorable="d" d:DesignHeight="50" d:DesignWidth="50" Height="50"> <Grid> - <ContentControl Content="{Binding}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"> - <ContentControl.Resources> - <DataTemplate DataType="{x:Type integration:ExternalBridgeSignalRClient}"> - <ContentControl Style="{StaticResource FSE_SignalRMachineIcon}" /> - </DataTemplate> - - <DataTemplate DataType="{x:Type integration:ExternalBridgeTcpClient}"> - <ContentControl Style="{StaticResource FSE_WifiMachineIcon}" /> - </DataTemplate> - - <DataTemplate DataType="{x:Type integration:ExternalBridgeUsbClient}"> - <ContentControl Style="{StaticResource FSE_UsbMachineIcon}" /> - </DataTemplate> - - <DataTemplate DataType="{x:Type emulations:EmulatorExternalBridge}"> - <ContentControl Style="{StaticResource FSE_EmulatorMachineIcon}"/> - </DataTemplate> - </ContentControl.Resources> - </ContentControl> + <local:MachineConnectionIcon ExternalBridgeClient="{Binding}" /> </Grid> </UserControl> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineConnectionIcon.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineConnectionIcon.cs new file mode 100644 index 000000000..d739ac6e5 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineConnectionIcon.cs @@ -0,0 +1,83 @@ +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.FSE.Common.Connection; +using Tango.Integration.ExternalBridge; + +namespace Tango.FSE.Common.Controls +{ + public class MachineConnectionIcon : Control + { + public MachineTypes MachineType + { + get { return (MachineTypes)GetValue(MachineTypeProperty); } + set { SetValue(MachineTypeProperty, value); } + } + public static readonly DependencyProperty MachineTypeProperty = + DependencyProperty.Register("MachineType", typeof(MachineTypes), typeof(MachineConnectionIcon), new PropertyMetadata(MachineTypes.TS1800)); + + 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 MachineConnectionTypes ExternalBridgeClientType + { + get { return (MachineConnectionTypes)GetValue(ExternalBridgeClientTypeProperty); } + set { SetValue(ExternalBridgeClientTypeProperty, value); } + } + public static readonly DependencyProperty ExternalBridgeClientTypeProperty = + DependencyProperty.Register("ExternalBridgeClientType", typeof(MachineConnectionTypes), typeof(MachineConnectionIcon), new PropertyMetadata(MachineConnectionTypes.USB)); + + private void OnExternalBridgeClientChanged() + { + if (ExternalBridgeClient != null) + { + if (ExternalBridgeClient.GetType() == typeof(ExternalBridgeUsbClient)) + { + ExternalBridgeClientType = MachineConnectionTypes.USB; + } + else if (ExternalBridgeClient.GetType() == typeof(ExternalBridgeTcpFirmwareClient)) + { + ExternalBridgeClientType = MachineConnectionTypes.TCP; + MachineType = MachineTypes.Eureka; + } + else if (ExternalBridgeClient.GetType() == typeof(ExternalBridgeTcpClient)) + { + ExternalBridgeClientType = MachineConnectionTypes.Wifi; + MachineType = ExternalBridgeClient.MachineType; + } + else if (ExternalBridgeClient.GetType() == typeof(ExternalBridgeSignalRClient)) + { + ExternalBridgeClientType = MachineConnectionTypes.SignalR; + MachineType = ExternalBridgeClient.MachineType; + } + else if (ExternalBridgeClient.GetType() == typeof(EmulatorExternalBridge)) + { + ExternalBridgeClientType = MachineConnectionTypes.Emulator; + } + } + } + + static MachineConnectionIcon() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(MachineConnectionIcon), new FrameworkPropertyMetadata(typeof(MachineConnectionIcon))); + } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineConnectionIcon.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineConnectionIcon.xaml new file mode 100644 index 000000000..c402b2d21 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineConnectionIcon.xaml @@ -0,0 +1,64 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:local="clr-namespace:Tango.FSE.Common.Controls"> + + <Style TargetType="{x:Type local:MachineConnectionIcon}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:MachineConnectionIcon}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}"> + <Grid DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:MachineConnectionIcon}}"> + <Image Margin="0 5 10 0" RenderOptions.BitmapScalingMode="Fant"> + <Image.Style> + <Style TargetType="Image"> + <Setter Property="Source" Value="../Images/Connections/ts1800.png"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding MachineType}" Value="Eureka"> + <Setter Property="Source" Value="../Images/Connections/eureka.png"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> + + <material:PackIcon RenderOptions.BitmapScalingMode="Fant" Width="20" Height="20" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0 0 -1 0"> + <material:PackIcon.Style> + <Style TargetType="material:PackIcon"> + <Setter Property="Kind" Value="Usb"></Setter> + <Setter Property="Foreground" Value="{StaticResource FSE_UsbBrush}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding ExternalBridgeClientType}" Value="USB"> + <Setter Property="Kind" Value="Usb"></Setter> + <Setter Property="Foreground" Value="{StaticResource FSE_UsbBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding ExternalBridgeClientType}" Value="TCP"> + <Setter Property="Kind" Value="Lan"></Setter> + <Setter Property="Foreground" Value="{StaticResource FSE_LanBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding ExternalBridgeClientType}" Value="Wifi"> + <Setter Property="Kind" Value="Wifi"></Setter> + <Setter Property="Foreground" Value="{StaticResource FSE_WifiBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding ExternalBridgeClientType}" Value="SignalR"> + <Setter Property="Kind" Value="Cloud"></Setter> + <Setter Property="Foreground" Value="{StaticResource FSE_SignalRBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding ExternalBridgeClientType}" Value="Emulator"> + <Setter Property="Kind" Value="SdCard"></Setter> + <Setter Property="Foreground" Value="{StaticResource FSE_EmulatorBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </material:PackIcon.Style> + </material:PackIcon> + </Grid> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIcon.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIcon.cs new file mode 100644 index 000000000..349328676 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIcon.cs @@ -0,0 +1,54 @@ +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; + +namespace Tango.FSE.Common.Controls +{ + /// <summary> + /// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file. + /// + /// Step 1a) Using this custom control in a XAML file that exists in the current project. + /// Add this XmlNamespace attribute to the root element of the markup file where it is + /// to be used: + /// + /// xmlns:MyNamespace="clr-namespace:Tango.FSE.Common.Controls" + /// + /// + /// Step 1b) Using this custom control in a XAML file that exists in a different project. + /// Add this XmlNamespace attribute to the root element of the markup file where it is + /// to be used: + /// + /// xmlns:MyNamespace="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common.Controls" + /// + /// You will also need to add a project reference from the project where the XAML file lives + /// to this project and Rebuild to avoid compilation errors: + /// + /// Right click on the target project in the Solution Explorer and + /// "Add Reference"->"Projects"->[Browse to and select this project] + /// + /// + /// Step 2) + /// Go ahead and use your control in the XAML file. + /// + /// <MyNamespace:MachineIcon/> + /// + /// </summary> + public class MachineIcon : Control + { + static MachineIcon() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(MachineIcon), new FrameworkPropertyMetadata(typeof(MachineIcon))); + } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIcon.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIcon.xaml new file mode 100644 index 000000000..e4e9e1b48 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIcon.xaml @@ -0,0 +1,30 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.FSE.Common.Controls"> + + <Style TargetType="{x:Type local:MachineIcon}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:MachineIcon}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}"> + <Image RenderOptions.BitmapScalingMode="Fant"> + <Image.Style> + <Style TargetType="Image"> + <Setter Property="Source" Value="{StaticResource FSE_Machine_Small}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding MachineType}" Value="1"> + <Setter Property="Source" Value="{StaticResource FSE_Machine_Eureka_Small}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIconFull.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIconFull.cs new file mode 100644 index 000000000..c6f1da030 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIconFull.cs @@ -0,0 +1,25 @@ +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; + +namespace Tango.FSE.Common.Controls +{ + public class MachineIconFull : Control + { + static MachineIconFull() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(MachineIconFull), new FrameworkPropertyMetadata(typeof(MachineIconFull))); + } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIconFull.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIconFull.xaml new file mode 100644 index 000000000..10a4d655d --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineIconFull.xaml @@ -0,0 +1,30 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.FSE.Common.Controls"> + + <Style TargetType="{x:Type local:MachineIconFull}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:MachineIconFull}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}"> + <Image RenderOptions.BitmapScalingMode="Fant"> + <Image.Style> + <Style TargetType="Image"> + <Setter Property="Source" Value="{StaticResource FSE_Machine_Full}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding MachineType}" Value="1"> + <Setter Property="Source" Value="{StaticResource FSE_Machine_Eureka_Full}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineView.xaml index c82b5b460..25fc3f88e 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/MachineView.xaml @@ -24,247 +24,426 @@ </UserControl.Resources> <Grid> - <Viewbox MaxWidth="1200" Grid.Row="1" > - <Grid VerticalAlignment="Top"> - - <Image IsHitTestVisible="False" Source="{StaticResource FSE_Machine_Full}" MaxWidth="800" RenderOptions.BitmapScalingMode="Fant"> - <!--<Image.Effect> + <Grid> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="Visibility" Value="Visible"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Type}" Value="Eureka"> + <Setter Property="Visibility" Value="Hidden"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + <Viewbox MaxWidth="1200" Grid.Row="1" > + <Grid VerticalAlignment="Top"> + <Grid> + <Image IsHitTestVisible="False" Source="{StaticResource FSE_Machine_Full}" MaxWidth="800" RenderOptions.BitmapScalingMode="Fant"> + <!--<Image.Effect> <DropShadowEffect ShadowDepth="0" BlurRadius="20" Opacity="1" RenderingBias="Performance" Color="DimGray"></DropShadowEffect> </Image.Effect>--> - </Image> + </Image> - <Canvas ClipToBounds="False" x:Name="canvas"> + <Canvas ClipToBounds="False" x:Name="canvas"> - <Grid x:Name="hardwareGrid" Width="180" ToolTip="{Binding Configuration.HardwareVersion.Name}" Height="27" Canvas.Left="342" Canvas.Top="80" Background="#6B303030" IsHitTestVisible="True"> - <Border BorderBrush="#6C6C6C" BorderThickness="1" IsHitTestVisible="False"> - <StackPanel Orientation="Horizontal"> - <Image Source="../Images/hardware.png" Width="10" VerticalAlignment="Center" Margin="5" RenderOptions.BitmapScalingMode="Fant"></Image> - <TextBlock Padding="2 0 2 0" VerticalAlignment="Center" TextAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}" IsHitTestVisible="False" FontSize="12" TextWrapping="Wrap"> + <Grid x:Name="hardwareGrid" Width="180" ToolTip="{Binding Configuration.HardwareVersion.Name}" Height="27" Canvas.Left="342" Canvas.Top="80" Background="#6B303030" IsHitTestVisible="True"> + <Border BorderBrush="#6C6C6C" BorderThickness="1" IsHitTestVisible="False"> + <StackPanel Orientation="Horizontal"> + <Image Source="../Images/hardware.png" Width="10" VerticalAlignment="Center" Margin="5" RenderOptions.BitmapScalingMode="Fant"></Image> + <TextBlock Padding="2 0 2 0" VerticalAlignment="Center" TextAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}" IsHitTestVisible="False" FontSize="12" TextWrapping="Wrap"> <Run Text="{Binding Configuration.HardwareVersion.Name}"></Run> <Run Text="{Binding Configuration.HardwareVersion.Version}"></Run> - </TextBlock> - </StackPanel> - </Border> - </Grid> + </TextBlock> + </StackPanel> + </Border> + </Grid> - <!--<TextBlock Canvas.Left="532" FontStyle="Italic" Foreground="Gray" Canvas.Top="-22">Hardware</TextBlock> + <!--<TextBlock Canvas.Left="532" FontStyle="Italic" Foreground="Gray" Canvas.Top="-22">Hardware</TextBlock> <Grid Width="97" Height="90" Canvas.Left="431" Canvas.Top="-13"> <Rectangle Stroke="Gray" VerticalAlignment="Top" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> <Rectangle Stroke="Gray" HorizontalAlignment="Left" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> </Grid>--> - <UniformGrid Width="310" Canvas.Top="295" Canvas.Left="420" TextElement.Foreground="#252525" Rows="1" Columns="10" TextElement.FontSize="9"> - <TextBlock HorizontalAlignment="Center">1</TextBlock> - <TextBlock HorizontalAlignment="Center">2</TextBlock> - <TextBlock HorizontalAlignment="Center">3</TextBlock> - <TextBlock HorizontalAlignment="Center">4</TextBlock> - <TextBlock HorizontalAlignment="Center">5</TextBlock> - <TextBlock HorizontalAlignment="Center">6</TextBlock> - <TextBlock HorizontalAlignment="Center">7</TextBlock> - <TextBlock HorizontalAlignment="Center">8</TextBlock> - <TextBlock HorizontalAlignment="Center">9</TextBlock> - <TextBlock HorizontalAlignment="Center">10</TextBlock> - </UniformGrid> + <UniformGrid Width="310" Canvas.Top="295" Canvas.Left="420" TextElement.Foreground="#252525" Rows="1" Columns="10" TextElement.FontSize="9"> + <TextBlock HorizontalAlignment="Center">1</TextBlock> + <TextBlock HorizontalAlignment="Center">2</TextBlock> + <TextBlock HorizontalAlignment="Center">3</TextBlock> + <TextBlock HorizontalAlignment="Center">4</TextBlock> + <TextBlock HorizontalAlignment="Center">5</TextBlock> + <TextBlock HorizontalAlignment="Center">6</TextBlock> + <TextBlock HorizontalAlignment="Center">7</TextBlock> + <TextBlock HorizontalAlignment="Center">8</TextBlock> + <TextBlock HorizontalAlignment="Center">9</TextBlock> + <TextBlock HorizontalAlignment="Center">10</TextBlock> + </UniformGrid> - <Grid x:Name="gridIds" Width="310" Height="195" Canvas.Top="314" Canvas.Left="420"> - <ListBox ItemsSource="{Binding Configuration.IdsPacks}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> - <ListBox.ItemContainerStyle> - <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> - <Setter Property="Padding" Value="0"></Setter> - <Setter Property="VerticalContentAlignment" Value="Stretch"></Setter> - <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> - </Style> - </ListBox.ItemContainerStyle> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <UniformGrid Columns="10"></UniformGrid> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - <ItemsControl.ItemTemplate> - <DataTemplate> - <Grid> - <Grid.RowDefinitions> - <RowDefinition Height="1*"/> - <RowDefinition Height="30"/> - </Grid.RowDefinitions> - <UniformGrid Columns="1" Rows="2"> - <Grid Margin="2"> - <Image IsHitTestVisible="False" Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"> - <Image.Style> - <Style TargetType="Image"> - <Style.Triggers> - <DataTrigger Binding="{Binding Dispenser}" Value="{x:Null}"> - <Setter Property="Opacity" Value="0.2"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </Image.Style> - </Image> - <Rectangle IsHitTestVisible="False" Margin="14 25 13 34"> - <Rectangle.Fill> - <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> - <GradientStop Offset="0" Color="Transparent" /> - <GradientStop Offset="1" Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/> - </LinearGradientBrush> - </Rectangle.Fill> - </Rectangle> - </Grid> + <Grid x:Name="gridIds" Width="310" Height="195" Canvas.Top="314" Canvas.Left="420"> + <ListBox ItemsSource="{Binding Configuration.IdsPacks}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> + <ListBox.ItemContainerStyle> + <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> + <Setter Property="Padding" Value="0"></Setter> + <Setter Property="VerticalContentAlignment" Value="Stretch"></Setter> + <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> + </Style> + </ListBox.ItemContainerStyle> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <UniformGrid Columns="10"></UniformGrid> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*"/> + <RowDefinition Height="30"/> + </Grid.RowDefinitions> + <UniformGrid Columns="1" Rows="2"> + <Grid Margin="2"> + <Image IsHitTestVisible="False" Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"> + <Image.Style> + <Style TargetType="Image"> + <Style.Triggers> + <DataTrigger Binding="{Binding Dispenser}" Value="{x:Null}"> + <Setter Property="Opacity" Value="0.2"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> + <Rectangle IsHitTestVisible="False" Margin="14 25 13 34"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + + <Grid Margin="2"> + <Image IsHitTestVisible="False" Stretch="Fill" Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant"> + <Image.Style> + <Style TargetType="Image"> + <Style.Triggers> + <DataTrigger Binding="{Binding MidTankType}" Value="{x:Null}"> + <Setter Property="Opacity" Value="0.2"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> + <Rectangle IsHitTestVisible="False" Margin="4 25 4 1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + </UniformGrid> - <Grid Margin="2"> - <Image IsHitTestVisible="False" Stretch="Fill" Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant"> - <Image.Style> - <Style TargetType="Image"> + <Grid Grid.Row="1" Margin="3" IsHitTestVisible="False"> + <Grid.Style> + <Style TargetType="Grid"> <Style.Triggers> - <DataTrigger Binding="{Binding MidTankType}" Value="{x:Null}"> + <DataTrigger Binding="{Binding CartridgeType}" Value="{x:Null}"> <Setter Property="Opacity" Value="0.2"></Setter> </DataTrigger> </Style.Triggers> </Style> - </Image.Style> - </Image> - <Rectangle IsHitTestVisible="False" Margin="4 25 4 1"> - <Rectangle.Fill> - <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> - <GradientStop Offset="0" Color="Transparent" /> - <GradientStop Offset="1" Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/> - </LinearGradientBrush> - </Rectangle.Fill> - </Rectangle> + </Grid.Style> + <Border BorderBrush="#252525" BorderThickness="1" CornerRadius="3"> + <Border.Background> + <LinearGradientBrush> + <GradientStop Color="#FF252525"/> + <GradientStop Color="#FF838383" Offset="1"/> + </LinearGradientBrush> + </Border.Background> + </Border> + <Border BorderBrush="#252525" BorderThickness="1" CornerRadius="3"> + <Border.Background> + <LinearGradientBrush Opacity="0.7"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/> + </LinearGradientBrush> + </Border.Background> + </Border> + </Grid> </Grid> - </UniformGrid> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ListBox> - <Grid Grid.Row="1" Margin="3" IsHitTestVisible="False"> - <Grid.Style> - <Style TargetType="Grid"> - <Style.Triggers> - <DataTrigger Binding="{Binding CartridgeType}" Value="{x:Null}"> - <Setter Property="Opacity" Value="0.2"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </Grid.Style> - <Border BorderBrush="#252525" BorderThickness="1" CornerRadius="3"> - <Border.Background> - <LinearGradientBrush> - <GradientStop Color="#FF252525"/> - <GradientStop Color="#FF838383" Offset="1"/> - </LinearGradientBrush> - </Border.Background> - </Border> - <Border BorderBrush="#252525" BorderThickness="1" CornerRadius="3"> - <Border.Background> - <LinearGradientBrush Opacity="0.7"> - <GradientStop Offset="0" Color="Transparent" /> - <GradientStop Offset="1" Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/> - </LinearGradientBrush> - </Border.Background> - </Border> - </Grid> - </Grid> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ListBox> - - <Grid Margin="0 50 0 0"> - <Grid.Style> - <Style TargetType="Grid"> - <Setter Property="Visibility" Value="Hidden"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding Configuration.IdsPacks.Count}" Value="0"> - <Setter Property="Visibility" Value="Visible"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </Grid.Style> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold" Foreground="{StaticResource FSE_GrayBrush}">NO IDS PACKS</TextBlock> - </Grid> + <Grid Margin="0 50 0 0"> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="Visibility" Value="Hidden"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Configuration.IdsPacks.Count}" Value="0"> + <Setter Property="Visibility" Value="Visible"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold" Foreground="{StaticResource FSE_GrayBrush}">NO IDS PACKS</TextBlock> + </Grid> - <Rectangle VerticalAlignment="Bottom" Stroke="DimGray" StrokeThickness="2"> - <!--<Rectangle.Effect> + <Rectangle VerticalAlignment="Bottom" Stroke="DimGray" StrokeThickness="2"> + <!--<Rectangle.Effect> <DropShadowEffect ShadowDepth="1" Opacity="1" Color="Black" /> </Rectangle.Effect>--> - </Rectangle> - </Grid> + </Rectangle> + </Grid> - <Grid x:Name="gridEmbedded" Width="70" Height="100" Canvas.Left="80" Canvas.Top="331" IsHitTestVisible="True" SnapsToDevicePixels="True"> - <Image Source="../Images/ti-tm4c129x.png" RenderOptions.BitmapScalingMode="Fant"></Image> - </Grid> + <Grid x:Name="gridEmbedded" Width="70" Height="100" Canvas.Left="80" Canvas.Top="331" IsHitTestVisible="True" SnapsToDevicePixels="True"> + <Image Source="../Images/ti-tm4c129x.png" RenderOptions.BitmapScalingMode="Fant"></Image> + </Grid> - <Grid Width="61" IsHitTestVisible="True" SnapsToDevicePixels="True" ClipToBounds="True" Height="42" Canvas.Left="85" Canvas.Top="385"> - <Grid.RowDefinitions> - <RowDefinition Height="1*" /> - </Grid.RowDefinitions> + <Grid Width="61" IsHitTestVisible="True" SnapsToDevicePixels="True" ClipToBounds="True" Height="42" Canvas.Left="85" Canvas.Top="385"> + <Grid.RowDefinitions> + <RowDefinition Height="1*" /> + </Grid.RowDefinitions> - <StackPanel Orientation="Horizontal"> - <Image Source="../Images/embedded.png" Width="10" VerticalAlignment="Center" Margin="1" RenderOptions.BitmapScalingMode="Fant"></Image> - <TextBlock VerticalAlignment="Center" Padding="1" Foreground="{StaticResource FSE_GrayBrush}" IsHitTestVisible="False" FontSize="5" TextAlignment="Center" TextWrapping="Wrap" Height="15" Margin="0,6,0,0" Width="47"><Run Text="{Binding Configuration.EmbeddedFirmwareVersion.Name}"/><Run Text=" "/><Run Text="{Binding Configuration.EmbeddedFirmwareVersion.Version}"/></TextBlock> - </StackPanel> - </Grid> + <StackPanel Orientation="Horizontal"> + <Image Source="../Images/embedded.png" Width="10" VerticalAlignment="Center" Margin="1" RenderOptions.BitmapScalingMode="Fant"></Image> + <TextBlock VerticalAlignment="Center" Padding="1" Foreground="{StaticResource FSE_GrayBrush}" IsHitTestVisible="False" FontSize="5" TextAlignment="Center" TextWrapping="Wrap" Height="15" Margin="0,6,0,0" Width="47"><Run Text="{Binding Configuration.EmbeddedFirmwareVersion.Name}"/><Run Text=" "/><Run Text="{Binding Configuration.EmbeddedFirmwareVersion.Version}"/></TextBlock> + </StackPanel> + </Grid> - <TextBlock Canvas.Top="163" Canvas.Left="288" FontStyle="Italic" Foreground="Gray">Touch Panel</TextBlock> - <Grid Width="53" Height="55" Canvas.Top="184" Canvas.Left="279"> - <Rectangle Stroke="Gray" VerticalAlignment="Bottom" StrokeThickness="2" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> - <Rectangle Stroke="Gray" HorizontalAlignment="Right" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> - </Grid> + <TextBlock Canvas.Top="163" Canvas.Left="288" FontStyle="Italic" Foreground="Gray">Touch Panel</TextBlock> + <Grid Width="53" Height="55" Canvas.Top="184" Canvas.Left="279"> + <Rectangle Stroke="Gray" VerticalAlignment="Bottom" StrokeThickness="2" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> + <Rectangle Stroke="Gray" HorizontalAlignment="Right" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> + </Grid> - <TextBlock Canvas.Top="441" Canvas.Left="156" FontStyle="Italic" Foreground="Gray">Embedded Firmware</TextBlock> - <Grid Width="82" Height="26" Canvas.Top="410" Canvas.Left="158"> - <Rectangle Stroke="Gray" VerticalAlignment="Top" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> - <Rectangle Stroke="Gray" HorizontalAlignment="Right" StrokeThickness="1" StrokeDashArray="6" RenderTransformOrigin="0.5,0.5"/> - </Grid> + <TextBlock Canvas.Top="441" Canvas.Left="156" FontStyle="Italic" Foreground="Gray">Embedded Firmware</TextBlock> + <Grid Width="82" Height="26" Canvas.Top="410" Canvas.Left="158"> + <Rectangle Stroke="Gray" VerticalAlignment="Top" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> + <Rectangle Stroke="Gray" HorizontalAlignment="Right" StrokeThickness="1" StrokeDashArray="6" RenderTransformOrigin="0.5,0.5"/> + </Grid> - <TextBlock Canvas.Top="310" Canvas.Left="340" FontStyle="Italic" Foreground="Gray">Dispensers</TextBlock> - <Grid Width="53" Height="20" Canvas.Top="331" Canvas.Left="377"> - <Rectangle Stroke="Gray" VerticalAlignment="Bottom" StrokeThickness="2" StrokeDashArray="3" RenderTransformOrigin="0.5,0.5"/> - <Rectangle Stroke="Gray" HorizontalAlignment="Left" StrokeThickness="2" StrokeDashArray="3" RenderTransformOrigin="0.5,0.5"/> - </Grid> + <TextBlock Canvas.Top="310" Canvas.Left="340" FontStyle="Italic" Foreground="Gray">Dispensers</TextBlock> + <Grid Width="53" Height="20" Canvas.Top="331" Canvas.Left="377"> + <Rectangle Stroke="Gray" VerticalAlignment="Bottom" StrokeThickness="2" StrokeDashArray="3" RenderTransformOrigin="0.5,0.5"/> + <Rectangle Stroke="Gray" HorizontalAlignment="Left" StrokeThickness="2" StrokeDashArray="3" RenderTransformOrigin="0.5,0.5"/> + </Grid> - <!--<TextBlock Canvas.Top="395" Canvas.Left="331" FontStyle="Italic" Foreground="Gray">Mid Tanks</TextBlock> + <!--<TextBlock Canvas.Top="395" Canvas.Left="331" FontStyle="Italic" Foreground="Gray">Mid Tanks</TextBlock> <Grid Width="62" Height="29" Canvas.Top="418" Canvas.Left="357"> <Rectangle Stroke="Gray" VerticalAlignment="Bottom" StrokeThickness="2" StrokeDashArray="4" RenderTransformOrigin="0.5,0.5"/> <Rectangle Stroke="Gray" HorizontalAlignment="Left" StrokeThickness="1" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> </Grid>--> - <!--<TextBlock Canvas.Top="469" Canvas.Left="304" FontStyle="Italic" Foreground="Gray">Cartridges</TextBlock> + <!--<TextBlock Canvas.Top="469" Canvas.Left="304" FontStyle="Italic" Foreground="Gray">Cartridges</TextBlock> <Grid Width="87" Height="10" Canvas.Top="487" Canvas.Left="332"> <Rectangle Stroke="Gray" VerticalAlignment="Bottom" StrokeThickness="2" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> <Rectangle Stroke="Gray" HorizontalAlignment="Left" StrokeThickness="2" StrokeDashArray="5" RenderTransformOrigin="0.5,0.5"/> </Grid>--> - <Grid x:Name="gridTablet" Width="67" IsHitTestVisible="True" SnapsToDevicePixels="True" ClipToBounds="True" Height="90" Canvas.Left="188" Canvas.Top="198"> - <Grid.RowDefinitions> - <RowDefinition Height="1*" /> - <RowDefinition Height="1*" /> - <RowDefinition Height="1*" /> - </Grid.RowDefinitions> + <Grid x:Name="gridTablet" Width="67" IsHitTestVisible="True" SnapsToDevicePixels="True" ClipToBounds="True" Height="90" Canvas.Left="188" Canvas.Top="198"> + <Grid.RowDefinitions> + <RowDefinition Height="1*" /> + <RowDefinition Height="1*" /> + <RowDefinition Height="1*" /> + </Grid.RowDefinitions> - <StackPanel> - <Image Source="../Images/tablet.png" Width="10" Margin="2" RenderOptions.BitmapScalingMode="Fant"></Image> - <TextBlock Padding="2 0 2 0" Foreground="{StaticResource FSE_GrayBrush}" IsHitTestVisible="False" FontSize="6" TextAlignment="Center" TextWrapping="Wrap"> + <StackPanel> + <Image Source="../Images/tablet.png" Width="10" Margin="2" RenderOptions.BitmapScalingMode="Fant"></Image> + <TextBlock Padding="2 0 2 0" Foreground="{StaticResource FSE_GrayBrush}" IsHitTestVisible="False" FontSize="6" TextAlignment="Center" TextWrapping="Wrap"> <Run Text="{Binding Configuration.ApplicationDisplayPanelVersion.Name}"></Run> <Run Text="{Binding Configuration.ApplicationDisplayPanelVersion.Version}"></Run> - </TextBlock> - </StackPanel> + </TextBlock> + </StackPanel> - <StackPanel Grid.Row="3" > - <Image Source="../Images/application-firmware.png" Width="10" Margin="2" RenderOptions.BitmapScalingMode="Fant"></Image> - <TextBlock Padding="2 0 2 0" IsHitTestVisible="False" Foreground="{StaticResource FSE_GrayBrush}" FontSize="6" TextAlignment="Center" TextWrapping="Wrap"> + <StackPanel Grid.Row="3" > + <Image Source="../Images/application-firmware.png" Width="10" Margin="2" RenderOptions.BitmapScalingMode="Fant"></Image> + <TextBlock Padding="2 0 2 0" IsHitTestVisible="False" Foreground="{StaticResource FSE_GrayBrush}" FontSize="6" TextAlignment="Center" TextWrapping="Wrap"> <Run Text="{Binding Configuration.ApplicationFirmwareVersion.Name}"></Run> <Run Text="{Binding Configuration.ApplicationFirmwareVersion.Version}"></Run> - </TextBlock> - </StackPanel> + </TextBlock> + </StackPanel> - <StackPanel Grid.Row="1" > - <Image Source="../Images/android.png" Width="10" Margin="2" RenderOptions.BitmapScalingMode="Fant"></Image> - <TextBlock Padding="2 0 2 0" IsHitTestVisible="False" Foreground="{StaticResource FSE_GrayBrush}" FontSize="6" TextAlignment="Center" TextWrapping="Wrap"> + <StackPanel Grid.Row="1" > + <Image Source="../Images/android.png" Width="10" Margin="2" RenderOptions.BitmapScalingMode="Fant"></Image> + <TextBlock Padding="2 0 2 0" IsHitTestVisible="False" Foreground="{StaticResource FSE_GrayBrush}" FontSize="6" TextAlignment="Center" TextWrapping="Wrap"> <Run Text="{Binding Configuration.ApplicationOsVersion.Name}"></Run> <Run Text="{Binding Configuration.ApplicationOsVersion.Version}"></Run> + </TextBlock> + </StackPanel> + </Grid> + </Canvas> + + </Grid> + + </Grid> + </Viewbox> + </Grid> + + <Grid> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="Visibility" Value="Hidden"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Type}" Value="Eureka"> + <Setter Property="Visibility" Value="Visible"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + <Viewbox MaxWidth="1200" Grid.Row="1" Margin="25 0 0 0"> + <Grid IsHitTestVisible="False" VerticalAlignment="Top"> + + <Image IsHitTestVisible="False" Source="{StaticResource FSE_Machine_Eureka_Full}" MaxWidth="1000" Margin="-150 -50 0 0" RenderOptions.BitmapScalingMode="Fant"/> + + <StackPanel Margin="160 150 0 0" Width="410" HorizontalAlignment="Left"> + <UniformGrid TextElement.Foreground="#252525" Rows="1" Columns="10" TextElement.FontSize="20"> + <TextBlock HorizontalAlignment="Center">1</TextBlock> + <TextBlock HorizontalAlignment="Center">2</TextBlock> + <TextBlock HorizontalAlignment="Center">3</TextBlock> + <TextBlock HorizontalAlignment="Center">4</TextBlock> + <TextBlock HorizontalAlignment="Center">5</TextBlock> + <TextBlock HorizontalAlignment="Center">6</TextBlock> + <TextBlock HorizontalAlignment="Center">7</TextBlock> + <TextBlock HorizontalAlignment="Center">8</TextBlock> + <TextBlock HorizontalAlignment="Center">9</TextBlock> + <TextBlock HorizontalAlignment="Center">10</TextBlock> + </UniformGrid> + + <Grid Height="218"> + <ListBox ItemsSource="{Binding Configuration.IdsPacks}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Background="Transparent"> + <ListBox.ItemContainerStyle> + <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> + <Setter Property="Padding" Value="0"></Setter> + <Setter Property="VerticalContentAlignment" Value="Stretch"></Setter> + <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> + </Style> + </ListBox.ItemContainerStyle> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <UniformGrid Columns="10"></UniformGrid> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*"/> + <RowDefinition Height="30"/> + </Grid.RowDefinitions> + <UniformGrid Columns="1" Rows="2"> + <Grid Margin="2"> + <Image IsHitTestVisible="False" Source="../Images/dispenser.png" RenderOptions.BitmapScalingMode="Fant"> + <Image.Style> + <Style TargetType="Image"> + <Style.Triggers> + <DataTrigger Binding="{Binding Dispenser}" Value="{x:Null}"> + <Setter Property="Opacity" Value="0.2"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> + <Rectangle IsHitTestVisible="False" Margin="14 25 13 34"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + + <Grid Margin="2"> + <Image IsHitTestVisible="False" Stretch="Fill" Source="../Images/mid-tank.png" RenderOptions.BitmapScalingMode="Fant"> + <Image.Style> + <Style TargetType="Image"> + <Style.Triggers> + <DataTrigger Binding="{Binding MidTankType}" Value="{x:Null}"> + <Setter Property="Opacity" Value="0.2"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style> + </Image> + <Rectangle IsHitTestVisible="False" Margin="4 25 4 1"> + <Rectangle.Fill> + <LinearGradientBrush StartPoint="0,0" EndPoint="0,0.8" Opacity="0.8"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/> + </LinearGradientBrush> + </Rectangle.Fill> + </Rectangle> + </Grid> + </UniformGrid> + + <Grid Grid.Row="1" Margin="3" IsHitTestVisible="False"> + <Grid.Style> + <Style TargetType="Grid"> + <Style.Triggers> + <DataTrigger Binding="{Binding CartridgeType}" Value="{x:Null}"> + <Setter Property="Opacity" Value="0.2"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + <Border BorderBrush="#252525" BorderThickness="1" CornerRadius="3"> + <Border.Background> + <LinearGradientBrush> + <GradientStop Color="#FF252525"/> + <GradientStop Color="#FF838383" Offset="1"/> + </LinearGradientBrush> + </Border.Background> + </Border> + <Border BorderBrush="#252525" BorderThickness="1" CornerRadius="3"> + <Border.Background> + <LinearGradientBrush Opacity="0.7"> + <GradientStop Offset="0" Color="Transparent" /> + <GradientStop Offset="1" Color="{Binding LiquidType.Color,Converter={StaticResource ColorToIntegerConverter}}"/> + </LinearGradientBrush> + </Border.Background> + </Border> + </Grid> + </Grid> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ListBox> + + <Grid Margin="0 50 0 0"> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="Visibility" Value="Hidden"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Configuration.IdsPacks.Count}" Value="0"> + <Setter Property="Visibility" Value="Visible"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" FontWeight="Bold" Foreground="{StaticResource FSE_GrayBrush}">NO IDS PACKS</TextBlock> + </Grid> + + <Rectangle VerticalAlignment="Bottom" Stroke="DimGray" StrokeThickness="2"> + <!--<Rectangle.Effect> + <DropShadowEffect ShadowDepth="1" Opacity="1" Color="Black" /> + </Rectangle.Effect>--> + </Rectangle> + </Grid> + </StackPanel> + + <Border Margin="150 30 0 0" BorderThickness="1" IsHitTestVisible="False" HorizontalAlignment="Left" VerticalAlignment="Top"> + <StackPanel Orientation="Horizontal"> + <Image Source="../Images/hardware.png" Width="30" VerticalAlignment="Center" Margin="5" RenderOptions.BitmapScalingMode="Fant"></Image> + <TextBlock Padding="2 0 2 0" VerticalAlignment="Center" TextAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}" IsHitTestVisible="False" FontSize="20" TextWrapping="Wrap"> + <Run Text="{Binding Configuration.HardwareVersion.Name}"></Run> + <Run Text="{Binding Configuration.HardwareVersion.Version}"></Run> </TextBlock> </StackPanel> - </Grid> - </Canvas> - </Grid> - </Viewbox> + </Border> + </Grid> + </Viewbox> + </Grid> </Grid> </UserControl> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/emulator.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/emulator.png Binary files differnew file mode 100644 index 000000000..cd3478ab2 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/emulator.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/eureka.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/eureka.png Binary files differnew file mode 100644 index 000000000..212d391d4 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/eureka.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/signalr.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/signalr.png Binary files differnew file mode 100644 index 000000000..20d329640 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/signalr.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/tcp.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/tcp.png Binary files differnew file mode 100644 index 000000000..a19a64fec --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/tcp.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/ts1800.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/ts1800.png Binary files differnew file mode 100644 index 000000000..116e1e9c7 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/ts1800.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/usb.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/usb.png Binary files differnew file mode 100644 index 000000000..d0b917b44 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/usb.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/wifi.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/wifi.png Binary files differnew file mode 100644 index 000000000..8c4bfebc4 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/Connections/wifi.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/eureka_full.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/eureka_full.png Binary files differnew file mode 100644 index 000000000..484bb2ac1 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/eureka_full.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/eureka_small.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/eureka_small.png Binary files differnew file mode 100644 index 000000000..c9da4ae29 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/eureka_small.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/machines.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/machines.png Binary files differnew file mode 100644 index 000000000..788d1e67b --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/machines.png diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml index 792826d31..e10b0678d 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml @@ -22,6 +22,7 @@ <Color x:Key="FSE_MessageBoxTitleHeaderBackgroundColor">#404040</Color> <Color x:Key="FSE_UsbColor">#FF6F6F</Color> + <Color x:Key="FSE_LanColor">#EA6FFF</Color> <Color x:Key="FSE_WifiColor">#58C13B</Color> <Color x:Key="FSE_SignalRColor">#6DDAFF</Color> <Color x:Key="FSE_EmulatorColor">#F3FF6D</Color> @@ -66,6 +67,7 @@ <SolidColorBrush x:Key="FSE_MessageBoxTitleHeaderBackgroundBrush" Color="{StaticResource FSE_MessageBoxTitleHeaderBackgroundColor}"></SolidColorBrush> <SolidColorBrush x:Key="FSE_UsbBrush" Color="{StaticResource FSE_UsbColor}"></SolidColorBrush> + <SolidColorBrush x:Key="FSE_LanBrush" Color="{StaticResource FSE_LanColor}"></SolidColorBrush> <SolidColorBrush x:Key="FSE_WifiBrush" Color="{StaticResource FSE_WifiColor}"></SolidColorBrush> <SolidColorBrush x:Key="FSE_SignalRBrush" Color="{StaticResource FSE_SignalRColor}"></SolidColorBrush> <SolidColorBrush x:Key="FSE_EmulatorBrush" Color="{StaticResource FSE_EmulatorColor}"></SolidColorBrush> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Controls.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Controls.xaml index e2b01843e..0204be2ea 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Controls.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Controls.xaml @@ -15,6 +15,9 @@ <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Controls/FSEGroupBox.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Controls/FSERoundedCornersComboBox.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Controls/SelectionComboBox.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Controls/MachineConnectionIcon.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Controls/MachineIcon.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Controls/MachineIconFull.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Images.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Images.xaml index 91bf1816f..e69b69e44 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Images.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Images.xaml @@ -4,7 +4,10 @@ <BitmapImage x:Key="FSE_Machine_Big" UriSource="../Images/machine_big.png" /> <BitmapImage x:Key="FSE_Machine_Small" UriSource="../Images/machine_small.png" /> + <BitmapImage x:Key="FSE_Machine_Eureka_Small" UriSource="../Images/eureka_small.png" /> <BitmapImage x:Key="FSE_Machine_Full" UriSource="../Images/machine_full.png" /> + <BitmapImage x:Key="FSE_Machine_Eureka_Full" UriSource="../Images/eureka_full.png" /> + <BitmapImage x:Key="FSE_Machines_Full" UriSource="../Images/machines.png" /> <BitmapImage x:Key="FSE_Twine_Logo" UriSource="../Images/twine_logo.png" /> <BitmapImage x:Key="FSE_Twine_Logo_Colored" UriSource="../Images/twine_logo_colored.png" /> <BitmapImage x:Key="FSE_PPC" UriSource="../Images/tablet.png" /> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Styles.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Styles.xaml index 4b5d8f8d2..c7e36cafa 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Styles.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Styles.xaml @@ -4,6 +4,7 @@ xmlns:actions="clr-namespace:Tango.FSE.Common.EventTriggerActions" xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:commonControls="clr-namespace:Tango.FSE.Common.Controls" xmlns:wpf="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" @@ -625,7 +626,7 @@ <Setter.Value> <DataTemplate> <DockPanel VerticalAlignment="Center"> - <Image RenderOptions.BitmapScalingMode="Fant" Source="{StaticResource FSE_Machine_Small}" Width="24" /> + <commonControls:MachineIcon Height="24" /> <StackPanel VerticalAlignment="Center" Margin="10 0 0 0" Orientation="Horizontal"> <TextBlock Text="{Binding SerialNumber}" FontSize="{StaticResource FSE_SmallFontSize}"></TextBlock> <TextBlock Margin="10 0 0 0" FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding Name}"></TextBlock> @@ -638,7 +639,7 @@ <Setter.Value> <DataTemplate> <DockPanel VerticalAlignment="Center"> - <Image RenderOptions.BitmapScalingMode="Fant" Source="{StaticResource FSE_Machine_Small}" Width="32" /> + <commonControls:MachineIcon Height="32" /> <StackPanel Margin="5 0 0 0"> <TextBlock Text="{Binding SerialNumber}"></TextBlock> <TextBlock Margin="0 5 0 0" FontSize="{StaticResource FSE_SmallerFontSize}" Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding Name}"></TextBlock> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj index 95ee0b2f5..82d62ff14 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj @@ -190,6 +190,9 @@ <Compile Include="Controls\FSEPanel.cs" /> <Compile Include="Controls\FSETabControl.cs" /> <Compile Include="Controls\IconButton.cs" /> + <Compile Include="Controls\MachineConnectionIcon.cs" /> + <Compile Include="Controls\MachineIcon.cs" /> + <Compile Include="Controls\MachineIconFull.cs" /> <Compile Include="Controls\MachineView.xaml.cs"> <DependentUpon>MachineView.xaml</DependentUpon> </Compile> @@ -380,6 +383,18 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Controls\MachineConnectionIcon.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Controls\MachineIcon.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Controls\MachineIconFull.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Controls\MachineView.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -670,7 +685,36 @@ <Resource Include="Images\shadow_right.png" /> <Resource Include="Images\shadow_top.png" /> </ItemGroup> - <ItemGroup /> + <ItemGroup> + <Resource Include="Images\Connections\emulator.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\Connections\signalr.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\Connections\tcp.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\Connections\ts1800.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\Connections\usb.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\Connections\wifi.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\Connections\eureka.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\eureka_full.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\eureka_small.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\machines.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <PreBuildEvent> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Themes/Generic.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Themes/Generic.xaml index 9b1bd93cf..994dfc6ba 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Themes/Generic.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Themes/Generic.xaml @@ -3,5 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Tango.FSE.Common"> + </ResourceDictionary> |
