Exemplo n.º 1
0
 public void AddHand(Hand hand)
 {
     Methods.UiInvoke(() =>
     {
         if (_handsInfo.All(a => a.Hand.HandNumber != hand.HandNumber))
         {
             _handsInfo.Add(new HandInfo(hand));
         }
         GridView_TablesInfo.ResetColumnWidths();
     });
 }
Exemplo n.º 2
0
 public void UpdateView(List <Table> tables)
 {
     Methods.UiInvoke(() =>
     {
         // remove non-existing
         foreach (var tableInfo in _tablesInfo.Where(ti => tables.All(t => t != ti.Table)).ToArray())
         {
             _tablesInfo.Remove(tableInfo);
         }
         // find of add new
         foreach (var table in tables)
         {
             TableInfo tableInfo = _tablesInfo.FirstOrDefault(ti => ti.Table == table);
             if (tableInfo == null)
             {
                 tableInfo = new TableInfo(table);
                 _tablesInfo.Add(tableInfo);
             }
             tableInfo.Update();
         }
         // fit grid view
         GridView_TablesInfo.ResetColumnWidths();
     });
 }