|
|
|
@ -5,7 +5,7 @@
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:local="clr-namespace:SocketExample"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
Title="MultiClientsWindow" Height="450" Width="800">
|
|
|
|
|
Title="RFID读写器多终端监控软件v1.01" Height="450" Width="800">
|
|
|
|
|
|
|
|
|
|
<Window.Resources>
|
|
|
|
|
<Style x:Key="SocketButton" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}">
|
|
|
|
@ -56,7 +56,7 @@
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="10" Height="30">
|
|
|
|
|
<TextBlock Text="Panel生成数量:" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
|
|
|
|
<TextBlock Text="监控终端生成数量:" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
|
|
|
|
<TextBox x:Name="CountTextBox" Width="100" Margin="0,0,10,0" VerticalAlignment="Center"/>
|
|
|
|
|
<Button Content="生成" Click="GenerateButton_Click" Width="50" Margin="10 0 0 0" Style="{StaticResource SocketButton}"/>
|
|
|
|
|
<Button Content="清空" Click="ClearButton_Click" Width="50" Margin="10 0 0 0" Style="{StaticResource SocketButton}"/>
|
|
|
|
@ -80,14 +80,15 @@
|
|
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
<Label Content="IP地址" Height="30" Margin="10 8 0 0"/>
|
|
|
|
|
<TextBox TextWrapping="Wrap" x:Name="IPtextbox" Text="{Binding IPtext}" Width="75" Height="30" Margin="5 8 0 0"/>
|
|
|
|
|
<TextBox TextWrapping="Wrap" x:Name="IPtextbox" Text="{Binding IPtext}" Width="100" Height="20" Margin="5 8 0 0"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
<Label Content="端口号" Height="30" Margin="10 8 0 0"/>
|
|
|
|
|
<TextBox TextWrapping="Wrap" Text="{Binding Porttext}" x:Name="Porttextbox" Width="45" Height="30" Margin="5 8 0 0"/>
|
|
|
|
|
<TextBox TextWrapping="Wrap" Text="{Binding Porttext}" x:Name="Porttextbox" Width="45" Height="20" Margin="5 8 0 0"/>
|
|
|
|
|
<Button Content="读取" Height="20" Width="40" Margin="10 8 0 0" Command="{Binding _readcomn}" Style="{StaticResource SocketButton}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<Ellipse Width="20" Height="20" Fill="{Binding StateColour}" Margin="30 8 0 0"/>
|
|
|
|
|
<Ellipse Width="20" Height="20" Fill="{Binding StateColour}" Margin="20 8 0 0"/>
|
|
|
|
|
<Label Height="30" Content="{Binding LinkState}" Margin="2 8 0 0"></Label>
|
|
|
|
|
<Button Content="连接" Height="30" Margin="10 8 0 0" Command="{Binding _linkcomn}" Style="{StaticResource SocketButton}"/>
|
|
|
|
|
<Button Content="清空" Height="30" Margin="10 8 0 0" Command="{Binding _clearcomn}" Style="{StaticResource SocketButton}"/>
|
|
|
|
@ -165,9 +166,10 @@
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Label Grid.Row="0" HorizontalAlignment="Center" Content="GPIO状态"></Label>
|
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
|
<Grid Grid.Row="2">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
@ -177,25 +179,57 @@
|
|
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
|
|
|
|
<Label Content="GPO1" HorizontalAlignment="Left"/>
|
|
|
|
|
<Border BorderBrush="Black" BorderThickness="0.5">
|
|
|
|
|
<Label Content="{Binding GPIO1}"></Label>
|
|
|
|
|
<Label Content="{Binding GPO1}"></Label>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
|
|
|
<Label Content="GPO2" HorizontalAlignment="Left"/>
|
|
|
|
|
<Border BorderBrush="Black" BorderThickness="0.5">
|
|
|
|
|
<Label Content="{Binding GPIO2}"></Label>
|
|
|
|
|
<Label Content="{Binding GPO2}"></Label>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
|
|
|
|
<Label Content="GPO3" HorizontalAlignment="Left"/>
|
|
|
|
|
<Border BorderBrush="Black" BorderThickness="0.5">
|
|
|
|
|
<Label Content="{Binding GPIO3}"></Label>
|
|
|
|
|
<Label Content="{Binding GPO3}"></Label>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Column="3" Orientation="Horizontal">
|
|
|
|
|
<Label Content="GPO4" HorizontalAlignment="Left"/>
|
|
|
|
|
<Border BorderBrush="Black" BorderThickness="0.5">
|
|
|
|
|
<Label Content="{Binding GPIO4}"></Label>
|
|
|
|
|
<Label Content="{Binding GPO4}"></Label>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
<Grid Grid.Row="1" Margin="0 0 0 5">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
|
|
|
|
<Label Content="GPI1" HorizontalAlignment="Left" Margin="0 0 6 0"/>
|
|
|
|
|
<Border BorderBrush="Black" BorderThickness="0.5">
|
|
|
|
|
<Label Content="{Binding GPI1}"></Label>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
|
|
|
<Label Content="GPI2" HorizontalAlignment="Left" Margin="0 0 6 0"/>
|
|
|
|
|
<Border BorderBrush="Black" BorderThickness="0.5">
|
|
|
|
|
<Label Content="{Binding GPI2}"></Label>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
|
|
|
|
<Label Content="GPI3" HorizontalAlignment="Left" Margin="0 0 6 0"/>
|
|
|
|
|
<Border BorderBrush="Black" BorderThickness="0.5">
|
|
|
|
|
<Label Content="{Binding GPI3}"></Label>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Column="3" Orientation="Horizontal">
|
|
|
|
|
<Label Content="GPI4" HorizontalAlignment="Left" Margin="0 0 6 0"/>
|
|
|
|
|
<Border BorderBrush="Black" BorderThickness="0.5">
|
|
|
|
|
<Label Content="{Binding GPI4}"></Label>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
@ -210,18 +244,19 @@
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Label Grid.Row="0" Content="版本信息" HorizontalAlignment="Center"/>
|
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
|
|
|
|
<Label Content="模块型号:" HorizontalAlignment="Left"/>
|
|
|
|
|
<Label Content="{Binding moduleInfo}"></Label>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
|
|
|
|
<Label Content="主板硬件号:" HorizontalAlignment="Left"/>
|
|
|
|
|
<Label Content="{Binding motherboardHardware}"></Label>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Row="3" Orientation="Horizontal">
|
|
|
|
|
<Label Content="主板固件号:" HorizontalAlignment="Left"/>
|
|
|
|
|
<Label Content="{Binding motherboardFirmware}"></Label>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Label Grid.Column="0" Content="模块型号:" HorizontalAlignment="Left"/>
|
|
|
|
|
<Label Grid.Column="1" Content="{Binding moduleInfo}"></Label>
|
|
|
|
|
<Label Grid.Column="2" Content="主板固件号:" HorizontalAlignment="Left"/>
|
|
|
|
|
<Label Grid.Column="3" Content="{Binding motherboardFirmware}"></Label>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|