private void Screen_Load(object sender, EventArgs e) { Create c = new Create(); OpenForm(c, panelCreate); station m = new station(); OpenForm(m, panelMain); management mng = new management(); OpenForm(mng, panelManagement); upgrade u = new upgrade(); OpenForm(u, panelUpgrade); settings s = new settings(); OpenForm(s, panelSettings); panelTop.Visible = false; timerMoneyChanged.Enabled = true; foreach (TabPage item in tabControl1.TabPages) { if (item.Name == "tabPageCreate") { } else if (item.Name != "tabPageCreate") { item.Parent = null; } } }
private void CheckGender(management m) { if (radioButtonMan.Checked == true) { m.labelGeschlecht.Text = "Männlich"; } else if (radioButtonWoman.Checked == true) { m.labelGeschlecht.Text = "Weiblich"; } }
private void mietenSieEinenFahrerToolStripMenuItem_Click(object sender, EventArgs e) { station s = (station)Application.OpenForms["station"]; management m = (management)Application.OpenForms["management"]; s.timerBus.Enabled = false; s.timerDriver.Enabled = true; m.buttonDriver.Text = "Şoför çalışıyor."; m.buttonDriver.Enabled = false; s.buttonTransfer.Enabled = false; }
private void CheckGender(management m) { if (radioButtonMan.Checked == true) { m.labelGeschlecht.Text = "Erkek"; } else if (radioButtonWoman.Checked == true) { m.labelGeschlecht.Text = "Kadın"; } }
private void buttonCreate_Click(object sender, EventArgs e) { Screen s = (Screen)Application.OpenForms["screen"]; management m = (management)Application.OpenForms["management"]; station st = (station)Application.OpenForms["station"]; if (textBoxName != null && listBoxJobs.SelectedItem != null && comboBoxPlace.SelectedItem != null && (radioButtonMan.Checked == true || radioButtonWoman.Checked == true)) { if (listBoxJobs.SelectedIndex == 0) { station.money += 500; m.labelName.Text = textBoxName.Text; m.labelBeruf.Text = jobs[0]; CheckGender(m); } else if (listBoxJobs.SelectedIndex == 1) { station.money -= 500; m.labelName.Text = textBoxName.Text; m.labelBeruf.Text = jobs[1]; CheckGender(m); } else if (listBoxJobs.SelectedIndex == 2) { station.money += 5000; management.isaDriver = true; m.labelName.Text = textBoxName.Text; m.labelBeruf.Text = jobs[2]; CheckGender(m); } s.labelPlace.Text = comboBoxPlace.SelectedItem.ToString(); s.panelTop.Visible = true; s.tabPageCreate.Parent = null; s.tabPageHome.Parent = s.tabControl1; s.tabControl1.SelectedTab = s.tabPageHome; } else { MessageBox.Show("Geben Sie alle Daten ein"); } }
private void buttonChangeName_Click(object sender, EventArgs e) { management m = (management)Application.OpenForms["management"]; m.labelName.Text = textBoxChange.Text; }