Beispiel #1
0
 private void ListChanged(MembershipList e)
 {
     //update list box
     this.members.Items.Clear();
     for (int i = 0; i < e.Count; i++)
     {
         this.members.Items.Add(e[i].getDisplayText());
     }
     //save
     e.save(path);
 }
Beispiel #2
0
        private void delete_Click(object sender, EventArgs e)
        {
            int index         = members.SelectedIndex;
            var confirmResult = MessageBox.Show("Are you sure to delete " + membership[index].getDisplayText(),
                                                "Confirm Delete!!",
                                                MessageBoxButtons.YesNo);

            if (confirmResult == DialogResult.Yes)
            {
                membership = membership - membership[index];
            }
        }
Beispiel #3
0
 private void memberAdded(Member e)
 {
     membership = membership + e;
 }
Beispiel #4
0
 /// <summary>
 /// This is the method that is called to invoke, or "raise" the event changeHolder.
 /// </summary>
 /// <param name="e">custom event argument</param>
 public virtual void OnChanged(MembershipList e)
 {
     Changed?.Invoke(e);
 }