Ejemplo n.º 1
0
        /// <summary>
        /// Funkcja obsługująca zdarzenie DrawText na NodeControlle. Bierze status Tasku i zmienia kolor
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btx_DrawText_ColorBlock(object sender, Aga.Controls.Tree.NodeControls.DrawEventArgs e)
        {
            Task t = e.Node.Tag as Task;

            e.TextColor = t.getFontColor();
            Task.TaskStatus status = Task.TaskStatus.ERROR;
            if (t != null)
            {
                status = t.Status;
            }
        }
Ejemplo n.º 2
0
        public DialogResult ShowEditDialog(Task t, Task project)
        {
            TaskFontColorBtn.BackColor = t.getFontColor();
            this.EditedTask            = t;
            if (t.Tasks.Count > 0)
            {
                if (this.tableLayoutPanel2.Controls.Contains(nudProgress))
                {
                    chbCompleted.Visible = false;
                    this.tableLayoutPanel2.Controls.Remove(nudProgress);
                    this.tableLayoutPanel2.Controls.Add(ProgressLabel, 5, 2);
                }
            }
            else
            {
                if (this.tableLayoutPanel2.Controls.Contains(ProgressLabel))
                {
                    chbCompleted.Visible = true;
                    this.tableLayoutPanel2.Controls.Remove(ProgressLabel);
                    this.tableLayoutPanel2.Controls.Add(nudProgress, 5, 2);
                }
            }
            if (this.editedTask.Level != 0)
            {
                this.peopleList.Visible = false;
                this.comboBox1.Items.Clear();
                foreach (String person in project.PeopleList)
                {
                    this.comboBox1.Items.Add(person);
                }

                // parent = this.parent;
            }
            else
            {
                this.peopleList.Visible = true;
            }
            return(this.ShowDialog());
        }
Ejemplo n.º 3
0
        public DialogResult ShowEditDialog(Task t, Task project)
        {
            TaskFontColorBtn.BackColor = t.getFontColor();
            this.EditedTask = t;
            if (t.Tasks.Count > 0)
            {
                if (this.tableLayoutPanel2.Controls.Contains(nudProgress))
                {
                    chbCompleted.Visible = false;
                    this.tableLayoutPanel2.Controls.Remove(nudProgress);
                    this.tableLayoutPanel2.Controls.Add(ProgressLabel, 5, 2);
                }
            }
            else
            {
                if (this.tableLayoutPanel2.Controls.Contains(ProgressLabel))
                {
                    chbCompleted.Visible = true;
                    this.tableLayoutPanel2.Controls.Remove(ProgressLabel);
                    this.tableLayoutPanel2.Controls.Add(nudProgress, 5, 2);
                }
            }
            if (this.editedTask.Level != 0)
            {
                this.peopleList.Visible = false;
                this.comboBox1.Items.Clear();
                foreach (String person in project.PeopleList)
                {
                    this.comboBox1.Items.Add(person);
                }

                // parent = this.parent;
            }
            else
            {
                this.peopleList.Visible = true;
            }
            return this.ShowDialog();
        }