/// <summary> /// 保存检索条件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TFSRecordForm_FormClosed(object sender, FormClosedEventArgs e) { // 提交和Review名称提供记忆功能 string strCoder = this.search_code_textBox.Text.Trim(); IniInterface.SetValue("Search", "Checkin", strCoder); string strReviewer = this.search_review_textBox.Text.Trim(); IniInterface.SetValue("Search", "Reviewer", strReviewer); }
/// <summary> /// 窗口关闭时卸载钩子 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { try { // 保存配置文件 IniInterface.SetValue("Database", "Server", this.db_ip_textBox.Text.Trim()); IniInterface.SetValue("Group", "Name", this.group_name_comboBox.Text.Trim()); IniInterface.SetValue("HotKey", "Checkin", this.key_checkin_textBox.Text.Trim()); IniInterface.SetValue("HotKey", "Review", this.key_review_textBox.Text.Trim()); } catch (System.Exception ex) { } // 卸载钩子 if (m_hHook != 0) { WinAPI.UnhookWindowsHookEx(m_hHook); m_hHook = 0; } }