protected override void OnExit(ExitEventArgs e) { base.OnExit(e); ProxySettingService.UnsetProxy(); IntegrationManager.INSTANCE.UnsetProxy(); this.notifyIcon.Dispose(); }
public ManageProxy() { InitializeComponent(); _proxySettingService = new ProxySettingService(); FormBorderStyle = FormBorderStyle.FixedSingle; MaximizeBox = false; MinimizeBox = false; Icon = Resources.TrayIcon; }
public ProxyEditor(int?proxyId = null) { InitializeComponent(); FormBorderStyle = FormBorderStyle.FixedSingle; MaximizeBox = false; MinimizeBox = false; _proxySettingService = new ProxySettingService(); _proxyId = proxyId; Icon = Resources.TrayIcon; if (_proxyId.HasValue) { LoadExistingProxy(); } }
public static void CheckAndSetProxy() { var ssid = NetworkService.GetConnectingSSID(); if (ssid == string.Empty) { return; } var settings = AutoProxyConfig.Current.Proxy.FindSetting(ssid); if (settings.Count != 0) { var setting = settings.First(); ProxySettingService.SetProxy(setting); IntegrationManager.INSTANCE.SetProxy(setting); NotificationService.SendNotify(Resources.SetProxy, $"SSID: {ssid}"); } else { ProxySettingService.UnsetProxy(); IntegrationManager.INSTANCE.UnsetProxy(); NotificationService.SendNotify(Resources.UnsetProxy); } }
public ContextMenus() { _proxyManager = new ProxyManager(); _proxySettingService = new ProxySettingService(); }