diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml | 68 |
1 files changed, 24 insertions, 44 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml index 4208c2878..ccab634db 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml @@ -5,6 +5,7 @@ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:integration="clr-namespace:Tango.Integration.Services;assembly=Tango.Integration" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" @@ -52,58 +53,37 @@ <Grid Grid.Row="1"> <ListBox ItemsSource="{Binding Scanner.AvailableMachines}" SelectedItem="{Binding SelectedMachine}" Margin="0 0 0 7" BorderThickness="1" BorderBrush="Gainsboro"> - <ListBox.ItemTemplate> - <DataTemplate> - <Grid> - <StackPanel Orientation="Horizontal"> - <StackPanel.Style> - <Style TargetType="StackPanel"> - <Setter Property="Visibility" Value="Visible"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding Type}" Value="USB"> - <Setter Property="Visibility" Value="Collapsed"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </StackPanel.Style> - <Image Source="/Images/external-bridge-tcp.png" Width="38" Height="38" RenderOptions.BitmapScalingMode="Fant"></Image> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="11"> + <ListBox.Resources> + <DataTemplate DataType="{x:Type integration:ExternalBridgeTcpClient}"> + <StackPanel Orientation="Horizontal"> + <Image Source="/Images/external-bridge-tcp.png" Width="38" Height="38" RenderOptions.BitmapScalingMode="Fant"></Image> + <StackPanel Margin="10 0 0 0"> + <TextBlock FontSize="11"> <Run FontWeight="Bold">S/N:</Run> <Run Text="{Binding SerialNumber,Mode=OneWay}"></Run> - </TextBlock> - <TextBlock FontSize="11"> + </TextBlock> + <TextBlock FontSize="11"> <Run FontWeight="Bold">IP Address:</Run> <Run Text="{Binding IPAddress,Mode=OneWay}"></Run> - </TextBlock> - <TextBlock FontSize="11"> + </TextBlock> + <TextBlock FontSize="11"> <Run FontWeight="Bold">Organization:</Run> <Run Text="{Binding Organization,Mode=OneWay}"></Run> - </TextBlock> - </StackPanel> + </TextBlock> </StackPanel> - - <StackPanel Orientation="Horizontal"> - <StackPanel.Style> - <Style TargetType="StackPanel"> - <Setter Property="Visibility" Value="Collapsed"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding Type}" Value="USB"> - <Setter Property="Visibility" Value="Visible"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </StackPanel.Style> - <Image Source="/Images/external-bridge-usb.png" Width="38" Height="38" RenderOptions.BitmapScalingMode="Fant"></Image> - <StackPanel Margin="10 0 0 0"> - <TextBlock FontSize="11"> + </StackPanel> + </DataTemplate> + <DataTemplate DataType="{x:Type integration:ExternalBridgeUsbClient}"> + <StackPanel Orientation="Horizontal"> + <Image Source="/Images/external-bridge-usb.png" Width="38" Height="38" RenderOptions.BitmapScalingMode="Fant"></Image> + <StackPanel Margin="10 0 0 0"> + <TextBlock FontSize="11"> <Run FontWeight="Bold">Port:</Run> <Run Text="{Binding ComPort,Mode=OneWay}"></Run> - </TextBlock> - <TextBlock FontSize="11"> + </TextBlock> + <TextBlock FontSize="11"> <Run FontWeight="Bold">Device:</Run> <Run Text="{Binding Device,Mode=OneWay}"></Run> - </TextBlock> - </StackPanel> + </TextBlock> </StackPanel> - </Grid> + </StackPanel> </DataTemplate> - </ListBox.ItemTemplate> + </ListBox.Resources> </ListBox> <mahapps:MetroProgressBar VerticalAlignment="Bottom" Height="1" IsIndeterminate="True"></mahapps:MetroProgressBar> |
