Example #1
0
        /// <summary>
        /// Configura o cursor corrento quando o drag começa
        /// </summary>
        /// <param name="td"></param>
        /// <param name="e"></param>
        void DragStart(TarefaDisplay td, MouseEventArgs e)
        {
            this.dragging = td;

            ShowBalloonTip(td);

            this.Cursor = Cursors.SizeAll;
        }
Example #2
0
        private void ShowBalloonTip(TarefaDisplay td)
        {
            string message = "";

            switch (td.Tarefa.Status)
            {
            case Statuses.NaoIniciada:
                message = "Em Andamento";
                break;

            case Statuses.EmAndamento:
                message = "Concluída";
                break;
            }

            this.notifyIcon1.BalloonTipText = String.Format("Esta tarefa pode se tornar '{0}'", message);
            this.notifyIcon1.ShowBalloonTip(1000);
        }
Example #3
0
        private void AddTarefa(Tarefa t)
        {
            t.PropertyChanged += TarefaPropertyChanged;
            TarefaDisplay td = new TarefaDisplay(t);
            td.DragStart += DragStart;
            td.DragEnd += DragEnd;

            switch (t.Status)
            {
                case Statuses.NaoIniciada:
                    this.pnlNaoIniciadas.Add(td);
                    break;
                case Statuses.EmAndamento:
                    this.pnlEmAndamento.Add(td);
                    break;
                case Statuses.Concluida:
                    this.pnlConcluidas.Add(td);
                    break;
            }
        }
Example #4
0
        private void AddTarefa(Tarefa t)
        {
            t.PropertyChanged += TarefaPropertyChanged;
            TarefaDisplay td = new TarefaDisplay(t);

            td.DragStart += DragStart;
            td.DragEnd   += DragEnd;

            switch (t.Status)
            {
            case Statuses.NaoIniciada:
                this.pnlNaoIniciadas.Add(td);
                break;

            case Statuses.EmAndamento:
                this.pnlEmAndamento.Add(td);
                break;

            case Statuses.Concluida:
                this.pnlConcluidas.Add(td);
                break;
            }
        }
 void TarefaDisplay_DragStart(TarefaDisplay td, MouseEventArgs e)
 {
     DisplayComplementar();
 }
 private void TarefaDisplay_DragEnd(TarefaDisplay sender, MouseEventArgs e)
 {
     Display();
 }
Example #7
0
 public void Add(TarefaDisplay tarefa)
 {
     // Este método é um dos que parece trivial, mas auxilia bastante no encapsulamento
     // Poderíamos trocar o tipo de panel ou a maneira que as TarefaDisplay são exibidas sem mais problemas
     this.panel.Controls.Add(tarefa);
 }
Example #8
0
 void TarefaDisplay_DragStart(TarefaDisplay td, MouseEventArgs e)
 {
     DisplayComplementar();
 }
Example #9
0
 private void TarefaDisplay_DragEnd(TarefaDisplay sender, MouseEventArgs e)
 {
     Display();
 }
Example #10
0
 public void Add(TarefaDisplay tarefa)
 {
     // Este método é um dos que parece trivial, mas auxilia bastante no encapsulamento
     // Poderíamos trocar o tipo de panel ou a maneira que as TarefaDisplay são exibidas sem mais problemas
     this.panel.Controls.Add(tarefa);
 }
Example #11
0
        private void ShowBalloonTip(TarefaDisplay td)
        {
            string message = "";
            switch (td.Tarefa.Status)
            {
                case Statuses.NaoIniciada:
                    message = "Em Andamento";
                    break;
                case Statuses.EmAndamento:
                    message = "Concluída";
                    break;
            }

            this.notifyIcon1.BalloonTipText = String.Format("Esta tarefa pode se tornar '{0}'", message);
            this.notifyIcon1.ShowBalloonTip(1000);
        }
Example #12
0
        /// <summary>
        /// Configura o cursor corrento quando o drag começa
        /// </summary>
        /// <param name="td"></param>
        /// <param name="e"></param>
        void DragStart(TarefaDisplay td, MouseEventArgs e)
        {
            this.dragging = td;

            ShowBalloonTip(td);

            this.Cursor = Cursors.SizeAll;
        }
Example #13
0
 void DragEnd(TarefaDisplay td, MouseEventArgs e)
 {
     this.dragging = null;
     this.Cursor = Cursors.Default;
 }
Example #14
0
 void DragEnd(TarefaDisplay td, MouseEventArgs e)
 {
     this.dragging = null;
     this.Cursor   = Cursors.Default;
 }