Пример #1
0
 private void switchIsActivated_Click(object sender, EventArgs e)
 {
     if (guest_id != 0)
     {
         guestPresenter.guestActivation(guest_id, switchIsActivated, lblSwitchStatus);
         if (switchIsActivated.SwitchState == XanderUI.XUISwitch.State.On)
         {
             lblSwitchStatus.Text = "Activated";
         }
         else
         {
             lblSwitchStatus.Text = "Deactivated";
         }
         guestPresenter.loadGuests(dataGuests);
     }
     else
     {
         if (switchIsActivated.SwitchState == XanderUI.XUISwitch.State.On)
         {
             activation           = true;
             lblSwitchStatus.Text = "Activated";
         }
         else
         {
             activation           = false;
             lblSwitchStatus.Text = "Deactivated";
         }
     }
 }
Пример #2
0
 private void switchIsActivated_Click(object sender, EventArgs e)
 {
     if (guest_id != 0)
     {
         guestPresenter.guestActivation(guest_id, switchIsActivated, lblSwitchStatus);
     }
     else if (this.Size != new Size(616, 580))
     {
         if (switchIsActivated.SwitchState == XanderUI.XUISwitch.State.On)
         {
             activation           = true;
             lblSwitchStatus.Text = "Activated";
         }
         else
         {
             activation           = false;
             lblSwitchStatus.Text = "Deactivated";
         }
     }
 }