Exemple #1
0
 private void SetTextProperty(GobangRoom table, int index, string name)
 {
     if (table.InvokeRequired == true)
     {
         SetTextPropertyDelegate d = new SetTextPropertyDelegate(SetTextProperty);
         table.Invoke(d, table, index, name);
     }
     else
     {
         if (index == 0) //Black Player
         {
             table.BlackPlayerName = name;
         }
         else           //White Player
         {
             table.WhitePlayerName = name;
         }
     }
 }
Exemple #2
0
 private void SetBoolProperty(GobangRoom table, int index, bool boolValue) //table, black or white, sitted or empty
 {
     if (table.InvokeRequired == true)
     {
         SetBoolPropertyDelegate d = new SetBoolPropertyDelegate(SetBoolProperty);
         table.Invoke(d, table, index, boolValue);
     }
     else
     {
         if (index == 0)  //Black Player
         {
             table.HasBlackPlayer = boolValue;
         }
         else             //White Player
         {
             table.HasWhitePlayer = boolValue;
         }
     }
 }