//добавление сеанса private void buttonSessionsCreate_Click(object sender, EventArgs e) { AddSession form = new AddSession("", this); form.ShowDialog(this); if (dRes == DialogResult.OK) { saved = false; buttonSessionsCancel.Enabled = true; buttonSessionsCancel.Enabled = true; bufferSessions.Add(new Session(_com, "", 0)); UpdateSessionComboBoxList(); currentSession = bufferSessions.Count - 1; comboBoxSession.SelectedIndex = currentSession; FillSession(); } }
//изменение названия сеанса private void button3_Click(object sender, EventArgs e) { if (currentSession > 1) { AddSession form = new AddSession(bufferSessions[currentSession].Name, this); form.ShowDialog(this); if (dRes == DialogResult.OK) { saved = false; buttonSessionsSave.Enabled = true; buttonSessionsCancel.Enabled = true; bufferSessions[currentSession].Name = _com; UpdateSessionComboBoxList(); FillSession(); } } }