public void AddNewSchedule() { frmNewScheduleId dlg = new frmNewScheduleId(this.GetUpdateJobs()); if (dlg.ShowDialog() == DialogResult.OK) { TemplateNodeUpdateJob newJob = new TemplateNodeUpdateJob(); newJob.Settings = new ScheduleSettings(); newJob.Settings.Id = dlg.Value; newJob.Settings.StartDate = DateTime.Now; newJob.Settings.Enabled = false; UserSettingScheduleControl usc = new UserSettingScheduleControl(newJob) { Name = "UserSettingScheduleControl1" }; TabPage tabPage = new TabPage("New schedule"); tabPage.Controls.Add(usc); this.tabControl1.TabPages.Add(tabPage); this.tabControl1.SelectedTab = tabPage; } }
public void AddNewSchedule() { frmNewScheduleId dlg = new frmNewScheduleId(this.GetUpdateJobs()); if (dlg.ShowDialog() == DialogResult.OK) { TemplateNodeUpdateJob newJob = new TemplateNodeUpdateJob(); newJob.Settings = new ScheduleSettings(); newJob.Settings.Id = dlg.Value; newJob.Settings.StartDate = DateTime.Now; newJob.Settings.Enabled = false; UserSettingScheduleControl usc = new UserSettingScheduleControl(newJob) { Name = "UserSettingScheduleControl1" }; TabPage tabPage = new TabPage("New schedule"); tabPage.Controls.Add(usc); this.tabControl1.TabPages.Add(tabPage); this.tabControl1.SelectedTab = tabPage; } }