|
|
|
|
@ -4,9 +4,12 @@
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
|
|
xmlns:controls="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
|
|
|
|
|
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
|
|
|
|
|
xmlns:local="clr-namespace:SocketExample"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
Title="RFID读写器多终端监控软件v1.062" Height="450" Width="800">
|
|
|
|
|
Title="RFID读写器多终端监控软件v1.07" Height="450" Width="800"
|
|
|
|
|
Background="Transparent" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterScreen">
|
|
|
|
|
|
|
|
|
|
<Window.Resources>
|
|
|
|
|
<Style x:Key="SocketButton" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}">
|
|
|
|
|
@ -51,18 +54,62 @@
|
|
|
|
|
</Style>
|
|
|
|
|
</Window.Resources>
|
|
|
|
|
|
|
|
|
|
<Border>
|
|
|
|
|
<Border CornerRadius="30" BorderThickness="2" BorderBrush="#ebedf3" Padding="10" MouseDown="Border_MouseDown" Background="#FFCFD5E5">
|
|
|
|
|
<Border CornerRadius="30">
|
|
|
|
|
<Border.Background>
|
|
|
|
|
<LinearGradientBrush>
|
|
|
|
|
<GradientStop Color="#fefefe" Offset="0"/>
|
|
|
|
|
<GradientStop Color="#ededef" Offset="1"/>
|
|
|
|
|
</LinearGradientBrush>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
<Border CornerRadius="30">
|
|
|
|
|
<Border.Background>
|
|
|
|
|
<DrawingBrush Opacity="0.2" TileMode="Tile" Viewport="0,0,300,80" ViewportUnits="Absolute">
|
|
|
|
|
<DrawingBrush.Transform>
|
|
|
|
|
<RotateTransform Angle="-45" CenterX="0" CenterY="0"/>
|
|
|
|
|
</DrawingBrush.Transform>
|
|
|
|
|
<DrawingBrush.Drawing>
|
|
|
|
|
<DrawingGroup>
|
|
|
|
|
<GeometryDrawing Brush="Transparent">
|
|
|
|
|
<GeometryDrawing.Geometry>
|
|
|
|
|
<RectangleGeometry Rect="0,0,110,75"/>
|
|
|
|
|
</GeometryDrawing.Geometry>
|
|
|
|
|
</GeometryDrawing>
|
|
|
|
|
<ImageDrawing ImageSource="/海威图标-横.png" Rect="5,5,100,60"/>
|
|
|
|
|
</DrawingGroup>
|
|
|
|
|
</DrawingBrush.Drawing>
|
|
|
|
|
</DrawingBrush>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="90"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="10" Height="30">
|
|
|
|
|
<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}"/>
|
|
|
|
|
<Border Grid.Row="0" CornerRadius="20" Background="{StaticResource PrimaryBrush}" Margin="10" Cursor="">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" Margin="10 0 0 0" VerticalAlignment="Center">
|
|
|
|
|
<TextBlock Text="监控终端生成数量:" VerticalAlignment="Center" Margin="0,0,10,0" Foreground="White" FontSize="15" FontWeight="SemiBold"/>
|
|
|
|
|
<TextBox x:Name="CountTextBox" Width="100" Margin="0,0,10,0" VerticalAlignment="Center" FontSize="15" FontWeight="SemiBold"/>
|
|
|
|
|
<Button Content="生成" Click="GenerateButton_Click" Height="40" Width="50" Margin="10 0 0 0" Style="{StaticResource FlatButton}"/>
|
|
|
|
|
<Button Content="清空" Click="ClearButton_Click" Height="40" Width="50" Margin="10 0 0 0" Style="{StaticResource FlatButton}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<Grid Grid.Column="1" HorizontalAlignment="Right" Margin="0 0 10 0" VerticalAlignment="Center">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Button x:Name="Minimize_Button" Grid.Column="0" Content="最小化" Height="40" Width="50" Style="{StaticResource FlatButton}" Margin="0 0 16 0" Click="Minimize_Button_Click"/>
|
|
|
|
|
<Button x:Name="Maxmize_Button" Grid.Column="1" Content="最大化" Height="40" Width="50" Style="{StaticResource FlatButton}" Margin="0 0 0 0" Click="Maxmize_Button_Click"/>
|
|
|
|
|
<Button x:Name="Shutdown_Button" Grid.Column="2" Content="关闭" Height="40" Width="50" Style="{StaticResource FlatButton}" Click="Shutdown_Button_Click"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
|
|
|
|
|
|
|
|
|
<ItemsControl x:Name="PanelContainer">
|
|
|
|
|
@ -73,19 +120,19 @@
|
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Border BorderThickness="1" BorderBrush="Black" Margin="1" Width="{Binding Borderwidth}" >
|
|
|
|
|
<Border Style="{StaticResource TerminalStyle}" Width="{Binding Borderwidth}">
|
|
|
|
|
<StackPanel Orientation="Vertical" Margin="5 5 5 5" >
|
|
|
|
|
<Border Width="Auto" Background="LightSkyBlue" >
|
|
|
|
|
<TextBox Width="Auto" Foreground="Black" Background="LightSkyBlue" Text="{Binding Text}" FontSize="14"></TextBox>
|
|
|
|
|
<Border Width="Auto" Background="LightSkyBlue" CornerRadius="6" Padding="3">
|
|
|
|
|
<TextBox Width="Auto" Foreground="Black" Background="LightSkyBlue" Text="{Binding Text}" BorderThickness="0" FontSize="15" FontWeight="SemiBold"></TextBox>
|
|
|
|
|
</Border>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="5 1 5 1">
|
|
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
<Label Content="IP地址" Height="30" Margin="10 8 0 0"/>
|
|
|
|
|
<Label Content="IP地址" Height="30" Margin="10 8 0 0" FontWeight="SemiBold"/>
|
|
|
|
|
<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"/>
|
|
|
|
|
<Label Content="端口号" Height="30" Margin="10 8 0 0" FontWeight="SemiBold"/>
|
|
|
|
|
<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>
|
|
|
|
|
@ -114,7 +161,7 @@
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<StackPanel Orientation="Vertical" Margin="0,2,0,0">
|
|
|
|
|
<TextBlock Text="请输入需要发送的内容:"></TextBlock>
|
|
|
|
|
<TextBlock Text="请输入需要发送的内容:" FontWeight="SemiBold"></TextBlock>
|
|
|
|
|
<TextBox TextWrapping="Wrap" x:Name="MessageTextBox_Client" Text="{Binding MessageText}" Height="50" Width="140" Margin="0,0,0,1"/>
|
|
|
|
|
<Button Content="发送" Width="40" Height="22" Command="{Binding _sendcomn}" Style="{StaticResource SocketButton}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
@ -129,8 +176,9 @@
|
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" Margin="0.5 0 0.5 0">
|
|
|
|
|
<Grid Margin="5">
|
|
|
|
|
<Border BorderThickness="0.5" CornerRadius="10" BorderBrush="Black" Padding="2.5 3 2.5 3" Margin="0.5 1 0.5 1">
|
|
|
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden">
|
|
|
|
|
<Grid Margin="0.5">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
@ -165,7 +213,7 @@
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
|
|
|
|
|
</Border>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
@ -176,7 +224,7 @@
|
|
|
|
|
<Border BorderBrush="Black" BorderThickness="0.5">
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="1 2 1 2">
|
|
|
|
|
<Label Content="触发动作:" FontWeight="Bold" FontSize="13"/>
|
|
|
|
|
<TextBox Text="{Binding ActionType}" Width="70" TextAlignment="Center" FontSize="13"/>
|
|
|
|
|
<TextBox Text="{Binding ActionType}" Width="70" TextAlignment="Center" VerticalContentAlignment="Center" FontSize="13"/>
|
|
|
|
|
<ComboBox x:Name="TextComboBox" Width="20" Height="20" ItemsSource="{Binding SendTextComboBox,Mode=TwoWay}">
|
|
|
|
|
<i:Interaction.Triggers>
|
|
|
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
|
|
|
@ -187,7 +235,7 @@
|
|
|
|
|
</i:Interaction.Triggers>
|
|
|
|
|
</ComboBox>
|
|
|
|
|
<Label Content="时间段:" FontWeight="Bold" FontSize="13"/>
|
|
|
|
|
<TextBox Text="{Binding TimeOut}" Width="50" TextAlignment="Center" FontSize="13"/>
|
|
|
|
|
<TextBox Text="{Binding TimeOut}" Width="50" TextAlignment="Center" VerticalContentAlignment="Center" FontSize="13"/>
|
|
|
|
|
<Button Content="发送" Width="50" Margin="15 2 0 2" Command="{Binding _sendactioncomn}" Style="{StaticResource SocketButton}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Border>
|
|
|
|
|
@ -318,6 +366,7 @@
|
|
|
|
|
|
|
|
|
|
</Border>
|
|
|
|
|
-->
|
|
|
|
|
<!--gpio部分-->
|
|
|
|
|
<Border BorderBrush="Black" BorderThickness="0.5">
|
|
|
|
|
<Grid Margin="0 0 0 2">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
@ -468,4 +517,6 @@
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</Border>
|
|
|
|
|
</Border>
|
|
|
|
|
</Window>
|
|
|
|
|
|