private void Restart()
        {
            Thread thtmp = new Thread(new ParameterizedThreadStart(run));
            object appName = Application.ExecutablePath;
            Thread.Sleep(2000);
            thtmp.Start(appName);
        }

        private void run(Object obj)
        {
            Process ps = new Process();
            ps.StartInfo.FileName = obj.ToString();
            ps.Start();
        }

        /// <summary>
        /// 设置
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnConfig_Click(object sender, EventArgs e)
        {
            frmHikClientConfig frm = new frmHikClientConfig();
            if (frm.ShowDialog() == DialogResult.OK)
            {
                Application.ExitThread();
                Restart();
            }
        }

相关文章:

  • 2021-05-30
  • 2021-08-12
  • 2021-11-12
  • 2021-11-20
  • 2022-12-23
  • 2021-10-19
  • 2021-09-04
  • 2021-07-02
猜你喜欢
  • 2022-01-05
  • 2021-11-12
  • 2022-12-23
  • 2022-02-20
  • 2022-02-14
相关资源
相似解决方案