Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddGateway.cs
@@ -148,7 +148,7 @@
            var title = new Button () {
                TextAlignment = TextAlignment.Center,
                Text = home.RegionName,
                Text = home.Name,
                TextColor = SkinStyle.Current.TextColor1,
                TextSize = 19,
            };
@@ -303,7 +303,28 @@
                                }
                           
                              
                                if (backBytes.Length >= 33) {
                                if (backBytes.Length >= 37) {
                                    //******************住宅ID string类型*************
                                    bool enable = backBytes [0] == 0 ? false : true;
                                    //返回住宅ID 转为string类型
                                    string backIDStr = CommonPage.MyEncodingGB2312.GetString (backBytes, 1, 36).Trim ('\0');
                                    backIDStr = backIDStr.Replace ("ÿ", "");
                                    //|| backIDStr == "ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ"
                                    if (enable || backIDStr == UserConfig.Instance.CurrentRegion.Id || string.IsNullOrEmpty (backIDStr) ) {
                                        goNext = true;
                                    } else {
                                        //#if DEBUG
                                        //                                    Control.ControlBytesSendHasReturn (Command.Write_APP_Data_STORE_1D5E_CMD, common.SubnetID, common.DeviceID, new byte [] { 0, 0, 0, 0 });
                                        //#endif
                                        Application.RunOnMainThread (() => {
                                            //new Alert ("", "This gateway has been bound to a residence, please reset it before binding to another residence.", Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                                            new Alert ("", ErrorCode.UnableToBindGateway, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                                        });
                                    }
                                    //******************住宅ID int类型*************
                                    //bool enable = backBytes [32] == 0 ? false : true;
                                    //int bingResideceId = 0;
                                    ////返回住宅ID 转为string类型
@@ -322,24 +343,9 @@
                                    //    });
                                    //}
                                    bool enable = backBytes [32] == 0 ? false : true;
                                    //返回住宅ID 转为string类型
                                    string backIDStr = CommonPage.MyEncodingGB2312.GetString (backBytes, 0, 32).Trim ('\0');
                                    if (enable || backIDStr == UserConfig.Instance.CurrentRegion.RegionID || string.IsNullOrEmpty (backIDStr)) {
                                        goNext = true;
                                    } else {
                                        //#if DEBUG
                                        //                                    Control.ControlBytesSendHasReturn (Command.Write_APP_Data_STORE_1D5E_CMD, common.SubnetID, common.DeviceID, new byte [] { 0, 0, 0, 0 });
                                        //#endif
                                        Application.RunOnMainThread (() => {
                                            new Alert ("", "This gateway has been bound to a residence, please reset it before binding to another residence.", Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                                        });
                                    }
                                } else {
                                    Application.RunOnMainThread (() => {
                                        new Alert ("", "网关固件版本过低,请先升级!", Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                                        new Alert ("", ErrorCode.GatewayVersionLow, Language.StringByID (R.MyInternationalizationString.Close)).Show ();
                                    });
                                    //goNext = true;
                                }