From 4ea64ea7d59dc8729a94fe4ec6f7937137cd75e9 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Sat, 22 May 2021 11:54:08 +0200 Subject: [PATCH] aggiunto valorie gestione messageservice --- MP.Stats/Data/MessageService.cs | 44 ++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/MP.Stats/Data/MessageService.cs b/MP.Stats/Data/MessageService.cs index 13417b00..1394318c 100644 --- a/MP.Stats/Data/MessageService.cs +++ b/MP.Stats/Data/MessageService.cs @@ -11,6 +11,8 @@ namespace MP.Stats.Data private SelectData _detailFilter = new SelectData(); private SelectData _masterFilter = new SelectData(); + private string _pageIcon; + private string _pageName; private string _searchVal; private bool showSearch; @@ -22,6 +24,8 @@ namespace MP.Stats.Data public event Action EA_HideSearch; + public event Action EA_PageUpdated; + public event Action EA_SearchUpdated; public event Action EA_ShowSearch; @@ -53,6 +57,32 @@ namespace MP.Stats.Data public SelectData ODL_Filter { get; set; } = SelectData.Init(5, 7); public SelectData OEE_Filter { get; set; } = SelectData.Init(5, 7); + public string PageIcon + { + get => _pageIcon; + set + { + if (_pageIcon != value) + { + _pageIcon = value; + ReportPageUpd(); + } + } + } + + public string PageName + { + get => _pageName; + set + { + if (_pageName != value) + { + _pageName = value; + ReportPageUpd(); + } + } + } + public string SearchVal { get => _searchVal; @@ -98,9 +128,17 @@ namespace MP.Stats.Data #endregion Public Properties - #region Protected Methods + #region Private Methods - protected void ReportSearch() + private void ReportPageUpd() + { + if (EA_PageUpdated != null) + { + EA_PageUpdated?.Invoke(); + } + } + + private void ReportSearch() { if (EA_SearchUpdated != null) { @@ -108,6 +146,6 @@ namespace MP.Stats.Data } } - #endregion Protected Methods + #endregion Private Methods } } \ No newline at end of file