Exemplo n.º 1
0
 private void cmdNewPlayer_Click(object sender, EventArgs e)
 {
     var wnd = new Forms.AddPlayer();
     if (wnd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         list.MasterList.Add(wnd.DataItem);
         list.WeekendList = list.MasterList.Where((x) => (x.AvailableDays != 0x00 && x.AvailableDays != All)).ToList();
         this.playerListSource.ResetBindings(false);
     }
 }
Exemplo n.º 2
0
 private void cmdEditPlayer_Click(object sender, EventArgs e)
 {
     Data_Classes.Player p = (Data_Classes.Player)masterListBindingSource.Current;
     if (p != null)
     {
         Forms.AddPlayer wnd = new Forms.AddPlayer(ref p);
         wnd.ShowDialog();
         list.WeekendList = list.MasterList.Where((x) => (x.AvailableDays != 0x00 && x.AvailableDays != All)).ToList();
         list.HealerList = list.MasterList.Where((x) => (x.Job == Data_Classes.Player.Jobs.MilitaryAdvisor || (x.Job == Data_Classes.Player.Jobs.ChairpersonOfJoongBang && x.Level > 70))).ToList();
         this.playerListSource.ResetBindings(false);
     }
 }