public Window1() { client = new WlanClient(); InitializeComponent(); this.snarlComWindow = new NativeWindowApplication.SnarlMsgWnd(); SnarlMsgWndHandle = snarlComWindow.Handle; executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\"; iconPath = executablePath + wirelessFull; this.snarlComWindow.pathToIcon = iconPath; SnarlConnector.RegisterConfig(SnarlMsgWndHandle, "WiFiSnarler", Snarl.WindowsMessage.WM_USER + 55, iconPath); SnarlConnector.RegisterAlert("WiFiSnarler", "WiFi connected"); SnarlConnector.RegisterAlert("WiFiSnarler", "WiFi connected signal strength"); SnarlConnector.RegisterAlert("WiFiSnarler", "WiFi disconnected"); //WlanClient client = new WlanClient(); foreach (WlanClient.WlanInterface wlanIface in client.Interfaces) { //Add the event to track when the wireless connection changes wlanIface.WlanConnectionNotification += new WlanClient.WlanInterface.WlanConnectionNotificationEventHandler(wlanIface_WlanConnectionNotification); wlanIface.WlanNotification += new WlanClient.WlanInterface.WlanNotificationEventHandler(wlanIface_eventHandler); } // initializeAvailableWiFis(); // NetworkChange.NetworkAddressChanged += new System.Net.NetworkInformation.NetworkAddressChangedEventHandler(NetworkIPChanged); //WlanClient test = new WlanClient(); }
private AppController() { Requests = new List<IncomingRequest>(); comWindow = new NativeWindowApplication.SnarlMsgWnd(); if (Properties.Settings.Default.ResetAlreadySeenIds) { Properties.Settings.Default.LastIdShown = 0; } ShowDebug = Properties.Settings.Default.ShowErrorNotifications; RegisterWithSnarl(); UpdateTimer = new Timer(Properties.Settings.Default.UpdateInterval *1000); UpdateTimer.Elapsed += new ElapsedEventHandler(UpdateTimer_Elapsed); FetchNotifications(); }
private AppController() { Requests = new List <IncomingRequest>(); comWindow = new NativeWindowApplication.SnarlMsgWnd(); if (Properties.Settings.Default.ResetAlreadySeenIds) { Properties.Settings.Default.LastIdShown = 0; } ShowDebug = Properties.Settings.Default.ShowErrorNotifications; RegisterWithSnarl(); UpdateTimer = new Timer(Properties.Settings.Default.UpdateInterval * 1000); UpdateTimer.Elapsed += new ElapsedEventHandler(UpdateTimer_Elapsed); FetchNotifications(); }