public DialogResult Show(String pMessage, string user, string password) { DialogResult dr; using (FRM_AuthenticationForm wAuthForm = new FRM_AuthenticationForm()) { wAuthForm.Auth_Title_Font = Font; //wAuthForm.Auth_Title_Image = Auth_Title_Image; //wAuthForm.Auth_Title_Text = Auth_Title_Text; //wAuthForm.InitCredentials(user, password); dr= wAuthForm.ShowDialog(this); } return dr; }
public DialogResult ShowAuthenticationForm(string user, string password) { DialogResult dr; using (FRM_AuthenticationForm wAuthForm = new FRM_AuthenticationForm()) { wAuthForm.Auth_Title_Font = Font; //wAuthForm.Auth_Title_Image = Auth_Title_Image; //wAuthForm.Auth_Title_Text = Auth_Title_Text; wAuthForm.InitCredentials(user, password); dr = wAuthForm.ShowDialog(this); if (dr == System.Windows.Forms.DialogResult.OK) { storage.StorageObject.UserNameLogin = wAuthForm.UserNameLogin; storage.StorageObject.Password = wAuthForm.Password; } } storage.Save(); return dr; }