|
| 1 | +<Window x:Class="csma_cd.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:csma_cd" |
| 7 | + mc:Ignorable="d" |
| 8 | + Title="MainWindow" Height="600" Width="925"> |
| 9 | + <Grid > |
| 10 | + <Grid.RowDefinitions> |
| 11 | + <RowDefinition Height="50"></RowDefinition> |
| 12 | + <RowDefinition Height="*"></RowDefinition> |
| 13 | + |
| 14 | + </Grid.RowDefinitions> |
| 15 | + <Grid.ColumnDefinitions> |
| 16 | + |
| 17 | + <ColumnDefinition Width="620"></ColumnDefinition> |
| 18 | + <ColumnDefinition Width="280"></ColumnDefinition> |
| 19 | + |
| 20 | + </Grid.ColumnDefinitions> |
| 21 | + <TextBlock HorizontalAlignment="Center" Grid.Row="0" Grid.Column="0" FontSize="30" Text="CSMA-Collision Detection Protocol"></TextBlock> |
| 22 | + <Canvas Name="mycanvas" Grid.Row="1" Grid.Column="0" Height="500" Width="600" Background="MediumAquamarine"> |
| 23 | + <TextBlock Width="50" Height="30" Text="Packet1" Canvas.Left="0" Name="text1" Canvas.Top="225" Background="BlueViolet" ></TextBlock> |
| 24 | + <TextBlock Width="50" Height="30" Text="Packet2" Canvas.Left="315" Name="text2" Canvas.Top="10" Background="BlueViolet" ></TextBlock> |
| 25 | + <TextBlock Width="50" Height="30" Canvas.Left="300" Name="center_text" Canvas.Top="225" ></TextBlock> |
| 26 | + <TextBlock Width="50" Height="30" Text="Packet3" Canvas.Left="315" Name="text3" Canvas.Top="410" Background="BlueViolet" ></TextBlock> |
| 27 | + |
| 28 | + <Image Name="comp1" Canvas.Left="0" Canvas.Top="210" Source="C:\Users\IamRoot\Documents\Visual Studio 2015\Projects\aloha\aloha\bin\Debug\images\c.ico" Width="80" Height="80" MouseLeftButtonUp="c1_left_btn_up"/> |
| 29 | + <Image Name="comp2" Canvas.Left="300" Canvas.Top="0" Source="C:\Users\IamRoot\Documents\Visual Studio 2015\Projects\aloha\aloha\bin\Debug\images\c.ico" Width="80" Height="80" MouseLeftButtonUp="c2_left_btn_up"></Image> |
| 30 | + |
| 31 | + |
| 32 | + <Image Name="comp3" Canvas.Left="300" Canvas.Top="400" Source="C:\Users\IamRoot\Documents\Visual Studio 2015\Projects\aloha\aloha\bin\Debug\images\c.ico" Width="80" Height="80" MouseLeftButtonUp="c3_left_btn_up"></Image> |
| 33 | + |
| 34 | + <Image Name="router_img" Source="C:\Users\IamRoot\Documents\Visual Studio 2015\Projects\aloha\aloha\bin\Debug\images\r.png" Width="80" Height="80" Canvas.Left="489" Canvas.Top="210"></Image> |
| 35 | + </Canvas> |
| 36 | + |
| 37 | + <StackPanel Grid.Row="1" Grid.Column="1" > |
| 38 | + <TextBlock HorizontalAlignment="Center" FontSize="20" VerticalAlignment="Center" Text="Log:-"></TextBlock> |
| 39 | + <ListView Name="log" Height="300"> |
| 40 | + |
| 41 | + </ListView> |
| 42 | + |
| 43 | + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" > |
| 44 | + <Button Name="start_btn" Click="start_btn_Click" >start</Button> |
| 45 | + <Separator Opacity="0" Height="20" Width="50"/> |
| 46 | + |
| 47 | + <Button Name="stop_btn" Click="stop_btn_Click">Stop</Button> |
| 48 | + <Separator Opacity="0" Height="20" Width="50"/> |
| 49 | + |
| 50 | + <Button Name="reset_btn" Click="reset_btn_Click">Reset</Button> |
| 51 | + |
| 52 | + </StackPanel> |
| 53 | + <TextBlock><LineBreak></LineBreak></TextBlock> |
| 54 | + |
| 55 | + <StackPanel Orientation="Horizontal"> |
| 56 | + <Label>packet1 speed</Label> |
| 57 | + <Separator Opacity="0" Height="20" Width="50"/> |
| 58 | + |
| 59 | + <TextBox Width="50" Name="p1_speed_text_block"></TextBox> |
| 60 | + <Label>(Default 1.5)</Label> |
| 61 | + |
| 62 | + </StackPanel> |
| 63 | + <StackPanel Orientation="Horizontal"> |
| 64 | + <Label>packet1 speed</Label> |
| 65 | + <Separator Opacity="0" Height="20" Width="50"/> |
| 66 | + |
| 67 | + <TextBox Width="50" Name="p2_speed_text_block"></TextBox> |
| 68 | + <Label>(Default 0.5)</Label> |
| 69 | + |
| 70 | + </StackPanel> |
| 71 | + |
| 72 | + <StackPanel Orientation="Horizontal"> |
| 73 | + <Label>packet1 speed</Label> |
| 74 | + <Separator Opacity="0" Height="20" Width="50"/> |
| 75 | + |
| 76 | + <TextBox Width="50" Name="p3_speed_text_block"></TextBox> |
| 77 | + <Label>(Default 1.0)</Label> |
| 78 | + |
| 79 | + </StackPanel> |
| 80 | + <StackPanel Orientation="Horizontal"> |
| 81 | + |
| 82 | + <Label>max attempt</Label> |
| 83 | + <Separator Opacity="0" Height="20" Width="60"/> |
| 84 | + |
| 85 | + <TextBox Name="max_try_box" Width="50"></TextBox> |
| 86 | + <Label>Default(3)</Label> |
| 87 | + </StackPanel> |
| 88 | + |
| 89 | + |
| 90 | + </StackPanel> |
| 91 | + </Grid> |
| 92 | +</Window> |
0 commit comments