Esempio n. 1
0
        /// <summary>
        ///     事件:窗口关闭事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainWindow_Closed(object sender, EventArgs e)
        {
            // 保存信息到程序配置中
            Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

            cfa.AppSettings.Settings["Host"].Value     = Host.Value;
            cfa.AppSettings.Settings["Port"].Value     = Port.Value;
            cfa.AppSettings.Settings["Password"].Value = Password.Value;
            cfa.AppSettings.Settings["Method"].Value   = Method.Value;
            cfa.Save();
            // 关闭SSTAP进程
            Cmd.CloseProc();
        }