private void buttonSubmit_Click(object sender, EventArgs e) { string streetName = "Name: "+textBoxStreetName.Text; string Time = "Time: " + textBoxTimeFrom.Text + " Till " + textBoxTimeTo.Text; string date = "Date: " + dateTimePicker.Value.ToString(); this.Hide(); var form2 = new Simulation(streetName,Time,date); form2.Show(); form2.Closed += (s, args) => this.Close(); form2.Show(); }
public Simulation(string StreetName, string Time,string date) { InitializeComponent(); this.Text = "Simulation Magic! Street:" + StreetName+"."+ filePath; simulator = new Simulator(this); label1Time.Text = Time; labelStreetName.Text = StreetName; labelDate.Text = date; MoveCarsTimer = new Timer(); MoveCarsTimer.Tick += new EventHandler(PaintCarMoving); MoveCarsTimer.Interval = 50;//change speed of the cars moving //setting the selected indexes at 0 in the beginning comboBoxColumns.SelectedIndex = 0; comboBoxRows.SelectedIndex = 0; //menu filePath = "Miki.bin"; simulation = this; }
public Help(Simulation s) { InitializeComponent(); simulation = s; }