| | |
| | | continue; |
| | | } |
| | | // buspro上传的数据 |
| | | if (commGateway.obj1 == 1 && (str [1].ToString () == DeviceType.OnePortWirelessFR.ToString () || str [1].ToString () == DeviceType.SuperWireless.ToString () || str [1].ToString () == DeviceType.OnePortBus.ToString ())) { |
| | | if (commGateway.obj1 == 1 |
| | | && (str [1].ToString () == DeviceType.OnePortWirelessFR.ToString () |
| | | || str [1].ToString () == DeviceType.OnePortMqttFR.ToString () |
| | | || str [1].ToString () == DeviceType.SuperWireless.ToString () |
| | | || str [1].ToString () == DeviceType.OnePortBus.ToString ())) { |
| | | if (firstInitOfflintOnePortBus) { |
| | | FrameLayout OnePortWirelessFRFrameLayout = new FrameLayout () { |
| | | Height = Application.GetRealHeight (98), |
| | |
| | | VerticalScrolViewMiddle.AddChidren (wirelessView); |
| | | |
| | | AddWirelessGateway (commGateway, null, wirelessView); |
| | | } else if (str [1].ToString () == DeviceType.OnePortWirelessFR.ToString () || str [1].ToString () == DeviceType.SuperWireless.ToString ()) { |
| | | var onePortWirelessFR = Newtonsoft.Json.JsonConvert.DeserializeObject<OnePortWirelessFR> (one); |
| | | } else if (str [1].ToString () == DeviceType.OnePortWirelessFR.ToString () |
| | | || str [1].ToString () == DeviceType.OnePortMqttFR.ToString () |
| | | || str [1].ToString () == DeviceType.SuperWireless.ToString ()) { |
| | | OnePortWirelessFR onePortWirelessFR; |
| | | if(str [1].ToString () == DeviceType.OnePortMqttFR.ToString ()) { |
| | | onePortWirelessFR = Newtonsoft.Json.JsonConvert.DeserializeObject<OnePortMqttFR> (one); |
| | | } else { |
| | | onePortWirelessFR = Newtonsoft.Json.JsonConvert.DeserializeObject<OnePortWirelessFR> (one); |
| | | } |
| | | |
| | | if (onePortWirelessFR == null) { |
| | | continue; |
| | | } |
| | |
| | | var gateWayList = gateWayListZ.FindAll ((obj) => { |
| | | return obj.Split ('_') [1].ToString () == DeviceType.OnePortBus.ToString () || |
| | | obj.Split ('_') [1].ToString () == DeviceType.RCU.ToString () || |
| | | obj.Split ('_') [1].ToString () == DeviceType.OnePortMqttFR.ToString () || |
| | | obj.Split ('_') [1].ToString () == DeviceType.OnePortWirelessFR.ToString (); |
| | | }); |
| | | |
| | |
| | | var tempStrings = gatewayFileName.Split ('_'); |
| | | if (tempStrings [1].ToString () == DeviceType.OnePortBus.ToString () || |
| | | tempStrings [1].ToString () == DeviceType.RCU.ToString () || |
| | | tempStrings [1].ToString () == DeviceType.OnePortMqttFR.ToString () || |
| | | tempStrings [1].ToString () == DeviceType.OnePortWirelessFR.ToString ()) { |
| | | var one = System.Text.Encoding.UTF8.GetString (IO.FileUtils.ReadFile (gatewayFileName)); |
| | | if (one.Length == 0) { |
| | |
| | | textButton1.Text = onePortWirelessFR.Name; |
| | | button1.SelectedImagePath = "Item/WirelessSelected.png"; |
| | | button1.UnSelectedImagePath = "Item/Wireless.png"; |
| | | } else if (tempStrings [1].ToString () == DeviceType.OnePortMqttFR.ToString ()) { |
| | | var onePortMqttFR = Newtonsoft.Json.JsonConvert.DeserializeObject<OnePortMqttFR> (one); |
| | | textButton1.Text = onePortMqttFR.Name; |
| | | button1.SelectedImagePath = "Item/OnePortSelected.png"; |
| | | button1.UnSelectedImagePath = "Item/OnePort.png"; |
| | | } else if (tempStrings [1].ToString () == DeviceType.OnePortBus.ToString ()) { |
| | | var onePortBus = Newtonsoft.Json.JsonConvert.DeserializeObject<OnePortBus> (one); |
| | | textButton1.Text = onePortBus.Name; |