From a14256a462537e9f8b7c8102ffca078d1bd62245 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 14 Nov 2023 17:54:38 +0100 Subject: [PATCH] Fix vari login --- MP-TAB-SERV/Components/CmpTop.razor | 11 +- MP-TAB-SERV/Components/CmpTop.razor.cs | 83 +++---- MP-TAB-SERV/Components/OdlMan.razor.cs | 6 +- MP-TAB-SERV/MP-TAB-SERV.csproj | 4 +- MP-TAB-SERV/Pages/RegNewDevice.razor | 53 +++-- MP-TAB-SERV/Pages/RegNewDevice.razor.cs | 198 +++++++--------- MP-TAB-SERV/Pages/User.razor | 4 +- MP-TAB-SERV/Resources/ChangeLog.html | 2 +- MP-TAB-SERV/Resources/VersNum.txt | 2 +- MP-TAB-SERV/Resources/manifest.xml | 2 +- MP-TAB-SERV/Shared/MainLayout.razor | 36 +-- MP-TAB-SERV/Shared/MainLayout.razor.cs | 8 +- MP.Data/Services/MessageService.cs | 298 +++--------------------- 13 files changed, 221 insertions(+), 486 deletions(-) diff --git a/MP-TAB-SERV/Components/CmpTop.razor b/MP-TAB-SERV/Components/CmpTop.razor index 203ef85c..a746dc97 100644 --- a/MP-TAB-SERV/Components/CmpTop.razor +++ b/MP-TAB-SERV/Components/CmpTop.razor @@ -15,10 +15,13 @@
-
-
- + @if (!HideMenu) + { +
+
+ +
-
+ }
\ No newline at end of file diff --git a/MP-TAB-SERV/Components/CmpTop.razor.cs b/MP-TAB-SERV/Components/CmpTop.razor.cs index c2130cbd..7eeea791 100644 --- a/MP-TAB-SERV/Components/CmpTop.razor.cs +++ b/MP-TAB-SERV/Components/CmpTop.razor.cs @@ -1,4 +1,3 @@ -using EgwCoreLib.Utils; using Microsoft.AspNetCore.Components; using MP.Data.DatabaseModels; using MP.Data.DTO; @@ -30,6 +29,13 @@ namespace MP_TAB_SERV.Components protected string CurrOprTknRedis { get; set; } = null!; + protected DateTime expDT { get; set; } = DateTime.Now; + + protected bool HideMenu + { + get => NavMan.Uri.Contains("reg-new-device"); + } + [Inject] protected ListSelectDataSrv MDataService { get; set; } = null!; @@ -42,6 +48,9 @@ namespace MP_TAB_SERV.Components [Inject] protected NavigationManager NavMan { get; set; } = null!; + [Inject] + protected SharedMemService SMServ { get; set; } = null!; + [Inject] protected TabDataService TDService { get; set; } = null!; @@ -49,6 +58,33 @@ namespace MP_TAB_SERV.Components #region Protected Methods + protected async Task DoLogIn(string decodValue) + { + // decifro i valori.. + var decrVal = MsgServ.DecryptData(decodValue); + var opData = JsonConvert.DeserializeObject(decrVal); + if (opData != null) + { + var rigaOpr = await TDService.OperatoreSearch(opData.currOpr.MatrOpr, opData.currOpr.authKey); + if (rigaOpr != null) + { + userTknDTO newUserTkn = new userTknDTO() + { + currOpr = rigaOpr, + expTime = expDT + }; + + var jsonTkn = JsonConvert.SerializeObject(newUserTkn); + string hash = TDService.EncryptData(jsonTkn); + MsgServ.RigaOper = rigaOpr; + await MsgServ.SetLastMatrOprAsync(rigaOpr.MatrOpr); + await MsgServ.SetCurrOperDtoAsync(hash); + await TDService.OperatoreSetRedis(rigaOpr.MatrOpr, hash); + NavMan.NavigateTo("status-map"); + } + } + } + protected async Task ForceReload() { Stopwatch sw = new Stopwatch(); @@ -56,10 +92,15 @@ namespace MP_TAB_SERV.Components Log.Info("Start ForceReload"); ResetClass = "btn-warning"; await InvokeAsync(StateHasChanged); + var currToken = await MsgServ.GetCurrOperDtoAsync(); + var lastOpr = await MsgServ.GetLastMatrOprAsync(); // reset cache varie await MsgServ.ClearLocalStor(); await MsgServ.ClearSessionStor(); await MDataService.FlushCache(); + // salvo di nuovo opr + await MsgServ.SetLastMatrOprAsync(lastOpr); + await MsgServ.SetCurrOperDtoAsync(currToken); // reload MStor await ReloadMemStor(); // calcolo tempo esecuzione @@ -74,57 +115,21 @@ namespace MP_TAB_SERV.Components NavMan.NavigateTo("/", true); } - protected async Task logIn(string decodValue) - { - // decifro i valori.. - var decrVal = MsgServ.DecryptData(decodValue); - var opData = JsonConvert.DeserializeObject(decrVal); - if (opData != null) - { - var rigaOpr = await TDService.OperatoreSearch(opData.currOpr.MatrOpr, opData.currOpr.authKey); - //if (rigaOpr == null) - //{ - // var deHash = TDService.DecryptData(authKey); - // rigaOpr = await TDService.OperatoreSearch(matrOpr, deHash); - //} - if (rigaOpr != null) - { - userTknDTO newUserTkn = new userTknDTO() - { - currOpr = rigaOpr, - expTime = expDT - }; - - var jsonTkn = JsonConvert.SerializeObject(newUserTkn); - string hash = TDService.EncryptData(jsonTkn); - MsgServ.RigaOper = rigaOpr; - await MsgServ.setCurrOperDtoAsync(hash); - await TDService.OperatoreSetRedis(rigaOpr.MatrOpr, hash); - NavMan.NavigateTo("status-map"); - } - } - } - protected DateTime expDT { get; set; } = DateTime.Now; - [Inject] - protected SharedMemService SMServ { get; set; } = null!; - protected override async Task OnInitializedAsync() { await Task.Delay(1); int expDays = SMServ.GetConfInt("cookieDayExpire"); expDT = DateTime.Now.AddDays(expDays); - CurrOprTknLS = await MsgServ.getCurrOperDtoAsync(); + CurrOprTknLS = await MsgServ.GetCurrOperDtoAsync(); var decodedUrl = Uri.UnescapeDataString(CurrOprTknLS); // verifico se non avessi dati operatore if (MsgServ.RigaOper == null) { - await logIn(decodedUrl); + await DoLogIn(decodedUrl); } - - CurrOprTknRedis = await TDService.OperatoreGetRedis(MatrOpr); if (CurrOprTknRedis == "") { diff --git a/MP-TAB-SERV/Components/OdlMan.razor.cs b/MP-TAB-SERV/Components/OdlMan.razor.cs index ca176060..229fbfc9 100644 --- a/MP-TAB-SERV/Components/OdlMan.razor.cs +++ b/MP-TAB-SERV/Components/OdlMan.razor.cs @@ -972,12 +972,10 @@ namespace MP_TAB_SERV.Components #region Private Properties - private string _baseLang { get; set; } = "IT"; - + private string baseLang { - get => _baseLang; - set { MServ.UserPrefGet("Lang"); } + get => MServ.UserPrefGet("Lang"); } private bool cancelSetupEnabled diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index 9bce00ea..5f9739f3 100644 --- a/MP-TAB-SERV/MP-TAB-SERV.csproj +++ b/MP-TAB-SERV/MP-TAB-SERV.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2311.1415 + 6.16.2311.1417 enable MP_TAB_SERV @@ -20,7 +20,7 @@ - + diff --git a/MP-TAB-SERV/Pages/RegNewDevice.razor b/MP-TAB-SERV/Pages/RegNewDevice.razor index 0cf38925..b6be7e2f 100644 --- a/MP-TAB-SERV/Pages/RegNewDevice.razor +++ b/MP-TAB-SERV/Pages/RegNewDevice.razor @@ -4,27 +4,43 @@
QR-Scan USER LOGIN
+ +
-
- - - -
+
@if (ShowScanBarcode) { - + UseBuiltinDiv="false" + @ref="barcodeReaderCustom" + SelectDeviceBtnTitle="Select Device"> + + +
+ @*
*@ +
+ + + + +
+ + +
+
+ +
+
+
} - - @if (oprsList.Count > 0) {
@@ -44,24 +60,17 @@
- +
-@if (rigaOpr != null) -{ -
@($"{MsgServ.UserAuthKey} {MsgServ.MatrOpr}")
-} -@*@if (done) +@if (!string.IsNullOrEmpty(txtError)) { -
Logged In
+
+ @txtError +
} -else -{ -
Not logged in
-}*@ - diff --git a/MP-TAB-SERV/Pages/RegNewDevice.razor.cs b/MP-TAB-SERV/Pages/RegNewDevice.razor.cs index 680b6091..d3d25f29 100644 --- a/MP-TAB-SERV/Pages/RegNewDevice.razor.cs +++ b/MP-TAB-SERV/Pages/RegNewDevice.razor.cs @@ -1,18 +1,61 @@ -using EgwCoreLib.Utils; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.WebUtilities; + //using MongoDB.Bson.IO; using MP.Data.DatabaseModels; using MP.Data.DTO; using MP.Data.Services; using Newtonsoft.Json; +using ZXingBlazor.Components; namespace MP_TAB_SERV.Pages { public partial class RegNewDevice { - [Inject] - protected TabDataService TDService { get; set; } = null!; + #region Protected Fields + + protected int expDays = 1; + + protected DateTime vetoScan = DateTime.Now; + + #endregion Protected Fields + + #region Protected Properties + + protected string _authKey { get; set; } = ""; + + protected int _matrOpr { get; set; } = 0; + + protected string authKey + { + get + { + return _authKey; + } + set + { + if (_authKey != value) + { + _authKey = value; + DoLogIn().ConfigureAwait(false); + } + } + } + + protected string CurrOprTknLS { get; set; } = null!; + + protected string CurrOprTknRedis { get; set; } = null!; + + protected DateTime expDT { get; set; } = DateTime.Now; + + protected int matrOpr + { + get + { + return _matrOpr; + } + set => _matrOpr = value; + } [Inject] protected MessageService MsgServ { get; set; } = null!; @@ -22,62 +65,31 @@ namespace MP_TAB_SERV.Pages protected List oprsList { get; set; } = new List(); - protected override async Task OnInitializedAsync() + protected AnagOperatoriModel rigaOpr { get; set; } = null!; + + [Inject] + protected TabDataService TDService { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + protected async Task ToggleCodeScan() { await Task.Delay(1); - - //var currOpr = await TDService.LoginOperatore(matrOpr, authKey); - //if (currOpr.MatrOpr != 0) - //{ - // MsgServ.RigaOper = currOpr; - //} - TDService.ConfigGetVal("cookieDayExpire", ref expDays); - - expDT = DateTime.Now.AddDays(expDays); - - //CurrOprTknLS = await MsgServ.getCurrOperDtoAsync(); - //var decodedUrl = Uri.UnescapeDataString(CurrOprTknLS); - //CurrOprTknRedis = await TDService.OperatoreGetRedis(decodedUrl); - - //if (CurrOprTknRedis != "") - //{ - // NavMan.NavigateTo("status-map"); - //} - - //if (MsgServ.RigaOper != null) - //{ - // NavMan.NavigateTo("status-map", true); - //} - oprsList = await TDService.ElencoOperatori(); + ShowScanBarcode = !ShowScanBarcode; } - protected int expDays = 1; - protected int _matrOpr { get; set; } = 0; - protected int matrOpr + protected string txtError = ""; + + [Inject] + protected SharedMemService SMServ { get; set; } = null!; + + protected string Traduci(string lemma) { - get - { - //_matrOpr = MsgServ.MatrOpr; - return _matrOpr; - } - set => _matrOpr = value; + return SMServ.Traduci($"EN_{lemma}".ToUpper()); } - protected string _authKey { get; set; } = ""; - protected string authKey - { - get - { - //_authKey = MsgServ.UserAuthKey; - return _authKey; - } - set => _authKey = value; - } - protected AnagOperatoriModel rigaOpr { get; set; } = null!; - protected string CurrOprTknLS { get; set; } = null!; - protected string CurrOprTknRedis { get; set; } = null!; - - protected DateTime expDT { get; set; } = DateTime.Now; - protected async Task logIn() + protected async Task DoLogIn() { rigaOpr = await TDService.OperatoreSearch(matrOpr, authKey); if (rigaOpr == null) @@ -85,7 +97,7 @@ namespace MP_TAB_SERV.Pages var deHash = TDService.DecryptData(authKey); rigaOpr = await TDService.OperatoreSearch(matrOpr, deHash); } - if (rigaOpr != null) + if (rigaOpr != null && rigaOpr.MatrOpr > 0) { userTknDTO newUserTkn = new userTknDTO() { @@ -96,21 +108,27 @@ namespace MP_TAB_SERV.Pages var jsonTkn = JsonConvert.SerializeObject(newUserTkn); string hash = TDService.EncryptData(jsonTkn); MsgServ.RigaOper = rigaOpr; - await MsgServ.setCurrOperDtoAsync(hash); + await MsgServ.SetCurrOperDtoAsync(hash); + await MsgServ.SetLastMatrOprAsync(rigaOpr.MatrOpr); await TDService.OperatoreSetRedis(matrOpr, hash); NavMan.NavigateTo("status-map"); } - //StateHasChanged(); + else + { + txtError = Traduci("UserPwdMismatch"); + authKey = ""; + } } - protected async Task btnMode() + protected override async Task OnInitializedAsync() { - await Task.Delay(1); - ShowScanBarcode = !ShowScanBarcode; + txtError = ""; + matrOpr = await MsgServ.GetLastMatrOprAsync(); + TDService.ConfigGetVal("cookieDayExpire", ref expDays); + expDT = DateTime.Now.AddDays(expDays); + oprsList = await TDService.ElencoOperatori(); } - protected DateTime vetoScan = DateTime.Now; - protected async Task ScanDoneHandler(string value) { DateTime adesso = DateTime.Now; @@ -137,64 +155,20 @@ namespace MP_TAB_SERV.Pages authKey = Uri_authKey; } } - await logIn(); + await DoLogIn(); } } } + #endregion Protected Methods + + #region Private Properties + private bool ShowScanBarcode { get; set; } = false; + protected BarcodeReader barcodeReaderCustom { get; set; } = null!; - //private async Task ProcessBarcode(string Barcode) - //{ - // if (OrderCode != Barcode) - // { - // await InvokeAsync(() => - // { - // OrderCode = Barcode; - // }); - // var ordine = await DataService.OrderGetByCode(Barcode); - // if (ordine != null) - // { - // if (ordine.DtExecEnd > ordine.DtOrder) - // { - // await InvokeAsync(() => - // { - // errorDescription = "Errore: ordine già completato"; - // }); - // await Task.Run(() => - // { - // Thread.Sleep(3000); - // forceReset(); - // }); - // } - // else if (ordine.PlantId != SelPlantId) - // { - // await InvokeAsync(() => - // { - // errorDescription = "Errore: ordine destinato ad altro impianto"; - // }); + #endregion Private Properties - // await Task.Run(() => - // { - // Thread.Sleep(3000); - // forceReset(); - // }); - // } - // else - // { - // // salvo... - // MessageService.SelPlantId = $"{SelPlantId}"; - // MessageService.SelOrderCode = Barcode; - // // rimando a pagina load.... - // NavManager.NavigateTo($"GasStationLoad"); - // } - // } - // else - // { - // errorDescription = "Errore: ordine non trovato"; - // } - // } - //} } } \ No newline at end of file diff --git a/MP-TAB-SERV/Pages/User.razor b/MP-TAB-SERV/Pages/User.razor index 9662f576..31e65078 100644 --- a/MP-TAB-SERV/Pages/User.razor +++ b/MP-TAB-SERV/Pages/User.razor @@ -85,9 +85,9 @@   ABOUT PAGE
- +
@if (Width > 1021) diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index 01708ddc..33605a51 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2311.1415

+

Versione: 6.16.2311.1417


Note di rilascio:
  • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index 5e705941..aa26489c 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2311.1415 +6.16.2311.1417 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index 1a27ae5b..f30904f9 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2311.1415 + 6.16.2311.1417 https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html false diff --git a/MP-TAB-SERV/Shared/MainLayout.razor b/MP-TAB-SERV/Shared/MainLayout.razor index 8a029f91..1e089fb4 100644 --- a/MP-TAB-SERV/Shared/MainLayout.razor +++ b/MP-TAB-SERV/Shared/MainLayout.razor @@ -7,41 +7,17 @@
    - @*
    -
    - - - Username - - [999] -
    - -
    -
    -
    - -
    -
    -
    -
    *@ - - -
    @Body
    - + @if (!HideMenu) + { + + }
    diff --git a/MP-TAB-SERV/Shared/MainLayout.razor.cs b/MP-TAB-SERV/Shared/MainLayout.razor.cs index 0dc08eec..13aab913 100644 --- a/MP-TAB-SERV/Shared/MainLayout.razor.cs +++ b/MP-TAB-SERV/Shared/MainLayout.razor.cs @@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Components.Routing; using MP.Data.DatabaseModels; using MP.Data.Services; using NLog; -using System.Diagnostics; namespace MP_TAB_SERV.Shared { @@ -36,11 +35,16 @@ namespace MP_TAB_SERV.Shared /// protected List CurrMenuItems { get; set; } = new List(); + protected bool HideMenu + { + get => NavMan.Uri.Contains("reg-new-device"); + } + [Inject] protected ListSelectDataSrv MDataService { get; set; } = null!; [Inject] - protected MessageService MServ { get; set; } = null!; + protected MessageService MsgServ { get; set; } = null!; [Inject] protected SharedMemService MStor { get; set; } = null!; diff --git a/MP.Data/Services/MessageService.cs b/MP.Data/Services/MessageService.cs index 36b8c517..34d750e1 100644 --- a/MP.Data/Services/MessageService.cs +++ b/MP.Data/Services/MessageService.cs @@ -416,33 +416,6 @@ namespace MP.Data.Services } private AnagOperatoriModel? _rigaOper; - //{ - // get - // { - // AnagOperatoriModel answ = new AnagOperatoriModel(); - // string rawData = ""; - // var pUpd = Task.Run(async () => - // { - // rawData = await getCurrOperDtoAsync(); - // }); - // pUpd.Wait(); - // var decodedUrl = Uri.UnescapeDataString(rawData); - // var decrData = DecryptData(decodedUrl); - // answ = JsonConvert.DeserializeObject(decodedUrl); - // return answ; - // } - // set - // { - // var serVal = JsonConvert.SerializeObject(value); - // var encData = EncryptData(serVal); - // var escdata = Uri.EscapeDataString(encData); - // var pUpd = Task.Run(async () => - // { - // await setCurrOperDtoAsync(escdata); - // }); - // pUpd.Wait(); - // } - //} public string EncryptData(string rawData) { return SteamCrypto.EncryptString(rawData, Constants.passPhrase); @@ -527,7 +500,7 @@ namespace MP.Data.Services /// Restituisce il record OperatoreDTO da localstorage /// /// - public async Task getCurrOperDtoAsync() + public async Task GetCurrOperDtoAsync() { string answ = ""; var result = await localStorage.GetItemAsync("currTkn"); @@ -539,11 +512,39 @@ namespace MP.Data.Services return answ; } + /// + /// Restituisce ultima matrOpr registrata da localstorage + /// + /// + public async Task GetLastMatrOprAsync() + { + int answ = -1; + var result = await localStorage.GetItemAsync("lastMatrOpr"); + if (!string.IsNullOrEmpty(result)) + { + answ = int.Parse(result); + } + return answ; + } + + + /// + /// Salva matrOpr nel localstorage + /// + /// + public async Task SetLastMatrOprAsync(int matrOpr) + { + bool answ = false; + await localStorage.SetItemAsync("lastMatrOpr", matrOpr); + answ = true; + return answ; + } + /// /// scrive il record OperatoreDTO nel localstorage /// /// - public async Task setCurrOperDtoAsync(string currTkn) + public async Task SetCurrOperDtoAsync(string currTkn) { bool answ = false; await localStorage.SetItemAsync("currTkn", currTkn); @@ -551,244 +552,9 @@ namespace MP.Data.Services return answ; } + + #endregion Private Methods -#if false - public event Action EA_DateChanged = null!; - public event Action EA_CalModeChanged = null!; - - public event Action EA_TimbUpd = null!; -#endif - -#if false - public RegAttivitaModel? clonedRA { get; set; } = null; - - /// - /// Calcola HASH del codice impiego = payload utente - /// - /// - public string HashDip - { - get - { - DataValidator cDV = new DataValidator(_rigaOper); - string hash = cDV.HashDip; - return hash; - } - } -#endif -#if false - public bool IsActive - { - get - { - bool answ = false; - if (_rigaOper != null && _rigaOper.Attivo != null) - { - answ = (bool)_rigaOper.Attivo; - } - return answ; - } - } - - public bool isRicTimb { get; set; } = false; - - public CalendarModeEnum.modoControllo modoCal { get; set; } = CalendarModeEnum.modoControllo.showCalendar; -#endif - -#if false - /// - /// Indica ultima azione compiuta - /// - public string LastAction - { - get => lastAction; - set - { - if (lastAction != value) - { - lastAction = value; - } - } - } - - /// - /// Indica se il prossimo stato timbratura sia entrata - /// - public bool NextIsEntrata - { - get => nextIsEntrata; - set - { - if (nextIsEntrata != value) - { - nextIsEntrata = value; - } - } - } - - 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 bool PayloadOk { get; set; } = false; - public RegAttivitaModel? recordRA { get; set; } = null; -#endif -#if false - public string SearchVal - { - get => _searchVal; - set - { - if (_searchVal != value) - { - _searchVal = value; - - if (EA_DipUpdated != null) - { - EA_DipUpdated?.Invoke(); - } - } - } - } - - public int selWeekNum { get; set; } = 0; - public int selYear { get; set; } = DateTime.Today.Year; - - public bool ShowSearch - { - get => showSearch; - set - { - if (showSearch != value) - { - showSearch = value; - } - } - } - - public DateTime targetDate { get; set; } = DateTime.Today; - public DateTime targetDateMancTimb { get; set; } -#endif -#if false - - public void ReportDateChange() - { - if (EA_DateChanged != null) - { - EA_DateChanged?.Invoke(); - } - } - - public void setModeCalendar() - { - modoCal = CalendarModeEnum.modoControllo.showCalendar; - if (EA_CalModeChanged != null) - { - EA_CalModeChanged?.Invoke(); - } - } - public void setModeGauge() - { - modoCal = CalendarModeEnum.modoControllo.showGauge; - if (EA_CalModeChanged != null) - { - EA_CalModeChanged?.Invoke(); - } - } - public void setModeProj() - { - modoCal = CalendarModeEnum.modoControllo.showProj; - if (EA_CalModeChanged != null) - { - EA_CalModeChanged?.Invoke(); - } - } - public void setModeTempRil() - { - modoCal = CalendarModeEnum.modoControllo.showTempRil; - if (EA_CalModeChanged != null) - { - EA_CalModeChanged?.Invoke(); - } - } - public void setModeRichTimb() - { - modoCal = CalendarModeEnum.modoControllo.showTimbr; - if (EA_CalModeChanged != null) - { - EA_CalModeChanged?.Invoke(); - } - } - public void setModeShowWeek() - { - modoCal = CalendarModeEnum.modoControllo.showWeek; - if (EA_CalModeChanged != null) - { - EA_CalModeChanged?.Invoke(); - } - } - - public void ReportTimbratura() - { - if (EA_TimbUpd != null) - { - EA_TimbUpd?.Invoke(); - } - } -#endif -#if false - private string _pageIcon = ""; - private string _pageName = ""; -#endif -#if false - private string _searchVal = ""; - private bool showSearch; -#endif - -#if false - private string lastAction { get; set; } = ""; - private bool nextIsEntrata { get; set; } = true; -#endif - -#if false - private void ReportPageUpd() - { - if (EA_PageUpdated != null) - { - EA_PageUpdated?.Invoke(); - } - } - - private void ReportSearch() - { - if (EA_DipUpdated != null) - { - EA_DipUpdated?.Invoke(); - } - } -#endif } } \ No newline at end of file