void CScheduleEntryEdit(object sender, EventArgs e) { var sr = (ScheduleRow)sender; var ose = sr.Ose; using (var see = new ScheduleEntryEditor()) { see.ose = ose; if (see.ShowDialog(this) == DialogResult.OK) { sr.Ose = see.ose; sr.Invalidate(); } } }
private void button1_Click(object sender, EventArgs e) { var ose = new objectsScheduleEntry { objectid = Io.ObjectID, objecttypeid = Io.ObjectTypeID, daysofweek = "", parameter = "", time = (int)DateTime.Now.TimeOfDay.TotalMinutes, active = true }; using (var see = new ScheduleEntryEditor()) { see.ose = ose; if (see.ShowDialog(this) == DialogResult.OK) { MainForm.Schedule.Add(see.ose); RenderSchedule(); } } }
private void button1_Click(object sender, EventArgs e) { var ose = new objectsScheduleEntry { objectid = Io.ObjectID, objecttypeid = Io.ObjectTypeID, daysofweek = "", parameter = "", time = (int) DateTime.Now.TimeOfDay.TotalMinutes, active = true }; using (var see = new ScheduleEntryEditor()) { see.ose = ose; if (see.ShowDialog(this) == DialogResult.OK) { MainForm.Schedule.Add(see.ose); RenderSchedule(); } } }