96 lines
4.5 KiB
XML
96 lines
4.5 KiB
XML
<Grid x:Class="Common.UI.Views.SIRTBroadcasters"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="clr-namespace:Common.UI.ViewModels">
|
|
<Grid.DataContext>
|
|
<vm:SIRTBroadcasterVM />
|
|
</Grid.DataContext>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Border BorderBrush="Gray"
|
|
BorderThickness="0, 0, 1, 1"
|
|
Grid.Column="0"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch">
|
|
<Grid HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Top">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<ComboBox Grid.Row="0"
|
|
IsEnabled="{Binding ComPortsEnabled}"
|
|
ItemsSource="{Binding PortNames}"
|
|
Margin="5, 5, 5, 0"
|
|
Padding="5, 3, 0, 3"
|
|
SelectedItem="{Binding PortName}"
|
|
Width="100"/>
|
|
<Button Command="{Binding AddSIRTCommand}"
|
|
Content="Add SIRT"
|
|
Grid.Row="1"
|
|
IsEnabled="{Binding AddEnabled}"
|
|
Margin="5, 5, 5, 0"
|
|
Padding="20, 3"
|
|
Width="100" />
|
|
<Button Command="{Binding ClearAllCommand}"
|
|
Content="Clear all"
|
|
Grid.Row="2"
|
|
IsEnabled="{Binding ClearEnabled}"
|
|
Margin="5, 5, 5, 5"
|
|
Padding="20, 3"
|
|
Width="100" />
|
|
</Grid>
|
|
</Border>
|
|
<Border BorderBrush="Gray"
|
|
BorderThickness="0, 0, 0, 1"
|
|
Grid.Column="1"
|
|
Grid.Row="0"
|
|
Grid.RowSpan="2"
|
|
HorizontalAlignment="Stretch"
|
|
IsEnabled="{Binding ComPortsEnabled}"
|
|
VerticalAlignment="Stretch">
|
|
<ItemsControl ItemsSource="{Binding Connections}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type vm:SIRTConnectionVM}">
|
|
<Grid Margin="0, 0, 5, 0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="100" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="100" />
|
|
<ColumnDefinition Width="100" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Label Background="WhiteSmoke" Grid.Column="0" Content="{Binding PortName}" Margin="5, 5, 5, 0" VerticalAlignment="Stretch" />
|
|
<Label Background="WhiteSmoke" Grid.Column="1" Content="{Binding HexId}" Margin="0, 5, 5, 0" VerticalAlignment="Stretch" />
|
|
<Label Background="WhiteSmoke" Grid.Column="2" Content="{Binding Frequency}" Margin="0, 5, 5, 0" VerticalAlignment="Stretch" />
|
|
<Label Background="WhiteSmoke" Grid.Column="3" Content="{Binding IsRunning}" Margin="0, 5, 5, 0" VerticalAlignment="Stretch" />
|
|
<Button Content="Reconnect"
|
|
Command="{Binding ReconnectCommand}"
|
|
Grid.Column="4"
|
|
IsEnabled="{Binding ReconnectEnabled}"
|
|
Margin="0, 5, 5, 0"
|
|
Padding="20, 3" />
|
|
<Button Content="Disconnect"
|
|
Command="{Binding DisconnectCommand}"
|
|
Grid.Column="5"
|
|
IsEnabled="{Binding DisconnectEnabled}"
|
|
Margin="0, 5, 5, 0"
|
|
Padding="10, 3" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Border>
|
|
</Grid>
|