Esempio n. 1
0
 private void Label_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         Registrant r = Group.findRegistrantByGroupTag(((Label)sender).Text);
         if (r != null && askDelete(r))
         {
             Group.removeRegistrant(r);
             DataManager.GroupManager.updateUI(Group.Division);
         }
     }
     else
     {
         GroupPanel_MouseDown(this, e);
     }
 }
Esempio n. 2
0
 private void RegistrantPanel_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         this.DoDragDrop(this, DragDropEffects.All);
     }
     else if (e.Button == MouseButtons.Right)
     {
         Registrant       r      = Registrant;
         RegistrantEditor editor = new RegistrantEditor(ref r);
         editor.ShowDialog();
         if (editor.DialogResult == DialogResult.OK && Registrant.hasData())
         {
             ((RegistrantsPanel)Parent).refreshRegistrants(DataManager.CurrentDivision);
         }
     }
 }
Esempio n. 3
0
 public void import(string line)
 {
     string[] parts = line.Split(',');
     if (parts.Length < 5)
     {
         return;
     }
     ID       = parts[0];
     Order    = Int16.Parse(parts[1]);
     Division = (Division)(Enum.Parse(typeof(Division), parts[2]));
     for (int i = 3; i < parts.Length; i++)
     {
         Registrant r = DataManager.RegistrantManager.getRegistrantByID(parts[i], Division);
         if (r != null)
         {
             addRegistrant(r);
         }
     }
 }
Esempio n. 4
0
 public string generateGroupPanelString(Registrant reg)
 {
     return(reg.LastName + ", " + reg.FirstName + " (" + reg.Dojo + ")");
 }
Esempio n. 5
0
        private bool askDelete(Registrant r)
        {
            DialogResult result = MessageBox.Show("Really remove " + r.FirstName + " from group?", "Remove Registrant", MessageBoxButtons.YesNoCancel);

            return(result.Equals(DialogResult.Yes));
        }