| | |
| | | }; |
| | | textView.AddChidren(editText); |
| | | |
| | | string pairString = ""; |
| | | if (integratedDevice.spk == SPK.SensorEnvironment2) |
| | | { |
| | | //请输入设备机上的配对码 |
| | | var pairView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(309), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(319), |
| | | Height = Application.GetRealHeight(44), |
| | | }; |
| | | bodyFrameLayout.AddChidren(pairView); |
| | | pairView.AddChidren(new Button() { Y = Application.GetRealHeight(43), Height = 1, BackgroundColor = CSS.CSS_Color.DividingLineColor }); |
| | | |
| | | EditText pairText = new EditText() |
| | | { |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS.CSS_Color.FirstLevelTitleColor, |
| | | PlaceholderText = Language.StringByID(StringId.PlsEntryPairCode), |
| | | PlaceholderTextColor = CSS.CSS_Color.PromptingColor1, |
| | | TextSize = CSS.CSS_FontSize.TextFontSize, |
| | | }; |
| | | pairView.AddChidren(pairText); |
| | | |
| | | pairText.TextChangeEventHandler = (sender, e) => { |
| | | pairString = e; |
| | | }; |
| | | } |
| | | |
| | | |
| | | if (integratedDevice.spk == SPK.SensorEnvironment2 || integratedDevice.spk == SPK.SensorEnvironment3) |
| | | { |
| | | editText.PlaceholderText = Language.StringByID(StringId.PlsEntryMacCode); |
| | |
| | | try |
| | | { |
| | | var pm = new HttpServerRequest(); |
| | | var pack = pm.IndependentRegister3TyDevcie(integratedDevice.spk, snCode, Language.StringByID(StringId.SensorEnvironment)); |
| | | var pack = pm.IndependentRegister3TyDevcie(integratedDevice.spk, snCode,integratedDevice.productName,pairString);// Language.StringByID(StringId.SensorEnvironment) |
| | | if (pack.Code == StateCode.SUCCESS) |
| | | { |
| | | //var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<IntegratedBrandDevice>>(pack.Data.ToString()); |