private void Login_Click(object sender, RoutedEventArgs e) { try { remember(); cnt++; shopWindows = new ShopWindows(tbLogin.Text, dp.HashPassword(tbPassword.Password)); shopWindows.Show(); Close(); } catch (FaultException ex) { MessageBox.Show(string.Format("{0} - {1}", ex.Code.Name, ex.Message), "ERROR", MessageBoxButton.OK); } catch (Exception ex) { MessageBox.Show(ex.Message, "ERROR", MessageBoxButton.OK); } finally { if (cnt != 0) { resetpassword.Visibility = Visibility.Visible; } } }
public Test() { InitializeComponent(); Loaded += Window_Loaded; ShopWindows shopWindows = new ShopWindows("admin", dp.HashPassword("admin")); }
public CallbackClass(ShopWindows shopWindows) { this.shopWindows = shopWindows; }