diff --git a/MP-TAB3/Components/ControlsMan.razor.cs b/MP-TAB3/Components/ControlsMan.razor.cs
index 0d815de0..7dd27879 100644
--- a/MP-TAB3/Components/ControlsMan.razor.cs
+++ b/MP-TAB3/Components/ControlsMan.razor.cs
@@ -6,7 +6,7 @@ using static EgwCoreLib.Utils.DtUtils;
namespace MP_TAB3.Components
{
- public partial class ControlsMan
+ public partial class ControlsMan : IDisposable
{
#region Public Properties
@@ -23,6 +23,12 @@ namespace MP_TAB3.Components
#region Public Methods
+ public void Dispose()
+ {
+ ListComplete.Clear();
+ ListPaged.Clear();
+ }
+
///
/// Aggiorno valori produzione alla data richiesta...
///
@@ -78,8 +84,6 @@ namespace MP_TAB3.Components
#endregion Protected Properties
- private bool isMulti = false;
-
#region Protected Methods
///
@@ -125,44 +129,7 @@ namespace MP_TAB3.Components
await doUpdate();
}
}
- ///
- /// Macchina selezionata MAIN
- ///
- private string IdxMaccMain
- {
- get => RecMSE != null ? RecMSE.IdxMacchina : "";
- }
- ///
- /// Restituisce il codice IdxMacchina dell'altra tavola (se multi) altrimenti la stessa macchina...
- ///
- private string idxMaccAltraTav
- {
- get
- {
- string answ = "";
- if (RecMSE != null)
- {
- try
- {
- // verifico se SIA una tavola (ha char "#")
- int iSharp = IdxMaccMain.IndexOf('#');
- if (iSharp > 0)
- {
- // ora verifico SE ALTRA TAVOLA ha ODL...
- string nomeTav = IdxMaccMain.Substring(iSharp);
- string altraTav = nomeTav.Substring(0, nomeTav.Length - 1);
- altraTav += nomeTav.EndsWith("1") ? "2" : "1";
- // sistemo nome
- answ = IdxMaccMain.Replace(nomeTav, altraTav);
- }
- }
- catch
- { }
- }
- return answ;
- }
- }
protected async Task SaveKo()
{
isProcessing = true;
@@ -279,7 +246,7 @@ namespace MP_TAB3.Components
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
-
+ private bool isMulti = false;
private bool isProcessing = false;
private string noteKo = "";
@@ -302,9 +269,48 @@ namespace MP_TAB3.Components
private Periodo CurrPeriodo { get; set; } = new Periodo();
- private string IdxMaccSel { get; set; } = "";
private string IdxMaccAltra { get; set; } = "";
+ ///
+ /// Restituisce il codice IdxMacchina dell'altra tavola (se multi) altrimenti la stessa macchina...
+ ///
+ private string idxMaccAltraTav
+ {
+ get
+ {
+ string answ = "";
+ if (RecMSE != null)
+ {
+ try
+ {
+ // verifico se SIA una tavola (ha char "#")
+ int iSharp = IdxMaccMain.IndexOf('#');
+ if (iSharp > 0)
+ {
+ // ora verifico SE ALTRA TAVOLA ha ODL...
+ string nomeTav = IdxMaccMain.Substring(iSharp);
+ string altraTav = nomeTav.Substring(0, nomeTav.Length - 1);
+ altraTav += nomeTav.EndsWith("1") ? "2" : "1";
+ // sistemo nome
+ answ = IdxMaccMain.Replace(nomeTav, altraTav);
+ }
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+
+ ///
+ /// Macchina selezionata MAIN
+ ///
+ private string IdxMaccMain
+ {
+ get => RecMSE != null ? RecMSE.IdxMacchina : "";
+ }
+
+ private string IdxMaccSel { get; set; } = "";
private int IdxOdl { get; set; } = 0;
private string selMessage
diff --git a/MP-TAB3/Components/MachineBlock.razor.cs b/MP-TAB3/Components/MachineBlock.razor.cs
index edd660b6..63c7374e 100644
--- a/MP-TAB3/Components/MachineBlock.razor.cs
+++ b/MP-TAB3/Components/MachineBlock.razor.cs
@@ -70,6 +70,10 @@ namespace MP_TAB3.Components
public void Dispose()
{
+ innerCircleVals.Clear();
+ outerCircleVals.Clear();
+ datiProdAct = null;
+ LastRecMSE = null;
TabDServ.DataInvalidated -= TabDServ_DataInvalidated;
}
diff --git a/MP-TAB3/Components/ProdConfMan.razor.cs b/MP-TAB3/Components/ProdConfMan.razor.cs
index 1fbd1805..e0b900cd 100644
--- a/MP-TAB3/Components/ProdConfMan.razor.cs
+++ b/MP-TAB3/Components/ProdConfMan.razor.cs
@@ -6,7 +6,7 @@ using static EgwCoreLib.Utils.DtUtils;
namespace MP_TAB3.Components
{
- public partial class ProdConfMan
+ public partial class ProdConfMan : IDisposable
{
#region Public Properties
@@ -19,14 +19,27 @@ namespace MP_TAB3.Components
[Parameter]
public string IdxMacchSub { get; set; } = "";
- [Parameter]
- public bool ShowRilav { get; set; } = false;
-
[Parameter]
public MappaStatoExplModel? RecMSE { get; set; } = null;
+ [Parameter]
+ public bool ShowRilav { get; set; } = false;
+
#endregion Public Properties
+ #region Public Methods
+
+ public void Dispose()
+ {
+ ListComplete.Clear();
+ ListPaged.Clear();
+ ListaOdl.Clear();
+ ListaOper.Clear();
+ DictOpr.Clear();
+ }
+
+ #endregion Public Methods
+
#region Protected Properties
protected List ListComplete { get; set; } = new List();
@@ -67,13 +80,6 @@ namespace MP_TAB3.Components
}
}
- private void setupPeriodo()
- {
- DateTime fine = DateTime.Today.AddDays(1);
- DateTime inizio = fine.AddDays(-7);
- CurrPeriodo = new Periodo(inizio, fine);
- }
-
protected async Task SetMacc(string selIdxMacc)
{
isProcessing = true;
@@ -242,6 +248,22 @@ namespace MP_TAB3.Components
#region Private Methods
+ private ODLModel ActiveOdl(DateTime dtRif)
+ {
+ var recOdl = ListaOdl
+ .Where(x => x.DataInizio <= dtRif && (x.DataFine >= dtRif || x.DataFine == null))
+ .FirstOrDefault();
+ return recOdl ?? new ODLModel();
+ }
+
+ private ODLModel GetOdl(int idxOdl)
+ {
+ var recOdl = ListaOdl
+ .Where(x => x.IdxOdl == idxOdl)
+ .FirstOrDefault();
+ return recOdl ?? new ODLModel();
+ }
+
private MarkupString OperDto(int matr)
{
string answ = $"[{matr}]";
@@ -263,22 +285,6 @@ namespace MP_TAB3.Components
return (MarkupString)answ;
}
- private ODLModel ActiveOdl(DateTime dtRif)
- {
- var recOdl = ListaOdl
- .Where(x => x.DataInizio <= dtRif && (x.DataFine >= dtRif || x.DataFine == null))
- .FirstOrDefault();
- return recOdl ?? new ODLModel();
- }
-
- private ODLModel GetOdl(int idxOdl)
- {
- var recOdl = ListaOdl
- .Where(x => x.IdxOdl == idxOdl)
- .FirstOrDefault();
- return recOdl ?? new ODLModel();
- }
-
///
/// Rileggo anagrafiche di base
///
@@ -307,6 +313,13 @@ namespace MP_TAB3.Components
isProcessing = false;
}
+ private void setupPeriodo()
+ {
+ DateTime fine = DateTime.Today.AddDays(1);
+ DateTime inizio = fine.AddDays(-7);
+ CurrPeriodo = new Periodo(inizio, fine);
+ }
+
#endregion Private Methods
}
}
\ No newline at end of file
diff --git a/MP-TAB3/Components/ProdConfirm.razor.cs b/MP-TAB3/Components/ProdConfirm.razor.cs
index eab1cb97..be23a241 100644
--- a/MP-TAB3/Components/ProdConfirm.razor.cs
+++ b/MP-TAB3/Components/ProdConfirm.razor.cs
@@ -6,14 +6,8 @@ using NLog.Fluent;
namespace MP_TAB3.Components
{
- public partial class ProdConfirm:IDisposable
+ public partial class ProdConfirm : IDisposable
{
-
- public void Dispose()
- {
- confTimer.Elapsed -= ConfTimer_Elapsed;
- }
-
#region Public Properties
///
@@ -53,6 +47,16 @@ namespace MP_TAB3.Components
#endregion Public Properties
+ #region Public Methods
+
+ public void Dispose()
+ {
+ datiProdAct = null;
+ confTimer.Elapsed -= ConfTimer_Elapsed;
+ }
+
+ #endregion Public Methods
+
#region Protected Properties
protected string ConfBg
@@ -249,22 +253,6 @@ namespace MP_TAB3.Components
confTimer.Elapsed += ConfTimer_Elapsed;
}
- ///
- /// Timer visualizzazione esito conferma pezzi: deve nascondere...
- ///
- ///
- ///
- ///
- private void ConfTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
- {
- confTimer.Stop();
- showConfirmResult = false;
- // resetto
- lastPzBuoni = 0;
- lastPzRilav = 0;
- lastPzScarto = 0;
- }
-
protected override async Task OnParametersSetAsync()
{
lblOut = "";
@@ -340,11 +328,6 @@ namespace MP_TAB3.Components
confTimer.Start();
}
- ///
- /// Timer 3 sec x mostrare conferma
- ///
- private System.Timers.Timer confTimer = new System.Timers.Timer(3000);
-
protected void setConfirmBtn(bool newVal)
{
showConfirm = newVal;
@@ -385,20 +368,37 @@ namespace MP_TAB3.Components
private bool chkPzBuoniNeg = false;
+ private bool confDone = false;
+
private bool confRett = false;
+ ///
+ /// Timer 3 sec x mostrare conferma
+ ///
+ private System.Timers.Timer confTimer = new System.Timers.Timer(3000);
+
private bool enableMagPrint = false;
private bool enablePzProdLasciati = false;
- private bool confDone = false;
private bool isMulti = false;
+
private bool isSlave = false;
+ private DateTime lastConfProd = DateTime.Now;
+
+ private int lastPzBuoni = 0;
+
+ private int lastPzRilav = 0;
+
+ private int lastPzScarto = 0;
+
private string lblOut = "";
private int modoConfProd = 0;
+ private bool showConfirmResult = false;
+
#endregion Private Fields
#region Private Properties
@@ -424,17 +424,25 @@ namespace MP_TAB3.Components
private bool showConfirm { get; set; } = true;
- private bool showConfirmResult = false;
-
- private int lastPzBuoni = 0;
- private int lastPzRilav = 0;
- private int lastPzScarto = 0;
- private DateTime lastConfProd = DateTime.Now;
-
#endregion Private Properties
#region Private Methods
+ ///
+ /// Timer visualizzazione esito conferma pezzi: deve nascondere...
+ ///
+ ///
+ ///
+ private void ConfTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
+ {
+ confTimer.Stop();
+ showConfirmResult = false;
+ // resetto
+ lastPzBuoni = 0;
+ lastPzRilav = 0;
+ lastPzScarto = 0;
+ }
+
///
/// Registra conferma produzione in modalita nuova (con rettifica pezzi lasciati) o legacy
/// (con anticipo periodo)
diff --git a/MP-TAB3/Pages/Controls.razor.cs b/MP-TAB3/Pages/Controls.razor.cs
index 5fabe458..31725104 100644
--- a/MP-TAB3/Pages/Controls.razor.cs
+++ b/MP-TAB3/Pages/Controls.razor.cs
@@ -2,14 +2,6 @@ namespace MP_TAB3.Pages
{
public partial class Controls
{
- #region Private Fields
-
- private string IdxMaccSubSel = "";
-
- private bool IsLoading = false;
-
- #endregion Private Fields
-
#region Protected Methods
protected async Task ForceReload()
@@ -31,5 +23,13 @@ namespace MP_TAB3.Pages
}
#endregion Protected Methods
+
+ #region Private Fields
+
+ private string IdxMaccSubSel = "";
+
+ private bool IsLoading = false;
+
+ #endregion Private Fields
}
}
\ No newline at end of file