public UIsetExperment(MainWindow _mainWindow) { InitializeComponent(); mainWindow = _mainWindow; // laod the networks names: NetworkTopolgy.ImportNetworkNames(comb_network_names); // laod the names of the network. // INTIALIZE THE COM RANGE LIST: for (int i = 1; i <= 5; i += 1) { combo_back_direction_paramater.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } for (int i = 50; i <= 500; i += 50) { comb_com_raduis.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } for (int i = 30; i <= 180; i += 30) { comb_maxSpeed.Items.Add(new ComboBoxItem() { Content = i.ToString() }); comb_minSpeed.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } for (int i = 100; i <= 3000; i += 100) { combo_packets.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } for (int i = 50; i <= 1400; i += 50) { combo_numb_vehicles.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } for (int i = 1; i <= 20; i += 1) { combo_max_attemps.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } // maximum attemps to retransmit the packet. for (int i = 1; i <= 50; i += 1) { combo_max_stor_time.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } // maximum attemps to retransmit the packet. combo_trafic_ligh.Items.Add(new ComboBoxItem() { Content = "0.01" }); combo_trafic_ligh.Items.Add(new ComboBoxItem() { Content = "0.1" }); combo_trafic_ligh.Items.Add(new ComboBoxItem() { Content = "0.5" }); for (int i = 1; i <= 10; i += 1) { combo_trafic_ligh.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } // maximum attemps to retransmit the packet. for (int i = 0; i <= 9; i++) { string s = "0." + i.ToString(); combo_forward_direction_paramater.Items.Add(new ComboBoxItem() { Content = s }); combo_connectivity_wight.Items.Add(new ComboBoxItem() { Content = s }); combo_shortest_distance_weight.Items.Add(new ComboBoxItem() { Content = s }); } combo_connectivity_wight.Items.Add(new ComboBoxItem() { Content = 1 }); combo_shortest_distance_weight.Items.Add(new ComboBoxItem() { Content = 1 }); // show the defuals values: comb_com_raduis.Text = Settings.Default.CommunicationRange.ToString(); comb_minSpeed.Text = Settings.Default.MinSpeed.ToString(); combo_packets.Text = Settings.Default.NumberofPackets.ToString(); comb_maxSpeed.Text = Settings.Default.MaxSpeed.ToString(); comb_com_raduis.Text = Settings.Default.CommunicationRange.ToString(); combo_numb_vehicles.Text = Settings.Default.MaxNumberOfVehicles.ToString(); combo_max_attemps.Text = Settings.Default.MaximumAttemps.ToString(); combo_max_stor_time.Text = Settings.Default.MaxStoreTime.ToString(); combo_trafic_ligh.Text = Settings.Default.TraficSignalingTimerInterval.ToString(); comb_network_names.Text = Settings.Default.NetTopName.ToString(); combo_shortest_distance_weight.Text = Settings.Default.WeightShortestDistance.ToString(); combo_connectivity_wight.Text = Settings.Default.WeightConnectivity.ToString(); combo_forward_direction_paramater.Text = Settings.Default.IntraVehiForwardDirectionPar.ToString(); combo_back_direction_paramater.Text = Settings.Default.IntraVehiBackwardDirectionPar.ToString(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { // laod the networks names: NetworkTopolgy.ImportNetworkNames(comb_network_names); // laod the names of the network. // INTIALIZE THE COM RANGE LIST: for (int i = 1; i <= 5; i += 1) { combo_back_direction_paramater.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } for (int i = 50; i <= 500; i += 50) { comb_com_raduis.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } for (int i = 10; i <= 200; i += 10) { comb_maxSpeed.Items.Add(new ComboBoxItem() { Content = i.ToString() }); comb_minSpeed.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } for (int i = 100; i <= 3000; i += 100) { combo_packets.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } for (int i = 10; i <= 1400; i += 10) { combo_numb_vehicles.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } for (int i = 1; i <= 20; i += 1) { combo_max_attemps.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } // maximum attemps to retransmit the packet. for (int i = 1; i <= 50; i += 1) { combo_max_stor_time.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } // maximum attemps to retransmit the packet. combo_trafic_ligh.Items.Add(new ComboBoxItem() { Content = "0" }); combo_trafic_ligh.Items.Add(new ComboBoxItem() { Content = "0.01" }); combo_trafic_ligh.Items.Add(new ComboBoxItem() { Content = "0.1" }); combo_trafic_ligh.Items.Add(new ComboBoxItem() { Content = "0.5" }); for (int i = 1; i <= 10; i += 1) { combo_trafic_ligh.Items.Add(new ComboBoxItem() { Content = i.ToString() }); } // maximum attemps to retransmit the packet. for (int i = 0; i <= 9; i++) { string s = "0." + i.ToString(); combo_forward_direction_paramater.Items.Add(new ComboBoxItem() { Content = s }); combo_connectivity_wight.Items.Add(new ComboBoxItem() { Content = s }); combo_shortest_distance_weight.Items.Add(new ComboBoxItem() { Content = s }); } combo_connectivity_wight.Items.Add(new ComboBoxItem() { Content = 1 }); combo_shortest_distance_weight.Items.Add(new ComboBoxItem() { Content = 1 }); // show the defuals values: comb_com_raduis.Text = Settings.Default.CommunicationRange.ToString(); comb_minSpeed.Text = Settings.Default.MinSpeed.ToString(); combo_packets.Text = Settings.Default.NumberofPackets.ToString(); comb_maxSpeed.Text = Settings.Default.MaxSpeed.ToString(); comb_com_raduis.Text = Settings.Default.CommunicationRange.ToString(); combo_numb_vehicles.Text = Settings.Default.MaxNumberOfVehicles.ToString(); combo_max_attemps.Text = Settings.Default.MaximumAttemps.ToString(); combo_max_stor_time.Text = Settings.Default.MaxStoreTime.ToString(); combo_trafic_ligh.Text = Settings.Default.TraficSignalingTimerInterval.ToString(); comb_network_names.Text = Settings.Default.NetTopName.ToString(); combo_shortest_distance_weight.Text = Settings.Default.WeightShortestDistance.ToString(); combo_connectivity_wight.Text = Settings.Default.WeightConnectivity.ToString(); combo_forward_direction_paramater.Text = Settings.Default.IntraVehiForwardDirectionPar.ToString(); combo_back_direction_paramater.Text = Settings.Default.IntraVehiBackwardDirectionPar.ToString(); combo_packet_genrator.Text = Settings.Default.PacketGeneratedType; Combo_acc_type.Items.Add(new ComboBoxItem() { Content = "RandomSpeed" }); Combo_acc_type.Items.Add(new ComboBoxItem() { Content = "LimmitedToSegmementMaxSpeed" }); Combo_acc_type.Items.Add(new ComboBoxItem() { Content = "NormalDistrubution" }); SetAcc(Settings.Default.AccellerationType); foreach (string pro in Lister.ListProtocolsNames) { combo_protocols.Items.Add(new ComboBoxItem() { Content = pro }); } combo_protocols.Text = Settings.Default.RoutingProtocolString; }