Beispiel #1
0
        public List(string listName, int boardId)
        {
            InitializeComponent();
            taskPanel.BackColor = Color.FromArgb(rgb.Next(minValue, maxValue), rgb.Next(minValue, maxValue), rgb.Next(minValue, maxValue));
            ListNameLabel.Text  = listName;

            var tasks = LinqToSQLCRUD.ReadTasks(ListId);

            foreach (var task in tasks)
            {
                LinkLabel taskLink = new LinkLabel();
                taskLink.Text            = taskMarker + task.TaskName + "\n";
                taskLink.Tag             = task.TasktId;
                taskLink.Font            = taskFont;
                taskLink.LinkColor       = taskLinkColor;
                taskLink.ActiveLinkColor = taskActiveLinkColor;
                taskLink.Click          += (mySender, myEventArgs) => ViewTask_Click(mySender, myEventArgs, (int)taskLink.Tag);

                taskPanel.Controls.Add(taskLink);
            }
        }
Beispiel #2
0
        private void Refresh(int listId)
        {
            var tasks = LinqToSQLCRUD.ReadTasks(listId);

            taskPanel.Controls.Clear();

            foreach (var task in tasks)
            {
                LinkLabel taskLink = new LinkLabel();
                taskLink.Text            = taskMarker + task.TaskName + "\n"; //task.TaskName;
                taskLink.Tag             = task.TasktId;
                taskLink.Font            = taskFont;
                taskLink.LinkColor       = taskLinkColor;
                taskLink.ActiveLinkColor = taskActiveLinkColor;
                taskLink.Click          += (mySender, myEventArgs) => ViewTask_Click(mySender, myEventArgs, (int)taskLink.Tag);



                taskPanel.Controls.Add(taskLink);
            }
        }