public override string Click() { var oldDir = Value; var oldmbdir = Env.GetMBDir(); var newDir = base.Click(); if (newDir != oldDir) { Env.SetMBDir(newDir); var loginScreen = new SMBLogin(); if (loginScreen.ShowDialog() != DialogResult.OK) { Value = oldDir; } if(ConfigVarName != "mbdir") Env.SetMBDir(oldmbdir); } return Value; }
public void LoginTest() { var dlg = new SysconCommon.GUI.SMBLogin(); dlg.ShowDialog(); var username = dlg.LoggedInUser; Assert.IsNotNull(username); }
public string RequireSMBLogin() { var dlg = new SysconCommon.GUI.SMBLogin(this); dlg.ShowDialog(); if (dlg.LoggedInUser != null) _logged_in_user = dlg.LoggedInUser; return dlg.LoggedInUser; }