Ejemplo n.º 1
0
 private void Window_Closing(object sender, CancelEventArgs e)
 {
     if (StationInformation.isLocked)
     {
         Window unlock = new Unlocking();
         unlock.ShowDialog();
         if (StationInformation.isLocked)
         {
             e.Cancel = true;
         }
         else
         {
             DeletePreviousHistory();
         }
     }
 }
Ejemplo n.º 2
0
 private void menuItemSettings_Click(object Sender, EventArgs e)
 {
     if (!StationInformation.isLocked)
     {
         Window window = new SettingsWindow();
         window.ShowDialog();
     }
     else
     {
         Window unlock = new Unlocking();
         unlock.ShowDialog();
         if (!StationInformation.isLocked)
         {
             Window window = new SettingsWindow();
             window.ShowDialog();
             StationInformation.isLocked = true;
         }
     }
 }
Ejemplo n.º 3
0
 private void menuItemLock_Click(object sender, EventArgs e)
 {
     if (!StationInformation.isLocked)
     {
         StationInformation.isLocked = true;
         menuItemStatus.Text         = "Aplikacja zablokowana";
         menuItemLock.Text           = "Odblokuj";
     }
     else
     {
         Window unlock = new Unlocking();
         unlock.ShowDialog();
         if (!StationInformation.isLocked)
         {
             menuItemStatus.Text = "Aplikacja odblokowana";
             menuItemLock.Text   = "Zablokuj";
         }
     }
 }