private void btn_from_all_Click(object sender, RoutedEventArgs e) { myStategy = Stategy.all; PublicParameters.SimulationTime = 0; CounterTimer.Interval = TimeSpan.FromSeconds(5); PublicParameters.UpdateLossPercentage = Convert.ToInt16(comb_update.Text); Settings.Default.DrawPacketsLines = Convert.ToBoolean(chk_drawrouts.IsChecked); Settings.Default.KeepLogs = Convert.ToBoolean(chk_save_logs.IsChecked); Settings.Default.ExpoPerpCnt = Convert.ToDouble(com_prependicular.Text); Settings.Default.ExpoEucCnt = Convert.ToDouble(com_transmision_distance.Text); Settings.Default.ExpoEPCnt = Convert.ToDouble(com_energy.Text); Settings.Default.ExpoDirCnt = Convert.ToDouble(com_direction.Text); Settings.Default.DrawPacketsLines = Convert.ToBoolean(chk_drawrouts.IsChecked); Settings.Default.KeepLogs = Convert.ToBoolean(chk_save_logs.IsChecked); NOD = Convert.ToInt16(com_num_of_deadNodes.Text); PublicParameters.NOS = myNetWork.Count; PublicParameters.NOP = 1; mainWindow.PacketRate = NOS.ToString() + " nodes/" + NOP.ToString() + "pck/round"; mainWindow.top_menu.IsEnabled = false; this.IsEnabled = false; CounterTimer.Start(); this.Hide(); }
private void btn_compute_life_time_Click(object sender, RoutedEventArgs e) { myStategy = Stategy.some; PublicParamerters.SimulationTime = 0; CounterTimer.Interval = TimeSpan.FromSeconds(1); PublicParamerters.UpdateLossPercentage = Convert.ToInt16(comb_update.Text); Settings.Default.DrawPacketsLines = Convert.ToBoolean(chk_drawrouts.IsChecked); Settings.Default.KeepLogs = Convert.ToBoolean(chk_save_logs.IsChecked); Settings.Default.ExpoHCnt = Convert.ToDouble(com_prependicular.Text); Settings.Default.ExpoRCnt = Convert.ToDouble(com_transmision_distance.Text); Settings.Default.ExpoLCnt = Convert.ToDouble(com_energy.Text); Settings.Default.ExpoHCnt = Convert.ToDouble(com_direction.Text); Settings.Default.DrawPacketsLines = Convert.ToBoolean(chk_drawrouts.IsChecked); Settings.Default.KeepLogs = Convert.ToBoolean(chk_save_logs.IsChecked); NOD = Convert.ToInt16(com_NOD.Text); NOS = Convert.ToInt16(com_nos.Text); NOP = Convert.ToInt16(com_nop.Text); PublicParamerters.NOS = NOS; PublicParamerters.NOP = NOP; mainWindow.PacketRate = NOS.ToString() + " nodes/" + NOP.ToString() + "pck/round"; mainWindow.top_menu.IsEnabled = false; this.IsEnabled = false; CounterTimer.Start(); this.Hide(); }
private void btn_compute_life_time_Click(object sender, RoutedEventArgs e) { myStategy = Stategy.some; PublicParamerters.SimulationTime = 0; CounterTimer.Interval = TimeSpan.FromSeconds(1); Settings.Default.DrawPacketsLines = Convert.ToBoolean(chk_drawrouts.IsChecked); Settings.Default.KeepLogs = Convert.ToBoolean(chk_save_logs.IsChecked); Settings.Default.DrawPacketsLines = Convert.ToBoolean(chk_drawrouts.IsChecked); Settings.Default.KeepLogs = Convert.ToBoolean(chk_save_logs.IsChecked); NOD = Convert.ToInt16(com_NOD.Text); NOS = Convert.ToInt16(com_nos.Text); NOP = Convert.ToInt16(com_nop.Text); PublicParamerters.NOS = NOS; PublicParamerters.NOP = NOP; // mainWindow.PacketRate = NOS.ToString() + " nodes/" + NOP.ToString() + "pck/round"; mainWindow.top_menu.IsEnabled = false; this.IsEnabled = false; CounterTimer.Start(); this.Hide(); }
public void MoveControl(Position startPosition, Position endPosition) { IWorldObjects worldObjects = GameWorld.GetWorldObjects(endPosition); if (worldObjects == null && GameWorld.GameGround[endPosition.Y, endPosition.X] != 'K') // spillerne kan ikke komme ud af banen og de kan rykke ind hvis feltet er tomt { Placement = endPosition; } else { if (worldObjects is ICharacter c) { c.RecieveDamage(Stategy.DamagePoints(this)); } } }
private void btn_from_all_Click(object sender, RoutedEventArgs e) { myStategy = Stategy.all; PublicParamerters.SimulationTime = 0; CounterTimer.Interval = TimeSpan.FromSeconds(5); Settings.Default.DrawPacketsLines = Convert.ToBoolean(chk_drawrouts.IsChecked); Settings.Default.KeepLogs = Convert.ToBoolean(chk_save_logs.IsChecked); Settings.Default.DrawPacketsLines = Convert.ToBoolean(chk_drawrouts.IsChecked); Settings.Default.KeepLogs = Convert.ToBoolean(chk_save_logs.IsChecked); NOD = Convert.ToInt16(com_num_of_deadNodes.Text); PublicParamerters.NOS = myNetWork.Count; PublicParamerters.NOP = 1; // mainWindow.PacketRate = NOS.ToString() + " nodes/" + NOP.ToString() + "pck/round"; mainWindow.top_menu.IsEnabled = false; this.IsEnabled = false; CounterTimer.Start(); this.Hide(); }