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;
        }
예제 #2
0
        public void LoginTest()
        {
            var dlg = new SysconCommon.GUI.SMBLogin();
            dlg.ShowDialog();
            var username = dlg.LoggedInUser;

            Assert.IsNotNull(username);
        }
예제 #3
0
        public string RequireSMBLogin()
        {
            var dlg = new SysconCommon.GUI.SMBLogin(this);
            dlg.ShowDialog();
            if (dlg.LoggedInUser != null)
                _logged_in_user = dlg.LoggedInUser;

            return dlg.LoggedInUser;
        }