public MainForm() { InitializeComponent(); // VS designer gets confused with the order of those, hence we have to do it manually: this.splitContainer1.Panel2MinSize = 300; // we need handle for invokers to work: base.CreateHandle(); // set parent for modal dialogs: WinUtil.MainForm = this; this.FormClosing += new FormClosingEventHandler(MainForm_FormClosing); this.FormClosed += new FormClosedEventHandler(MainForm_FormClosed); InitTaskGrid(); InitActionGrid(); rbtScheduleOnce.CheckedChanged += new EventHandler(rbtScheduleFreq_CheckedChanged); rbtScheduleDaily.CheckedChanged += new EventHandler(rbtScheduleFreq_CheckedChanged); rbtScheduleWeekly.CheckedChanged += new EventHandler(rbtScheduleFreq_CheckedChanged); rbtScheduleMonthly.CheckedChanged += new EventHandler(rbtScheduleFreq_CheckedChanged); chkScheduleRepeat.CheckedChanged += new EventHandler(chkScheduleRepeat_CheckedChanged); InitCommandMap(); // get into a consistent state: NewTasks(); // if non client mode, offer to install or connect to service: TestClientModeOnStart(); // load saved settings: C1Settings.Load(this); // start time for service ping _timer.Interval = 1001; // 1 sec _timer.Tick += new EventHandler(_timer_Tick); _timer.Start(); }
private void FileSave() { C1Settings.Save(this); }
private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { C1Settings.Save(this); }