HDL Home App 第二版本 旧平台金堂用 正在使用
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
using System;
using System.Collections.Generic;
 
namespace Shared.Phone.UserCenter.UserMain
{
    /// <summary>
    /// 个人中心主画面
    /// </summary>
    public class UserMainForm : EditorCommonForm
    {
        #region ■ 变量声明___________________________
 
        /// <summary>
        /// 主菜单背景框
        /// </summary>
        private NormalFrameLayout frameMainMenuBack = null;
        /// <summary>
        /// 其他菜单的容器控件
        /// </summary>
        private FrameListControl frameOtherMenuContr = null;
        /// <summary>
        /// 用户名字
        /// </summary>
        private NormalViewControl btnUserName = null;
        /// <summary>
        /// 用户身份
        /// </summary>
        private NormalViewControl btnAuthority = null;
        /// <summary>
        /// 用户头像
        /// </summary>
        private ImageView btnUserIcon = null;
        /// <summary>
        /// 皇冠
        /// </summary>
        private IconViewControl btnImperialCrown = null;
        /// <summary>
        /// 信息提示控件
        /// </summary>
        private MessageManagementControl msgControl = null;
 
        #endregion
 
        #region ■ 初始化_____________________________
 
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建),
        /// 注意:因为外面的框架问题,在外面不能使用底层的方法
        /// 不然,可能会有些共通参数出错
        /// </summary>
        public void ShowForm()
        {
            this.FormID = "UserMainForm";
 
            //特殊处理:恢复可关闭进度条,别问为什么,我也不知道为什么,以防万一而已
            ProgressBar.SetCloseBarFlag(false);
            //初始化头部控件
            this.InitTopFrameLayout();
            //初始化中部控件
            this.InitBodyFrameLayout();
            //移除返回键
            base.RemoveBackButton();
 
            //body占完整个屏幕,除了底部菜单
            bodyFrameLayout.Y = 0;
            bodyFrameLayout.Height = this.Height;
            bodyFrameLayout.BackgroundColor = UserCenterColor.Current.BlackBackGround;
 
            //初始化中部控件
            this.InitMiddleFrame();
        }
 
        /// <summary>
        /// 初始化中部控件
        /// </summary>
        private void InitMiddleFrame()
        {
            //清空bodyFrame
            this.ClearBodyFrame();
 
            //个人中心
            var btnTitle = new NormalViewControl(450, 100, true);
            btnTitle.X = ControlCommonResourse.XXLeft;
            btnTitle.Y = Application.GetRealHeight(112);
            btnTitle.TextColor = UserCenterColor.Current.White;
            btnTitle.TextSize = 24;
            btnTitle.IsBold = true;
            btnTitle.TextID = R.MyInternationalizationString.UserCenter;
            bodyFrameLayout.AddChidren(btnTitle);
 
            var btnBack1 = new PicViewControl(1031, 942);
            btnBack1.Y = btnTitle.Bottom - Application.GetRealHeight(10);
            btnBack1.UnSelectedImagePath = "Center/MainBack1.png";
            bodyFrameLayout.AddChidren(btnBack1);
            var btnBack2 = new PicViewControl(392, 172);
            btnBack2.X = Application.GetRealWidth(688);
            btnBack2.UnSelectedImagePath = "Center/MainBack2.png";
            bodyFrameLayout.AddChidren(btnBack2);
 
            //信息提示控件
            this.msgControl = new MessageManagementControl();
            msgControl.Y = Application.GetRealHeight(127);
            msgControl.X = Application.GetRealWidth(953);
            bodyFrameLayout.AddChidren(this.msgControl);
 
            //白框
            var frameBack = new FrameLayout();
            frameBack.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
            frameBack.Y = Application.GetRealHeight(380);
            frameBack.Gravity = Gravity.CenterHorizontal;
            frameBack.Radius = (uint)Application.GetRealHeight(29);
            frameBack.Width = bodyFrameLayout.Width - Application.GetRealWidth(29 * 2);
            frameBack.Height = bodyFrameLayout.Height - Application.GetRealHeight(380) + Application.GetRealHeight(100);
            bodyFrameLayout.AddChidren(frameBack);
 
            //初始化个人信息的控件
            this.InitUserInfoControl(frameBack);
 
            //初始化主菜单的控件
            this.InitMainMenuInfoControl(frameBack);
 
            //初始化其他菜单
            this.InitOtherMenuControl(frameBack);
        }
 
        #endregion
 
        #region ■ 个人信息的控件_____________________
 
        /// <summary>
        /// 初始化个人信息的控件
        /// </summary>
        /// <param name="frameWhite">背景</param>
        private void InitUserInfoControl(FrameLayout frameWhite)
        {
            //用户头像
            this.btnUserIcon = new ImageView();
            btnUserIcon.Height = this.GetPictrueRealSize(280);
            btnUserIcon.Width = this.GetPictrueRealSize(280);
            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(280) / 2;
            btnUserIcon.X = Application.GetRealWidth(121);
            if (Common.Config.Instance.Home.IsVirtually == false)
            {
                btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
            }
            else
            {
                btnUserIcon.ImagePath = "Account/Cat.png";
            }
            bodyFrameLayout.AddChidren(btnUserIcon);
            btnUserIcon.Y = frameWhite.Y - Application.GetRealHeight(109);
            btnUserIcon.MouseUpEventHandler += (sender, e) =>
            {
                if (Common.Config.Instance.Home.IsVirtually == true)
                {
                    //如果住宅为虚拟住宅,则直接提示:确定退出当前账号?
                    string msg = Language.StringByID(R.MyInternationalizationString.uLogoutAccountMsg);
                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                    {
                        //退出账号
                        UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account);
                    });
                    return;
                }
                var form = new UserInformationForm();
                form.AddForm();
            };
 
            //皇冠
            this.btnImperialCrown = new IconViewControl(60);
            btnImperialCrown.X = Application.GetRealWidth(346);
            btnImperialCrown.Y = Application.GetRealHeight(475);
            btnImperialCrown.UnSelectedImagePath = "Center/ImperialCrown.png";
            bodyFrameLayout.AddChidren(btnImperialCrown);
            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
            {
                btnImperialCrown.Visible = false;
            }
 
            //用户昵称
            this.btnUserName = new NormalViewControl(605, 60, true);
            btnUserName.IsBold = true;
            btnUserName.X = btnUserIcon.Right + Application.GetRealWidth(5);
            btnUserName.Y = Application.GetRealHeight(43);
            if (UserCenterResourse.UserInfo != null)
            {
                btnUserName.Text = UserCenterResourse.UserInfo.UserName;
            }
            frameWhite.AddChidren(btnUserName);
 
            //用户身份
            this.btnAuthority = new NormalViewControl(605, 60, true);
            btnAuthority.X = btnUserName.X;
            btnAuthority.Y = btnUserName.Bottom;
            btnAuthority.TextColor = UserCenterColor.Current.TextGrayColor3;
            btnAuthority.TextSize = 12;
            if (UserCenterResourse.UserInfo != null)
            {
                btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText;
            }
            frameWhite.AddChidren(btnAuthority);
        }
 
        #endregion
 
        #region ■ 主菜单的控件_______________________
 
        /// <summary>
        /// 初始化主菜单的控件
        /// </summary>
        /// <param name="frameWhite">背景</param>
        private void InitMainMenuInfoControl(FrameLayout frameWhite)
        {
            if (frameMainMenuBack != null)
            {
                frameMainMenuBack.RemoveAll();
            }
            else
            {
                //背景框
                frameMainMenuBack = new NormalFrameLayout();
                frameMainMenuBack.Y = Application.GetRealHeight(288);
                frameMainMenuBack.Gravity = Gravity.CenterHorizontal;
                frameMainMenuBack.Height = Application.GetRealHeight(371);
                frameMainMenuBack.Width = frameWhite.Width - Application.GetRealWidth(29 * 2);
                frameMainMenuBack.Radius = (uint)Application.GetRealHeight(17);
                frameMainMenuBack.BackgroundColor = UserCenterColor.Current.White;
                frameWhite.AddChidren(frameMainMenuBack);
            }
 
            //标题:管理
            var frameTitle = new FrameLayout();
            frameTitle.Y = Application.GetRealHeight(6);
            frameTitle.Width = Application.GetRealWidth(907);
            frameTitle.Height = Application.GetRealHeight(121);
            frameTitle.Gravity = Gravity.CenterHorizontal;
            frameMainMenuBack.AddChidren(frameTitle);
            var btnTitle = new NormalViewControl(500, 60, true);
            btnTitle.Gravity = Gravity.CenterVertical;
            btnTitle.TextID = R.MyInternationalizationString.uManagement;
            frameTitle.AddChidren(btnTitle);
            var btnLine = new NormalViewControl(frameTitle.Width, 1, false);
            btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
            btnLine.Y = frameTitle.Height - 1;
            frameTitle.AddChidren(btnLine);
 
            //创建全部的主菜单控件
            this.CreatAllMainMenuControl(frameMainMenuBack);
        }
 
        /// <summary>
        /// 创建全部的主菜单控件
        /// </summary>
        /// <param name="frameBack"></param>
        private void CreatAllMainMenuControl(FrameLayout frameBack)
        {
            var frameMenu = new FrameLayout();
            frameMenu.Y = Application.GetRealHeight(184);
            frameMenu.Height = Application.GetRealHeight(153);
            frameBack.AddChidren(frameMenu);
 
            //成员管理
            string unSelectPic = "Center/MenberManagement.png";
            int TextID = R.MyInternationalizationString.uMember;
            if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
            {
                //生成控件
                var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
                frame.ButtonClickEvent += (sender, e) =>
                {
                    if (Common.Config.Instance.Home.IsVirtually == true)
                    {
                        //如果住宅为虚拟住宅,则此功能无效
                        return;
                    }
                    var form = new Member.MemberListForm();
                    form.AddForm();
                };
            }
 
            //设备管理
            unSelectPic = "Center/DeviceManagement.png";
            TextID = R.MyInternationalizationString.uDevice;
            if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
            {
                //生成控件
                var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
                frame.ButtonClickEvent += (sender, e) =>
                {
                    HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
                    //拥有网关,或者是虚拟住宅,则进入设备列表界面
                    if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == false
                    || Common.Config.Instance.Home.IsVirtually == true)
                    {
                        var form = new Device.DeviceListMainForm();
                        form.AddForm();
                    }
                    else
                    {
                        //没有网关,则进入网关列表界面
                        var form = new GatewayManage.GatewayListForm();
                        form.AddForm();
                    }
                };
            }
 
            //住宅管理
            unSelectPic = "Center/ResidenceManagement.png";
            TextID = R.MyInternationalizationString.uResidence;
            if (1 == 1)//统一格式好看一点而已
            {
                //生成控件
                var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
                frame.ButtonClickEvent += (sender, e) =>
                {
                    //住宅接口不需要特殊的登陆Token
                    var form = new Residence.ResidenceListMainForm();
                    form.AddForm();
                };
            }
 
            //人脸管理
            unSelectPic = "Center/FaceManagement.png";
            TextID = R.MyInternationalizationString.uFace;
            if (UserCenterResourse.UserInfo.AuthorityNo == 1)//是主账号才展示
            {
                //生成控件
                var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
                frame.ButtonClickEvent += (sender, e) =>
                {
                    if (Common.Config.Instance.Home.IsVirtually == true)
                    {
                        //如果住宅为虚拟住宅,则此功能无效
                        return;
                    }
                    //打开人脸管理页面
#if iOS
 
                    Shared.IOS.HDLFVSDK.Video.ShowFaceManagement();
#endif
 
                };
            }
 
            //安防管理
            unSelectPic = "Center/SafetyManagement.png";
            TextID = R.MyInternationalizationString.uSafety;
            //这个账号拥有网关的情况下,才显示这个菜单
            if (HdlGatewayLogic.Current.GetAllLocalGateway().Count > 0)
            {
                //生成控件
                var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
                frame.ButtonClickEvent += (sender, e) =>
                {
                    if (Common.Config.Instance.Home.IsVirtually == true)
                    {
                        //如果住宅为虚拟住宅,则此功能无效
                        return;
                    }
                    var form = new Safety.SafetyManagementMainForm();
                    form.AddForm();
                };
            }
            //重新让它居中
            frameMenu.Gravity = Gravity.CenterHorizontal;
        }
 
        /// <summary>
        /// 创建一个主菜单控件
        /// </summary>
        /// <param name="frameBack">背景框</param>
        /// <param name="textId">显示文本</param>
        /// <param name="UnSelectPic">图片对象</param>
        /// <returns></returns>
        private FrameRowControl CreatMainMenuControl(FrameLayout frameBack, int textId, string UnSelectPic)
        {
            int width = 236;
            //外框
            var frame = new FrameRowControl();
            frame.Width = Application.GetRealWidth(width);
            frame.Height = frameBack.Height;
            frame.Gravity = Gravity.CenterVertical;
            frame.X = frameBack.ChildrenCount * Application.GetRealWidth(width);
            frameBack.AddChidren(frame);
            frame.RemoveBaseClickEvent();
            //变更大小
            frameBack.Width = frameBack.ChildrenCount * Application.GetRealWidth(width);
 
            //图标
            var btnIcon = new IconViewControl(81);
            btnIcon.Gravity = Gravity.CenterHorizontal;
            btnIcon.UnSelectedImagePath = UnSelectPic;
            frame.AddChidren(btnIcon);
 
            //文字
            var btnText = new NormalViewControl(frame.Width, Application.GetRealHeight(72), false);
            btnText.TextSize = 12;
            btnText.Y = btnIcon.Bottom;
            btnText.TextAlignment = TextAlignment.Center;
            btnText.TextID = textId;
            frame.AddChidren(btnText);
 
            return frame;
        }
 
        #endregion
 
        #region ■ 初始化其他菜单_____________________
 
        /// <summary>
        /// 初始化其他菜单
        /// </summary>
        /// <param name="frameWhite">背景</param>
        private void InitOtherMenuControl(FrameLayout frameWhite)
        {
            if (this.frameOtherMenuContr != null)
            {
                frameOtherMenuContr.RemoveAll();
            }
            else
            {
                frameOtherMenuContr = new FrameListControl(26);
                frameOtherMenuContr.Y = Application.GetRealHeight(698);
                frameOtherMenuContr.Height = ControlCommonResourse.ListViewRowHeight * 4 + Application.GetRealHeight(26 * 4);
                frameWhite.AddChidren(frameOtherMenuContr);
            }
 
            //可视对讲
            var rowVideo = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
            frameOtherMenuContr.AddChidren(rowVideo);
            //向右图标
            var btnBackVDRight = rowVideo.AddRightArrow();
            btnBackVDRight.X -= ControlCommonResourse.XXLeft / 2;
            //图标
            var btnBackVDIcon = rowVideo.AddLeftIcon();
            btnBackVDIcon.X -= ControlCommonResourse.XXLeft / 2;
            btnBackVDIcon.UnSelectedImagePath = "Item/videoIntercom.png";
            //底线
            var btnBackVDLine = rowVideo.AddBottomLine();
            btnBackVDLine.X -= ControlCommonResourse.XXLeft / 2;
            //数据备份View
            var btnBackVDView = rowVideo.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.videoIntercom), 300);
            btnBackVDView.X -= ControlCommonResourse.XXLeft / 2;
            rowVideo.ButtonClickEvent += (sender, e) =>
            {
                if (Common.Config.Instance.Home.IsVirtually == true)
                {
                    //如果住宅为虚拟住宅,则此功能无效
                    return;
                }
 
#if iOS
                Shared.IOS.HDLFVSDK.Video.ShowDeviceList();
#endif
            };
 
            if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
            {
                //数据备份
                var rowback = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
                frameOtherMenuContr.AddChidren(rowback);
                //向右图标
                var btnBackRight = rowback.AddRightArrow();
                btnBackRight.X -= ControlCommonResourse.XXLeft / 2;
                //图标
                var btnBackIcon = rowback.AddLeftIcon();
                btnBackIcon.X -= ControlCommonResourse.XXLeft / 2;
                btnBackIcon.UnSelectedImagePath = "Center/Backup.png";
                //底线
                var btnBackLine = rowback.AddBottomLine();
                btnBackLine.X -= ControlCommonResourse.XXLeft / 2;
                //数据备份View
                var btnBackView = rowback.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uDataBackup), 300);
                btnBackView.X -= ControlCommonResourse.XXLeft / 2;
                rowback.ButtonClickEvent += (sender, e) =>
                {
                    if (Common.Config.Instance.Home.IsVirtually == true)
                    {
                        //如果住宅为虚拟住宅,则此功能无效
                        return;
                    }
                    var form = new HdlBackup.HdlBackupListForm();
                    ; form.AddForm();
                };
            }
 
            //意见反馈
            var rowSuggestion = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
            frameOtherMenuContr.AddChidren(rowSuggestion);
            //向右图标
            var btnSuRight = rowSuggestion.AddRightArrow();
            btnSuRight.X -= ControlCommonResourse.XXLeft / 2;
            //图标
            var btnSuggestionIcon = rowSuggestion.AddLeftIcon();
            btnSuggestionIcon.X -= ControlCommonResourse.XXLeft / 2;
            btnSuggestionIcon.UnSelectedImagePath = "Center/Opinion.png";
            //底线
            var btnSuLine = rowSuggestion.AddBottomLine();
            btnSuLine.X -= ControlCommonResourse.XXLeft / 2;
            //意见反馈View
            var btnSuView = rowSuggestion.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.Suggestions), 300);
            btnSuView.X -= ControlCommonResourse.XXLeft / 2;
            rowSuggestion.ButtonClickEvent += (sender, e) =>
            {
                var form = new Suggestion.FeedbackForm();
                form.AddForm();
            };
 
            //关于我们
            var rowAbount = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
            frameOtherMenuContr.AddChidren(rowAbount);
            //向右图标
            var btnAbountRight = rowAbount.AddRightArrow();
            btnAbountRight.X -= ControlCommonResourse.XXLeft / 2;
            //图标
            var btnAbountIcon = rowAbount.AddLeftIcon();
            btnAbountIcon.X -= ControlCommonResourse.XXLeft / 2;
            btnAbountIcon.UnSelectedImagePath = "Center/Abount.png";
            //底线
            var btnAbountLine = rowAbount.AddBottomLine();
            btnAbountLine.X -= ControlCommonResourse.XXLeft / 2;
            //关于我们View
            var btnAbountView = rowAbount.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uAboutMe), 300);
            btnAbountView.X -= ControlCommonResourse.XXLeft / 2;
            rowAbount.ButtonClickEvent += (sender, e) =>
            {
                var form = new Abount.AbountForm();
                form.AddForm(false);
            };
 
            if (UserCenterResourse.HideOption.CenterHideMenu == 1)
            {
                //隐匿菜单
                var rowHide = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
                frameOtherMenuContr.AddChidren(rowHide);
                //向右图标
                var btnHideRight = rowHide.AddRightArrow();
                btnHideRight.X -= ControlCommonResourse.XXLeft / 2;
                //图标
                var btnHideIcon = rowHide.AddLeftIcon();
                btnHideIcon.X -= ControlCommonResourse.XXLeft / 2;
                btnHideIcon.UnSelectedImagePath = "Center/Abount.png";
                //底线
                var btnHideLine = rowHide.AddBottomLine();
                btnHideLine.X -= ControlCommonResourse.XXLeft / 2;
                //隐匿菜单View
                var btnHideView = rowHide.AddLeftCaption("隐匿菜单", 300);
                btnHideView.X -= ControlCommonResourse.XXLeft / 2;
                rowHide.ButtonClickEvent += (sender, e) =>
                {
                    var from = new HideOption.HideOptionMainForm();
                    from.AddForm();
                };
            }
        }
 
        #endregion
 
        #region ■ 界面重新激活事件___________________
 
        /// <summary>
        /// 自身的上层界面关闭后,它自身处于最上层时,触发的事件
        /// </summary>
        public override int FormActionAgainEvent()
        {
            //虚拟住宅不需要刷新
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return -1;
            }
            //用户头像
            if (UserCenterResourse.UserInfo.UserIconFileChanged == true)
            {
                UserCenterResourse.UserInfo.UserIconFileChanged = false;
                btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
            }
            //用户名字
            btnUserName.Text = UserCenterResourse.UserInfo.UserName;
            if (UserCenterResourse.UserInfo != null)
            {
                //用户身份
                btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText;
            }
            //皇冠
            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
            {
                this.btnImperialCrown.Visible = false;
            }
            else
            {
                this.btnImperialCrown.Visible = true;
            }
 
            //刷新信息提示控件
            this.msgControl?.RefreshStatu();
 
            //初始化主菜单的控件
            this.InitMainMenuInfoControl(null);
            //初始化其他菜单的控件
            this.InitOtherMenuControl(null);
 
            return 1;
        }
 
        #endregion
    }
}