| | |
| | | /// </summary>
|
| | | public MessageManagementControl()
|
| | | {
|
| | | this.Height = Application.GetMinRealAverage(69);
|
| | | this.Width = Application.GetMinRealAverage(69);
|
| | | this.Height = this.GetPictrueRealSize(69);
|
| | | this.Width = this.GetPictrueRealSize(69);
|
| | | this.UnSelectedImagePath = "Item/MessageManagement.png";
|
| | | this.SelectedImagePath = "Item/MessageManagementSelected.png";
|
| | | this.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //点击后,清空状态
|
| | | this.IsSelected = false;
|
| | | ControlCommonResourse.HadNewMessage = false;
|
| | |
|
| | | var form = new UserMain.MessageManagementForm();
|
| | | form.AddForm();
|
| | | };
|
| | | //添加缓存
|
| | | ControlCommonResourse.listMessageManaContr.Add(this);
|
| | | //刷新状态
|
| | | this.RefreshStatu();
|
| | | //如果住宅为虚拟住宅,则此功能无效
|
| | | if (Common.Config.Instance.Home.IsVirtually == false)
|
| | | {
|
| | | this.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //点击后,清空状态
|
| | | this.IsSelected = false;
|
| | | ControlCommonResourse.HadNewMessage = false;
|
| | |
|
| | | var form = new UserMain.MessageManagementForm();
|
| | | form.AddForm();
|
| | | };
|
| | | //添加缓存
|
| | | ControlCommonResourse.listMessageManaContr.Add(this);
|
| | | //刷新状态
|
| | | this.RefreshStatu();
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | /// </summary>
|
| | | public void RefreshStatu()
|
| | | {
|
| | | //如果住宅为虚拟住宅,则此功能无效
|
| | | if (Common.Config.Instance.Home.IsVirtually == true)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (ControlCommonResourse.HadNewMessage == true)
|
| | | {
|
| | | //如果已经有新消息过来了,就不用读了
|