Esempio n. 1
0
 public void ToggleButtons(bool really = true)
 {
     if (buttonSetBoats.InvokeRequired)
     {
         ShowButtonDelegate d = new ShowButtonDelegate(ToggleButtons);
         this.Invoke(d, new object[] { really });
     }
     else
     {
         buttonSetBoats.Enabled = really;
         buttonStrike.Enabled = !really;
     }
 }
Esempio n. 2
0
 public void ShowButtons(bool really)
 {
     if (buttonSetBoats.InvokeRequired || buttonStrike.InvokeRequired)
     {
         ShowButtonDelegate d = new ShowButtonDelegate(ShowButtons);
         this.Invoke(d, new object[] { really });
     }
     else
     {
         buttonSetBoats.Visible = really;
         buttonStrike.Visible = really;
         buttonEndGame.Visible = really;
     }
 }