| | |
| | | { |
| | | if (gatewayDeicve.Type == DeviceType.OnePortMqttFR) { |
| | | |
| | | Console.WriteLine ("Assign OnePortMqttFR,HDL MQTT"); |
| | | Utlis.WriteLine ("Assign OnePortMqttFR,HDL MQTT"); |
| | | //RemoteSetting (); |
| | | RemoteSettingWithHDLMQTT (); |
| | | } else { |
| | | Console.WriteLine ("Assign OnePortWirelessFR"); |
| | | Utlis.WriteLine ("Assign OnePortWirelessFR"); |
| | | RemoteSettingWithOldDevice (); |
| | | //RemoteSettingWithMQTT (); |
| | | } |
| | |
| | | if (common.Type == DeviceType.MusicModel) |
| | | continue; |
| | | if (common.isMixBox) { |
| | | Console.WriteLine ("IsMixBox"); |
| | | Utlis.WriteLine ("IsMixBox"); |
| | | continue; |
| | | } |
| | | countDevcie++; |
| | |
| | | btnDelDevice.Parent.RemoveFromParent (); |
| | | }); |
| | | } catch (Exception ex) { |
| | | Console.WriteLine (ex.Message); |
| | | Utlis.WriteLine (ex.Message); |
| | | } finally { |
| | | Application.RunOnMainThread (() => { |
| | | MainPage.Loading.Hide (); |
| | |
| | | // } |
| | | // } |
| | | // } catch (Exception ex) { |
| | | // Console.WriteLine ("Cinfig Read Device Loop Info " + ex.Message); |
| | | // Utlis.WriteLine ("Cinfig Read Device Loop Info " + ex.Message); |
| | | // } |
| | | //}); |
| | | } |
| | |
| | | //这里搜索设备,直到完成就退出 |
| | | readDevice (); |
| | | } catch (Exception ex) { |
| | | Console.WriteLine (ex.Message); |
| | | Utlis.WriteLine (ex.Message); |
| | | } |
| | | Application.RunOnMainThread (action); |
| | | }) { IsBackground = true }.Start (); |
| | |
| | | ms.WriteByte (common.SubnetID); |
| | | ms.WriteByte (common.DeviceID); |
| | | } |
| | | Console.WriteLine ("搜索非网关设备,网络地址是:" + CommonPage.EndPoint.ToString ()); |
| | | Utlis.WriteLine ("搜索非网关设备,网络地址是:" + CommonPage.EndPoint.ToString ()); |
| | | var control = new Control (); |
| | | control.Send (new Target () { |
| | | IPEndPoint = CommonPage.EndPoint, |
| | |
| | | BindGatewaysNew (); |
| | | } |
| | | } catch (Exception ex) { |
| | | Console.WriteLine (ex.Message); |
| | | Utlis.WriteLine (ex.Message); |
| | | Application.RunOnMainThread (() => { |
| | | new Alert ("", Language.StringByID (R.MyInternationalizationString.OperationFailed), Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | | }); |
| | |
| | | } |
| | | |
| | | } catch (Exception ex) { |
| | | Console.WriteLine (ex.Message); |
| | | Utlis.WriteLine (ex.Message); |
| | | Application.RunOnMainThread (() => { |
| | | //修改网关连接模式失败 |
| | | new Alert ("", "Failed to modify gateway connection mode!", Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | |
| | | // } |
| | | |
| | | // } catch (Exception ex) { |
| | | // Console.WriteLine (ex.Message); |
| | | // Utlis.WriteLine (ex.Message); |
| | | // Application.RunOnMainThread (() => { |
| | | // new Alert ("", Language.StringByID (R.MyInternationalizationString.OperationFailed), Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | | // }); |