public void Start(bool regHotkeys = true)
 {
     if (_config.updated && regHotkeys)
     {
         _config.updated = false;
         ProgramUpdated.Invoke(this, new UpdatedEventArgs()
         {
             OldVersion = _config.version,
             NewVersion = UpdateChecker.Version,
         });
         Configuration.Save(_config);
     }
     Reload();
     if (regHotkeys)
     {
         HotkeyReg.RegAllHotkeys();
     }
 }
        public void Start(bool regHotkeys = true)
        {
            Process          process   = new Process();
            ProcessStartInfo startInfo = new ProcessStartInfo();

            startInfo.FileName               = System.Configuration.ConfigurationManager.AppSettings["kcptunName"];
            startInfo.Arguments              = System.Configuration.ConfigurationManager.AppSettings["kcptunArgs"];
            startInfo.RedirectStandardError  = false;
            startInfo.RedirectStandardInput  = false;
            startInfo.RedirectStandardOutput = false;
            startInfo.CreateNoWindow         = true;
            startInfo.UseShellExecute        = false;
            process.StartInfo = startInfo;
            process.Start();

            Reload();
            if (regHotkeys)
            {
                HotkeyReg.RegAllHotkeys();
            }
        }
Example #3
0
 public void Start()
 {
     Reload();
     HotkeyReg.RegAllHotkeys();
 }