Exemple #1
0
 private void OnSSIDOkClick(string SSID, string password)
 {
     this.ShowWaitControl();
     ControlDialog.WifiConfig wifiConfig = new ControlDialog.WifiConfig();
     wifiConfig.SSID     = SSID;
     wifiConfig.password = password;
     new Thread(new ParameterizedThreadStart(this.setWifiThreadStart)).Start(wifiConfig);
 }
Exemple #2
0
 private void setWifiThreadStart(object obj)
 {
     if (obj is ControlDialog.WifiConfig)
     {
         ControlDialog.WifiConfig expr_11 = (ControlDialog.WifiConfig)obj;
         string SSID     = expr_11.SSID;
         string password = expr_11.password;
         ChannelUtil.setWifi(SSID, password);
         string newSSID     = ChannelUtil.getWifiSSID();
         string newPassword = ChannelUtil.getWifiPassword();
         ControlDialog.log.Trace("old ssid = " + SSID);
         ControlDialog.log.Trace("old pass = "******"new ssid = " + newSSID);
         ControlDialog.log.Trace("new pass = " + newPassword);
         if (!string.IsNullOrEmpty(SSID) && !string.IsNullOrEmpty(newPassword) && SSID.Equals(newSSID) && password.Equals(newPassword))
         {
             this.setWifiFinish(true);
             return;
         }
         this.setWifiFinish(false);
     }
 }