Last active
November 17, 2017 14:21
-
-
Save Willy-Kimura/75948353658b3452135c5a34bcc15f43 to your computer and use it in GitHub Desktop.
This adds a list of TaskItems inside our task-list panel section.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This adds a new TaskItem inside our task-list panel section. | |
public void AddTask(TaskItem.TaskLabels task_label, bool show_separator, string task_subject, string task_title, string task_subtitle) | |
{ | |
// Create a new TaskItem and set the required parameters with the "Add" method. | |
TaskItem task_item = new TaskItem(); | |
task_item.Add(task_label, show_separator, task_subject, task_title, task_subtitle); | |
// Then set the TaskItem's Dock property to "Top". | |
task_item.Dock = DockStyle.Top; | |
// Add the TaskItem to the Panel. | |
Panel1.Controls.Add(task_item); | |
// Finally, bring the TaskItem to the front to avoid disarrangements. | |
task_item.BringToFront(); | |
} | |
// Add a list of pre-defined TaskItems. | |
public void AddTasks() | |
{ | |
AddTask(TaskItem.TaskLabels.General, true, "EMAIL", "Send over investment documents", "Assigned to Mark R. - Added 12 Jun 2014"); | |
AddTask(TaskItem.TaskLabels.General, true, "DOCUMENT", "Prepare for a bi-weekly meeting to discuss new features", "Assigned to Amy G. - Added 12 Jun 2014"); | |
AddTask(TaskItem.TaskLabels.Important, true, "SCHEDULE - OVERDUE FOR 3 DAYS", "Schedule a call with Claudia for Thursday", "Assigned to Quinn T. - Added 12 Jun 2014"); | |
AddTask(TaskItem.TaskLabels.Finished, true, "EMAIL", "Send over investment documents", "Assigned to Mark R. - Added 12 Jun 2014"); | |
AddTask(TaskItem.TaskLabels.General, false, "BOOKING", "Register client for Monday meeting", "Assigned to James P. - Added 12 Jun 2014"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment