gxc
2020-02-28 66a9965c44ecc32a6696abca876ab9d1cd091584
ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
@@ -50,19 +50,21 @@
        {
            listView.RemoveAll();
            this.AddRowControl("当前身份", 400, UserCenterResourse.UserInfo.AuthorityText, 400);
            this.AddNormalRowControl("当前身份", 400, UserCenterResourse.UserInfo.AuthorityText, 400);
            this.AddRowControl("住宅ID", 400, Common.Config.Instance.Home.Id, 700);
            this.AddTopButtomRowControl("住宅ID", 400, Common.Config.Instance.Home.Id, 900);
            this.AddRowControl("账号GUID", 400, Common.Config.Instance.Home.MainUserDistributedMark, 700);
            this.AddTopButtomRowControl("账号GUID", 400, Common.Config.Instance.Home.MainUserDistributedMark, 900);
            this.AddRowControl("住宅分享", 400, Common.Config.Instance.Home.IsOthreShare == true ? "是" : "否", 400);
            this.AddNormalRowControl("住宅分享", 400, Common.Config.Instance.Home.IsOthreShare == true ? "是" : "否", 400);
            this.AddRowControl("账号类型", 400, Common.Config.Instance.Home.AccountType.ToString(), 400);
            this.AddNormalRowControl("账号类型", 400, Common.Config.Instance.Home.AccountType.ToString(), 400);
            this.AddRowControl("远程连接", 400, ZigBee.Device.ZbGateway.IsRemote == true ? "是" : "否", 400);
            this.AddNormalRowControl("远程连接", 400, ZigBee.Device.ZbGateway.IsRemote == true ? "是" : "否", 400);
            this.AddRowControl("拥有远程权限", 400, ZigBee.Device.ZbGateway.AllowRemoteCtrl == true ? "是" : "否", 400);
            this.AddNormalRowControl("拥有远程权限", 400, ZigBee.Device.ZbGateway.AllowRemoteCtrl == true ? "是" : "否", 400);
            this.AddNormalRowControl("WIFI变量", 400, Shared.Application.IsWifi == true ? "true" : "false", 400);
            int count = HdlGatewayLogic.Current.GetAllLocalGateway().Count;
            var row1 = new FrameRowControl(listView.rowSpace / 2);
@@ -102,6 +104,30 @@
            row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
            row1.AddLeftCaption("清除缓存文件", 500);
            row1.AddRightArrow();
            row1.ButtonClickEvent += (sender, e) =>
            {
                this.ShowMassage(ShowMsgType.Confirm, "是否清除缓存文件", () =>
                {
                    var myPath = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory);
                    try
                    {
                        System.IO.Directory.Delete(myPath, true);
                        System.IO.Directory.CreateDirectory(myPath);
                        this.ShowMassage(ShowMsgType.Tip, "清除缓存文件完成,请重新登陆");
                        UserCenterLogic.ReLoginAgain(UserCenterResourse.UserInfo.Account);
                    }
                    catch (Exception ex)
                    {
                        this.ShowMassage(ShowMsgType.Error, "清除缓存文件异常");
                        HdlLogLogic.Current.WriteLog(ex, "清除缓存文件异常");
                    }
                });
            };
            row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
            row1.AddLeftCaption("上传Log", 500);
            row1.AddRightArrow();
            row1.ButtonClickEvent += (sender, e) =>
@@ -125,7 +151,7 @@
        /// <param name="width1"></param>
        /// <param name="viewText"></param>
        /// <param name="width2"></param>
        private FrameRowControl AddRowControl(string caption, int width1, string viewText, int width2)
        private FrameRowControl AddNormalRowControl(string caption, int width1, string viewText, int width2)
        {
            var row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
@@ -137,6 +163,25 @@
            return row1;
        }
        /// <summary>
        /// 添加行
        /// </summary>
        /// <param name="caption"></param>
        /// <param name="width1"></param>
        /// <param name="viewText"></param>
        /// <param name="width2"></param>
        private FrameRowControl AddTopButtomRowControl(string caption, int width1, string viewText, int width2)
        {
            var row1 = new FrameRowControl(listView.rowSpace / 2);
            listView.AddChidren(row1);
            row1.AddTopView(caption, width1);
            row1.AddBottomView(viewText, width2);
            row1.AddBottomLine();
            row1.UseClickStatu = false;
            return row1;
        }
        #endregion
    }
}