Exemple #1
0
        public NotesControl(TaskControl inParentTaskControl, Workspace.Task inTask)
        {
            mParentTaskControl = inParentTaskControl;
            mTask = inTask;

            InitializeComponent();
        }
Exemple #2
0
        public TaskControl(PileControl inPileControl, Workspace.Task inTask)
        {
            InitializeComponent();

            mTask = inTask;
            mParentPileControl = inPileControl;

            // Set text
            if (inTask.Text != null)
            {
                Workspace.SetFlowDocumentContentFromXML(richTextBox.Document, inTask.Text);
            }

            // Init external links
            foreach (Workspace.ExternalLink link in inTask.ExternalLinks)
            {
                AddNewExternalLinkControl(link);
            }

            // Set the task's header color
            UpdateTaskHeaderColor();

            // Init notes
            if (inTask.Notes != null)
            {
                AddNewNotesControl();
            }
        }
        public EditNotesWindow(Workspace inWorkspace, Workspace.Task inTask)
        {
            InitializeComponent();

            // Init task after UI has been initialized, as the init of the UI will trigger a notesTextBox_TextChanged
            mTask = inTask;

            if (inTask.Text != null)
            {
                Workspace.SetFlowDocumentContentFromXML(richTextBox.Document, inTask.Text);
            }

            Workspace.SetFlowDocumentContentFromXML(notesTextBox.Document, inTask.Notes);
        }
        private TaskControl AddNewTaskControl(Workspace.Task inTask)
        {
            int index = mPile.Tasks.IndexOf(inTask);

            if (index < 0)
            {
                index = mPile.Tasks.Count;
            }

            TaskControl task_control = new TaskControl(this, inTask);

            stackPanel.Children.Insert(2 + index, task_control);

            task_control.moveButton.MouseDown += TaskControl_MouseDown;
            task_control.moveButton.MouseUp   += TaskControl_MouseUp;
            task_control.moveButton.MouseMove += TaskControl_MouseMove;

            return(task_control);
        }
 private void AddTaskRect_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     Workspace.Task new_task = new Workspace.Task();
     mPile.InsertTask(0, new_task);
     AddNewTaskControl(new_task);
 }
Exemple #6
0
        public void ShowEditNotesWindow(Workspace.Task inTask)
        {
            EditNotesWindow window = new EditNotesWindow(Workspace.Instance, inTask);

            window.ShowDialog();
        }