Exemple #1
0
 static public void checking()
 {
     while (true)
     {
         if ((AllForms.booked != null && !AllForms.booked.Visible || AllForms.booked == null) &&
             (AllForms.infoBooking != null && !AllForms.infoBooking.Visible || AllForms.infoBooking == null) &&
             (AllForms.infoNumbers != null && !AllForms.infoNumbers.Visible || AllForms.infoNumbers == null) &&
             (AllForms.menuGuest != null && !AllForms.menuGuest.Visible || AllForms.menuGuest == null) &&
             (AllForms.offers != null && !AllForms.offers.Visible || AllForms.offers == null) &&
             (AllForms.profile != null && !AllForms.profile.Visible || AllForms.profile == null) &&
             (AllForms.registration != null && !AllForms.registration.Visible || AllForms.registration == null) &&
             (AllForms.types != null && !AllForms.types.Visible || AllForms.types == null) &&
             (AllForms.cancBooking != null && !AllForms.cancBooking.Visible || AllForms.cancBooking == null) &&
             (AllForms.anketa != null && !AllForms.anketa.Visible || AllForms.anketa == null) &&
             (AllForms.changePass != null && !AllForms.changePass.Visible || AllForms.changePass == null) &&
             (AllForms.bookingSettle != null && !AllForms.bookingSettle.Visible || AllForms.bookingSettle == null) &&
             (AllForms.faceSettling != null && !AllForms.faceSettling.Visible || AllForms.faceSettling == null) &&
             (AllForms.infoGuests != null && !AllForms.infoGuests.Visible || AllForms.infoGuests == null) &&
             (AllForms.receptionistMenu != null && !AllForms.receptionistMenu.Visible || AllForms.receptionistMenu == null) &&
             (AllForms.unsettling != null && !AllForms.unsettling.Visible || AllForms.unsettling == null) &&
             (AllForms.CleanerMenu != null && !AllForms.CleanerMenu.Visible || AllForms.CleanerMenu == null) &&
             (Program.authorisation != null && !Program.authorisation.Visible || Program.authorisation == null))
         {
             GuestCommands.sendClose();
             System.Environment.Exit(0);
         }
     }
 }
Exemple #2
0
 public static void Close()
 {
     GuestCommands.sendClose();
     if (client != null)
     {
         client.Close();
     }
     if (stream != null)
     {
         stream.Close();
     }
 }