xm
2020-07-31 ecba45c93391066bc30c7bd602c3a7683fbb99a7
ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
@@ -51,15 +51,6 @@
        {
            listView.RemoveAll();
            var rowTemp = this.AddNormalRowControl(string.Empty, 400, string.Empty, 400);
            var btnTemp = new NormalViewControl(600, 100, true);
            btnTemp.Text = "一般信息部分";
            btnTemp.Gravity = Gravity.Center;
            btnTemp.TextSize = 16;
            btnTemp.IsBold = true;
            btnTemp.TextAlignment = TextAlignment.Center;
            rowTemp.AddChidren(btnTemp);
            this.AddNormalRowControl("当前身份", 400, UserCenterResourse.UserInfo.AuthorityText, 400);
            this.AddTopButtomRowControl("住宅ID", 400, Common.Config.Instance.Home.Id, 900);
@@ -76,24 +67,15 @@
            this.AddNormalRowControl("WIFI变量", 400, Shared.Application.IsWifi == true ? "true" : "false", 400);
            rowTemp = this.AddNormalRowControl(string.Empty, 400, string.Empty, 400);
            btnTemp = new NormalViewControl(600, 100, true);
            btnTemp.Text = "链接调试部分";
            btnTemp.Gravity = Gravity.Center;
            btnTemp.TextSize = 16;
            btnTemp.IsBold = true;
            btnTemp.TextAlignment = TextAlignment.Center;
            rowTemp.AddChidren(btnTemp);
            this.AddNormalRowControl("手机获取的IP", 600, new Shared.Net.NetWiFi().BroadcastIpAddress.ToString(), 600);
            if (ZigBee.Common.Application.FindGateWaySocket.udpClient == null)
            if (ZigBee.Common.Application.FindGateWaySocket.busSocket == null)
            {
                this.AddNormalRowControl("Socket链接", 400, "未初始化", 400);
            }
            else
            {
                this.AddNormalRowControl("Socket链接", 400, "已初始化", 400);
                this.AddNormalRowControl("Socket链接", 400, ZigBee.Common.Application.FindGateWaySocket.busSocket.Connected == true ? "true" : "false", 400);
            }
            int count = ZbGateway.GateWayList.Count;
@@ -116,6 +98,28 @@
            //检测能否广播得到网关
            this.AddCheckReceviceGatewayRow();
            row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
            row1.AddLeftCaption("查看缓存文件", 500);
            row1.AddRightArrow();
            row1.AddBottomLine();
            row1.ButtonClickEvent += (sender, e) =>
            {
                var form = new HideOptionDirectoryListForm();
                form.AddForm();
            };
            row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
            row1.AddLeftCaption("设备缓存变量", 500);
            row1.AddRightArrow();
            row1.AddBottomLine();
            row1.ButtonClickEvent += (sender, e) =>
            {
                var form = new HideOptionMemoryListDeviceForm();
                form.AddForm();
            };
            row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
@@ -191,61 +195,6 @@
                    ZigBee.Common.Application.FindGateWaySocket.Stop();
                    ZigBee.Common.Application.FindGateWaySocket.Start();
                    this.ShowMassage(ShowMsgType.Tip, "初始化完成");
                });
            };
            rowTemp = this.AddNormalRowControl(string.Empty, 400, string.Empty, 400);
            btnTemp = new NormalViewControl(600, 100, true);
            btnTemp.Text = "查看缓存部分";
            btnTemp.Gravity = Gravity.Center;
            btnTemp.TextSize = 16;
            btnTemp.IsBold = true;
            btnTemp.TextAlignment = TextAlignment.Center;
            rowTemp.AddChidren(btnTemp);
            row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
            row1.AddLeftCaption("查看缓存文件", 500);
            row1.AddRightArrow();
            row1.AddBottomLine();
            row1.ButtonClickEvent += (sender, e) =>
            {
                var form = new HideOptionDirectoryListForm();
                form.AddForm();
            };
            row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
            row1.AddLeftCaption("设备缓存变量", 500);
            row1.AddRightArrow();
            row1.AddBottomLine();
            row1.ButtonClickEvent += (sender, e) =>
            {
                var form = new HideOptionMemoryListDeviceForm();
                form.AddForm();
            };
            rowTemp = this.AddNormalRowControl(string.Empty, 400, string.Empty, 400);
            btnTemp = new NormalViewControl(600, 100, true);
            btnTemp.Text = "其他部分";
            btnTemp.Gravity = Gravity.Center;
            btnTemp.TextSize = 16;
            btnTemp.IsBold = true;
            btnTemp.TextAlignment = TextAlignment.Center;
            rowTemp.AddChidren(btnTemp);
            row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
            row1.AddLeftCaption("重置导入标识", 500);
            row1.AddRightArrow();
            row1.AddBottomLine();
            row1.ButtonClickEvent += (sender, e) =>
            {
                this.ShowMassage(ShowMsgType.Confirm, "是否重置这个住宅的导入标识?\r\n重置之后可以再次导入网关", () =>
                {
                    Common.Config.Instance.Home.SendTemplateSuccess = false;
                    Common.Config.Instance.Home.Save();
                    this.ShowMassage(ShowMsgType.Tip, "重置完成");
                });
            };