示例#1
0
 public void PopulateGroups(object groupTupleObject) {
     try {
         if (GroupsFlowPanel.InvokeRequired) GroupsFlowPanel.Invoke((MethodInvoker)delegate { PopulateGroups(groupTupleObject); });
         else {
             Tuple<GroupDetails, TaskCollection> GroupTupleObject = (Tuple<GroupDetails, TaskCollection>)groupTupleObject;
             GroupDetails GroupDetailsObject = GroupTupleObject.Item1;
             GroupButton GroupButtonObject = new GroupButton(ref GroupDetailsObject);
             GroupButtonObject.Width = GroupsFlowPanel.Width - 30;
             GroupButtonObject.Height = 70;
             GroupButtonObject.Padding = new Padding(5, 5, 5, 5);
             GroupButtonObject.MouseClick += new MouseEventHandler(delegate (object sender, MouseEventArgs e) {
                 try {
                     if (e.Button == MouseButtons.Left) {
                         GroupForm GroupFormObject = new GroupForm(ref GroupTupleObject, ref GroupButtonObject);
                         GroupFormObject.ShowDialog();
                     } else if (e.Button == MouseButtons.Right && GroupTupleObject.Item1.Enabled && GroupTupleObject.Item2.TaskList.Count > 0) {
                         GroupRunner GroupRunnerFormObject = new GroupRunner(ref GroupTupleObject);
                         GroupRunnerFormObject.ShowDialog();
                     }
                 } catch { }
             });
             GroupsFlowPanel.Controls.Add(GroupButtonObject);
             if (++GroupsLoadedCount == NumberOfGroups) {
                 GroupButtonList = GroupsFlowPanel.Controls.OfType<GroupButton>().Cast<GroupButton>().ToList();
                 SortByChangeEnabled(true);
                 SortByComboBox.SelectedIndex = 0;
             }
         }
     } catch {
         GroupsFlowPanel.Invoke((MethodInvoker)delegate { PopulateGroups(groupTupleObject); });
     }
 }
示例#2
0
 public void PopulateGroups(object groupTupleObject)
 {
     try {
         if (GroupsFlowPanel.InvokeRequired)
         {
             GroupsFlowPanel.Invoke((MethodInvoker) delegate { PopulateGroups(groupTupleObject); });
         }
         else
         {
             Tuple <GroupDetails, TaskCollection> GroupTupleObject = (Tuple <GroupDetails, TaskCollection>)groupTupleObject;
             GroupDetails GroupDetailsObject = GroupTupleObject.Item1;
             GroupButton  GroupButtonObject  = new GroupButton(ref GroupDetailsObject);
             GroupButtonObject.Width       = GroupsFlowPanel.Width - 30;
             GroupButtonObject.Height      = 70;
             GroupButtonObject.Padding     = new Padding(5, 5, 5, 5);
             GroupButtonObject.MouseClick += new MouseEventHandler(delegate(object sender, MouseEventArgs e) {
                 try {
                     if (e.Button == MouseButtons.Left)
                     {
                         GroupForm GroupFormObject = new GroupForm(ref GroupTupleObject, ref GroupButtonObject);
                         GroupFormObject.ShowDialog();
                     }
                     else if (e.Button == MouseButtons.Right && GroupTupleObject.Item1.Enabled && GroupTupleObject.Item2.TaskList.Count > 0)
                     {
                         GroupRunner GroupRunnerFormObject = new GroupRunner(ref GroupTupleObject);
                         GroupRunnerFormObject.ShowDialog();
                     }
                 } catch { }
             });
             GroupsFlowPanel.Controls.Add(GroupButtonObject);
             if (++GroupsLoadedCount == NumberOfGroups)
             {
                 GroupButtonList = GroupsFlowPanel.Controls.OfType <GroupButton>().Cast <GroupButton>().ToList();
                 SortByChangeEnabled(true);
                 SortByComboBox.SelectedIndex = 0;
             }
         }
     } catch {
         GroupsFlowPanel.Invoke((MethodInvoker) delegate { PopulateGroups(groupTupleObject); });
     }
 }
示例#3
0
        public void AddGroup(Tuple <GroupDetails, TaskCollection> groupTuppleObject)
        {
            GroupDetails GroupDetailsObject = groupTuppleObject.Item1;
            GroupButton  GroupButtonObject  = new GroupButton(ref GroupDetailsObject);

            GroupButtonObject.Width       = GroupsFlowPanel.Width - 30;
            GroupButtonObject.Height      = 70;
            GroupButtonObject.Padding     = new Padding(5, 5, 5, 5);
            GroupButtonObject.MouseClick += new MouseEventHandler(delegate(object sender, MouseEventArgs e) {
                if (e.Button == MouseButtons.Left)
                {
                    GroupForm GroupFormObject = new GroupForm(ref groupTuppleObject, ref GroupButtonObject);
                    GroupFormObject.ShowDialog();
                }
                else if (e.Button == MouseButtons.Right && groupTuppleObject.Item1.Enabled && groupTuppleObject.Item2.TaskList.Count > 0)
                {
                    GroupRunner GroupRunnerFormObject = new GroupRunner(ref groupTuppleObject);
                    GroupRunnerFormObject.ShowDialog();
                }
            });
            GroupsFlowPanel.Controls.Add(GroupButtonObject);
            GroupButtonList.Add(GroupButtonObject);
        }
示例#4
0
 public void AddGroup(Tuple<GroupDetails, TaskCollection> groupTuppleObject) {
     GroupDetails GroupDetailsObject = groupTuppleObject.Item1;
     GroupButton GroupButtonObject = new GroupButton(ref GroupDetailsObject);
     GroupButtonObject.Width = GroupsFlowPanel.Width - 30;
     GroupButtonObject.Height = 70;
     GroupButtonObject.Padding = new Padding(5, 5, 5, 5);
     GroupButtonObject.MouseClick += new MouseEventHandler(delegate (object sender, MouseEventArgs e) {
         if (e.Button == MouseButtons.Left) {
             GroupForm GroupFormObject = new GroupForm(ref groupTuppleObject, ref GroupButtonObject);
             GroupFormObject.ShowDialog();
         } else if (e.Button == MouseButtons.Right && groupTuppleObject.Item1.Enabled && groupTuppleObject.Item2.TaskList.Count > 0) {
             GroupRunner GroupRunnerFormObject = new GroupRunner(ref groupTuppleObject);
             GroupRunnerFormObject.ShowDialog();
         }
     });
     GroupsFlowPanel.Controls.Add(GroupButtonObject);
     GroupButtonList.Add(GroupButtonObject);
 }