private void btnAdd_Click(object sender, EventArgs e) { string date = null; string time = null; string subject = null; string content = null; Schedule schedule = null; AddScheduleForm addScheduleDialog = new AddScheduleForm(); if (addScheduleDialog.ShowDialog(this) == DialogResult.OK) { date = addScheduleDialog.monthCalendar.SelectionStart.ToString("yyyy-MM-dd"); time = addScheduleDialog.comboBox_hour.Text + ":" + addScheduleDialog.comboBox_minute.Text; subject = addScheduleDialog.subject.Text; content = addScheduleDialog.content.Text; schedule = new Schedule(date, time, subject, content); this.schedules.Add(schedule.ToString(), schedule); updateListView(date,time); } else { } addScheduleDialog.Dispose(); }
private void btnAdd_Click(object sender, EventArgs e) { string date = null; string time = null; string subject = null; string content = null; Schedule schedule = null; AddScheduleForm addScheduleDialog = new AddScheduleForm(); if (addScheduleDialog.ShowDialog(this) == DialogResult.OK) { date = addScheduleDialog.monthCalendar.SelectionStart.ToString("yyyy-MM-dd"); time = addScheduleDialog.comboBox_hour.Text + ":" + addScheduleDialog.comboBox_minute.Text; subject = addScheduleDialog.subject.Text; content = addScheduleDialog.content.Text; schedule = new Schedule(date, time, subject, content); this.schedules.Add(schedule.ToString(), schedule); updateListView(date, time); } else { } addScheduleDialog.Dispose(); }