Exemple #1
0
        /**************************************************************************************************/
        private void TaskListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                Task t = (Task)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        PendingTaskSummaryRow ptsr = new PendingTaskSummaryRow(t);
                        ptsr.Width = flowLayoutPanel1.Width - 10;
                        flowLayoutPanel1.Controls.Add(ptsr);
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        Control doomedptsr = null;
                        foreach (Control c in flowLayoutPanel1.Controls)
                        {
                            if (((PendingTaskSummaryRow)c).GetTask() == t)
                            {
                                doomedptsr = c;
                            }
                        }
                        if (doomedptsr != null)
                            flowLayoutPanel1.Controls.Remove(doomedptsr);
                        break;
                }
            }
        }
Exemple #2
0
 /**************************************************************************************************/
 private void TaskListLoaded(HraListLoadedEventArgs e)
 {
     flowLayoutPanel1.Controls.Clear();
     tasks.Sort( Task.CompareTasksByReverseDate);
     foreach (Task t in tasks)
     {
         PendingTaskSummaryRow ptsr = new PendingTaskSummaryRow(t);
         ptsr.Width = flowLayoutPanel1.Width - 10;
         flowLayoutPanel1.Controls.Add(ptsr);
     }
 }
 /**************************************************************************************************/
 private void TaskListLoaded(HraListLoadedEventArgs e)
 {
     flowLayoutPanel1.Controls.Clear();
     tasks.Sort( Task.CompareTasksByReverseDate);
     foreach (Task t in tasks)
     {
         PendingTaskSummaryRow ptsr = new PendingTaskSummaryRow(t);
         ptsr.Width = flowLayoutPanel1.Width - 10;
         flowLayoutPanel1.Controls.Add(ptsr);
     }
 }
        /**************************************************************************************************/
        private void TaskListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                Task t = (Task)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        PendingTaskSummaryRow ptsr = new PendingTaskSummaryRow(t);
                        ptsr.Width = flowLayoutPanel1.Width - 10;
                        flowLayoutPanel1.Controls.Add(ptsr);
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        Control doomedptsr = null;
                        foreach (Control c in flowLayoutPanel1.Controls)
                        {
                            if (((PendingTaskSummaryRow)c).GetTask() == t)
                            {
                                doomedptsr = c;
                            }
                        }
                        if (doomedptsr != null)
                            flowLayoutPanel1.Controls.Remove(doomedptsr);
                        break;
                }
            }
        }