12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <Window x:Class="MV485.Dlg.DlgAddDevice"
- 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:MV485.Dlg"
- xmlns:local1="clr-namespace:MV485.helper"
- mc:Ignorable="d"
- Background="WhiteSmoke"
- WindowStartupLocation="CenterOwner"
- ResizeMode="NoResize"
- ShowInTaskbar="False"
- Title="添加485设备" Height="300" Width="340">
- <Grid Margin="10 10 10 0">
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="40" />
- </Grid.RowDefinitions>
- <Border Grid.Row="0" BorderBrush="#D3D3D3" BorderThickness="1" Background="White">
- <Grid Margin="10 5 10 5">
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="*" />
- <RowDefinition Height="*" />
- <RowDefinition Height="*" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="70" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Row="0" Grid.Column="0" Text="端口号" FontSize="14" VerticalAlignment="Center" />
- <ComboBox x:Name="cmbPortNames" Grid.Row="0" Grid.Column="1" Height="28"
- DisplayMemberPath="ModelName" SelectedValuePath="PortName"
- Padding="5 0 0 0" Margin="2" FontSize="13px" VerticalContentAlignment="Center"/>
- <TextBlock Grid.Row="1" Grid.Column="0" Text="波特率" FontSize="14" VerticalAlignment="Center" />
- <ComboBox x:Name="cmbBaudrate" Grid.Row="1" Grid.Column="1" Height="28"
- Padding="5 0 0 0" Margin="2" FontSize="13px"
- VerticalContentAlignment="Center"/>
- <TextBlock Grid.Row="2" Grid.Column="0" Text="485地址" FontSize="14" VerticalAlignment="Center" />
- <!--<ComboBox x:Name="cmbDevId" Width="60" Padding="5 0 0 0" Margin="0" FontSize="14"
- PreviewTextInput="TextBox_PreviewTextInput" VerticalContentAlignment="Center" Height="28" IsEditable="True"/>-->
- <local1:MultiSelectComboBox x:Name="mcmbAddress" Grid.Row="2" Grid.Column="1"
- Height="28" Padding="0 0 0 0" FontSize="13px" Margin="2"
- VerticalContentAlignment="Center" />
- <TextBlock Grid.Row="3" Grid.Column="0" Text="读取间隔" FontSize="14" VerticalAlignment="Center" />
- <Grid Margin="2" Grid.Row="3" Grid.Column="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <TextBox Grid.Column="0" Name="txtReadInterval" HorizontalAlignment="Stretch" Height="28"
- FontSize="14px" Foreground="#000000" VerticalAlignment="Center" Padding="2"/>
- <TextBlock Grid.Column="1" Text="分钟" Margin="5 0 0 0" VerticalAlignment="Center" />
- </Grid>
-
- <StackPanel Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Orientation="Horizontal">
- <CheckBox x:Name="chkRun" Content="启用" FontSize="14" IsChecked="True" Margin="0 0 20 0" />
- <CheckBox x:Name="chkReadImage" Content="读取照片" FontSize="14" IsChecked="False" />
- </StackPanel>
- </Grid>
- </Border>
-
- <!-- 按钮区域 -->
- <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
- <Button Name="btnOK" Content="确定" HorizontalAlignment="Center" Margin="0 0 20 0"
- VerticalAlignment="Center" Width="80" Height="26" Click="BtnOK_Click" />
- <Button Name="btnClose" Content="取消" HorizontalAlignment="Center"
- VerticalAlignment="Center" Width="80" Height="26" Click="BtnClose_Click" />
- </StackPanel>
- </Grid>
- </Window>
|