Beispiel #1
0
 public static void ChangeButtonTo(string btn)
 {
     if (statusForm.btnStop.InvokeRequired)
     {
         ChangeButtonCallback d = new ChangeButtonCallback(ChangeButtonTo);
         statusForm.Invoke(d, new object[] { btn });
     }
     else
     {
         //statusForm.btnClose.Visible = !(statusForm.btnClose.Visible);
         //statusForm.btnStop.Visible = !(statusForm.btnStop.Visible);
         if (btn.Equals("Stop"))
         {
             statusForm.btnStop.Visible  = true;
             statusForm.btnClose.Visible = false;
         }
         else
         {
             statusForm.btnStop.Visible  = false;
             statusForm.btnClose.Visible = true;
         }
     }
 }
Beispiel #2
0
        public static void ChangeButtonTo(string btn)
        {
            if (statusForm.btnStop.InvokeRequired)
            {
                ChangeButtonCallback d = new ChangeButtonCallback(ChangeButtonTo);
                statusForm.Invoke(d, new object[] { btn });
            }
            else
            {
                //statusForm.btnClose.Visible = !(statusForm.btnClose.Visible);
                //statusForm.btnStop.Visible = !(statusForm.btnStop.Visible);
                if (btn.Equals("Stop"))
                {
                    statusForm.btnStop.Visible = true;
                    statusForm.btnClose.Visible = false;
                }
                else
                {
                    statusForm.btnStop.Visible = false;
                    statusForm.btnClose.Visible = true;
                }
            }

        }