Esempio n. 1
0
        private void UnlockServices(object sender, RoutedEventArgs e)
        {
            ProtectServiceWindow UnlockWindow = new ProtectServiceWindow();

            UnlockWindow.Title = "Unlock protected Services";
            if (UnlockWindow.ShowDialog() == true)
            {
                foreach (Service currentService in servicesList.Items)
                {
                    currentService.UnProtect(UnlockWindow.Password.Text);
                }
            }
        }
Esempio n. 2
0
 private void ProtectService(object sender, RoutedEventArgs e)
 {
     if (servicesList.SelectedItems.Count == 1)
     {
         Service CurrentService             = (Service)servicesList.SelectedItem;
         ProtectServiceWindow ProtectWindow = new ProtectServiceWindow();
         ProtectWindow.Title = "(Un)protect service '" + CurrentService.Name + "'";
         if (ProtectWindow.ShowDialog() == true)
         {
             CurrentService.Protect(ProtectWindow.Password.Text);
             ExtEvents.ChangeDocumentEvent.Raise();
         }
     }
 }