Пример #1
0
 public SEBWlanNetworkSelector()
 {
     this.InitializeComponent();
     try
     {
         this.wlanClient    = new WlanClient();
         this.wlanInterface = this.wlanClient.Interfaces[0];
         this.RefreshNetworks();
     }
     catch (Exception ex)
     {
         this.listNetworks.Enabled = false;
         this.listNetworks.Items.Add((object)SEBUIStrings.WlanNoNetworkInterfaceFound);
         Logger.AddError("No Network interface found", (object)this, ex, (string)null);
     }
 }
        public SEBWlanNetworkSelector()
        {
            InitializeComponent();

            try
            {
                //Find a wlan interface
                wlanClient = new WlanClient();
                wlanInterface = wlanClient.Interfaces[0];
                RefreshNetworks();
            }
            catch (Exception ex)
            {
                listNetworks.Enabled = false;
                listNetworks.Items.Add(SEBUIStrings.WlanNoNetworkInterfaceFound);
                Logger.AddError("No Network interface found",this,ex);
            }
        }
        public SEBWlanNetworkSelector()
        {
            InitializeComponent();

            try
            {
                //Find a wlan interface
                wlanClient    = new WlanClient();
                wlanInterface = wlanClient.Interfaces[0];
                RefreshNetworks();
            }
            catch (Exception ex)
            {
                listNetworks.Enabled = false;
                listNetworks.Items.Add(SEBUIStrings.WlanNoNetworkInterfaceFound);
                Logger.AddError("No Network interface found", this, ex);
            }
        }
        public SEBWlanToolStripButton()
        {
            this.Alignment = ToolStripItemAlignment.Right;
            try
            {
                //Find a wlan interface
                wlanClient = new WlanClient();
                wlanInterface = wlanClient.Interfaces[0];

                //Start the update timer
                timer = new Timer();
                timer.Tick += (x,y) => Update();
                timer.Interval = 1000;
                timer.Start();
            }
            catch (Exception ex)
            {
                Logger.AddError("No WiFi interface found",this,ex);
                base.Enabled = false;
                Update();
            }
        }