コード例 #1
0
        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;
        }
コード例 #2
0
        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;
        }