private void Stop(object sender, EventArgs e) { Proxy.Stop(); if (Config.modifySystemProxy == true) { SystemProxy.Disable(); } notifyIcon.ContextMenu.MenuItems[0].Visible = true; notifyIcon.ContextMenu.MenuItems[1].Visible = false; notifyIcon.Icon = new Icon(System.Windows.Application.GetResourceStream(new Uri("pack://application:,,,/icon/server_stop.ico")).Stream); }
private void Run(object sender, EventArgs e) { Proxy.Start(); if (Config.modifySystemProxy == true) { SystemProxy.Enable("127.0.0.1:" + Config.localPort); } notifyIcon.ContextMenu.MenuItems[0].Visible = false; notifyIcon.ContextMenu.MenuItems[1].Visible = true; notifyIcon.Icon = new Icon(System.Windows.Application.GetResourceStream(new Uri("pack://application:,,,/icon/server_run.ico")).Stream); }