-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
143 lines (122 loc) · 9.33 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<Window x:Class="VSIM.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"
xmlns:local="clr-namespace:VSIM"
mc:Ignorable="d"
Loaded="Window_Loaded"
Closing="Window_Closing"
WindowState="Maximized"
Background="Transparent"
WindowStartupLocation="CenterScreen"
Title="VSIM" Height="350" Width="525">
<Border>
<StackPanel>
<DockPanel IsEnabled="True" Name="top_menu">
<Menu DockPanel.Dock="Top">
<MenuItem Name="btn_experment" Click="Btn_experment_Click" Header="Experments" >
</MenuItem>
<MenuItem Header="Road Network">
<MenuItem Click="ComponentMenuItem_Click" Header="_Network Generator" />
<MenuItem Click="ComponentMenuItem_Click" Header="_Add Junction" />
<MenuItem Click="ComponentMenuItem_Click" Header="_Add Road Segment">
<MenuItem Click="ComponentMenuItem_Click" Header="_Two Lanes" />
<MenuItem Click="ComponentMenuItem_Click" Header="_Four Lanes" />
<MenuItem Click="ComponentMenuItem_Click" Header="_Six Lanes" />
</MenuItem>
<MenuItem Click="ComponentMenuItem_Click" Header="_Import Vanet" />
<MenuItem Click="ComponentMenuItem_Click" Header="_Export Vanet" />
<MenuItem Click="ComponentMenuItem_Click" Header="_Clear" />
</MenuItem>
<MenuItem Header="Vehicles">
<MenuItem Header="Vehicles's Number">
<MenuItem Click="btn_set_number_of_vechiles" Header="Unlimited"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="1"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="5"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="10"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="20"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="30"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="50"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="80"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="100"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="150"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="200"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="250"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="300"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="350"/>
<MenuItem Click="btn_set_number_of_vechiles" Header="400"/>
</MenuItem>
<MenuItem Header="Display Info">
<MenuItem Name="op_none" Click="btn_show_v_info" Header="None" />
<MenuItem Name="op_VID" Click="btn_show_v_info" Header="VID" />
<MenuItem Name="op_SpeedKMH" Click="btn_show_v_info" Header="Speed KMH" />
<MenuItem Name="op_SpeedTimer" Click="btn_show_v_info" Header="Speed Timer" />
<MenuItem Name="op_RID" Click="btn_show_v_info" Header="Road Sgment ID" />
<MenuItem Name="op_SJID" Click="btn_show_v_info" Header="Start Junction" />
<MenuItem Name="op_DJID" Click="btn_show_v_info" Header="End Junction" />
<MenuItem Name="op_LaneIndex" Click="btn_show_v_info" Header="Lane Index" />
<MenuItem Name="op_InstanceLocation" Click="btn_show_v_info" Header="Instance Location" />
<MenuItem Name="op_RemianDistanceToHeadingJunction" Click="btn_show_v_info" Header="Remain Distance To Heading Junction" />
<MenuItem Name="op_TravelledDistanceInMeter" Click="btn_show_v_info" Header="Travelled Distance In Segment" />
<MenuItem Name="op_ExceededDistanceInMeter" Click="btn_show_v_info" Header="Exceeded Distance" />
<MenuItem Name="op_PacketsQueueLength" Click="btn_show_v_info" Header="Packets Queue Length" />
<MenuItem Name="op_JunctionQueueIndex" Click="btn_show_v_info" Header="Junction Queue Index" />
<MenuItem Name="op_RIDpluseLaneIndex" Click="btn_show_v_info" Header="RID and Lane Index" />
<MenuItem Name="op_SwitchDirection" Click="btn_show_v_info" Header="Switch to Direction" />
<MenuItem Name="op_Direction" Click="btn_show_v_info" Header="Direction" />
</MenuItem>
</MenuItem>
<MenuItem Header="Packets">
<MenuItem Header="Packets Rate">
<MenuItem Click="btn_change_packet_rate" Header="1pck/0" />
<MenuItem Click="btn_change_packet_rate" Header="1pck/1ms" />
<MenuItem Click="btn_change_packet_rate" Header="pck/0.5s" />
<MenuItem Click="btn_change_packet_rate" Header="1pck/1s" />
<MenuItem Click="btn_change_packet_rate" Header="1pck/3s" />
<MenuItem Click="btn_change_packet_rate" Header="1pck/5s" />
<MenuItem Click="btn_change_packet_rate" Header="1pck/10s" />
<MenuItem Click="btn_change_packet_rate" Header="1pck/15s" />
<MenuItem Click="btn_change_packet_rate" Header="1pck/20s" />
<MenuItem Click="btn_change_packet_rate" Header="1pck/30s" />
</MenuItem>
<MenuItem Header="Number of Packets">
<MenuItem Click="btn_generate_x_of_packets" Header="1" />
<MenuItem Click="btn_generate_x_of_packets" Header="3" />
<MenuItem Click="btn_generate_x_of_packets" Header="10" />
<MenuItem Click="btn_generate_x_of_packets" Header="100" />
<MenuItem Click="btn_generate_x_of_packets" Header="300" />
<MenuItem Click="btn_generate_x_of_packets" Header="500" />
<MenuItem Click="btn_generate_x_of_packets" Header="1000" />
<MenuItem Click="btn_generate_x_of_packets" Header="1500" />
<MenuItem Click="btn_generate_x_of_packets" Header="2000" />
<MenuItem Click="btn_generate_x_of_packets" Header="3000" />
<MenuItem Click="btn_generate_x_of_packets" Header="5000" />
<MenuItem Click="btn_generate_x_of_packets" Header="10000" />
</MenuItem>
</MenuItem>
<MenuItem Header="Resultes">
<MenuItem Click="btn_show_results" Header="_Show Live Results"/>
<MenuItem Click="btn_show_results" Header="_Show Results Details" />
<MenuItem Click="btn_show_results" Header="_Print Results" />
</MenuItem>
</Menu>
</DockPanel>
<TabControl Width="AUTO" Height="AUTO">
<TabItem Width="AUTO" Height="AUTO">
<TabItem.Header>
<StackPanel Height="20" Orientation="Horizontal">
<TextBlock Name="tab_vanet">Vanet</TextBlock>
<Label Width="50"></Label>
<Slider Value="{Binding ElementName=canvas_vanet, Path=LayoutTransform.ScaleX, Mode=OneWay}" Name="_slider" Maximum="10" Width="200" ValueChanged="Slider_ValueChanged"></Slider>
<TextBlock Name="lbl_zome_percentage">100%</TextBlock>
</StackPanel>
</TabItem.Header>
<ScrollViewer Name="vanet_scroller" Margin="0,1,0,0" CanContentScroll="True" SnapsToDevicePixels="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" PanningMode="HorizontalOnly" DataContext="{Binding}">
<Canvas Background="Transparent" Name="canvas_vanet" Height="267"></Canvas>
</ScrollViewer>
</TabItem>
</TabControl>
</StackPanel>
</Border>
</Window>