-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
103 lines (97 loc) · 8.25 KB
/
MainWindow.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<Window x:Class="UI.MainWindow"
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"
mc:Ignorable="d"
Title="C# examples" Height="500" Width="1200">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="200"/>
<RowDefinition Height="140"/>
<RowDefinition Height="140"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="#DAF7A6">
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="60"/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="600"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="20"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="1" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center">size</Label>
<Label Grid.Row="0" Grid.Column="2" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center">data</Label>
<Label Grid.Row="0" Grid.Column="3" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center">count</Label>
<Label Grid.Row="0" Grid.Column="4" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center">head</Label>
<Label Grid.Row="0" Grid.Column="5" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center">tail</Label>
<Label Grid.Row="1" Grid.Column="0" FontSize="16" HorizontalAlignment="Right" VerticalAlignment="Center">FIFO</Label>
<TextBlock Grid.Row="1" Grid.Column="1" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Name="fifo_size"></TextBlock>
<TextBlock Grid.Row="1" Grid.Column="2" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Name="fifo_data"></TextBlock>
<TextBlock Grid.Row="1" Grid.Column="3" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Name="fifo_count"></TextBlock>
<TextBlock Grid.Row="1" Grid.Column="4" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Name="fifo_head"></TextBlock>
<TextBlock Grid.Row="1" Grid.Column="5" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Name="fifo_tail"></TextBlock>
<Button Grid.Row="1" Grid.Column="6" FontSize="14" Height="25" FontWeight="Bold" Background="red" Foreground="white" Click="Button_fifo_reset" Name="fifo_reset">reset</Button>
<Label Grid.Row="2" Grid.Column="0" FontSize="16" HorizontalAlignment="Right" VerticalAlignment="Center">LIFO</Label>
<TextBlock Grid.Row="2" Grid.Column="1" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Name="lifo_size"></TextBlock>
<TextBlock Grid.Row="2" Grid.Column="2" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Name="lifo_data"></TextBlock>
<TextBlock Grid.Row="2" Grid.Column="3" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Name="lifo_count"></TextBlock>
<TextBlock Grid.Row="2" Grid.Column="4" FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center" Name="lifo_head"></TextBlock>
<Button Grid.Row="2" Grid.Column="6" FontSize="14" Height="25" FontWeight="Bold" Background="red" Foreground="white" Click="Button_lifo_reset" Name="lifo_reset">reset</Button>
</Grid>
</Grid>
<Grid Grid.Row="1" Background="yellow">
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" FontSize="16" HorizontalAlignment="Right" VerticalAlignment="Center">FIFO</Label>
<TextBox Grid.Row="0" Grid.Column="1" Width="60" FontSize="16" VerticalAlignment="Center" Name="fifo_write_data"></TextBox>
<Button Grid.Row="0" Grid.Column="2" FontSize="14" Height="25" Width="80" FontWeight="Bold" HorizontalAlignment="Left" Click="Button_fifo_write" Name="fifo_write">WRITE</Button>
<Button Grid.Row="0" Grid.Column="3" FontSize="14" Height="25" Width="80" FontWeight="Bold" HorizontalAlignment="Center" Click="Button_fifo_read" Name="fifo_read">READ</Button>
<TextBlock Grid.Row="0" Grid.Column="4" Width="60" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Name="fifo_read_data"></TextBlock>
<Label Grid.Row="1" Grid.Column="0" FontSize="16" HorizontalAlignment="Right" VerticalAlignment="Center">LIFO</Label>
<TextBox Grid.Row="1" Grid.Column="1" Width="60" FontSize="16" VerticalAlignment="Center" Name="lifo_write_data"></TextBox>
<Button Grid.Row="1" Grid.Column="2" FontSize="14" Height="25" Width="80" FontWeight="Bold" HorizontalAlignment="Left" Click="Button_lifo_write" Name="lifo_write">WRITE</Button>
<Button Grid.Row="1" Grid.Column="3" FontSize="14" Height="25" Width="80" FontWeight="Bold" HorizontalAlignment="Center" Click="Button_lifo_read" Name="lifo_read">READ</Button>
<TextBlock Grid.Row="1" Grid.Column="4" Width="60" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Name="lifo_read_data"></TextBlock>
</Grid>
</Grid>
<Grid Grid.Row="2" Background="skyblue">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"/>
<ColumnDefinition Width="180"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="140"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" FontSize="16" HorizontalAlignment="Right" VerticalAlignment="Center">FSM State</Label>
<TextBlock Grid.Row="0" Grid.Column="1" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center" Name="fsm_state"></TextBlock>
<Label Grid.Row="0" Grid.Column="2" FontSize="16" HorizontalAlignment="Right" VerticalAlignment="Center">FSM Events</Label>
<Button Grid.Row="0" Grid.Column="3" FontSize="14" Height="25" Width="80" FontWeight="Bold" HorizontalAlignment="Center" Click="Button_fsm_card" Name="fsm_card">Insert Card</Button>
<Button Grid.Row="0" Grid.Column="4" FontSize="14" Height="25" Width="80" FontWeight="Bold" HorizontalAlignment="Center" Click="Button_fsm_pin" Name="fsm_pin">Enter PIN</Button>
<Button Grid.Row="0" Grid.Column="5" FontSize="14" Height="25" Width="80" FontWeight="Bold" HorizontalAlignment="Center" Click="Button_fsm_withdraw" Name="fsm_withdraw">Withdraw</Button>
<Button Grid.Row="0" Grid.Column="6" FontSize="14" Height="25" Width="80" FontWeight="Bold" HorizontalAlignment="Center" Click="Button_fsm_terminate" Name="fsm_terminate">Terminate</Button>
<Button Grid.Row="0" Grid.Column="7" FontSize="14" Height="25" Width="80" FontWeight="Bold" HorizontalAlignment="Center" Click="Button_fsm_cancel" Name="fsm_cancel" Background="red" Foreground="white">CANCEL</Button>
</Grid>
</Grid>
</Window>