Пример #1
0
 void ResolveConflict(Table table, int i)
 {
     // swap it in data
     if (table == tableTeams)
     {
         SwapItems(teams, i);
     }
     else
     {
         SwapItems(speakers, i);
     }
     // i is one less than row (since header)
     MiscHelpers.SwapTableRows(table, (uint)i, (uint)i + 1);
     // update pos labels
     foreach (Widget w in table)
     {
         Table.TableChild c = table[w] as Table.TableChild;
         if (c.LeftAttach == 0 && c.TopAttach == i)
         {
             ((Label)(w as EventBox).Child).Text = i.ToString();
         }
         else if (c.LeftAttach == 0 && c.TopAttach == i + 1)
         {
             ((Label)(w as EventBox).Child).Text = (i + 1).ToString();
         }
     }
     // update all marking, this affects also speakers
     // if teams are switched...
     UpdateBreakroundMarking();
 }
Пример #2
0
 void SwapTableRows(uint row1, uint row2)
 {
     MiscHelpers.SwapTableRows(table, row1, row2);
 }