private void btnAccept_Click(object sender, EventArgs e) { Victorina.allDirectories = cbAllDirectories.Checked; Victorina.gameDuration = Convert.ToInt32(cbGameDuration.Text); Victorina.musicDuration = Convert.ToInt32(cbMusicDuration.Text); Victorina.randomStart = cbRandomStart.Checked; Victorina.WriteParam(); this.Hide(); }
private void btnOk_Click(object sender, EventArgs e) { Victorina.subfolders = cbSubfolders.Checked; Victorina.gameDuration = Convert.ToInt32(cbGameDuration.Text); Victorina.musicDuration = Convert.ToInt32(cbMusicDuration.Text); Victorina.randomStart = cbRandomStart.Checked; Victorina.WriteParam(); this.Hide(); }
private void btnOk_Click(object sender, EventArgs e) { Victorina.GameDuration = Convert.ToInt32(cmbGameDuration.Text); Victorina.MusicDuration = Convert.ToInt32(cmbMusicDuration.Text); Victorina.AllDirectories = cbAllDirectory.Checked; Victorina.RandomStart = cbRandomStart.Checked; Victorina.timeAnswer = Convert.ToInt32(cmbTimeAnswer.Text); Victorina.WriteSettings(); this.Hide(); }
private void button_OK_Click_1(object sender, EventArgs e) { Victorina.allDirectories = checkBox_useSubdirs.Checked; Victorina.gameDuration = Convert.ToInt32(comboBox_gameDuration.Text); Victorina.musicDuration = Convert.ToInt32(comboBox_musicDuration.Text); Victorina.timeForAnswer = Convert.ToInt32(comboBox_timeForAnswer.Text); Victorina.WriteParams(); // сохраняем параметры в реестр this.Hide(); // крываем окно, при этом сохранив все настройки }
private void FmMain_Load(object sender, EventArgs e) { try { Victorina.ReadSettings(); Victorina.ReadMusic(); } catch { MessageBox.Show("Something is wrong.Maybe you not set all settings." + "Before play, go to settings and check all property."); } }
private void fMain_Load(object sender, EventArgs e) { Victorina.ReadParam(); Victorina.ReadMusic(); }
private void Form1_Load(object sender, EventArgs e) { Victorina.ReadParams(); Victorina.ReadMusic(); }