67 lines
2.4 KiB
XML
67 lines
2.4 KiB
XML
<UserControl
|
|
x:Class="MECF.Framework.Simulator.Core.Commons.SocketTitleView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:MECF.Framework.Simulator.Core.Commons"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:DesignHeight="100"
|
|
d:DesignWidth="800"
|
|
Background="LightBlue"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<local:ConnectionStatusBackgroundConverter x:Key="connectionStatusBackgroundConverter" />
|
|
|
|
<Style TargetType="Label">
|
|
<Setter Property="FontSize" Value="16" />
|
|
<Setter Property="Padding" Value="10,0,10,0" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="50" />
|
|
<RowDefinition Height="50" />
|
|
</Grid.RowDefinitions>
|
|
<Label
|
|
Grid.Row="0"
|
|
Height="50"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Background="{Binding IsConnected, Converter={StaticResource connectionStatusBackgroundConverter}}"
|
|
Content="{Binding Title}"
|
|
FontSize="20" />
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
|
<TextBox
|
|
Width="120"
|
|
Height="35"
|
|
Margin="20,0,0,0"
|
|
VerticalContentAlignment="Center"
|
|
Text="{Binding LocalPortSetPoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
<Label Content="Listen port:" />
|
|
<Label Content="{Binding LocalPortSetPoint}" />
|
|
|
|
<Label Content="{Binding ConnectionStatus}" />
|
|
|
|
<Button
|
|
Width="100"
|
|
Height="35"
|
|
Command="{Binding EnableCommand}"
|
|
Content="Enable"
|
|
IsEnabled="{Binding IsEnableEnable}" />
|
|
<Button
|
|
Width="100"
|
|
Height="35"
|
|
Command="{Binding DisableCommand}"
|
|
Content="Disable"
|
|
IsEnabled="{Binding IsEnableDisable}" />
|
|
|
|
<Label Content="Connection:" />
|
|
<Label Content="{Binding RemoteConnection}" />
|
|
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|