private void AddTaskItem_Clicked(object sender, EventArgs args) { var taskTab = new TaskItemTab(_categoryStore, this); taskTab.Destroyed += TaskItemWindow_Destroyed; taskTab.AddTaskItemHandler += Window_AddTaskItemHandler; var win = _noteBook.AppendPage(taskTab, new Label("New TaskItem")); _noteBook.CurrentPage = win; var windowNoteChild = (Notebook.NotebookChild)_noteBook[taskTab]; windowNoteChild.Detachable = false; windowNoteChild.TabFill = false; }
private void ModifyTaskItemActionOnActivated(object sender, EventArgs eventArgs) { var taskTab = new TaskItemTab(_categoryStore, this); taskTab.Destroyed += TaskItemWindow_Destroyed; var record = RetrieveTreeViewSelection <Activity>(_mainView.Selection).Result; if (record == null) { return; } taskTab.LoadTodoItem(record); var win = _noteBook.AppendPage(taskTab, new Label($"Modifying {record.Name}")); _noteBook.CurrentPage = win; var windowNoteChild = (Notebook.NotebookChild)_noteBook[taskTab]; windowNoteChild.Detachable = false; windowNoteChild.TabFill = false; }