private void LoginClick(object sender, RoutedEventArgs e) { var login = loginTextBox.Text; var pass = passwordBox.Password; try { if (Security.VerifyCredentials(login, pass)) { Hide(); accounting = new AccountingPCWindow(); accounting.Show(); Close(); } else { MessageBox.Show("Неправильный логин или пароль", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error); } } catch (Exception exception) { MessageBox.Show(exception.Message, exception.GetType().Name, MessageBoxButton.OK, MessageBoxImage.Error); } }
public ChangePlaceWindow(AccountingPCWindow window) { CurrentPlace = new Place(); InitializeComponent(); try { var assembly = Assembly.GetExecutingAssembly(); var resourceName = assembly.GetManifestResourceNames().Single(s => s.EndsWith("icon.ico")); using (var stream = assembly.GetManifestResourceStream(resourceName)) { if (stream != null) { Icon = BitmapFrame.Create(stream); } } } catch (Exception ex) { Clipboard.SetText(ex.ToString()); } Owner = window; Accounting = window; devicesOnPlace.ItemContainerGenerator.StatusChanged += ItemContainerGenerator_StatusChanged; }
private void CancelClick(object sender, RoutedEventArgs e) { accounting = null; Close(); }
public AudienceManagement(AccountingPCWindow accountingPCWindow) { AccWindow = accountingPCWindow; }