wxr
2022-06-09 bd68f0a389e4e47b108749afea26a4eb5418e31b
Crabtree/SmartHome/UI/SimpleControl/CommonPage.cs
@@ -98,7 +98,25 @@
            try {
                List<byte> ButtonBkeyModelList = new List<byte> ();
                switch (command) {
                case Command.readGatewayVision:
                case Command.InitializationGatewayACK:
                    if (usefullBytes.Length == 4) {
                        if (usefullBytes [0] == 0xF8 && usefullBytes [3] == 0) {
                            MainPage.GatewayStatus = "Initialization_complete";//初始化完成
                        }
                    }
                    break;
                case Command.enjoyUpgrade2ACK:
                    if (usefullBytes.Length > 1) {
                        if(usefullBytes [0] == 0xF8 && usefullBytes [1] == 0xF8) {
                            MainPage.GatewayStatus = "upgrade_100_success";//升级成功
                        }
                        else {
                            MainPage.GatewayStatus = "upgrading_" + (usefullBytes [0] * 256 + usefullBytes [1])+"_"+subnetID+"_"+deviceID;//升级中
                            Console.WriteLine (MainPage.GatewayStatus);
                        }
                    }
                    break;
                case Command.readGatewayVisionACK:
                    var visionString = MyEncodingGB2312.GetString (usefullBytes);
                    Console.WriteLine ($"当前网关版本信息:{visionString}");
                    break;
@@ -965,6 +983,9 @@
                            superWireless.WirelessPassword = MyEncodingGB2312.GetString (usefullBytes, 64, 16).Trim ('\0');
                        }
                        GateWayList.Add (superWireless);
                        Application.RunOnMainThread (() => {
                            GuideAddGateway.InitGatewayRowView (superWireless);
                        });
                        //IO.FileUtils.SaveEquipmentMessage (superWireless);
                        //System.Threading.Tasks.Task.Run (() => {
                        //    if (string.IsNullOrEmpty (UserConfig.Current.RemoteModeFile)) {