private void btnOut_Click(object sender, EventArgs e) { var res = MessageBox.Show("你确定要重新登陆吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (res == DialogResult.Yes) { SaveSomeSet(); ShowLogin?.Invoke(); this.Close(); } }
/// <summary> /// Save the General.Modules settings to the settings file /// </summary> /// <param name="pathsNode">XML-node for the General.Modules settings</param> public void Save(XmlNode modulesNode) { string xpath; //XmlNode node; xpath = "./showLogin"; SettingsHelper.SetSettingValue(xpath, modulesNode, ShowLogin.ToString()); xpath = "./usageLogging"; SettingsHelper.SetSettingValue(xpath, modulesNode, UsageLogging.ToString()); xpath = "./savedQueries"; SettingsHelper.SetSettingValue(xpath, modulesNode, SavedQueries.ToString()); }