예제 #1
0
 private void UpdateButton(Button button, Color color)
 {
     if (button.InvokeRequired)
     {
         UpdateButtonDelegate d = new UpdateButtonDelegate(UpdateButton);
         button.Invoke(d, new object[] { button, color });
     }
     else
     {
         button.BackColor = color;
     }
 }
예제 #2
0
 private void UpdateButton(Button button, bool isLive)
 {
     if (button.InvokeRequired)
     {
         UpdateButtonDelegate d = new UpdateButtonDelegate(UpdateButton);
         button.Invoke(d, new object[] { button, isLive });
     }
     else
     {
         if (!isLive)
         {
             button.BackColor = deadCellColor;
         }
         else
         {
             button.BackColor = liveCellColor;
         }
     }
 }