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 | 48 |
1 files changed, 20 insertions, 28 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..1626e67ef 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" @@ -43,7 +44,7 @@ </Grid.RowDefinitions> <Grid> - <TextBlock VerticalAlignment="Center" Margin="0 0 0 0" Text="Scanning for machine on your local network..."></TextBlock> + <TextBlock VerticalAlignment="Center" Margin="0 0 0 0" Text="Scanning for machines on your local environment..."></TextBlock> <!--<Button Command="{Binding ScanCommand}" HorizontalAlignment="Right" Width="40" Padding="0" Style="{StaticResource MaterialDesignFlatButton}" Foreground="Black" ToolTip="Scan"> <materialDesign:PackIcon Kind="Refresh" Width="24" Height="24"></materialDesign:PackIcon> @@ -51,21 +52,15 @@ </Grid> <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> + <ListBox ItemsSource="{Binding Scanner.AvailableMachines}" SelectedItem="{Binding SelectedMachine}" Margin="0 0 0 7" BorderThickness="1" BorderBrush="Gainsboro" HorizontalContentAlignment="Stretch"> + <ListBox.Resources> + <DataTemplate DataType="{x:Type integration:ExternalBridgeTcpClient}"> + <DockPanel> + <StackPanel Orientation="Vertical" VerticalAlignment="Center" DockPanel.Dock="Right" ToolTip="Allow incoming diagnostics data"> + <ToggleButton IsChecked="{Binding EnableDiagnostics}" VerticalAlignment="Center"></ToggleButton> + <TextBlock VerticalAlignment="Center" FontSize="10">Diagnostics</TextBlock> + </StackPanel> <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"> @@ -79,18 +74,15 @@ </TextBlock> </StackPanel> </StackPanel> - + </DockPanel> + </DataTemplate> + <DataTemplate DataType="{x:Type integration:ExternalBridgeUsbClient}"> + <DockPanel> + <StackPanel Orientation="Vertical" VerticalAlignment="Center" DockPanel.Dock="Right" ToolTip="Allow incoming diagnostics data"> + <ToggleButton IsChecked="{Binding EnableDiagnostics}" VerticalAlignment="Center"></ToggleButton> + <TextBlock VerticalAlignment="Center" FontSize="10">Diagnostics</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"> @@ -101,9 +93,9 @@ </TextBlock> </StackPanel> </StackPanel> - </Grid> + </DockPanel> </DataTemplate> - </ListBox.ItemTemplate> + </ListBox.Resources> </ListBox> <mahapps:MetroProgressBar VerticalAlignment="Bottom" Height="1" IsIndeterminate="True"></mahapps:MetroProgressBar> |
