Ejemplo n.º 1
0
 public SelectableTask(CanvasGroup group, Task task)
     : base(group)
 {
     this.group = group;
     this._task = task;
     Init ();
 }
Ejemplo n.º 2
0
 public bool RemoveTask(Task task)
 {
     if (taskList.Contains (task) && task!= null)
     {
         taskList.Remove (task);
         return true;
     }
     return false;
 }
Ejemplo n.º 3
0
 public bool AddTask(Task task)
 {
     if (task != null && !taskList.Contains (task))
     {
         taskList.Add (task);
         return true;
     }
     return false;
 }
Ejemplo n.º 4
0
 public TaskInfoDialog(Task task)
 {
     this.task = task;
     Init ();
     startHourSpin.Value = task.StartingHour;
     endHourSpin.Value = task.EndingHour;
     startMinuteSpin.Value = task.StartingMinute;
     endMinuteSpin.Value = task.EndingMinute;
     priorityOption.SetHistory ((uint)task.Priority);
     dayOption.SetHistory ((uint)task.Day);
     textView.Buffer.Text = (task.Description == null) ? "" : task.Description;
 }
 public ReadonlyTaskInfoDialog(Task task)
 {
     this.task = task;
     Init ();
     startingHourLabel.Text = task.StartingHour.ToString ();
     endingHourLabel.Text = task.EndingHour.ToString ();
     startingMinuteLabel.Text = task.StartingMinute.ToString ();
     endingMinuteLabel.Text = task.EndingMinute.ToString ();
     priorityLabel.Text = task.Priority.ToString ();
     dayLabel.Text = task.Day.ToString ();
     descriptionTextView.Buffer.Text = (task.Description == null) ? "" : task.Description;
 }
Ejemplo n.º 6
0
 private void PointToTime(Cell firstCell, Cell curCell, Task task, double firstX, double firstY, double curX, double curY)
 {
     task.EndingHour = curCell.Row + 8;
     task.EndingMinute = (int) ((curY - (curCell.Row * curCell.Height)) / PlannerWindow.minuteLength);
 }
Ejemplo n.º 7
0
 private void StartDrawing(EventButton ev)
 {
     if (ev.X >= taskArea.X1 && ev.X <= taskArea.X2
             && ev.Y >= taskArea.Y1 && ev.Y <= taskArea.Y2)
     {
         Task task = new Task ();
         stask = new SelectableTask (group, task);
         double minRounded = RoundMinutes (firstCell, ev.Y);
         stask.X1 = firstCell.Width * firstCell.Column;
         firstX = stask.X1;
         stask.Y1 = minRounded;
         firstY = stask.Y1;
         stask.X2 = firstCell.Width * (firstCell.Column + 1);
         stask.Y2 = stask.Y1 + firstCell.Height/4;
         task.StartingHour = firstCell.Row + 8;
         task.StartingMinute = (int)((minRounded - (firstCell.Row * firstCell.Height))/ PlannerWindow.minuteLength);
         task.Priority = TaskPriority.Medium;
         task.Day = (WeekDay)firstCell.Column - 1; //starting on monday = 0
         App.CurrentTaskSet.Add (task);
         TaskList.Add (stask);
     }
 }