|
|
|
@ -7,70 +7,5 @@ |
|
|
|
xmlns:local="clr-namespace:MultiTerm.Wpf.View.SettingsView" |
|
|
|
xmlns:local="clr-namespace:MultiTerm.Wpf.View.SettingsView" |
|
|
|
mc:Ignorable="d" |
|
|
|
mc:Ignorable="d" |
|
|
|
d:DesignHeight="50" d:DesignWidth="800"> |
|
|
|
d:DesignHeight="50" d:DesignWidth="800"> |
|
|
|
<UserControl.Resources> |
|
|
|
<local:NetworkSettingsView/> |
|
|
|
<!-- Converter --> |
|
|
|
|
|
|
|
<conv:IntToStringConverter x:Key="IntToStringConverter"/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</UserControl.Resources> |
|
|
|
|
|
|
|
<DockPanel> |
|
|
|
|
|
|
|
<Button DockPanel.Dock="Left" Command="{Binding ConnectDisconnectCommand}" Content="{Binding ConnectDisconnectButtonText}" Width="80"/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" IsEnabled="{Binding AreEditable}"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Hostname / IP --> |
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" ToolTipService.InitialShowDelay="200"> |
|
|
|
|
|
|
|
<StackPanel.ToolTip> |
|
|
|
|
|
|
|
<StackPanel Orientation="Vertical"> |
|
|
|
|
|
|
|
<TextBlock Text="Examples:"></TextBlock> |
|
|
|
|
|
|
|
<UniformGrid Columns="2"> |
|
|
|
|
|
|
|
<TextBlock Text="IPv4:"/> |
|
|
|
|
|
|
|
<TextBlock Text="'192.168.1.20'"/> |
|
|
|
|
|
|
|
<TextBlock Text="IPv6:"/> |
|
|
|
|
|
|
|
<TextBlock Text="'FE80::AB8'"/> |
|
|
|
|
|
|
|
<TextBlock Text="Hostname:"/> |
|
|
|
|
|
|
|
<TextBlock Text="'exampleDevice'"/> |
|
|
|
|
|
|
|
<TextBlock Text="Hostname+Domain:"/> |
|
|
|
|
|
|
|
<TextBlock Text="'exampleDevice.local'"/> |
|
|
|
|
|
|
|
</UniformGrid> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
</StackPanel.ToolTip> |
|
|
|
|
|
|
|
<Label Margin="10 0" VerticalAlignment="Center">Hostname/IP:</Label> |
|
|
|
|
|
|
|
<TextBox Text="{Binding Path=Hostname, Mode=TwoWay}" VerticalContentAlignment="Center" MinWidth="120" Width="Auto"/> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Port --> |
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" ToolTipService.InitialShowDelay="200"> |
|
|
|
|
|
|
|
<StackPanel.ToolTip> |
|
|
|
|
|
|
|
<TextBlock>Port Number (0...65535)</TextBlock> |
|
|
|
|
|
|
|
</StackPanel.ToolTip> |
|
|
|
|
|
|
|
<Label Margin="20 0 10 0" VerticalAlignment="Center" HorizontalAlignment="Center">Port:</Label> |
|
|
|
|
|
|
|
<TextBox Text="{Binding Path=Port, Mode=TwoWay, Converter={StaticResource IntToStringConverter}}" Width="50" VerticalContentAlignment="Center"/> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Display for Resolved IP Address --> |
|
|
|
|
|
|
|
<StackPanel Orientation="Vertical" Margin="20 0 10 0"> |
|
|
|
|
|
|
|
<StackPanel.Style> |
|
|
|
|
|
|
|
<Style TargetType="{x:Type StackPanel}"> |
|
|
|
|
|
|
|
<!-- Defaults to visible --> |
|
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/> |
|
|
|
|
|
|
|
<Style.Triggers> |
|
|
|
|
|
|
|
<!-- Collapsed when Resolved Address String length is 0 --> |
|
|
|
|
|
|
|
<DataTrigger Binding="{Binding Path=ResolvedAddress.Length, FallbackValue=0, TargetNullValue=0}" Value="0"> |
|
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/> |
|
|
|
|
|
|
|
</DataTrigger> |
|
|
|
|
|
|
|
</Style.Triggers> |
|
|
|
|
|
|
|
</Style> |
|
|
|
|
|
|
|
</StackPanel.Style> |
|
|
|
|
|
|
|
<Label VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="DarkGray">Resolved IP Address:</Label> |
|
|
|
|
|
|
|
<TextBox IsReadOnly="True" Text="{Binding ResolvedAddress}"/> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
<!--<StackPanel Orientation="Horizontal"> |
|
|
|
|
|
|
|
<Label Margin="20 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center" Padding="0">Serial Number:</Label> |
|
|
|
|
|
|
|
<Label Margin="5 0 10 0" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="DarkGray" FontSize="12" Padding="0 0">(optional)</Label> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
<TextBox Width="Auto" MinWidth="100" VerticalContentAlignment="Center" Text="{Binding Path=SerialNumber, Mode=TwoWay}" />--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</DockPanel> |
|
|
|
|
|
|
|
</UserControl> |
|
|
|
</UserControl> |
|
|
|
|