public ManageAccounts() { InitializeComponent(); AccounLoad(); try { objManageAccounts = this; } catch { }; }
public ManageAccounts() { InitializeComponent(); Thread Obj_New = new Thread(AccounLoad); Obj_New.Start(); // AccounLoad(); try { objManageAccounts = this; } catch { }; }
private void Button_Click(object sender, RoutedEventArgs e) { try { MessageBoxButton btnC = MessageBoxButton.OK; ManageAccounts obj_Manage_Accounts = new ManageAccounts(); string singleUsername = string.Empty; string siglePassword = string.Empty; string singleproxy = string.Empty; string path = string.Empty; string proxyAddress = string.Empty; string proxyPort = string.Empty; string proxyUserName = string.Empty; string proxyPassword = string.Empty; singleUsername = txt_AddSingleAccount_Account.Text; siglePassword = txt_AddSingleAccount_Password.Password; if (string.IsNullOrEmpty(singleUsername)) { ModernDialog.ShowMessage("Please Enter Account !", "Message Box ", btnC); txt_AddSingleAccount_Account.Focus(); return; } if (string.IsNullOrEmpty(siglePassword)) { ModernDialog.ShowMessage("Please Enter Password !", "Message Box ", btnC); txt_AddSingleAccount_Password.Focus(); return; } try { proxyAddress = txt_AddSingleAccount_ProxyAddress.Text; } catch (Exception ex) { GlobusLogHelper.log.Error("Error : " + ex.StackTrace); } try { proxyPort = txt_AddSingleAccount_ProxyPort.Text; } catch (Exception ex) { GlobusLogHelper.log.Error("Error : " + ex.StackTrace); } try { proxyUserName = txt_AddSingleAccount_ProxyUsername.Text; } catch (Exception ex) { GlobusLogHelper.log.Error("Error : " + ex.StackTrace); } try { proxyPassword = txt_AddSingleAccount_ProxyPassword.Password; } catch (Exception ex) { GlobusLogHelper.log.Error("Error : " + ex.StackTrace); } Qm.AddAccountInDataBase(singleUsername, siglePassword, proxyAddress, proxyPort, proxyUserName, proxyPassword, path); obj_Manage_Accounts.LoadAccountsFromDataBase(); Window parentWindow = (Window)this.Parent; parentWindow.Close(); } catch (Exception ex) { GlobusLogHelper.log.Error("Error : " + ex.StackTrace); } }