|
| 1 | +<Window x:Class="TCP_Server_Client_Tester.MainWindow" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 5 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 6 | + xmlns:local="clr-namespace:TCP_Server_Client_Tester" |
| 7 | + mc:Ignorable="d" |
| 8 | + Title="TCP Server Client Tester" Height="480" Width="640"> |
| 9 | + <Grid> |
| 10 | + <TabControl> |
| 11 | + <TabItem x:Name="serverTab" Header="Server"> |
| 12 | + <Grid> |
| 13 | + <Grid.ColumnDefinitions> |
| 14 | + <ColumnDefinition Width="10*" /> |
| 15 | + <ColumnDefinition Width="*" /> |
| 16 | + <ColumnDefinition Width="5*" /> |
| 17 | + </Grid.ColumnDefinitions> |
| 18 | + <Grid.RowDefinitions> |
| 19 | + <RowDefinition Height="*" /> |
| 20 | + </Grid.RowDefinitions> |
| 21 | + |
| 22 | + <Grid Grid.Column="0" Grid.Row="0"> |
| 23 | + <Grid.ColumnDefinitions> |
| 24 | + <ColumnDefinition Width="*"/> |
| 25 | + </Grid.ColumnDefinitions> |
| 26 | + <Grid.RowDefinitions> |
| 27 | + <RowDefinition Height="12*"/> |
| 28 | + <RowDefinition Height="*"/> |
| 29 | + <RowDefinition Height="*" /> |
| 30 | + </Grid.RowDefinitions> |
| 31 | + |
| 32 | + <TextBox x:Name="serverTextboxBig" Grid.Column="0" Grid.Row="0" Margin="5,5,5,5" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" IsReadOnly="True"/> |
| 33 | + |
| 34 | + <Grid Grid.Column="0" Grid.Row="1"> |
| 35 | + <Grid.ColumnDefinitions> |
| 36 | + <ColumnDefinition Width="3*" /> |
| 37 | + <ColumnDefinition Width="*" /> |
| 38 | + </Grid.ColumnDefinitions> |
| 39 | + <Grid.RowDefinitions> |
| 40 | + <RowDefinition Height="*" /> |
| 41 | + </Grid.RowDefinitions> |
| 42 | + <TextBox x:Name="serverSendTextbox1" Grid.Column="0" Grid.Row="0" Margin="5,5,5,5"/> |
| 43 | + <Button Content="Send" Grid.Column="1" Grid.Row="0" Margin="5,5,5,0" Height="20" VerticalAlignment="Top" Click="Button_Click"/> |
| 44 | + </Grid> |
| 45 | + |
| 46 | + <Grid Grid.Column="0" Grid.Row="2"> |
| 47 | + <Grid.ColumnDefinitions> |
| 48 | + <ColumnDefinition Width="3*" /> |
| 49 | + <ColumnDefinition Width="*" /> |
| 50 | + </Grid.ColumnDefinitions> |
| 51 | + <Grid.RowDefinitions> |
| 52 | + <RowDefinition Height="*" /> |
| 53 | + </Grid.RowDefinitions> |
| 54 | + <TextBox x:Name="serverSendTextbox2" Grid.Column="0" Grid.Row="0" Margin="5,5,5,5"/> |
| 55 | + <Button Content="Send" Grid.Column="1" Grid.Row="0" Margin="5,5,5,5" Click="Button_Click_1"/> |
| 56 | + </Grid> |
| 57 | + |
| 58 | + </Grid> |
| 59 | + |
| 60 | + <Grid Grid.Column="2" Grid.Row="0"> |
| 61 | + <Grid.ColumnDefinitions> |
| 62 | + <ColumnDefinition Width="*" /> |
| 63 | + </Grid.ColumnDefinitions> |
| 64 | + <Grid.RowDefinitions> |
| 65 | + <RowDefinition Height="*" /> |
| 66 | + <RowDefinition Height="*" /> |
| 67 | + <RowDefinition Height="*" /> |
| 68 | + <RowDefinition Height="*" /> |
| 69 | + <RowDefinition Height="*" /> |
| 70 | + <RowDefinition Height="*" /> |
| 71 | + <RowDefinition Height="*" /> |
| 72 | + <RowDefinition Height="*" /> |
| 73 | + <RowDefinition Height="*" /> |
| 74 | + <RowDefinition Height="*" /> |
| 75 | + <RowDefinition Height="*" /> |
| 76 | + <RowDefinition Height="*" /> |
| 77 | + <RowDefinition Height="*" /> |
| 78 | + <RowDefinition Height="*" /> |
| 79 | + </Grid.RowDefinitions> |
| 80 | + |
| 81 | + <Label Content="Port:" Grid.Column="0" Grid.Row="0" VerticalAlignment="Bottom"/> |
| 82 | + <TextBox x:Name="serverPort" Text="233" Grid.Column="0" Grid.Row="1" Margin="5,0,5,10"/> |
| 83 | + <Label Content="IP:" Grid.Column="0" Grid.Row="2" VerticalAlignment="Bottom"/> |
| 84 | + <TextBox x:Name="serverIP" Text="192.168.144.1" Grid.Column="0" Grid.Row="3" Margin="5,0,5,10"/> |
| 85 | + <Button x:Name="serverStartButton" Content="Listen" Grid.Column="0" Grid.Row="4" Margin="5,5,5,5" Background="LightGreen" FontWeight="Bold" Click="serverStartButton_Click"/> |
| 86 | + </Grid> |
| 87 | + </Grid> |
| 88 | + </TabItem> |
| 89 | + |
| 90 | + <TabItem x:Name="clientTab" Header="Client"> |
| 91 | + <Grid> |
| 92 | + <Grid.ColumnDefinitions> |
| 93 | + <ColumnDefinition Width="10*" /> |
| 94 | + <ColumnDefinition Width="*" /> |
| 95 | + <ColumnDefinition Width="5*" /> |
| 96 | + </Grid.ColumnDefinitions> |
| 97 | + <Grid.RowDefinitions> |
| 98 | + <RowDefinition Height="*" /> |
| 99 | + </Grid.RowDefinitions> |
| 100 | + |
| 101 | + <Grid Grid.Column="0" Grid.Row="0"> |
| 102 | + <Grid.ColumnDefinitions> |
| 103 | + <ColumnDefinition Width="*"/> |
| 104 | + </Grid.ColumnDefinitions> |
| 105 | + <Grid.RowDefinitions> |
| 106 | + <RowDefinition Height="12*"/> |
| 107 | + <RowDefinition Height="*"/> |
| 108 | + <RowDefinition Height="*" /> |
| 109 | + </Grid.RowDefinitions> |
| 110 | + |
| 111 | + <TextBox x:Name="clientTextboxBig" Grid.Column="0" Grid.Row="0" Margin="5,5,5,5" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" IsReadOnly="True"/> |
| 112 | + |
| 113 | + <Grid Grid.Column="0" Grid.Row="1"> |
| 114 | + <Grid.ColumnDefinitions> |
| 115 | + <ColumnDefinition Width="3*" /> |
| 116 | + <ColumnDefinition Width="*" /> |
| 117 | + </Grid.ColumnDefinitions> |
| 118 | + <Grid.RowDefinitions> |
| 119 | + <RowDefinition Height="*" /> |
| 120 | + </Grid.RowDefinitions> |
| 121 | + <TextBox x:Name="clientSendTextbox1" Grid.Column="0" Grid.Row="0" Margin="5,5,5,5"/> |
| 122 | + <Button Content="Send" Grid.Column="1" Grid.Row="0" Margin="5,5,5,5" Click="Button_Click_2"/> |
| 123 | + </Grid> |
| 124 | + |
| 125 | + <Grid Grid.Column="0" Grid.Row="2"> |
| 126 | + <Grid.ColumnDefinitions> |
| 127 | + <ColumnDefinition Width="3*" /> |
| 128 | + <ColumnDefinition Width="*" /> |
| 129 | + </Grid.ColumnDefinitions> |
| 130 | + <Grid.RowDefinitions> |
| 131 | + <RowDefinition Height="*" /> |
| 132 | + </Grid.RowDefinitions> |
| 133 | + <TextBox x:Name="clientSendTextbox2" Grid.Column="0" Grid.Row="0" Margin="5,5,5,5"/> |
| 134 | + <Button Content="Send" Grid.Column="1" Grid.Row="0" Margin="5,5,5,5" Click="Button_Click_3"/> |
| 135 | + </Grid> |
| 136 | + |
| 137 | + </Grid> |
| 138 | + |
| 139 | + <Grid Grid.Column="2" Grid.Row="0"> |
| 140 | + <Grid.ColumnDefinitions> |
| 141 | + <ColumnDefinition Width="*" /> |
| 142 | + </Grid.ColumnDefinitions> |
| 143 | + <Grid.RowDefinitions> |
| 144 | + <RowDefinition Height="*" /> |
| 145 | + <RowDefinition Height="*" /> |
| 146 | + <RowDefinition Height="*" /> |
| 147 | + <RowDefinition Height="*" /> |
| 148 | + <RowDefinition Height="*" /> |
| 149 | + <RowDefinition Height="*" /> |
| 150 | + <RowDefinition Height="*" /> |
| 151 | + <RowDefinition Height="*" /> |
| 152 | + <RowDefinition Height="*" /> |
| 153 | + <RowDefinition Height="*" /> |
| 154 | + <RowDefinition Height="*" /> |
| 155 | + <RowDefinition Height="*" /> |
| 156 | + <RowDefinition Height="*" /> |
| 157 | + <RowDefinition Height="*" /> |
| 158 | + </Grid.RowDefinitions> |
| 159 | + |
| 160 | + <Label Content="Port:" Grid.Column="0" Grid.Row="0" VerticalAlignment="Bottom"/> |
| 161 | + <TextBox x:Name="clientPort" Text="233" Grid.Column="0" Grid.Row="1" Margin="5,0,5,10"/> |
| 162 | + <Label Content="IP:" Grid.Column="0" Grid.Row="2" VerticalAlignment="Bottom"/> |
| 163 | + <TextBox x:Name="clientIP" Text="192.168.144.1" Grid.Column="0" Grid.Row="3" Margin="5,0,5,10"/> |
| 164 | + <Button x:Name="clientStartButton" Content="Connect" Grid.Column="0" Grid.Row="4" Margin="5,5,5,5" Background="LightGreen" FontWeight="Bold" Click="clientStartButton_Click"/> |
| 165 | + </Grid> |
| 166 | + </Grid> |
| 167 | + </TabItem> |
| 168 | + </TabControl> |
| 169 | + </Grid> |
| 170 | +</Window> |
0 commit comments