예제 #1
0
파일: MainForm.cs 프로젝트: tansent/GoBang
 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;
         }
     }
 }
예제 #2
0
파일: MainForm.cs 프로젝트: tansent/GoBang
 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;
         }
     }
 }