protected override void OnStop()
 {
     var proxy = new ProxyHandler();
     var threadHandler = new ThreadHandler();
     var installHandler = new InstallHandler();
     threadHandler.StopRequestThread();
     proxy.Stop();
     installHandler.Uninstall(true);
 }
 protected override void OnStart(string[] args)
 {
     var proxy = new ProxyHandler();
     var threadHandler = new ThreadHandler();
     var installHandler = new InstallHandler();
     proxy.Start();
     threadHandler.StartRequestThread();
     installHandler.Install();
 }
Example #3
0
 private void proxyToggleBtn_Click(object sender, EventArgs e)
 {
     var proxy = new ProxyHandler();
     var threadHandler = new ThreadHandler();
     var installHandler = new InstallHandler();
     if (ProxyHandler.IsRunning)
     {
         threadHandler.StopRequestThread();
         proxy.Stop();
         installHandler.Uninstall(true);
         runProxyLbl.Text = @"Proxy not running";
     }
     else
     {
         proxy.Start();
         threadHandler.StartRequestThread();
         installHandler.Install();
         runProxyLbl.Text = @"Proxy running";
     }
 }
Example #4
0
 private void exitBtn_Click(object sender, EventArgs e)
 {
     var installHandler = new InstallHandler();
     installHandler.Uninstall(false);
     Environment.Exit(Environment.ExitCode);
 }