public ToDoOptions(ToDoOptions fromOptions) { if (fromOptions != null) { _reminderStrings = fromOptions.ReminderStrings; _groupStrings = fromOptions.GroupStrings; _defaultTaskDescription = fromOptions.DefaultTaskDescription; } }
private void optionsStripMenuItem_Click(object sender, EventArgs e) { using (ToDoOptionsDialog dialog = new ToDoOptionsDialog(new ToDoOptions(_options))) { if (dialog.ShowDialog() == DialogResult.OK) { _options = dialog.Options; _engine.SettingsProvider.Set("ToDoOptions", _options, PersistHint.AcrossSessions); } } CreateGroupsInListView(); PopulateListView(); }
public ToDoExplorer(TaskClerkEngine engine) { InitializeComponent(); _engine = engine; _todoTasks = _engine.SettingsProvider.Get("ToDoTasks", new List <ToDoTask>()) as List <ToDoTask>; _options = _engine.SettingsProvider.Get("ToDoOptions", new ToDoOptions()) as ToDoOptions; listView.Font = _engine.SettingsProvider.Get("GeneralFont", SystemFonts.DefaultFont) as Font; toolStripStatusLang.Text = Thread.CurrentThread.CurrentCulture.Name; GetFormSizeAndLocation(); CreateGroupsInListView(); PopulateListView(); this.monthCalendar.DateSelected += new System.Windows.Forms.DateRangeEventHandler(this.monthCalendar_DateSelected); this.listView.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listView_ItemSelectionChanged); }
public ToDoExplorer(TaskClerkEngine engine) { InitializeComponent(); _engine = engine; _todoTasks = _engine.SettingsProvider.Get("ToDoTasks", new List<ToDoTask>()) as List<ToDoTask>; _options = _engine.SettingsProvider.Get("ToDoOptions", new ToDoOptions()) as ToDoOptions; listView.Font = _engine.SettingsProvider.Get("GeneralFont", SystemFonts.DefaultFont) as Font; toolStripStatusLang.Text = Thread.CurrentThread.CurrentCulture.Name; GetFormSizeAndLocation(); CreateGroupsInListView(); PopulateListView(); this.monthCalendar.DateSelected += new System.Windows.Forms.DateRangeEventHandler(this.monthCalendar_DateSelected); this.listView.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listView_ItemSelectionChanged); }
public ToDoOptionsDialog(ToDoOptions options) { InitializeComponent(); propertyGrid.SelectedObject = options; }
private void optionsStripMenuItem_Click(object sender, EventArgs e) { using (ToDoOptionsDialog dialog = new ToDoOptionsDialog(new ToDoOptions(_options))) { if(dialog.ShowDialog() == DialogResult.OK) { _options = dialog.Options; _engine.SettingsProvider.Set("ToDoOptions", _options, PersistHint.AcrossSessions); } } CreateGroupsInListView(); PopulateListView(); }