Beispiel #1
0
        void NewUserTaskClicked(object obj, EventArgs e)
        {
            Task task = new Task();

            task.WorkspaceObject = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem;
            updating             = true;
            TaskService.UserTasks.Add(task);
            updating = false;
            TreeIter iter = store.AppendValues(GettextCatalog.GetString(Enum.GetName(typeof(TaskPriority), task.Priority)), task.Completed, task.Description, task, GetColorByPriority(task.Priority), task.Completed ? (int)Pango.Weight.Light : (int)Pango.Weight.Bold);

            view.Selection.SelectIter(iter);
            TreePath path = store.GetPath(iter);

            view.ScrollToCell(path, view.Columns[(int)Columns.Description], true, 0, 0);
            view.SetCursorOnCell(path, view.Columns[(int)Columns.Description], cellRendDesc, true);
            TaskService.SaveUserTasks(task.WorkspaceObject);
        }
Beispiel #2
0
        void NewUserTaskClicked(object obj, EventArgs e)
        {
            TaskListEntry task = new TaskListEntry();

            task.WorkspaceObject = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem;
            updating             = true;
            TaskService.UserTasks.Add(task);
            updating = false;
            var      text = priorities [GetEnumIndex(task.Priority)];
            TreeIter iter = store.AppendValues(text, task.Completed, task.Description, task, GetColorByPriority(task.Priority), task.Completed ? (int)Pango.Weight.Light : (int)Pango.Weight.Bold);

            view.Selection.SelectIter(sortModel.ConvertChildIterToIter(iter));
            TreePath sortedPath = sortModel.ConvertChildPathToPath(store.GetPath(iter));

            view.ScrollToCell(sortedPath, view.Columns[(int)Columns.Description], true, 0, 0);
            view.SetCursorOnCell(sortedPath, view.Columns[(int)Columns.Description], cellRendDesc, true);
            TaskService.SaveUserTasks(task.WorkspaceObject);
        }