parent
5d94176a0a
commit
f55f6d5e16
@ -1,28 +0,0 @@
|
||||
<Window x:Class="SocketExample.ClientWindow"
|
||||
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:SocketExample"
|
||||
mc:Ignorable="d"
|
||||
Title="ClientWindow" Height="450" Width="800">
|
||||
<Grid>
|
||||
<StackPanel x:Name="InformationPanel" Margin="0,72,400,10" >
|
||||
<TextBlock x:Name="InfoTextBlock_Client" TextWrapping="Wrap" Text="" Height="352"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="0,0,0,375" Orientation="Horizontal">
|
||||
<Label Content="IP地址" Height="30" Margin="40 8 10 0"/>
|
||||
<TextBox TextWrapping="Wrap" x:Name="IPtextbox" Text="127.0.0.1" Width="200" Height="30" Margin="0 8 10 0"/>
|
||||
<Label Content="端口号" Height="30" Margin="40 8 10 0"/>
|
||||
<TextBox TextWrapping="Wrap" Text="8999" x:Name="Porttextbox" Width="200" Height="30" Margin="0 8 10 0"/>
|
||||
<Button Content="链接" Height="30" Margin="30 8 10 0" Click="Button_Click"/>
|
||||
<Button Content="清空" Height="30" Margin="30 8 10 0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="400,72,0,10">
|
||||
<TextBox TextWrapping="Wrap" x:Name="MessageTextBox_Client" Text="请输入需要发送的内容" Width="250" Height="100" Margin="10,72,0,10"/>
|
||||
<Button Content="发送" Margin="10,20,0,10" Width="250" Click="Button_Click_Send" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
@ -1,67 +0,0 @@
|
||||
<Window x:Class="SocketExample.MultiClientsWindow"
|
||||
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:SocketExample"
|
||||
mc:Ignorable="d"
|
||||
Title="MultiClientsWindow" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="10">
|
||||
<TextBlock Text="Panel生成数量:" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
||||
<TextBox x:Name="CountTextBox" Width="100" Margin="0,0,10,0"/>
|
||||
<Button Content="生成" Click="GenerateButton_Click" Padding="10,5"/>
|
||||
<Button Content="清空" Click="ClearButton_Click" Padding="10,5" Margin="10 0 0 0"/>
|
||||
</StackPanel>
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl x:Name="PanelContainer">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"></WrapPanel>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" Margin="5 5 5 5" Width="370" Height="400">
|
||||
<Border Width="Auto" Background="LightSkyBlue" >
|
||||
<TextBlock Width="Auto" Text="{Binding Text}"></TextBlock>
|
||||
</Border>
|
||||
<StackPanel Orientation="Horizontal" Width="360">
|
||||
<Label Content="IP地址" Height="30" Margin="10 8 0 0"/>
|
||||
<TextBox TextWrapping="Wrap" x:Name="IPtextbox" Text="{Binding IPtext}" Width="75" Height="30" Margin="10 8 0 0"/>
|
||||
<Label Content="端口号" Height="30" Margin="10 8 0 0"/>
|
||||
<TextBox TextWrapping="Wrap" Text="{Binding Porttext}" x:Name="Porttextbox" MinWidth="40" Height="30" Margin="10 8 0 0"/>
|
||||
<Button Content="链接" Height="30" Margin="10 8 0 0" Command="{Binding _linkcomn}"/>
|
||||
<Button Content="清空" Height="30" Margin="10 8 0 0" Command="{Binding _clearcomn}"/>
|
||||
<Button Content="断开" Height="30" Margin="10 8 10 0" Command="{Binding _disconnectcomn}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Width="360" Margin="0,5,0,5" Height="250">
|
||||
<Border Height="Auto" Width="200" BorderBrush="Black" BorderThickness="0.5" Margin="5,5,10,0" >
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock x:Name="InfoTextBlock_Client" TextWrapping="Wrap" Text="{Binding Infotext}" Height="Auto" Width="Auto" Margin="5,5,5,5"></TextBlock>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
|
||||
<StackPanel Orientation="Vertical" Margin="0,5,0,0" Width="140">
|
||||
<TextBox TextWrapping="Wrap" x:Name="MessageTextBox_Client" Text="{Binding MessageText}" Height="200" Margin="0,0,0,10"/>
|
||||
<Button Content="发送" Width="50" HorizontalAlignment="Center" Command="{Binding _sendcomn}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Window>
|
Binary file not shown.
After Width: | Height: | Size: 172 KiB |
@ -1,214 +0,0 @@
|
||||
<Window x:Class="SocketExample.TCPWindow"
|
||||
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:SocketExample"
|
||||
mc:Ignorable="d"
|
||||
Title="MultiClientsWindow" Height="450" Width="800">
|
||||
|
||||
<Window.Resources>
|
||||
<Style x:Key="SocketButton" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="ButtonBorder" CornerRadius="3">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#FF4A90E2" Offset="0"/>
|
||||
<GradientStop Color="#FF1E62D0" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<ContentPresenter HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="ButtonBorder" Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#FF5D9CEC" Offset="0"/>
|
||||
<GradientStop Color="#FF2D76DB" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="ButtonBorder" Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#FF3D7BC8" Offset="0"/>
|
||||
<GradientStop Color="#FF0D4BB6" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="10" Height="30">
|
||||
<TextBlock Text="Panel生成数量:" 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}"/>
|
||||
</StackPanel>
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl x:Name="PanelContainer">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"></WrapPanel>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderThickness="1" BorderBrush="Black" Margin="1">
|
||||
<StackPanel Orientation="Vertical" Margin="5 5 5 5" Width="360" >
|
||||
<Border Width="Auto" Background="LightSkyBlue" >
|
||||
<TextBlock Width="Auto" Text="{Binding Text}"></TextBlock>
|
||||
</Border>
|
||||
<StackPanel Orientation="Horizontal" Width="350">
|
||||
<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"/>
|
||||
</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"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Ellipse Width="20" Height="20" Fill="{Binding StateColour}" Margin="30 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}"/>
|
||||
<Button Content="断开" Height="30" Margin="10 8 10 0" Command="{Binding _disconnectcomn}" Style="{StaticResource SocketButton}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Width="350" Margin="0,5,0,5" Height="100">
|
||||
<Border Height="Auto" Width="200" BorderBrush="Black" BorderThickness="0.5" Margin="5,5,10,0" >
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock x:Name="InfoTextBlock_Client" TextWrapping="Wrap" Text="{Binding Infotext}" Height="Auto" Width="Auto" Margin="5,5,5,5"></TextBlock>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
|
||||
<StackPanel Orientation="Vertical" Margin="0,5,0,0" Width="130">
|
||||
|
||||
<TextBlock Text="请输入需要发送的内容:"></TextBlock>
|
||||
<TextBox TextWrapping="Wrap" x:Name="MessageTextBox_Client" Text="{Binding MessageText}" Height="50" Margin="0,0,0,5"/>
|
||||
<Button Content="发送" Width="50" HorizontalAlignment="Center" Command="{Binding _sendcomn}" Style="{StaticResource SocketButton}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<Border BorderBrush="Black" BorderThickness="0.5">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Label Content="{Binding EPCASC}"></Label>
|
||||
<Label Content="{Binding EPCinfo}"></Label>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="Black" BorderThickness="0.5">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Content="RSSI" HorizontalAlignment="Left"/>
|
||||
<Label Grid.Column="1" Content="Count" HorizontalAlignment="Center"/>
|
||||
<Label Grid.Column="2" Content="Time" HorizontalAlignment="Right" Margin="0 0 20 0"/>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="{Binding RSSIinfo}" HorizontalAlignment="Left"/>
|
||||
<Label Grid.Column="1" Grid.Row="1" Content="{Binding Countinfo}" HorizontalAlignment="Center"/>
|
||||
<Label Grid.Column="2" Grid.Row="1" Content="{Binding Timeinfo}" HorizontalAlignment="Right"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border BorderBrush="Black" BorderThickness="0.5">
|
||||
<Grid Margin="0 0 0 2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" HorizontalAlignment="Center" Content="GPIO状态"></Label>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||
<Label Content="GPIO1" HorizontalAlignment="Left"/>
|
||||
<Border BorderBrush="Black" BorderThickness="0.5">
|
||||
<Label Content="{Binding GPIO1}"></Label>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<Label Content="GPIO2" HorizontalAlignment="Left"/>
|
||||
<Border BorderBrush="Black" BorderThickness="0.5">
|
||||
<Label Content="{Binding GPIO2}"></Label>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<Label Content="GPIO3" HorizontalAlignment="Left"/>
|
||||
<Border BorderBrush="Black" BorderThickness="0.5">
|
||||
<Label Content="{Binding GPIO3}"></Label>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="3" Orientation="Horizontal">
|
||||
<Label Content="GPIO4" HorizontalAlignment="Left"/>
|
||||
<Border BorderBrush="Black" BorderThickness="0.5">
|
||||
<Label Content="{Binding GPIO4}"></Label>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border BorderBrush="Black" BorderThickness="0.5">
|
||||
<Grid Margin="0 0 0 2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<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>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Window>
|
@ -1,114 +0,0 @@
|
||||
<Window x:Class="SocketExample.TouchSocketWindow"
|
||||
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:SocketExample"
|
||||
mc:Ignorable="d"
|
||||
Title="MultiClientsWindow" Height="450" Width="800">
|
||||
|
||||
<Window.Resources>
|
||||
<Style x:Key="SocketButton" TargetType="Button" BasedOn="{StaticResource BaseButtonStyle}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border x:Name="ButtonBorder" CornerRadius="3">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#FF4A90E2" Offset="0"/>
|
||||
<GradientStop Color="#FF1E62D0" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<ContentPresenter HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="ButtonBorder" Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#FF5D9CEC" Offset="0"/>
|
||||
<GradientStop Color="#FF2D76DB" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="ButtonBorder" Property="Background">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#FF3D7BC8" Offset="0"/>
|
||||
<GradientStop Color="#FF0D4BB6" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="10" Height="30">
|
||||
<TextBlock Text="Panel生成数量:" 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}"/>
|
||||
</StackPanel>
|
||||
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl x:Name="PanelContainer">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"></WrapPanel>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderThickness="1" BorderBrush="Black" Margin="1">
|
||||
<StackPanel Orientation="Vertical" Margin="5 5 5 5" Width="360" Height="390">
|
||||
<Border Width="Auto" Background="LightSkyBlue" >
|
||||
<TextBlock Width="Auto" Text="{Binding Text}"></TextBlock>
|
||||
</Border>
|
||||
<StackPanel Orientation="Horizontal" Width="350">
|
||||
<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"/>
|
||||
<Label Content="端口号" Height="30" Margin="10 8 0 0"/>
|
||||
<TextBox TextWrapping="Wrap" Text="{Binding Porttext}" x:Name="Porttextbox" Width="40" Height="30" Margin="5 8 0 0"/>
|
||||
<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}"/>
|
||||
<Button Content="断开" Height="30" Margin="10 8 10 0" Command="{Binding _disconnectcomn}" Style="{StaticResource SocketButton}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Width="350" Margin="0,5,0,5" Height="300">
|
||||
<Border Height="Auto" Width="200" BorderBrush="Black" BorderThickness="0.5" Margin="5,5,10,0" >
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock x:Name="InfoTextBlock_Client" TextWrapping="Wrap" Text="{Binding Infotext}" Height="Auto" Width="Auto" Margin="5,5,5,5"></TextBlock>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
|
||||
<StackPanel Orientation="Vertical" Margin="0,5,0,0" Width="130">
|
||||
|
||||
<TextBlock Text="请输入需要发送的内容:"></TextBlock>
|
||||
<TextBox TextWrapping="Wrap" x:Name="MessageTextBox_Client" Text="{Binding MessageText}" Height="250" Margin="0,0,0,5"/>
|
||||
<Button Content="发送" Width="50" HorizontalAlignment="Center" Command="{Binding _sendcomn}" Style="{StaticResource SocketButton}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Window>
|
Loading…
Reference in New Issue