Beispiel #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);
     }
 }
Beispiel #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);
         }
     }
 }
Beispiel #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);
         }
     }
 }
Beispiel #4
0
 public string generateGroupPanelString(Registrant reg)
 {
     return(reg.LastName + ", " + reg.FirstName + " (" + reg.Dojo + ")");
 }
Beispiel #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));
        }