Merge branch 'develop' into ADM

This commit is contained in:
Samuele E. Locatelli
2021-03-03 15:57:24 +01:00
87 changed files with 3258 additions and 3037 deletions
Vendored
+3 -4
View File
@@ -13,9 +13,9 @@ pipeline {
steps {
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
script {
withEnv(['NEXT_BUILD_NUMBER=1394']) {
// env.versionNumber = VersionNumber(versionNumberString : '6.12.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '6.12.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
withEnv(['NEXT_BUILD_NUMBER=1396']) {
// env.versionNumber = VersionNumber(versionNumberString : '6.13.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
env.versionNumber = VersionNumber(versionNumberString : '6.13.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
env.APP_NAME = 'MAPO'
}
}
@@ -44,7 +44,6 @@ pipeline {
bat "fart.exe VersGen\\MoonPro.cs 1.0.0.0 ${env.versionNumber} || EXIT /B 0"
// checkout NuGet in file sorgente!!!
fixNuget("${WORKSPACE}\\MAPO.sln")
// bat "e:\\nuget.exe restore ${WORKSPACE}\\MAPO.sln"
}
script {
/* compilo installers in base al BRANCH del cliente... */
+28
View File
@@ -0,0 +1,28 @@
[*.cs]
indent_style = space
indent_size = 4
#tab_width = 2
trim_trailing_whitespace = true
# Default severity for analyzer diagnostics with category 'Design'
dotnet_analyzer_diagnostic.category-Design.severity = none
# Default severity for analyzer diagnostics with category 'Redundancy'
dotnet_analyzer_diagnostic.category-Redundancy.severity = none
# Default severity for analyzer diagnostics with category 'Naming'
dotnet_analyzer_diagnostic.category-Naming.severity = none
# Default severity for analyzer diagnostics with category 'Globalization'
dotnet_analyzer_diagnostic.category-Globalization.severity = none
# CA1805: Non eseguire inutilmente l'inizializzazione
dotnet_diagnostic.CA1805.severity = none
# CA2227: Le proprietà delle raccolte devono essere di sola lettura
dotnet_diagnostic.CA2227.severity = none
# CA1825: Evitare allocazioni di matrice di lunghezza zero.
dotnet_diagnostic.CA1825.severity = none
# CA5372: Usa XmlReader per XPathDocument
dotnet_diagnostic.CA5372.severity = none
# RCS1155: Use StringComparison when comparing strings.
dotnet_diagnostic.RCS1155.severity = none
+1
View File
@@ -511,6 +511,7 @@
<Content Include="FileUpload\.placeHolder.file">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include=".editorconfig" />
<None Include="Scripts\jquery-3.4.1.intellisense.js" />
<Content Include="Scripts\jquery-3.4.1.js" />
<Content Include="Scripts\jquery-3.4.1.slim.js" />
@@ -9,15 +9,6 @@ namespace MP_ADM.WebUserControls
{
public partial class cmp_planApprove : BaseUserControl
{
#region Private Fields
/// <summary>
/// Oggetto datalayer specifico
/// </summary>
private DataLayer DataLayerObj = new DataLayer();
#endregion Private Fields
#region Protected Properties
/// <summary>
@@ -8,31 +8,12 @@ namespace MP_ADM.WebUserControls
{
public partial class mod_anagArticoli : BaseUserControl
{
#region Private Fields
/// <summary>
/// Oggetto datalayer specifico
/// </summary>
private DataLayer DataLayerObj = new DataLayer();
#endregion Private Fields
#region Protected Fields
protected string _idxGridView;
#endregion Protected Fields
#region Public Events
public event EventHandler eh_nuovoValore;
public event EventHandler eh_resetSelezione;
public event EventHandler eh_selValore;
#endregion Public Events
#region Private Methods
/// <summary>
@@ -125,10 +106,7 @@ namespace MP_ADM.WebUserControls
// salvo in session il valore selezionato...
memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false);
// sollevo evento nuovo valore...
if (eh_selValore != null)
{
eh_selValore(this, new EventArgs());
}
raiseSelNew();
}
/// <summary>
@@ -139,10 +117,7 @@ namespace MP_ADM.WebUserControls
protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e)
{
// evento come nuovo...
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
raiseNewVal();
}
protected void ods_Updating(object sender, ObjectDataSourceMethodEventArgs e)
@@ -266,30 +241,7 @@ namespace MP_ADM.WebUserControls
grView.SelectedIndex = -1;
grView.DataBind();
lblWarning.Visible = false;
if (eh_resetSelezione != null)
{
eh_resetSelezione(this, new EventArgs());
}
}
/// <summary>
/// effettua traduzione del lemma
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduci(string lemma)
{
return user_std.UtSn.Traduci(lemma);
}
/// <summary>
/// effettua traduzione in inglese del lemma
/// </summary>
/// <param name="lemma"></param>
/// <returns></returns>
public string traduciEn(string lemma)
{
return user_std.UtSn.TraduciEn(lemma);
raiseReset();
}
#endregion Public Methods
+70 -71
View File
@@ -5,15 +5,30 @@ namespace MP_ADM.WebUserControls
{
public partial class mod_newOdl : BaseUserControl
{
protected void Page_Load(object sender, EventArgs e)
#region Private Methods
/// <summary>
/// mostro elenco ultimi 5 tempi e note...
/// </summary>
private void showLastTimeAndNote()
{
// update tempi ciclo!
grViewTempi.DataBind();
}
#region gestione eventi
#endregion Private Methods
public event EventHandler eh_nuovoValore;
#region Protected Methods
#endregion gestione eventi
/// <summary>
/// annullamento inserimento
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnCancel_Click(object sender, EventArgs e)
{
raiseNewVal();
}
/// <summary>
/// conferma inserimento TC
@@ -48,24 +63,63 @@ namespace MP_ADM.WebUserControls
{
logger.lg.scriviLog(string.Format("Non sono riuscito ad inserire l'ODL con i seguenti parametri: {0} | {1} | {2} | {3} | {4}", CodArticolo, IdxMacchina, numPezzi, TCiclo, pzPallet), tipoLog.ERROR);
}
// segnalo update
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
raiseNewVal();
}
/// <summary>
/// annullamento inserimento
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnCancel_Click(object sender, EventArgs e)
protected void btnReset_Click(object sender, EventArgs e)
{
if (eh_nuovoValore != null)
resetSelezione();
}
/// <summary>
/// selezione articolo
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlArticolo_SelectedIndexChanged(object sender, EventArgs e)
{
showLastTimeAndNote();
}
/// <summary>
/// selezione impianto
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlMacchine_SelectedIndexChanged(object sender, EventArgs e)
{
showLastTimeAndNote();
}
/// <summary>
/// evento selezione riga: salvo tempo e qta nei campi input...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grViewTempi_SelectedIndexChanged(object sender, EventArgs e)
{
// ricavo i dati selezionati
int idxOdl = 0;
try
{
eh_nuovoValore(this, new EventArgs());
idxOdl = Convert.ToInt32(grViewTempi.SelectedValue);
}
catch
{ }
MapoDb.DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxOdl, false)[0];
// precompilo dati pezzi/tempi
txtPezzi.Text = rigaOdl.NumPezzi.ToString();
txtTempoCiclo.Text = rigaOdl.TCAssegnato.ToString("0.00");
txtPzPallet.Text = rigaOdl.PzPallet.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
}
/// <summary>
@@ -91,44 +145,9 @@ namespace MP_ADM.WebUserControls
lblMinSec.Text = text;
}
/// <summary>
/// selezione articolo
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlArticolo_SelectedIndexChanged(object sender, EventArgs e)
{
showLastTimeAndNote();
}
#endregion Protected Methods
/// <summary>
/// mostro elenco ultimi 5 tempi e note...
/// </summary>
private void showLastTimeAndNote()
{
// update tempi ciclo!
grViewTempi.DataBind();
}
/// <summary>
/// selezione impianto
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlMacchine_SelectedIndexChanged(object sender, EventArgs e)
{
showLastTimeAndNote();
}
/// <summary>
/// reset della selezione
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
#region Public Methods
/// <summary>
/// resetta la selezione dei valori in caso di modifiche su altri controlli
@@ -139,26 +158,6 @@ namespace MP_ADM.WebUserControls
grViewTempi.DataBind();
}
/// <summary>
/// evento selezione riga: salvo tempo e qta nei campi input...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void grViewTempi_SelectedIndexChanged(object sender, EventArgs e)
{
// ricavo i dati selezionati
int idxOdl = 0;
try
{
idxOdl = Convert.ToInt32(grViewTempi.SelectedValue);
}
catch
{ }
MapoDb.DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxOdl, false)[0];
// precompilo dati pezzi/tempi
txtPezzi.Text = rigaOdl.NumPezzi.ToString();
txtTempoCiclo.Text = rigaOdl.TCAssegnato.ToString("0.00");
txtPzPallet.Text = rigaOdl.PzPallet.ToString();
}
#endregion Public Methods
}
}
@@ -7,12 +7,6 @@ namespace MP_ADM.WebUserControls
{
public partial class mod_newPromessaODL : BaseUserControl
{
#region Public Events
public event EventHandler eh_nuovoValore;
#endregion Public Events
#region Public Properties
/// <summary>
@@ -83,10 +77,7 @@ namespace MP_ADM.WebUserControls
{
memLayer.ML.emptySessionVal("idxProm2Clone");
memLayer.ML.emptySessionVal("idxProm2Edit");
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
raiseNewVal();
}
/// <summary>
@@ -158,10 +149,7 @@ namespace MP_ADM.WebUserControls
memLayer.ML.emptySessionVal("idxProm2Edit");
}
// segnalo update
if (eh_nuovoValore != null)
{
eh_nuovoValore(this, new EventArgs());
}
raiseNewVal();
}
/// <summary>
+28
View File
@@ -0,0 +1,28 @@
[*.cs]
indent_style = space
indent_size = 4
#tab_width = 2
trim_trailing_whitespace = true
# Default severity for analyzer diagnostics with category 'Design'
dotnet_analyzer_diagnostic.category-Design.severity = none
# Default severity for analyzer diagnostics with category 'Redundancy'
dotnet_analyzer_diagnostic.category-Redundancy.severity = none
# Default severity for analyzer diagnostics with category 'Naming'
dotnet_analyzer_diagnostic.category-Naming.severity = none
# Default severity for analyzer diagnostics with category 'Globalization'
dotnet_analyzer_diagnostic.category-Globalization.severity = none
# CA1805: Non eseguire inutilmente l'inizializzazione
dotnet_diagnostic.CA1805.severity = none
# CA2227: Le proprietà delle raccolte devono essere di sola lettura
dotnet_diagnostic.CA2227.severity = none
# CA1825: Evitare allocazioni di matrice di lunghezza zero.
dotnet_diagnostic.CA1825.severity = none
# CA5372: Usa XmlReader per XPathDocument
dotnet_diagnostic.CA5372.severity = none
# RCS1155: Use StringComparison when comparing strings.
dotnet_diagnostic.RCS1155.severity = none
+1
View File
@@ -365,6 +365,7 @@
</Content>
<Content Include="App_Readme\SteamWare_demo\example-NLog.config" />
<Content Include="App_Readme\SteamWare_demo\example-app.config" />
<Content Include=".editorconfig" />
<None Include="NLog.xsd">
<SubType>Designer</SubType>
</None>
+28
View File
@@ -0,0 +1,28 @@
[*.cs]
indent_style = space
indent_size = 4
#tab_width = 2
trim_trailing_whitespace = true
# Default severity for analyzer diagnostics with category 'Design'
dotnet_analyzer_diagnostic.category-Design.severity = none
# Default severity for analyzer diagnostics with category 'Redundancy'
dotnet_analyzer_diagnostic.category-Redundancy.severity = none
# Default severity for analyzer diagnostics with category 'Naming'
dotnet_analyzer_diagnostic.category-Naming.severity = none
# Default severity for analyzer diagnostics with category 'Globalization'
dotnet_analyzer_diagnostic.category-Globalization.severity = none
# CA1805: Non eseguire inutilmente l'inizializzazione
dotnet_diagnostic.CA1805.severity = none
# CA2227: Le proprietà delle raccolte devono essere di sola lettura
dotnet_diagnostic.CA2227.severity = none
# CA1825: Evitare allocazioni di matrice di lunghezza zero.
dotnet_diagnostic.CA1825.severity = none
# CA5372: Usa XmlReader per XPathDocument
dotnet_diagnostic.CA5372.severity = none
# RCS1155: Use StringComparison when comparing strings.
dotnet_diagnostic.RCS1155.severity = none
+9 -3
View File
@@ -37,7 +37,9 @@ namespace MP.Controllers
}
}
catch (Exception exc)
{ }
{
SteamWare.Logger.Logging.Instance.Error($"Exception on getAKV:{Environment.NewLine}{exc}");
}
}
return answ;
}
@@ -72,8 +74,10 @@ namespace MP.Controllers
string currTgt = getAKV(key);
answ = $"{currUrl.Scheme}://{currUrl.Authority}/{currTgt}";
}
catch
{ }
catch (Exception exc)
{
SteamWare.Logger.Logging.Instance.Error($"Exception on urlTgt:{Environment.NewLine}{exc}");
}
return answ;
}
@@ -350,6 +354,7 @@ namespace MP.Controllers
}
catch (Exception exc)
{
SteamWare.Logger.Logging.Instance.Error($"Exception on check auth CTRACK:{Environment.NewLine}{exc}");
ViewBag.CTrack_Enb = false;
}
// fix visibilità MAG
@@ -371,6 +376,7 @@ namespace MP.Controllers
}
catch (Exception exc)
{
SteamWare.Logger.Logging.Instance.Error($"Exception on check auth MAG:{Environment.NewLine}{exc}");
ViewBag.MAG_Enb = false;
}
}
+1
View File
@@ -372,6 +372,7 @@
<Content Include="fonts\RobotoCondensed.woff2" />
<Content Include="fonts\OpenSansCondensed.woff" />
<Content Include="fonts\OpenSans.woff" />
<Content Include=".editorconfig" />
<None Include="Scripts\jquery-3.4.1.intellisense.js" />
<None Include="Scripts\jquery-3.5.1-vsdoc.js" />
<Content Include="Scripts\jquery-3.5.1.js" />
+28
View File
@@ -0,0 +1,28 @@
[*.cs]
indent_style = space
indent_size = 4
#tab_width = 2
trim_trailing_whitespace = true
# Default severity for analyzer diagnostics with category 'Design'
dotnet_analyzer_diagnostic.category-Design.severity = none
# Default severity for analyzer diagnostics with category 'Redundancy'
dotnet_analyzer_diagnostic.category-Redundancy.severity = none
# Default severity for analyzer diagnostics with category 'Naming'
dotnet_analyzer_diagnostic.category-Naming.severity = none
# Default severity for analyzer diagnostics with category 'Globalization'
dotnet_analyzer_diagnostic.category-Globalization.severity = none
# CA1805: Non eseguire inutilmente l'inizializzazione
dotnet_diagnostic.CA1805.severity = none
# CA2227: Le proprietà delle raccolte devono essere di sola lettura
dotnet_diagnostic.CA2227.severity = none
# CA1825: Evitare allocazioni di matrice di lunghezza zero.
dotnet_diagnostic.CA1825.severity = none
# CA5372: Usa XmlReader per XPathDocument
dotnet_diagnostic.CA5372.severity = none
# RCS1155: Use StringComparison when comparing strings.
dotnet_diagnostic.RCS1155.severity = none
@@ -20,6 +20,8 @@ namespace MP_MAG.Areas.HelpPage
/// </summary>
public class HelpPageSampleGenerator
{
#region Public Constructors
/// <summary>
/// Initializes a new instance of the <see cref="HelpPageSampleGenerator"/> class.
/// </summary>
@@ -34,10 +36,9 @@ namespace MP_MAG.Areas.HelpPage
};
}
/// <summary>
/// Gets CLR types that are used as the content of <see cref="HttpRequestMessage"/> or <see cref="HttpResponseMessage"/>.
/// </summary>
public IDictionary<HelpPageSampleKey, Type> ActualHttpMessageTypes { get; internal set; }
#endregion Public Constructors
#region Public Properties
/// <summary>
/// Gets the objects that are used directly as samples for certain actions.
@@ -45,9 +46,9 @@ namespace MP_MAG.Areas.HelpPage
public IDictionary<HelpPageSampleKey, object> ActionSamples { get; internal set; }
/// <summary>
/// Gets the objects that are serialized as samples by the supported formatters.
/// Gets CLR types that are used as the content of <see cref="HttpRequestMessage"/> or <see cref="HttpResponseMessage"/>.
/// </summary>
public IDictionary<Type, object> SampleObjects { get; internal set; }
public IDictionary<HelpPageSampleKey, Type> ActualHttpMessageTypes { get; internal set; }
/// <summary>
/// Gets factories for the objects that the supported formatters will serialize as samples. Processed in order,
@@ -62,23 +63,138 @@ namespace MP_MAG.Areas.HelpPage
public IList<Func<HelpPageSampleGenerator, Type, object>> SampleObjectFactories { get; private set; }
/// <summary>
/// Gets the request body samples for a given <see cref="ApiDescription"/>.
/// Gets the objects that are serialized as samples by the supported formatters.
/// </summary>
/// <param name="api">The <see cref="ApiDescription"/>.</param>
/// <returns>The samples keyed by media type.</returns>
public IDictionary<MediaTypeHeaderValue, object> GetSampleRequests(ApiDescription api)
public IDictionary<Type, object> SampleObjects { get; internal set; }
#endregion Public Properties
#region Private Methods
// Default factory for sample objects
private static object DefaultSampleObjectFactory(HelpPageSampleGenerator sampleGenerator, Type type)
{
return GetSample(api, SampleDirection.Request);
// Try to create a default sample object
ObjectGenerator objectGenerator = new ObjectGenerator();
return objectGenerator.GenerateObject(type);
}
/// <summary>
/// Gets the response body samples for a given <see cref="ApiDescription"/>.
/// </summary>
/// <param name="api">The <see cref="ApiDescription"/>.</param>
/// <returns>The samples keyed by media type.</returns>
public IDictionary<MediaTypeHeaderValue, object> GetSampleResponses(ApiDescription api)
private static bool IsFormatSupported(SampleDirection sampleDirection, MediaTypeFormatter formatter, Type type)
{
return GetSample(api, SampleDirection.Response);
switch (sampleDirection)
{
case SampleDirection.Request:
return formatter.CanReadType(type);
case SampleDirection.Response:
return formatter.CanWriteType(type);
}
return false;
}
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Handling the failure by returning the original string.")]
private static string TryFormatJson(string str)
{
try
{
object parsedJson = JsonConvert.DeserializeObject(str);
return JsonConvert.SerializeObject(parsedJson, Formatting.Indented);
}
catch
{
// can't parse JSON, return the original string
return str;
}
}
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Handling the failure by returning the original string.")]
private static string TryFormatXml(string str)
{
try
{
XDocument xml = XDocument.Parse(str);
return xml.ToString();
}
catch
{
// can't parse XML, return the original string
return str;
}
}
private static object WrapSampleIfString(object sample)
{
string stringSample = sample as string;
if (stringSample != null)
{
return new TextSample(stringSample);
}
return sample;
}
private IEnumerable<KeyValuePair<HelpPageSampleKey, object>> GetAllActionSamples(string controllerName, string actionName, IEnumerable<string> parameterNames, SampleDirection sampleDirection)
{
HashSet<string> parameterNamesSet = new HashSet<string>(parameterNames, StringComparer.OrdinalIgnoreCase);
foreach (var sample in ActionSamples)
{
HelpPageSampleKey sampleKey = sample.Key;
if (String.Equals(controllerName, sampleKey.ControllerName, StringComparison.OrdinalIgnoreCase) &&
String.Equals(actionName, sampleKey.ActionName, StringComparison.OrdinalIgnoreCase) &&
(sampleKey.ParameterNames.SetEquals(new[] { "*" }) || parameterNamesSet.SetEquals(sampleKey.ParameterNames)) &&
sampleDirection == sampleKey.SampleDirection)
{
yield return sample;
}
}
}
#endregion Private Methods
#region Internal Methods
internal static Exception UnwrapException(Exception exception)
{
AggregateException aggregateException = exception as AggregateException;
if (aggregateException != null)
{
return aggregateException.Flatten().InnerException;
}
return exception;
}
#endregion Internal Methods
#region Public Methods
/// <summary>
/// Search for samples that are provided directly through <see cref="ActionSamples"/>.
/// </summary>
/// <param name="controllerName">Name of the controller.</param>
/// <param name="actionName">Name of the action.</param>
/// <param name="parameterNames">The parameter names.</param>
/// <param name="type">The CLR type.</param>
/// <param name="formatter">The formatter.</param>
/// <param name="mediaType">The media type.</param>
/// <param name="sampleDirection">The value indicating whether the sample is for a request or for a response.</param>
/// <returns>The sample that matches the parameters.</returns>
public virtual object GetActionSample(string controllerName, string actionName, IEnumerable<string> parameterNames, Type type, MediaTypeFormatter formatter, MediaTypeHeaderValue mediaType, SampleDirection sampleDirection)
{
object sample;
// First, try to get the sample provided for the specified mediaType, sampleDirection, controllerName, actionName and parameterNames.
// If not found, try to get the sample provided for the specified mediaType, sampleDirection, controllerName and actionName regardless of the parameterNames.
// If still not found, try to get the sample provided for the specified mediaType and type.
// Finally, try to get the sample provided for the specified mediaType.
if (ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, sampleDirection, controllerName, actionName, parameterNames), out sample) ||
ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, sampleDirection, controllerName, actionName, new[] { "*" }), out sample) ||
ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, type), out sample) ||
ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType), out sample))
{
return sample;
}
return null;
}
/// <summary>
@@ -136,37 +252,7 @@ namespace MP_MAG.Areas.HelpPage
}
/// <summary>
/// Search for samples that are provided directly through <see cref="ActionSamples"/>.
/// </summary>
/// <param name="controllerName">Name of the controller.</param>
/// <param name="actionName">Name of the action.</param>
/// <param name="parameterNames">The parameter names.</param>
/// <param name="type">The CLR type.</param>
/// <param name="formatter">The formatter.</param>
/// <param name="mediaType">The media type.</param>
/// <param name="sampleDirection">The value indicating whether the sample is for a request or for a response.</param>
/// <returns>The sample that matches the parameters.</returns>
public virtual object GetActionSample(string controllerName, string actionName, IEnumerable<string> parameterNames, Type type, MediaTypeFormatter formatter, MediaTypeHeaderValue mediaType, SampleDirection sampleDirection)
{
object sample;
// First, try to get the sample provided for the specified mediaType, sampleDirection, controllerName, actionName and parameterNames.
// If not found, try to get the sample provided for the specified mediaType, sampleDirection, controllerName and actionName regardless of the parameterNames.
// If still not found, try to get the sample provided for the specified mediaType and type.
// Finally, try to get the sample provided for the specified mediaType.
if (ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, sampleDirection, controllerName, actionName, parameterNames), out sample) ||
ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, sampleDirection, controllerName, actionName, new[] { "*" }), out sample) ||
ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType, type), out sample) ||
ActionSamples.TryGetValue(new HelpPageSampleKey(mediaType), out sample))
{
return sample;
}
return null;
}
/// <summary>
/// Gets the sample object that will be serialized by the formatters.
/// Gets the sample object that will be serialized by the formatters.
/// First, it will look at the <see cref="SampleObjects"/>. If no sample object is found, it will try to create
/// one using <see cref="DefaultSampleObjectFactory"/> (which wraps an <see cref="ObjectGenerator"/>) and other
/// factories in <see cref="SampleObjectFactories"/>.
@@ -207,6 +293,26 @@ namespace MP_MAG.Areas.HelpPage
return sampleObject;
}
/// <summary>
/// Gets the request body samples for a given <see cref="ApiDescription"/>.
/// </summary>
/// <param name="api">The <see cref="ApiDescription"/>.</param>
/// <returns>The samples keyed by media type.</returns>
public IDictionary<MediaTypeHeaderValue, object> GetSampleRequests(ApiDescription api)
{
return GetSample(api, SampleDirection.Request);
}
/// <summary>
/// Gets the response body samples for a given <see cref="ApiDescription"/>.
/// </summary>
/// <param name="api">The <see cref="ApiDescription"/>.</param>
/// <returns>The samples keyed by media type.</returns>
public IDictionary<MediaTypeHeaderValue, object> GetSampleResponses(ApiDescription api)
{
return GetSample(api, SampleDirection.Response);
}
/// <summary>
/// Resolves the actual type of <see cref="System.Net.Http.ObjectContent{T}"/> passed to the <see cref="System.Net.Http.HttpRequestMessage"/> in an action.
/// </summary>
@@ -265,6 +371,7 @@ namespace MP_MAG.Areas.HelpPage
type = requestBodyParameter == null ? null : requestBodyParameter.ParameterDescriptor.ParameterType;
formatters = api.SupportedRequestBodyFormatters;
break;
case SampleDirection.Response:
default:
type = api.ResponseDescription.ResponseType ?? api.ResponseDescription.DeclaredType;
@@ -319,6 +426,7 @@ namespace MP_MAG.Areas.HelpPage
}
sample = new TextSample(serializedSampleString);
reader.Dispose();
}
else
{
@@ -354,91 +462,6 @@ namespace MP_MAG.Areas.HelpPage
return sample;
}
internal static Exception UnwrapException(Exception exception)
{
AggregateException aggregateException = exception as AggregateException;
if (aggregateException != null)
{
return aggregateException.Flatten().InnerException;
}
return exception;
}
// Default factory for sample objects
private static object DefaultSampleObjectFactory(HelpPageSampleGenerator sampleGenerator, Type type)
{
// Try to create a default sample object
ObjectGenerator objectGenerator = new ObjectGenerator();
return objectGenerator.GenerateObject(type);
}
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Handling the failure by returning the original string.")]
private static string TryFormatJson(string str)
{
try
{
object parsedJson = JsonConvert.DeserializeObject(str);
return JsonConvert.SerializeObject(parsedJson, Formatting.Indented);
}
catch
{
// can't parse JSON, return the original string
return str;
}
}
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Handling the failure by returning the original string.")]
private static string TryFormatXml(string str)
{
try
{
XDocument xml = XDocument.Parse(str);
return xml.ToString();
}
catch
{
// can't parse XML, return the original string
return str;
}
}
private static bool IsFormatSupported(SampleDirection sampleDirection, MediaTypeFormatter formatter, Type type)
{
switch (sampleDirection)
{
case SampleDirection.Request:
return formatter.CanReadType(type);
case SampleDirection.Response:
return formatter.CanWriteType(type);
}
return false;
}
private IEnumerable<KeyValuePair<HelpPageSampleKey, object>> GetAllActionSamples(string controllerName, string actionName, IEnumerable<string> parameterNames, SampleDirection sampleDirection)
{
HashSet<string> parameterNamesSet = new HashSet<string>(parameterNames, StringComparer.OrdinalIgnoreCase);
foreach (var sample in ActionSamples)
{
HelpPageSampleKey sampleKey = sample.Key;
if (String.Equals(controllerName, sampleKey.ControllerName, StringComparison.OrdinalIgnoreCase) &&
String.Equals(actionName, sampleKey.ActionName, StringComparison.OrdinalIgnoreCase) &&
(sampleKey.ParameterNames.SetEquals(new[] { "*" }) || parameterNamesSet.SetEquals(sampleKey.ParameterNames)) &&
sampleDirection == sampleKey.SampleDirection)
{
yield return sample;
}
}
}
private static object WrapSampleIfString(object sample)
{
string stringSample = sample as string;
if (stringSample != null)
{
return new TextSample(stringSample);
}
return sample;
}
#endregion Public Methods
}
}
+10
View File
@@ -18,6 +18,16 @@ namespace MP_MAG
#endregion Internal Fields
#region Protected Methods
protected override void OnInit(EventArgs e)
{
// Assuming that your page makes use of ASP.NET session state and the SessionID is stable.
ViewStateUserKey = Session.SessionID;
}
#endregion Protected Methods
#region Public Methods
/// <summary>
+10 -37
View File
@@ -1,8 +1,8 @@
/*!
* Bootstrap Grid v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap Grid v4.5.2 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
html {
box-sizing: border-box;
@@ -15,39 +15,12 @@ html {
box-sizing: inherit;
}
.container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 576px) {
.container {
max-width: 540px;
}
}
@media (min-width: 768px) {
.container {
max-width: 720px;
}
}
@media (min-width: 992px) {
.container {
max-width: 960px;
}
}
@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}
.container-fluid, .container-sm, .container-md, .container-lg, .container-xl {
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl {
width: 100%;
padding-right: 15px;
padding-left: 15px;
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+11 -13
View File
@@ -1,8 +1,8 @@
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap Reboot v4.5.2 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
*,
@@ -133,12 +133,12 @@ a:hover {
text-decoration: underline;
}
a:not([href]) {
a:not([href]):not([class]) {
color: inherit;
text-decoration: none;
}
a:not([href]):hover {
a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
@@ -155,6 +155,7 @@ pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
-ms-overflow-style: scrollbar;
}
figure {
@@ -222,6 +223,10 @@ select {
text-transform: none;
}
[role="button"] {
cursor: pointer;
}
select {
word-wrap: normal;
}
@@ -254,13 +259,6 @@ input[type="checkbox"] {
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -1,8 +1,8 @@
/*!
* Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap Reboot v4.5.2 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
File diff suppressed because one or more lines are too long
+150 -115
View File
@@ -1,8 +1,8 @@
/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap v4.5.2 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root {
--blue: #007bff;
@@ -163,12 +163,12 @@ a:hover {
text-decoration: underline;
}
a:not([href]) {
a:not([href]):not([class]) {
color: inherit;
text-decoration: none;
}
a:not([href]):hover {
a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
@@ -185,6 +185,7 @@ pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
-ms-overflow-style: scrollbar;
}
figure {
@@ -252,6 +253,10 @@ select {
text-transform: none;
}
[role="button"] {
cursor: pointer;
}
select {
word-wrap: normal;
}
@@ -284,13 +289,6 @@ input[type="checkbox"] {
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
@@ -541,39 +539,12 @@ pre code {
overflow-y: scroll;
}
.container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 576px) {
.container {
max-width: 540px;
}
}
@media (min-width: 768px) {
.container {
max-width: 720px;
}
}
@media (min-width: 992px) {
.container {
max-width: 960px;
}
}
@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}
.container-fluid, .container-sm, .container-md, .container-lg, .container-xl {
.container,
.container-fluid,
.container-sm,
.container-md,
.container-lg,
.container-xl {
width: 100%;
padding-right: 15px;
padding-left: 15px;
@@ -2100,6 +2071,15 @@ pre code {
opacity: 1;
}
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control,
input[type="month"].form-control {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
select.form-control:focus::-ms-value {
color: #495057;
background-color: #fff;
@@ -2247,6 +2227,7 @@ textarea.form-control {
.valid-tooltip {
position: absolute;
top: 100%;
left: 0;
z-index: 5;
display: none;
max-width: 100%;
@@ -2347,6 +2328,7 @@ textarea.form-control {
.invalid-tooltip {
position: absolute;
top: 100%;
left: 0;
z-index: 5;
display: none;
max-width: 100%;
@@ -2517,7 +2499,6 @@ textarea.form-control {
color: #212529;
text-align: center;
vertical-align: middle;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
@@ -2551,6 +2532,10 @@ textarea.form-control {
opacity: 0.65;
}
.btn:not(:disabled):not(.disabled) {
cursor: pointer;
}
a.btn.disabled,
fieldset:disabled a.btn {
pointer-events: none;
@@ -3121,7 +3106,6 @@ fieldset:disabled a.btn {
.btn-link:focus, .btn-link.focus {
text-decoration: underline;
box-shadow: none;
}
.btn-link:disabled, .btn-link.disabled {
@@ -3580,8 +3564,9 @@ input[type="button"].btn-block {
.input-group > .custom-select,
.input-group > .custom-file {
position: relative;
-ms-flex: 1 1 0%;
flex: 1 1 0%;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
width: 1%;
min-width: 0;
margin-bottom: 0;
}
@@ -3761,6 +3746,7 @@ input[type="button"].btn-block {
.custom-control {
position: relative;
z-index: 1;
display: block;
min-height: 1.5rem;
padding-left: 1.5rem;
@@ -4297,12 +4283,14 @@ input[type="button"].btn-block {
background-color: #007bff;
}
.nav-fill > .nav-link,
.nav-fill .nav-item {
-ms-flex: 1 1 auto;
flex: 1 1 auto;
text-align: center;
}
.nav-justified > .nav-link,
.nav-justified .nav-item {
-ms-flex-preferred-size: 0;
flex-basis: 0;
@@ -4661,7 +4649,7 @@ input[type="button"].btn-block {
}
.navbar-light .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-light .navbar-text {
@@ -4709,7 +4697,7 @@ input[type="button"].btn-block {
}
.navbar-dark .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-dark .navbar-text {
@@ -4743,14 +4731,26 @@ input[type="button"].btn-block {
margin-left: 0;
}
.card > .list-group:first-child .list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
.card > .list-group {
border-top: inherit;
border-bottom: inherit;
}
.card > .list-group:last-child .list-group-item:last-child {
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
.card > .list-group:first-child {
border-top-width: 0;
border-top-left-radius: calc(0.25rem - 1px);
border-top-right-radius: calc(0.25rem - 1px);
}
.card > .list-group:last-child {
border-bottom-width: 0;
border-bottom-right-radius: calc(0.25rem - 1px);
border-bottom-left-radius: calc(0.25rem - 1px);
}
.card > .card-header + .list-group,
.card > .list-group + .card-footer {
border-top: 0;
}
.card-body {
@@ -4792,10 +4792,6 @@ input[type="button"].btn-block {
border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
}
.card-header + .list-group .list-group-item:first-child {
border-top: 0;
}
.card-footer {
padding: 0.75rem 1.25rem;
background-color: rgba(0, 0, 0, 0.03);
@@ -4825,6 +4821,7 @@ input[type="button"].btn-block {
bottom: 0;
left: 0;
padding: 1.25rem;
border-radius: calc(0.25rem - 1px);
}
.card-img,
@@ -4936,6 +4933,10 @@ input[type="button"].btn-block {
}
}
.accordion {
overflow-anchor: none;
}
.accordion > .card {
overflow: hidden;
}
@@ -4968,6 +4969,11 @@ input[type="button"].btn-block {
border-radius: 0.25rem;
}
.breadcrumb-item {
display: -ms-flexbox;
display: flex;
}
.breadcrumb-item + .breadcrumb-item {
padding-left: 0.5rem;
}
@@ -5422,6 +5428,7 @@ a.badge-dark:focus, a.badge-dark.focus {
display: flex;
height: 1rem;
overflow: hidden;
line-height: 0;
font-size: 0.75rem;
background-color: #e9ecef;
border-radius: 0.25rem;
@@ -5484,6 +5491,7 @@ a.badge-dark:focus, a.badge-dark.focus {
flex-direction: column;
padding-left: 0;
margin-bottom: 0;
border-radius: 0.25rem;
}
.list-group-item-action {
@@ -5513,13 +5521,13 @@ a.badge-dark:focus, a.badge-dark.focus {
}
.list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
border-top-left-radius: inherit;
border-top-right-radius: inherit;
}
.list-group-item:last-child {
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
border-bottom-right-radius: inherit;
border-bottom-left-radius: inherit;
}
.list-group-item.disabled, .list-group-item:disabled {
@@ -5549,26 +5557,26 @@ a.badge-dark:focus, a.badge-dark.focus {
flex-direction: row;
}
.list-group-horizontal .list-group-item:first-child {
.list-group-horizontal > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal .list-group-item:last-child {
.list-group-horizontal > .list-group-item:last-child {
border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
.list-group-horizontal .list-group-item.active {
.list-group-horizontal > .list-group-item.active {
margin-top: 0;
}
.list-group-horizontal .list-group-item + .list-group-item {
.list-group-horizontal > .list-group-item + .list-group-item {
border-top-width: 1px;
border-left-width: 0;
}
.list-group-horizontal .list-group-item + .list-group-item.active {
.list-group-horizontal > .list-group-item + .list-group-item.active {
margin-left: -1px;
border-left-width: 1px;
}
@@ -5578,22 +5586,22 @@ a.badge-dark:focus, a.badge-dark.focus {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-sm .list-group-item:first-child {
.list-group-horizontal-sm > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-sm .list-group-item:last-child {
.list-group-horizontal-sm > .list-group-item:last-child {
border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
.list-group-horizontal-sm .list-group-item.active {
.list-group-horizontal-sm > .list-group-item.active {
margin-top: 0;
}
.list-group-horizontal-sm .list-group-item + .list-group-item {
.list-group-horizontal-sm > .list-group-item + .list-group-item {
border-top-width: 1px;
border-left-width: 0;
}
.list-group-horizontal-sm .list-group-item + .list-group-item.active {
.list-group-horizontal-sm > .list-group-item + .list-group-item.active {
margin-left: -1px;
border-left-width: 1px;
}
@@ -5604,22 +5612,22 @@ a.badge-dark:focus, a.badge-dark.focus {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-md .list-group-item:first-child {
.list-group-horizontal-md > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-md .list-group-item:last-child {
.list-group-horizontal-md > .list-group-item:last-child {
border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
.list-group-horizontal-md .list-group-item.active {
.list-group-horizontal-md > .list-group-item.active {
margin-top: 0;
}
.list-group-horizontal-md .list-group-item + .list-group-item {
.list-group-horizontal-md > .list-group-item + .list-group-item {
border-top-width: 1px;
border-left-width: 0;
}
.list-group-horizontal-md .list-group-item + .list-group-item.active {
.list-group-horizontal-md > .list-group-item + .list-group-item.active {
margin-left: -1px;
border-left-width: 1px;
}
@@ -5630,22 +5638,22 @@ a.badge-dark:focus, a.badge-dark.focus {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-lg .list-group-item:first-child {
.list-group-horizontal-lg > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-lg .list-group-item:last-child {
.list-group-horizontal-lg > .list-group-item:last-child {
border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
.list-group-horizontal-lg .list-group-item.active {
.list-group-horizontal-lg > .list-group-item.active {
margin-top: 0;
}
.list-group-horizontal-lg .list-group-item + .list-group-item {
.list-group-horizontal-lg > .list-group-item + .list-group-item {
border-top-width: 1px;
border-left-width: 0;
}
.list-group-horizontal-lg .list-group-item + .list-group-item.active {
.list-group-horizontal-lg > .list-group-item + .list-group-item.active {
margin-left: -1px;
border-left-width: 1px;
}
@@ -5656,38 +5664,36 @@ a.badge-dark:focus, a.badge-dark.focus {
-ms-flex-direction: row;
flex-direction: row;
}
.list-group-horizontal-xl .list-group-item:first-child {
.list-group-horizontal-xl > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0;
}
.list-group-horizontal-xl .list-group-item:last-child {
.list-group-horizontal-xl > .list-group-item:last-child {
border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0;
}
.list-group-horizontal-xl .list-group-item.active {
.list-group-horizontal-xl > .list-group-item.active {
margin-top: 0;
}
.list-group-horizontal-xl .list-group-item + .list-group-item {
.list-group-horizontal-xl > .list-group-item + .list-group-item {
border-top-width: 1px;
border-left-width: 0;
}
.list-group-horizontal-xl .list-group-item + .list-group-item.active {
.list-group-horizontal-xl > .list-group-item + .list-group-item.active {
margin-left: -1px;
border-left-width: 1px;
}
}
.list-group-flush .list-group-item {
border-right-width: 0;
border-left-width: 0;
.list-group-flush {
border-radius: 0;
}
.list-group-flush .list-group-item:first-child {
border-top-width: 0;
.list-group-flush > .list-group-item {
border-width: 0 0 1px;
}
.list-group-flush:last-child .list-group-item:last-child {
.list-group-flush > .list-group-item:last-child {
border-bottom-width: 0;
}
@@ -5842,9 +5848,6 @@ button.close {
padding: 0;
background-color: transparent;
border: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
a.close.disabled {
@@ -5852,15 +5855,14 @@ a.close.disabled {
}
.toast {
-ms-flex-preferred-size: 350px;
flex-basis: 350px;
max-width: 350px;
overflow: hidden;
font-size: 0.875rem;
background-color: rgba(255, 255, 255, 0.85);
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.1);
box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
opacity: 0;
border-radius: 0.25rem;
}
@@ -5892,6 +5894,8 @@ a.close.disabled {
background-color: rgba(255, 255, 255, 0.85);
background-clip: padding-box;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
border-top-left-radius: calc(0.25rem - 1px);
border-top-right-radius: calc(0.25rem - 1px);
}
.toast-body {
@@ -5982,6 +5986,9 @@ a.close.disabled {
.modal-dialog-centered::before {
display: block;
height: calc(100vh - 1rem);
height: -webkit-min-content;
height: -moz-min-content;
height: min-content;
content: "";
}
@@ -6107,6 +6114,9 @@ a.close.disabled {
}
.modal-dialog-centered::before {
height: calc(100vh - 3.5rem);
height: -webkit-min-content;
height: -moz-min-content;
height: min-content;
}
.modal-sm {
max-width: 300px;
@@ -6638,6 +6648,8 @@ a.close.disabled {
}
50% {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
@@ -6648,6 +6660,8 @@ a.close.disabled {
}
50% {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
@@ -7933,6 +7947,27 @@ button.bg-dark:focus {
}
}
.user-select-all {
-webkit-user-select: all !important;
-moz-user-select: all !important;
-ms-user-select: all !important;
user-select: all !important;
}
.user-select-auto {
-webkit-user-select: auto !important;
-moz-user-select: auto !important;
-ms-user-select: auto !important;
user-select: auto !important;
}
.user-select-none {
-webkit-user-select: none !important;
-moz-user-select: none !important;
-ms-user-select: none !important;
user-select: none !important;
}
.overflow-auto {
overflow: auto !important;
}
@@ -8088,18 +8123,6 @@ button.bg-dark:focus {
height: 100vh !important;
}
.stretched-link::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
pointer-events: auto;
content: "";
background-color: rgba(0, 0, 0, 0);
}
.m-0 {
margin: 0 !important;
}
@@ -9912,6 +9935,18 @@ button.bg-dark:focus {
}
}
.stretched-link::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
pointer-events: auto;
content: "";
background-color: rgba(0, 0, 0, 0);
}
.text-monospace {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}
File diff suppressed because one or more lines are too long
+5 -5
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -82,6 +82,8 @@ namespace MP_MAG.Controllers
default:
break;
}
// CHECK FIXME 2021.03.03: verificare sia OK dispose
tab.Dispose();
return answ;
}
+41 -18
View File
@@ -26,7 +26,7 @@
<UseGlobalApplicationHostFile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TypeScriptToolsVersion>3.7</TypeScriptToolsVersion>
<TypeScriptToolsVersion>4.0</TypeScriptToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -52,9 +52,10 @@
</Reference>
<Reference Include="AjaxControlToolkit, Version=19.1.0.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e, processorArchitecture=MSIL">
<HintPath>..\packages\AjaxControlToolkit.19.1.0\lib\net40\AjaxControlToolkit.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="AspNet.ScriptManager.bootstrap, Version=4.4.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AspNet.ScriptManager.bootstrap.4.4.1\lib\net45\AspNet.ScriptManager.bootstrap.dll</HintPath>
<Reference Include="AspNet.ScriptManager.bootstrap, Version=4.5.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AspNet.ScriptManager.bootstrap.4.5.2\lib\net45\AspNet.ScriptManager.bootstrap.dll</HintPath>
</Reference>
<Reference Include="AspNet.ScriptManager.jQuery, Version=3.4.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AspNet.ScriptManager.jQuery.3.4.1\lib\net45\AspNet.ScriptManager.jQuery.dll</HintPath>
@@ -62,14 +63,14 @@
<Reference Include="Crc32C.NET, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Crc32C.NET.1.0.5.0\lib\net20\Crc32C.NET.dll</HintPath>
</Reference>
<Reference Include="DnsClient, Version=1.2.0.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
<HintPath>..\packages\DnsClient.1.2.0\lib\net45\DnsClient.dll</HintPath>
<Reference Include="DnsClient, Version=1.3.2.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
<HintPath>..\packages\DnsClient.1.3.2\lib\net45\DnsClient.dll</HintPath>
</Reference>
<Reference Include="Elmah, Version=1.2.14706.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\elmah.corelibrary.1.2.2\lib\Elmah.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.2.0.246, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.0.8, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.0\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.FriendlyUrls, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.FriendlyUrls.Core.1.0.2\lib\net45\Microsoft.AspNet.FriendlyUrls.dll</HintPath>
@@ -92,12 +93,15 @@
</Reference>
<Reference Include="MongoDB.Bson, Version=2.10.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.10.2\lib\net452\MongoDB.Bson.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Driver, Version=2.10.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.10.2\lib\net452\MongoDB.Driver.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Driver.Core, Version=2.10.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.10.2\lib\net452\MongoDB.Driver.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MongoDB.Libmongocrypt, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Libmongocrypt.1.0.0\lib\net452\MongoDB.Libmongocrypt.dll</HintPath>
@@ -107,6 +111,7 @@
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="PdfSharp, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
<HintPath>..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.dll</HintPath>
@@ -116,40 +121,49 @@
</Reference>
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.1.1\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SharpCompress, Version=0.24.0.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
<HintPath>..\packages\SharpCompress.0.24.0\lib\net45\SharpCompress.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Snappy.NET, Version=1.1.1.8, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Snappy.NET.1.1.1.8\lib\net45\Snappy.NET.dll</HintPath>
</Reference>
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.0.601\lib\net461\StackExchange.Redis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SteamWare, Version=4.0.2003.734, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SteamWare.4.0.2003.734\lib\net462\SteamWare.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SteamWare.Logger, Version=4.0.2003.734, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SteamWare.Logger.4.0.2003.734\lib\net462\SteamWare.Logger.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SteamWare.Reports, Version=4.0.2003.734, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SteamWare.Reports.4.0.2003.734\lib\net462\SteamWare.Reports.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Diagnostics.PerformanceCounter, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.PerformanceCounter.4.7.0\lib\net461\System.Diagnostics.PerformanceCounter.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Pipelines, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.4.7.0\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@@ -157,18 +171,25 @@
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Pkcs, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Pkcs.5.0.0\lib\net461\System.Security.Cryptography.Pkcs.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.ServiceModel" />
<Reference Include="System.Threading.Channels, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Channels.4.7.0\lib\netstandard2.0\System.Threading.Channels.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Web.Entity" />
@@ -742,6 +763,7 @@
<Content Include="images\LogoSteamware.png" />
<Content Include="images\SteamwareLogo.png" />
<Content Include="jumper.aspx" />
<Content Include="mongocrypt.dll" />
<Content Include="Resources\ChangeLog.html">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
@@ -758,16 +780,6 @@
<Content Include="Scripts\bootstrap.bundle.min.js" />
<Content Include="Scripts\bootstrap.js" />
<Content Include="Scripts\bootstrap.min.js" />
<Content Include="Scripts\bootstrap.min.js.map" />
<Content Include="Scripts\bootstrap.js.map" />
<Content Include="Scripts\bootstrap.bundle.min.js.map" />
<Content Include="Scripts\bootstrap.bundle.js.map" />
<Content Include="Content\bootstrap.min.css.map" />
<Content Include="Content\bootstrap.css.map" />
<Content Include="Content\bootstrap-reboot.min.css.map" />
<Content Include="Content\bootstrap-reboot.css.map" />
<Content Include="Content\bootstrap-grid.min.css.map" />
<Content Include="Content\bootstrap-grid.css.map" />
<Content Include="Scripts\esm\popper-utils.js" />
<Content Include="Scripts\esm\popper-utils.min.js" />
<Content Include="Scripts\esm\popper.js" />
@@ -873,6 +885,7 @@
<Content Include="WebUserControls\mod_enrollByAuthKey.ascx" />
<Content Include="WebUserControls\mod_enrollByJumperAuthKey.ascx" />
<Content Include="WebUserControls\mod_regNewDevice.ascx" />
<Content Include=".editorconfig" />
<None Include="compilerconfig.json" />
<None Include="compilerconfig.json.defaults">
<DependentUpon>compilerconfig.json</DependentUpon>
@@ -884,6 +897,12 @@
<Content Include="Content\RobotoCondensed.woff2" />
<Content Include="logs\.placeholder" />
<Content Include="NLog.config" />
<Content Include="Content\bootstrap.min.css.map" />
<Content Include="Content\bootstrap.css.map" />
<Content Include="Content\bootstrap-reboot.min.css.map" />
<Content Include="Content\bootstrap-reboot.css.map" />
<Content Include="Content\bootstrap-grid.min.css.map" />
<Content Include="Content\bootstrap-grid.css.map" />
<None Include="Properties\PublishProfiles\IIS02.pubxml" />
<None Include="Properties\PublishProfiles\IIS01.pubxml" />
<Content Include="Reports\CartellinoFinitiOdette.rdlc">
@@ -895,6 +914,10 @@
<Content Include="Reports\CartellinoSemilavorati.rdlc">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Scripts\bootstrap.min.js.map" />
<Content Include="Scripts\bootstrap.js.map" />
<Content Include="Scripts\bootstrap.bundle.min.js.map" />
<Content Include="Scripts\bootstrap.bundle.js.map" />
<None Include="Scripts\jquery-3.4.1.intellisense.js" />
<Content Include="Scripts\jquery-3.4.1.js" />
<Content Include="Scripts\jquery-3.4.1.min.js" />
+9 -5
View File
@@ -7,11 +7,15 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
public partial class Default : BasePage
{
Response.Redirect("menu");
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
Response.Redirect("menu");
}
#endregion Protected Methods
}
}
}
+1 -1
View File
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class EnrollDevice : System.Web.UI.Page
public partial class EnrollDevice : BasePage
{
#region Protected Methods
+1 -1
View File
@@ -8,7 +8,7 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class PLScanner : System.Web.UI.Page
public partial class PLScanner : BasePage
{
#region Protected Methods
+1 -1
View File
@@ -8,7 +8,7 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class Reset : System.Web.UI.Page
public partial class Reset : BasePage
{
#region Protected Methods
+1 -1
View File
@@ -8,7 +8,7 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class SmartStarter : System.Web.UI.Page
public partial class SmartStarter : BasePage
{
#region Private Methods
+31 -20
View File
@@ -4,28 +4,39 @@ using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class elencoLotti : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
public partial class elencoLotti : BasePage
{
if(!Page.IsPostBack)
{
cmp_dettLotti.Visible = false;
}
cmp_elencoLotti.eh_doRefresh += Cmp_elencoLotti_eh_doRefresh;
cmp_elencoLotti.eh_doReset += Cmp_elencoLotti_eh_doReset;
#region Private Methods
private void Cmp_elencoLotti_eh_doRefresh(object sender, EventArgs e)
{
cmp_dettLotti.lotto = cmp_elencoLotti.LottoSel;
cmp_dettLotti.Visible = true;
}
private void Cmp_elencoLotti_eh_doReset(object sender, EventArgs e)
{
cmp_dettLotti.lotto = "0";
cmp_dettLotti.Visible = false;
}
#endregion Private Methods
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
cmp_dettLotti.Visible = false;
}
cmp_elencoLotti.eh_doRefresh += Cmp_elencoLotti_eh_doRefresh;
cmp_elencoLotti.eh_doReset += Cmp_elencoLotti_eh_doReset;
}
#endregion Protected Methods
}
private void Cmp_elencoLotti_eh_doRefresh(object sender, EventArgs e)
{
cmp_dettLotti.lotto = cmp_elencoLotti.LottoSel;
cmp_dettLotti.Visible = true;
}
private void Cmp_elencoLotti_eh_doReset(object sender, EventArgs e)
{
cmp_dettLotti.lotto = "0";
cmp_dettLotti.Visible = false;
}
}
}
+1 -1
View File
@@ -8,7 +8,7 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class gestPedane : System.Web.UI.Page
public partial class gestPedane : BasePage
{
#region Protected Properties
+5 -2
View File
@@ -7,11 +7,14 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class jumper : System.Web.UI.Page
public partial class jumper : BasePage
{
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
}
#endregion Protected Methods
}
}
+1 -1
View File
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class menu : System.Web.UI.Page
public partial class menu : BasePage
{
#region Protected Methods
+1 -1
View File
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class packList : System.Web.UI.Page
public partial class packList : BasePage
{
#region Protected Methods
+1 -1
View File
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class printCartOdl : System.Web.UI.Page
public partial class printCartOdl : BasePage
{
#region Private Methods
+12 -8
View File
@@ -7,14 +7,18 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class prtFiniti : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
public partial class prtFiniti : BasePage
{
if (!Page.IsPostBack)
{
((Site)this.Master).showSearch = false;
}
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
((Site)this.Master).showSearch = false;
}
}
#endregion Protected Methods
}
}
}
+12 -8
View File
@@ -7,14 +7,18 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class prtSemilav : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
public partial class prtSemilav : BasePage
{
if (!Page.IsPostBack)
{
((Site)this.Master).showSearch = false;
}
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
((Site)this.Master).showSearch = false;
}
}
#endregion Protected Methods
}
}
}
+1 -1
View File
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace MP_MAG.SMART
{
public partial class tryLogin : System.Web.UI.Page
public partial class tryLogin : BasePage
{
#region Protected Methods
+585 -696
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+565 -676
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+4 -4
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+15 -3
View File
@@ -73,8 +73,8 @@
</namespaces>
<controls>
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /></controls>
</pages>
<sessionState mode="Custom" customProvider="MySessionStateStore">
<providers>
@@ -383,7 +383,19 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.3" newVersion="4.1.1.3" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.0.8" newVersion="1.3.0.8" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DnsClient" publicKeyToken="4574bb5573c51424" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.2.0" newVersion="1.3.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
+1 -1
View File
@@ -37,7 +37,7 @@ namespace MP_MAG.WebUserControls
{
resetMessage();
}
else if (inputAcquired == "")
else if (string.IsNullOrEmpty(inputAcquired))
{
raiseEvent();
}
+75 -56
View File
@@ -7,63 +7,82 @@ using System.Web.UI.WebControls;
namespace MP_MAG.WebUserControls
{
public partial class cmp_dettLotti : System.Web.UI.UserControl
{
/// <summary>
/// Generico evento di richiesta refresh a aprent
/// </summary>
public event EventHandler eh_doRefresh;
/// <summary>
/// Generico evento di richiesta refresh a aprent
/// </summary>
public event EventHandler eh_doReset;
protected void Page_Load(object sender, EventArgs e)
public partial class cmp_dettLotti : System.Web.UI.UserControl
{
if (!Page.IsPostBack)
{
}
}
/// <summary>
/// Lotto OUT cui fare riferimento con elenco
/// </summary>
public string lotto
{
get
{
return hfLotto.Value;
}
set
{
hfLotto.Value = value;
}
}
#region Public Events
/// <summary>
/// comando reset
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
/// <summary>
/// Generico evento di richiesta refresh a aprent
/// </summary>
public event EventHandler eh_doReset;
private void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
raiseReset();
#endregion Public Events
#region Public Properties
/// <summary>
/// Lotto OUT cui fare riferimento con elenco
/// </summary>
public string lotto
{
get
{
return hfLotto.Value;
}
set
{
hfLotto.Value = value;
}
}
#endregion Public Properties
#region Private Methods
private void resetSelezione()
{
grView.SelectedIndex = -1;
grView.DataBind();
raiseReset();
}
#endregion Private Methods
#region Protected Methods
/// <summary>
/// comando reset
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void lbtReset_Click(object sender, EventArgs e)
{
resetSelezione();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
}
}
#endregion Protected Methods
#region Public Methods
/// <summary>
/// Chiamata evento
/// </summary>
public void raiseReset()
{
// se qualcuno ascolta sollevo evento nuovo valore...
if (eh_doReset != null)
{
eh_doReset(this, new EventArgs());
}
}
#endregion Public Methods
}
/// <summary>
/// Chiamata evento
/// </summary>
public void raiseReset()
{
// se qualcuno ascolta sollevo evento nuovo valore...
if (eh_doReset != null)
{
eh_doReset(this, new EventArgs());
}
}
}
}
}
@@ -124,6 +124,7 @@ namespace MP_MAG.WebUserControls
}
catch (Exception exc)
{
logger.lg.scriviLog($"Eccezione in updateTreeMenu {Environment.NewLine}{exc}");
if (safePages.IndexOf(Request.Url.Segments.LastOrDefault(), StringComparison.OrdinalIgnoreCase) < 0)
{
Response.Redirect("login", false);
+1 -1
View File
@@ -344,7 +344,7 @@ namespace MP_MAG.WebUserControls
private bool processLastCmd(bool doRaiseEv)
{
if (lastCmd == "") doRaiseEv = true;
if (string.IsNullOrEmpty(lastCmd)) doRaiseEv = true;
// processiamo barcode letto
decodedData decoData = MagDataLayer.man.decodeBcode(lastValidCmd);
switch (decoData.codeType)
@@ -342,7 +342,7 @@ namespace MP_MAG.WebUserControls
private bool processLastCmd(bool doRaiseEv)
{
if (lastCmd == "") doRaiseEv = true;
if (string.IsNullOrEmpty(lastCmd)) doRaiseEv = true;
// processiamo barcode letto
decodedData decoData = MagDataLayer.man.decodeBcode(lastValidCmd);
switch (decoData.codeType)
+5 -2
View File
@@ -7,11 +7,14 @@ using System.Web.UI.WebControls;
namespace MP_MAG
{
public partial class jumper : System.Web.UI.Page
public partial class jumper : BasePage
{
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
}
#endregion Protected Methods
}
}
+4 -5
View File
@@ -3,11 +3,11 @@
<package id="AIM" version="1.0.3" targetFramework="net462" />
<package id="AjaxControlToolkit" version="19.1.0" targetFramework="net462" />
<package id="Antlr" version="3.5.0.2" targetFramework="net462" />
<package id="AspNet.ScriptManager.bootstrap" version="4.4.1" targetFramework="net462" />
<package id="AspNet.ScriptManager.bootstrap" version="4.5.2" targetFramework="net462" />
<package id="AspNet.ScriptManager.jQuery" version="3.4.1" targetFramework="net462" />
<package id="bootstrap" version="4.4.1" targetFramework="net462" />
<package id="bootstrap" version="4.5.2" targetFramework="net462" />
<package id="Crc32C.NET" version="1.0.5.0" targetFramework="net462" />
<package id="DnsClient" version="1.2.0" targetFramework="net462" />
<package id="DnsClient" version="1.3.2" targetFramework="net462" />
<package id="elmah" version="1.2.2" targetFramework="net462" />
<package id="elmah.corelibrary" version="1.2.2" targetFramework="net462" />
<package id="Font.Awesome" version="5.12.0" targetFramework="net462" />
@@ -45,12 +45,11 @@
<package id="MongoDB.Libmongocrypt" version="1.0.0" targetFramework="net462" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="net462" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net462" />
<package id="NLog" version="4.6.8" targetFramework="net462" />
<package id="PDFsharp" version="1.50.5147" targetFramework="net462" />
<package id="Pipelines.Sockets.Unofficial" version="2.1.1" targetFramework="net462" />
<package id="popper.js" version="1.16.1" targetFramework="net462" />
<package id="SharpCompress" version="0.24.0" targetFramework="net462" />
<package id="SharpZipLib" version="1.2.0" targetFramework="net462" />
<package id="SharpZipLib" version="1.3.0" targetFramework="net462" />
<package id="Snappy.NET" version="1.1.1.8" targetFramework="net462" />
<package id="StackExchange.Redis" version="2.0.601" targetFramework="net462" />
<package id="SteamWare" version="4.0.2003.734" targetFramework="net462" />
+9
View File
@@ -47,3 +47,12 @@ dotnet_diagnostic.CA1062.severity = none
# CA1716: Gli identificatori non devono corrispondere a parole chiave
dotnet_diagnostic.CA1716.severity = none
# CA1044: Le proprietà non devono essere di sola scrittura
dotnet_diagnostic.CA1044.severity = none
# CA1056: Le proprietà simili a URI non devono essere stringhe
dotnet_diagnostic.CA1056.severity = none
# CA1805: Non eseguire inutilmente l'inizializzazione
dotnet_diagnostic.CA1805.severity = none
+1 -1
View File
@@ -60,7 +60,7 @@ namespace MP_SITE.WebUserControls
return DataLayerObj.isMulti(idxMacchina);
}
protected void Page_Load(object sender, EventArgs e)
protected virtual void Page_Load(object sender, EventArgs e)
{
_resoconti = new resoconti();
if (!Page.IsPostBack)
@@ -22,8 +22,9 @@ namespace MP_SITE.WebUserControls
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
protected override void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
if (!Page.IsPostBack)
{
mod_righePag.numRowPag = Convert.ToInt32(memLayer.ML.CRI("_righeDataGridMed") / 2);
@@ -4,8 +4,5 @@ namespace MP_SITE.WebUserControls
{
public partial class mod_andamentoStorico : baseProdControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
@@ -4,56 +4,75 @@ using System;
namespace MP_SITE.WebUserControls
{
public partial class mod_datiConfermati : System.Web.UI.UserControl
{
/// <summary>
/// Oggetto datalayer specifico
/// </summary>
DataLayer DataLayerObj = new DataLayer();
protected void Page_Load(object sender, EventArgs e)
public partial class mod_datiConfermati : System.Web.UI.UserControl
{
#region Private Fields
}
/// <summary>
/// aggiorna visualizzazione
/// </summary>
public void doUpdate()
{
grView.DataBind();
}
/// <summary>
/// Verifica la visibilità della colonna macchina (SOLO SE E' multi...)
/// </summary>
public bool isMulti
{
get
{
bool answ = false;
try
/// <summary>
/// Oggetto datalayer specifico
/// </summary>
private DataLayer DataLayerObj = new DataLayer();
#endregion Private Fields
#region Public Properties
/// <summary>
/// Verifica la visibilità della colonna macchina (SOLO SE E' multi...)
/// </summary>
public bool isMulti
{
string IdxMacchina = memLayer.ML.StringSessionObj("IdxMacchina");
answ = DataLayerObj.mDatiMacchinaVal(IdxMacchina, "Multi") != "0";
get
{
bool answ = false;
try
{
string IdxMacchina = memLayer.ML.StringSessionObj("IdxMacchina");
answ = DataLayerObj.mDatiMacchinaVal(IdxMacchina, "Multi") != "0";
}
catch
{ }
return answ;
}
}
catch
{ }
return answ;
}
#endregion Public Properties
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
}
#endregion Protected Methods
#region Public Methods
/// <summary>
/// aggiorna visualizzazione
/// </summary>
public void doUpdate()
{
grView.DataBind();
}
/// <summary>
/// Filtra il nome macchina (per il caso doppia tavola...)
/// </summary>
/// <param name="idxMacc"></param>
/// <returns></returns>
public string filtName(object idxMacc)
{
string answ = "-";
if (isMulti)
{
answ = idxMacc.ToString();
int iSharp = answ.IndexOf("#", StringComparison.OrdinalIgnoreCase);
answ = answ.Substring(iSharp + 1);
}
return answ;
}
#endregion Public Methods
}
/// <summary>
/// Filtra il nome macchina (per il caso doppia tavola...)
/// </summary>
/// <param name="idxMacc"></param>
/// <returns></returns>
public string filtName(object idxMacc)
{
string answ = "-";
if (isMulti)
{
answ = idxMacc.ToString();
int iSharp = answ.IndexOf("#");
answ = answ.Substring(iSharp + 1);
}
return answ;
}
}
}
@@ -4,84 +4,103 @@ using System.Web.UI;
namespace MP_SITE.WebUserControls
{
public partial class mod_immagineStato : System.Web.UI.UserControl
{
#region area protected
protected resoconti _resoconti;
protected void Page_Load(object sender, EventArgs e)
public partial class mod_immagineStato : System.Web.UI.UserControl
{
_resoconti = new resoconti();
if (!Page.IsPostBack)
{
aggiornamento();
}
}
#region Protected Fields
#endregion
protected resoconti _resoconti;
#region area public
#endregion Protected Fields
/// <summary>
/// idx della macchina da mostrare
/// </summary>
public string idxMacchina
{
get
{
string idxMacchina = "1";
try
#region Public Properties
/// <summary>
/// idx della macchina da mostrare
/// </summary>
public string idxMacchina
{
idxMacchina = memLayer.ML.QSS("IdxMacchina");
get
{
string idxMacchina = "1";
try
{
idxMacchina = memLayer.ML.QSS("IdxMacchina");
}
catch
{
}
return idxMacchina;
}
}
catch
{
}
return idxMacchina;
}
}
public string statoDaIdx(object idx)
{
return _resoconti.statoDaIdx(Convert.ToInt32(idx));
}
public string urlMacchina()
{
string urlMacc = "";
try
{
urlMacc = string.Format("~/images/macchine/{0}", _resoconti.urlMacchina(idxMacchina));
if (urlMacc == "")
{
urlMacc = "~/images/macchine/Steamware.png";
}
}
catch
{
urlMacc = "~/images/macchine/Steamware.png";
}
return urlMacc;
}
public void aggiornamento()
{
// sistemo i dati riguardo la macchina
lblMacchina.Text = string.Format("{0} - {1}", _resoconti.nomeMacchina(idxMacchina), statoDaIdx(_resoconti.statoMacchina(idxMacchina)));
imgMacchina.ImageUrl = urlMacchina();
updateLayout();
}
/// <summary>
/// aggiorna il layout grafico
/// </summary>
private void updateLayout()
{
if (idxMacchina != "nd")
{
// in base allo stato recupero il colore...
string codColore = _resoconti.semaforoDaIdxStato(_resoconti.statoMacchina(idxMacchina));
pnlImg.CssClass = string.Format("p-2 {0}", codColore );
}
}
#endregion
}
public string ImageUrlMacchina
{
get
{
string urlMacc = "";
try
{
urlMacc = string.Format("~/images/macchine/{0}", _resoconti.urlMacchina(idxMacchina));
if (string.IsNullOrEmpty(urlMacc))
{
urlMacc = "~/images/macchine/Steamware.png";
}
}
catch
{
urlMacc = "~/images/macchine/Steamware.png";
}
return urlMacc;
}
}
#endregion Public Properties
#region Private Methods
/// <summary>
/// aggiorna il layout grafico
/// </summary>
private void updateLayout()
{
if (idxMacchina != "nd")
{
// in base allo stato recupero il colore...
string codColore = _resoconti.semaforoDaIdxStato(_resoconti.statoMacchina(idxMacchina));
pnlImg.CssClass = string.Format("p-2 {0}", codColore);
}
}
#endregion Private Methods
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
_resoconti = new resoconti();
if (!Page.IsPostBack)
{
aggiornamento();
}
}
#endregion Protected Methods
#region Public Methods
public void aggiornamento()
{
// sistemo i dati riguardo la macchina
lblMacchina.Text = string.Format("{0} - {1}", _resoconti.nomeMacchina(idxMacchina), statoDaIdx(_resoconti.statoMacchina(idxMacchina)));
imgMacchina.ImageUrl = ImageUrlMacchina;
updateLayout();
}
public string statoDaIdx(object idx)
{
return _resoconti.statoDaIdx(Convert.ToInt32(idx));
}
#endregion Public Methods
}
}
@@ -3,44 +3,52 @@ using System;
namespace MP_SITE.WebUserControls
{
public partial class mod_logControlli : baseProdControl
{
public override void aggiornamento()
public partial class mod_logControlli : baseProdControl
{
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("inizio caricamento dati LogControlli", tipoLog.INFO);
}
grView.PageSize = _numRighe;
ods.DataBind();
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("fine caricamento dati LogControlli", tipoLog.INFO);
}
if (!Page.IsPostBack)
{
fixMacchina();
}
}
#region Private Methods
public void reportUpdt(object sender, EventArgs e)
{
reportUpdate();
}
private void fixMacchina()
{
string IdxMacc = memLayer.ML.StringSessionObj("IdxMacchina");
int idx = 0;
if (isMulti(IdxMacc))
{
idx = IdxMacc.IndexOf("#");
if (idx > 0)
private void fixMacchina()
{
IdxMacc = IdxMacc.Substring(0, IdxMacc.IndexOf("#"));
string IdxMacc = memLayer.ML.StringSessionObj("IdxMacchina");
int idx = 0;
if (isMulti(IdxMacc))
{
idx = IdxMacc.IndexOf("#", StringComparison.OrdinalIgnoreCase);
if (idx > 0)
{
IdxMacc = IdxMacc.Substring(0, IdxMacc.IndexOf("#", StringComparison.OrdinalIgnoreCase));
}
}
memLayer.ML.setSessionVal("IdxMacchinaControlli", IdxMacc);
}
}
memLayer.ML.setSessionVal("IdxMacchinaControlli", IdxMacc);
#endregion Private Methods
#region Public Methods
public override void aggiornamento()
{
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("inizio caricamento dati LogControlli", tipoLog.INFO);
}
grView.PageSize = _numRighe;
ods.DataBind();
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("fine caricamento dati LogControlli", tipoLog.INFO);
}
if (!Page.IsPostBack)
{
fixMacchina();
}
}
public void reportUpdt(object sender, EventArgs e)
{
reportUpdate();
}
#endregion Public Methods
}
}
}
+43 -34
View File
@@ -8,43 +8,52 @@ using System.Web.UI.WebControls;
namespace MP_SITE.WebUserControls
{
public partial class mod_logFluxData : baseProdControl
{
public override void aggiornamento()
public partial class mod_logFluxData : baseProdControl
{
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("inizio caricamento dati FluxLog", tipoLog.INFO);
}
grView.PageSize = _numRighe;
ods.DataBind();
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("fine caricamento dati FluxLog", tipoLog.INFO);
}
if (!Page.IsPostBack)
{
fixMacchina();
}
}
public void reportUpdt(object sender, EventArgs e)
{
reportUpdate();
}
#region Private Methods
private void fixMacchina()
{
string IdxMacc = memLayer.ML.StringSessionObj("IdxMacchina");
int idx = 0;
if (isMulti(IdxMacc))
{
idx = IdxMacc.IndexOf("#");
if (idx > 0)
private void fixMacchina()
{
IdxMacc = IdxMacc.Substring(0, IdxMacc.IndexOf("#"));
string IdxMacc = memLayer.ML.StringSessionObj("IdxMacchina");
int idx = 0;
if (isMulti(IdxMacc))
{
idx = IdxMacc.IndexOf("#", StringComparison.OrdinalIgnoreCase);
if (idx > 0)
{
IdxMacc = IdxMacc.Substring(0, IdxMacc.IndexOf("#", StringComparison.OrdinalIgnoreCase));
}
}
memLayer.ML.setSessionVal("IdxMacchinaFluxFlog", IdxMacc);
}
}
memLayer.ML.setSessionVal("IdxMacchinaFluxFlog", IdxMacc);
#endregion Private Methods
#region Public Methods
public override void aggiornamento()
{
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("inizio caricamento dati FluxLog", tipoLog.INFO);
}
grView.PageSize = _numRighe;
ods.DataBind();
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("fine caricamento dati FluxLog", tipoLog.INFO);
}
if (!Page.IsPostBack)
{
fixMacchina();
}
}
public void reportUpdt(object sender, EventArgs e)
{
reportUpdate();
}
#endregion Public Methods
}
}
}
+43 -34
View File
@@ -3,43 +3,52 @@ using System;
namespace MP_SITE.WebUserControls
{
public partial class mod_logScarti : baseProdControl
{
public override void aggiornamento()
public partial class mod_logScarti : baseProdControl
{
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("inizio caricamento dati LogScarti", tipoLog.INFO);
}
grView.PageSize = _numRighe;
ods.DataBind();
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("fine caricamento dati LogScarti", tipoLog.INFO);
}
if (!Page.IsPostBack)
{
fixMacchina();
}
}
public void reportUpdt(object sender, EventArgs e)
{
reportUpdate();
}
#region Private Methods
private void fixMacchina()
{
string IdxMacc = memLayer.ML.StringSessionObj("IdxMacchina");
int idx = 0;
if (isMulti(IdxMacc))
{
idx = IdxMacc.IndexOf("#");
if (idx > 0)
private void fixMacchina()
{
IdxMacc = IdxMacc.Substring(0, IdxMacc.IndexOf("#"));
string IdxMacc = memLayer.ML.StringSessionObj("IdxMacchina");
int idx = 0;
if (isMulti(IdxMacc))
{
idx = IdxMacc.IndexOf("#", StringComparison.OrdinalIgnoreCase);
if (idx > 0)
{
IdxMacc = IdxMacc.Substring(0, IdxMacc.IndexOf("#", StringComparison.OrdinalIgnoreCase));
}
}
memLayer.ML.setSessionVal("IdxMacchinaScarti", IdxMacc);
}
}
memLayer.ML.setSessionVal("IdxMacchinaScarti", IdxMacc);
#endregion Private Methods
#region Public Methods
public override void aggiornamento()
{
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("inizio caricamento dati LogScarti", tipoLog.INFO);
}
grView.PageSize = _numRighe;
ods.DataBind();
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("fine caricamento dati LogScarti", tipoLog.INFO);
}
if (!Page.IsPostBack)
{
fixMacchina();
}
}
public void reportUpdt(object sender, EventArgs e)
{
reportUpdate();
}
#endregion Public Methods
}
}
}
+43 -34
View File
@@ -4,43 +4,52 @@ using System.Web.UI;
namespace MP_SITE.WebUserControls
{
public partial class mod_logTC : baseProdControl
{
public override void aggiornamento()
public partial class mod_logTC : baseProdControl
{
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("inizio caricamento dati TC", tipoLog.INFO);
}
grView.PageSize = _numRighe;
ods.DataBind();
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("fine caricamento dati TC", tipoLog.INFO);
}
if (!Page.IsPostBack)
{
fixMacchina();
}
}
public void reportUpdt(object sender, EventArgs e)
{
reportUpdate();
}
#region Private Methods
private void fixMacchina()
{
string IdxMacc = memLayer.ML.StringSessionObj("IdxMacchina");
int idx = 0;
if (isMulti(IdxMacc))
{
idx = IdxMacc.IndexOf("#");
if (idx > 0)
private void fixMacchina()
{
IdxMacc = IdxMacc.Substring(0, IdxMacc.IndexOf("#"));
string IdxMacc = memLayer.ML.StringSessionObj("IdxMacchina");
int idx = 0;
if (isMulti(IdxMacc))
{
idx = IdxMacc.IndexOf("#", StringComparison.OrdinalIgnoreCase);
if (idx > 0)
{
IdxMacc = IdxMacc.Substring(0, IdxMacc.IndexOf("#", StringComparison.OrdinalIgnoreCase));
}
}
memLayer.ML.setSessionVal("IdxMacchinaTC", IdxMacc);
}
}
memLayer.ML.setSessionVal("IdxMacchinaTC", IdxMacc);
#endregion Private Methods
#region Public Methods
public override void aggiornamento()
{
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("inizio caricamento dati TC", tipoLog.INFO);
}
grView.PageSize = _numRighe;
ods.DataBind();
if (memLayer.ML.CRI("_logLevel") > 5)
{
logger.lg.scriviLog("fine caricamento dati TC", tipoLog.INFO);
}
if (!Page.IsPostBack)
{
fixMacchina();
}
}
public void reportUpdt(object sender, EventArgs e)
{
reportUpdate();
}
#endregion Public Methods
}
}
}
@@ -15,7 +15,7 @@ namespace MP_SITE.WebUserControls
protected int _larghezza = 100;
protected double _min2plot = 0.0;
protected double _min2plot = 0;
protected double _minRosso = 0.5;
@@ -226,7 +226,7 @@ namespace MP_SITE.WebUserControls
tipo = 1;
Chart1.Series["SeqB"].Points.AddXY(tipo, inizio, fine);
// aggiungo tooltip
Chart1.Series["SeqB"].Points[Chart1.Series["SeqB"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codR);
Chart1.Series["SeqB"].Points[Chart1.Series["SeqB"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codB);
Chart1.Series["SeqB"].Points[Chart1.Series["SeqB"].Points.Count - 1].PostBackValue = inizio.ToString();
break;
@@ -6,355 +6,387 @@ using System.Web.UI.WebControls;
namespace MP_SITE.WebUserControls
{
public partial class mod_sequencerTempiCiclo : System.Web.UI.UserControl
{
#region proprietà
protected int _timeSplits = 10;
protected double _minVal = 0.5;
/// <summary>
/// totale in minuti da plottare
/// </summary>
protected double totale = 1;
/// <summary>
/// valore minimo da plottare
/// </summary>
public double min2plot { get; set; }
/// <summary>
/// titolo del grafico
/// </summary>
public string titolo { get; set; }
/// <summary>
/// larghezza totale del grafico
/// </summary>
public int larghezza { get; set; }
/// <summary>
/// numero dei segmenti del grafico
/// </summary>
public int numSplit { get; set; }
/// <summary>
/// % minuma nel periodo per dire che sia verde
/// </summary>
public double minVal { get; set; }
/// <summary>
/// definisce se plottare "reversed" (ovvero i valori "minimi" sono con barre + alte dei massimi, come se vosse apssare da tempo a velocità...)
/// </summary>
public bool plotReversed { get; set; }
/// <summary>
/// altezza max grafico
/// </summary>
public int graphHeight { get; set; }
#endregion
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
public partial class mod_sequencerTempiCiclo : System.Web.UI.UserControl
{
if (!Page.IsPostBack)
{
// setup valori
min2plot = 0.0;
titolo = "TempiCiclo";
doUpdate();
}
}
/// <summary>
/// disegna la tabella
/// </summary>
protected void plottaGrafico()
{
// a seconda del numero di eventi da plottare decido la procedura...
DataLayer_generic.serieTimeValDataTable dati = _grafico.serieDati;
try
{
// è la somma dei minuti totali dall'inizio alla fine...
totale = _grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio).TotalMinutes;
}
catch
{ }
#region Protected Fields
plottaDettaglio(dati);
}
/// <summary>
/// oggetto protected
/// </summary>
protected objTempiCiclo _grafico;
/// <summary>
/// popola il sequencer degli stati riportando tutti i singoli valori
/// </summary>
/// <param name="dati"></param>
/// <returns></returns>
private void plottaDettaglio(DataLayer_generic.serieTimeValDataTable dati)
{
// definizioni x chart
Chart1.Width = larghezza;
Chart1.AntiAliasing = System.Web.UI.DataVisualization.Charting.AntiAliasingStyles.All;
Chart1.Height = graphHeight;
// definizione intervallo asse Y (che qui è anche asse X...
Chart1.ChartAreas["TempiCiclo"].AxisX.Minimum = _grafico.intervallo.inizio.ToOADate();
Chart1.ChartAreas["TempiCiclo"].AxisX.Maximum = _grafico.intervallo.fine.ToOADate();
LabelStyle lbst = new LabelStyle();
lbst.Format = "HH:mm";
Chart1.ChartAreas["TempiCiclo"].AxisX.LabelStyle = lbst;
protected double _minVal = 0.5;
protected int _timeSplits = 10;
// definizioni x chart area tempi ciclo
Chart1.ChartAreas["TempiCiclo"].AxisY.Enabled = System.Web.UI.DataVisualization.Charting.AxisEnabled.False;
Chart1.ChartAreas["TempiCiclo"].AxisY.IsLogarithmic = false;
Chart1.ChartAreas["TempiCiclo"].AxisY.IsReversed = true;
/// <summary>
/// totale in minuti da plottare
/// </summary>
protected double totale = 1;
#endregion Protected Fields
string tipo_A = "";
string tipo_B = "";
decimal ratioTC;
decimal deltaValori = grafico.maxVal - grafico.minVal;
foreach (DataLayer_generic.serieTimeValRow riga in _grafico.serieDati)
{
#region Public Events
ratioTC = riga.valore;
/// <summary>
/// evento di richeista zoom sui dati
/// </summary>
public event EventHandler eh_richiestaZoom;
// a seconda del tipo aggiungo all'una o all'altra serie...
if (grafico.palletChange)
#endregion Public Events
#region Public Properties
/// <summary>
/// elemento grafico da plottare
/// </summary>
public objTempiCiclo grafico
{
// controllo per inizializzare i 2 tipi...
if (string.IsNullOrEmpty(tipo_A))
{
tipo_A = riga.tipo;
if (Chart1.Series.Count < 1)
get
{
Chart1.Series.Add(tipo_A);
return _grafico;
}
}
else if (string.IsNullOrEmpty(tipo_B) && riga.tipo != tipo_A)
{
tipo_B = riga.tipo;
if (Chart1.Series.Count < 2)
set
{
// provo ad aggiungere nuova...
try
{
Chart1.Series.Add(tipo_B);
}
// ... sennò aggiungo vecchia serie
catch
{
Chart1.Series.Add(tipo_A);
}
_grafico = value;
}
}
// definisco colori
if (riga.tipo == tipo_A)
{
}
/// <summary>
/// altezza max grafico
/// </summary>
public int graphHeight { get; set; }
/// <summary>
/// larghezza totale del grafico
/// </summary>
public int larghezza { get; set; }
/// <summary>
/// valore minimo da plottare
/// </summary>
public double min2plot { get; set; }
/// <summary>
/// % minuma nel periodo per dire che sia verde
/// </summary>
public double minVal { get; set; }
/// <summary>
/// numero dei segmenti del grafico
/// </summary>
public int numSplit { get; set; }
/// <summary>
/// definisce se plottare "reversed" (ovvero i valori "minimi" sono con barre + alte dei massimi, come se vosse apssare da tempo a velocità...)
/// </summary>
public bool plotReversed { get; set; }
/// <summary>
/// titolo del grafico
/// </summary>
public string titolo { get; set; }
#endregion Public Properties
#region Private Methods
/// <summary>
/// intercetta richiesta di zoom e zoomma sul giorno in esame...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void lnkb_Click(object sender, EventArgs e)
{
LinkButton lnk = (LinkButton)sender;
// calcolo il giorno...
memLayer.ML.setSessionVal("dataZoom", lnk.CommandArgument.ToString());
if (eh_richiestaZoom != null)
{
eh_richiestaZoom(this, new EventArgs());
}
}
/// <summary>
/// popola il sequencer degli stati riportando tutti i singoli valori
/// </summary>
/// <returns></returns>
private void plottaDettaglio()
{
// definizioni x chart
Chart1.Width = larghezza;
Chart1.AntiAliasing = System.Web.UI.DataVisualization.Charting.AntiAliasingStyles.All;
Chart1.Height = graphHeight;
// definizione intervallo asse Y (che qui è anche asse X...
Chart1.ChartAreas["TempiCiclo"].AxisX.Minimum = _grafico.intervallo.inizio.ToOADate();
Chart1.ChartAreas["TempiCiclo"].AxisX.Maximum = _grafico.intervallo.fine.ToOADate();
LabelStyle lbst = new LabelStyle();
lbst.Format = "HH:mm";
Chart1.ChartAreas["TempiCiclo"].AxisX.LabelStyle = lbst;
// definizioni x chart area tempi ciclo
Chart1.ChartAreas["TempiCiclo"].AxisY.Enabled = System.Web.UI.DataVisualization.Charting.AxisEnabled.False;
Chart1.ChartAreas["TempiCiclo"].AxisY.IsLogarithmic = false;
Chart1.ChartAreas["TempiCiclo"].AxisY.IsReversed = true;
string tipo_A = "";
string tipo_B = "";
decimal ratioTC;
decimal deltaValori = grafico.maxVal - grafico.minVal;
foreach (DataLayer_generic.serieTimeValRow riga in _grafico.serieDati)
{
ratioTC = riga.valore;
// a seconda del tipo aggiungo all'una o all'altra serie...
if (grafico.palletChange)
{
// controllo per inizializzare i 2 tipi...
if (string.IsNullOrEmpty(tipo_A))
{
tipo_A = riga.tipo;
if (Chart1.Series.Count < 1)
{
Chart1.Series.Add(tipo_A);
}
}
else if (string.IsNullOrEmpty(tipo_B) && riga.tipo != tipo_A)
{
tipo_B = riga.tipo;
if (Chart1.Series.Count < 2)
{
// provo ad aggiungere nuova...
try
{
Chart1.Series.Add(tipo_B);
}
// ... sennò aggiungo vecchia serie
catch
{
Chart1.Series.Add(tipo_A);
}
}
}
// definisco colori
if (riga.tipo == tipo_A)
{
try
{
Chart1.Series[tipo_A].Points.AddXY(riga.DataEnd, ratioTC);
}
catch
{
Chart1.Series[0].Points.AddXY(riga.DataEnd, ratioTC);
}
}
else
{
try
{
Chart1.Series[tipo_B].Points.AddXY(riga.DataEnd, ratioTC);
}
catch
{
Chart1.Series[1].Points.AddXY(riga.DataEnd, ratioTC);
}
}
}
else // unica serie
{
if (string.IsNullOrEmpty(tipo_A))
{
tipo_A = riga.tipo;
if (Chart1.Series.Count < 1)
{
Chart1.Series.Add(tipo_A);
}
}
Chart1.Series[tipo_A].Points.AddXY(riga.DataEnd, ratioTC);
}
}
if (Chart1.Series.Count > 0)
{
// disegno plot nuovo...
try
{
Chart1.Series[tipo_A].XValueType = ChartValueType.DateTime;
Chart1.Series[tipo_A].ChartType = SeriesChartType.FastPoint;
}
catch
{
Chart1.Series[0].XValueType = ChartValueType.DateTime;
Chart1.Series[0].ChartType = SeriesChartType.FastPoint;
}
if (Chart1.Series.Count > 1)
{
try
{
Chart1.Series[tipo_B].XValueType = ChartValueType.DateTime;
Chart1.Series[tipo_B].ChartType = SeriesChartType.FastPoint;
}
catch
{
Chart1.Series[1].XValueType = ChartValueType.DateTime;
Chart1.Series[1].ChartType = SeriesChartType.FastPoint;
}
}
}
}
#endregion Private Methods
#region Protected Methods
/// <summary>
/// calcola il rapporto tr ail valore e le grandezze reali dato masismo, intervallo, apdding, plot regolare o reversed...
/// </summary>
/// <param name="valore"></param>
/// <param name="maxVal"></param>
/// <param name="deltaValori"></param>
/// <param name="plotReversed"></param>
/// <returns></returns>
protected decimal calcolaRatio(decimal valore, decimal maxVal, decimal deltaValori, bool plotReversed, decimal padding)
{
decimal answ = 0;
if (plotReversed)
{
answ = (padding + ((1 - 2 * padding) * ((maxVal - valore) / (deltaValori))));
}
else
{
answ = (padding + ((1 - 2 * padding) * ((valore - maxVal) / (deltaValori))));
}
return answ;
}
/// <summary>
/// evento di click x zoom
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Chart1_Click(object sender, ImageMapEventArgs e)
{
// alzo evento
if (eh_richiestaZoom != null)
{
eh_richiestaZoom(this, new EventArgs());
}
}
/// <summary>
/// restituisce true se ci sono dati...
/// </summary>
/// <returns></returns>
protected bool datiPresenti()
{
bool answ = false;
try
{
Chart1.Series[tipo_A].Points.AddXY(riga.DataEnd, ratioTC);
int numCelle = grafico.serieDati.Rows.Count;
answ = (numCelle > 0);
}
catch
{ }
return answ;
}
/// <summary>
/// caricamento pagina
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Chart1.Series[0].Points.AddXY(riga.DataEnd, ratioTC);
// setup valori
min2plot = 0.0;
titolo = "TempiCiclo";
doUpdate();
}
}
else
{
}
/// <summary>
/// disegna la tabella
/// </summary>
protected void plottaGrafico()
{
// a seconda del numero di eventi da plottare decido la procedura...
DataLayer_generic.serieTimeValDataTable dati = _grafico.serieDati;
try
{
Chart1.Series[tipo_B].Points.AddXY(riga.DataEnd, ratioTC);
// è la somma dei minuti totali dall'inizio alla fine...
totale = _grafico.intervallo.fine.Subtract(_grafico.intervallo.inizio).TotalMinutes;
}
catch
{ }
plottaDettaglio();
}
#endregion Protected Methods
#if false
/// <summary>
/// popola il sequencer degli stati raggruppando perché troppi valori secondo MEDIA ARMONICA
/// </summary>
/// <param name="dati"></param>
/// <returns></returns>
private void plottaGruppiMediaArmonica(DataLayer_generic.serieTimeValDataTable dati)
{
// creo oggetto x contenere i dati "mediati"
DataLayer_generic.serieTimeValDataTable datiGrouped = new DataLayer_generic.serieTimeValDataTable();
// calcolo il val minimo da plottare (come ampiezza)
decimal ampiezzaMin = (decimal)totale / numSplit;
// setup valori iniziali
decimal valoreCurr = (decimal)0.0;
decimal valoreMedio = (decimal)1.0;
DateTime timeRaggiunto = _grafico.intervallo.inizio;
decimal ampiezzaCurr = (decimal)0.0;
decimal ampiezzaMedia = (decimal)0.0;
string label = "";
// ciclo x tutti i record
foreach (DataLayer_generic.serieTimeValRow riga in dati)
{
Chart1.Series[1].Points.AddXY(riga.DataEnd, ratioTC);
// calcolo nuova ampiezza
ampiezzaCurr = (decimal)riga.DataEnd.Subtract(riga.DataStart).TotalMinutes;
//...e calcolo nuovo valore medio...
valoreCurr = riga.valore;
// calcolo media armonica
valoreMedio = ((ampiezzaCurr + ampiezzaMedia) / (ampiezzaMedia / valoreMedio + ampiezzaCurr / valoreCurr));
ampiezzaMedia = ampiezzaCurr + ampiezzaMedia;
// se supero il limite aggiungo in tabella, sennò proseguo...
if (ampiezzaMedia > ampiezzaMin)
{
label = string.Format("TC: {0} min/pz", valoreMedio);
datiGrouped.AddserieTimeValRow(timeRaggiunto, riga.DataEnd, valoreMedio, label, "TC");
// resetto
timeRaggiunto = riga.DataEnd;
ampiezzaMedia = (decimal)0.0;
valoreMedio = (decimal)1.0;
}
}
}
_grafico.palletChange = false;
plottaDettaglio(datiGrouped);
}
else // unica serie
#endif
#region Public Methods
/// <summary>
/// aggiorna il controllo
/// </summary>
public void doUpdate()
{
if (string.IsNullOrEmpty(tipo_A))
{
tipo_A = riga.tipo;
if (Chart1.Series.Count < 1)
if (datiPresenti())
{
Chart1.Series.Add(tipo_A);
plottaGrafico();
}
else
{
// non plotto
}
}
Chart1.Series[tipo_A].Points.AddXY(riga.DataEnd, ratioTC);
}
}
if (Chart1.Series.Count > 0)
{
// disegno plot nuovo...
try
{
Chart1.Series[tipo_A].XValueType = ChartValueType.DateTime;
Chart1.Series[tipo_A].ChartType = SeriesChartType.FastPoint;
}
catch
{
Chart1.Series[0].XValueType = ChartValueType.DateTime;
Chart1.Series[0].ChartType = SeriesChartType.FastPoint;
}
if (Chart1.Series.Count > 1)
{
try
{
Chart1.Series[tipo_B].XValueType = ChartValueType.DateTime;
Chart1.Series[tipo_B].ChartType = SeriesChartType.FastPoint;
}
catch
{
Chart1.Series[1].XValueType = ChartValueType.DateTime;
Chart1.Series[1].ChartType = SeriesChartType.FastPoint;
}
}
}
#endregion Public Methods
}
/// <summary>
/// calcola il rapporto tr ail valore e le grandezze reali dato masismo, intervallo, apdding, plot regolare o reversed...
/// </summary>
/// <param name="valore"></param>
/// <param name="maxVal"></param>
/// <param name="deltaValori"></param>
/// <param name="plotReversed"></param>
/// <returns></returns>
protected decimal calcolaRatio(decimal valore, decimal maxVal, decimal deltaValori, bool plotReversed, decimal padding)
{
decimal answ = 0;
if (plotReversed)
{
answ = (padding + ((1 - 2 * padding) * ((maxVal - valore) / (deltaValori))));
}
else
{
answ = (padding + ((1 - 2 * padding) * ((valore - maxVal) / (deltaValori))));
}
return answ;
}
/// <summary>
/// intercetta richiesta di zoom e zoomma sul giorno in esame...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void lnkb_Click(object sender, EventArgs e)
{
LinkButton lnk = (LinkButton)sender;
// calcolo il giorno...
memLayer.ML.setSessionVal("dataZoom", lnk.CommandArgument.ToString());
if (eh_richiestaZoom != null)
{
eh_richiestaZoom(this, new EventArgs());
}
}
/// <summary>
/// popola il sequencer degli stati raggruppando perché troppi valori secondo MEDIA ARMONICA
/// </summary>
/// <param name="dati"></param>
/// <returns></returns>
private void plottaGruppiMediaArmonica(DataLayer_generic.serieTimeValDataTable dati)
{
// creo oggetto x contenere i dati "mediati"
DataLayer_generic.serieTimeValDataTable datiGrouped = new DataLayer_generic.serieTimeValDataTable();
// calcolo il val minimo da plottare (come ampiezza)
decimal ampiezzaMin = (decimal)totale / numSplit;
// setup valori iniziali
decimal valoreCurr = (decimal)0.0;
decimal valoreMedio = (decimal)1.0;
DateTime timeRaggiunto = _grafico.intervallo.inizio;
decimal ampiezzaCurr = (decimal)0.0;
decimal ampiezzaMedia = (decimal)0.0;
string label = "";
// ciclo x tutti i record
foreach (DataLayer_generic.serieTimeValRow riga in dati)
{
// calcolo nuova ampiezza
ampiezzaCurr = (decimal)riga.DataEnd.Subtract(riga.DataStart).TotalMinutes;
//...e calcolo nuovo valore medio...
valoreCurr = riga.valore;
// calcolo media armonica
valoreMedio = ((ampiezzaCurr + ampiezzaMedia) / (ampiezzaMedia / valoreMedio + ampiezzaCurr / valoreCurr));
ampiezzaMedia = ampiezzaCurr + ampiezzaMedia;
// se supero il limite aggiungo in tabella, sennò proseguo...
if (ampiezzaMedia > ampiezzaMin)
{
label = string.Format("TC: {0} min/pz", valoreMedio);
datiGrouped.AddserieTimeValRow(timeRaggiunto, riga.DataEnd, valoreMedio, label, "TC");
// resetto
timeRaggiunto = riga.DataEnd;
ampiezzaMedia = (decimal)0.0;
valoreMedio = (decimal)1.0;
}
}
_grafico.palletChange = false;
plottaDettaglio(datiGrouped);
}
/// <summary>
/// restituisce true se ci sono dati...
/// </summary>
/// <returns></returns>
protected bool datiPresenti()
{
bool answ = false;
try
{
int numCelle = grafico.serieDati.Rows.Count;
answ = (numCelle > 0);
}
catch
{ }
return answ;
}
/// <summary>
/// oggetto protected
/// </summary>
protected objTempiCiclo _grafico;
/// <summary>
/// elemento grafico da plottare
/// </summary>
public objTempiCiclo grafico
{
get
{
return _grafico;
}
set
{
_grafico = value;
}
}
/// <summary>
/// aggiorna il controllo
/// </summary>
public void doUpdate()
{
if (datiPresenti())
{
plottaGrafico();
}
else
{
// non plotto
}
}
/// <summary>
/// evento di richeista zoom sui dati
/// </summary>
public event EventHandler eh_richiestaZoom;
/// <summary>
/// evento di click x zoom
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Chart1_Click(object sender, ImageMapEventArgs e)
{
// alzo evento
if (eh_richiestaZoom != null)
{
eh_richiestaZoom(this, new EventArgs());
}
}
}
}
+80 -72
View File
@@ -1,82 +1,90 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterPages/Bootstrap.Master" AutoEventWireup="true" CodeBehind="fixODL.aspx.cs" Inherits="MoonProTablet.fixODL" %>
<%@ Register Src="~/WebUserControls/mod_dettMacchina.ascx" TagName="mod_dettMacchina" TagPrefix="uc1" %>
<%@ Register Src="~/WebUserControls/mod_directLinks.ascx" TagPrefix="uc1" TagName="mod_directLinks" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="container my-3" role="main">
<uc1:mod_dettMacchina ID="mod_dettMacchina1" runat="server" />
<div class="form-group" runat="server" id="divSelMacc">
<asp:DropDownList runat="server" ID="ddlSubMacc" DataSourceID="ods" DataTextField="CodMaccArticolo" DataValueField="IdxMacchina" AutoPostBack="True" OnSelectedIndexChanged="ddlSubMacc_SelectedIndexChanged" OnDataBound="ddlSubMacc_DataBound" CssClass="form-control"></asp:DropDownList>
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getMulti" TypeName="MapoDb.DS_applicazioneTableAdapters.MSFDTableAdapter" FilterExpression="idxMacchina LIKE '%#%'">
<SelectParameters>
<asp:SessionParameter DefaultValue="0" Name="IdxMacchina" SessionField="IdxMacchina" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
<div class="container-flow m-3" role="main">
<div class="row">
<div class="col">
<h2>Riassegnazione ODL</h2>
Ultimi ODL lavorati:
<div class="col-12 col-md-8 col-lg-9 col-xl-10">
<uc1:mod_dettMacchina ID="mod_dettMacchina1" runat="server" />
<div class="form-group" runat="server" id="divSelMacc">
<asp:DropDownList runat="server" ID="ddlSubMacc" DataSourceID="ods" DataTextField="CodMaccArticolo" DataValueField="IdxMacchina" AutoPostBack="True" OnSelectedIndexChanged="ddlSubMacc_SelectedIndexChanged" OnDataBound="ddlSubMacc_DataBound" CssClass="form-control"></asp:DropDownList>
<asp:ObjectDataSource runat="server" ID="ods" OldValuesParameterFormatString="original_{0}" SelectMethod="getMulti" TypeName="MapoDb.DS_applicazioneTableAdapters.MSFDTableAdapter" FilterExpression="idxMacchina LIKE '%#%'">
<SelectParameters>
<asp:SessionParameter DefaultValue="0" Name="IdxMacchina" SessionField="IdxMacchina" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
<div class="row">
<div class="col">
<h2>Riassegnazione ODL</h2>
Ultimi ODL lavorati:
</div>
</div>
<div class="row">
<div class="col">
<asp:GridView ID="grViewLastODL" runat="server" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2" DataKeyNames="IdxODL" DataSourceID="odsLastODL" ForeColor="Black" GridLines="None" AllowPaging="True" PageSize="5">
<AlternatingRowStyle BackColor="PaleGoldenrod" />
<Columns>
<asp:BoundField DataField="IdxODL" HeaderText="ODL" InsertVisible="False" ReadOnly="True" SortExpression="IdxODL" />
<asp:BoundField DataField="CodArticolo" HeaderText="Articolo" SortExpression="CodArticolo" />
<asp:BoundField DataField="NumPezzi" HeaderText="# Pezzi" SortExpression="NumPezzi" />
<asp:BoundField DataField="TCAssegnato" HeaderText="TC" SortExpression="TCAssegnato" DataFormatString="{0:N2}" />
<%--<asp:BoundField DataField="DescArticolo" HeaderText="DescArticolo" SortExpression="DescArticolo" />--%>
<asp:TemplateField HeaderText="Periodo" SortExpression="DataInizio">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("DataFine") %>' ForeColor="DarkBlue" /><br />
<asp:Label ID="Label1" runat="server" Text='<%# Eval("DataInizio") %>' ForeColor="DarkGreen" /><br />
</ItemTemplate>
<ItemStyle Font-Size="0.8em" />
</asp:TemplateField>
<asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" ItemStyle-Font-Size="0.7em">
<ItemStyle Font-Size="0.7em"></ItemStyle>
</asp:BoundField>
<asp:BoundField DataField="PzPallet" HeaderText="PzPallet" SortExpression="PzPallet" />
</Columns>
<FooterStyle BackColor="Tan" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<SortedAscendingCellStyle BackColor="#FAFAE7" />
<SortedAscendingHeaderStyle BackColor="#DAC09E" />
<SortedDescendingCellStyle BackColor="#E1DB9C" />
<SortedDescendingHeaderStyle BackColor="#C2A47B" />
</asp:GridView>
<asp:ObjectDataSource ID="odsLastODL" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByMacchinaPeriodo" TypeName="MapoDb.DS_ProdTempiTableAdapters.ODLTableAdapter">
<SelectParameters>
<asp:ControlParameter DefaultValue="0" ControlID="hfIdxMacchina" Name="IdxMacchina" PropertyName="Value" Type="String" />
<asp:ControlParameter ControlID="hfDataFrom" Name="dataFrom" PropertyName="Value" Type="DateTime" />
<asp:ControlParameter ControlID="hfDataTo" Name="dataTo" PropertyName="Value" Type="DateTime" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfIdxMacchina" />
<asp:HiddenField runat="server" ID="hfDataFrom" />
<asp:HiddenField runat="server" ID="hfDataTo" />
</div>
</div>
<div class="row my-3">
<div class="col-8">
<asp:DropDownList runat="server" ID="ddlODL" DataSourceID="odsOdlAvail" DataTextField="label" DataValueField="value" CssClass="form-control btn-secondary" OnSelectedIndexChanged="ddlODL_SelectedIndexChanged" AutoPostBack="True">
</asp:DropDownList>
<asp:ObjectDataSource ID="odsOdlAvail" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getUnused" TypeName="MapoDb.DS_UtilityTableAdapters.v_selODLTableAdapter">
<SelectParameters>
<asp:ControlParameter DefaultValue="0" ControlID="hfIdxMacchina" Name="IdxMacchina" PropertyName="Value" Type="String" />
<asp:Parameter Name="showAll" Type="Boolean" />
<asp:ControlParameter ControlID="hfNumDayOdl" DefaultValue="999" Name="numDayAdd" PropertyName="Value" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfNumDayOdl" />
</div>
<div class="col-4">
<asp:LinkButton runat="server" ID="lbtSetODL" CssClass="btn btn-warning btn-block" OnClick="lbtSetODL_Click"><i class="fa fa-plus"></i> Imposta ODL</asp:LinkButton>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<asp:GridView ID="grViewLastODL" runat="server" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2" DataKeyNames="IdxODL" DataSourceID="odsLastODL" ForeColor="Black" GridLines="None" AllowPaging="True" PageSize="5">
<AlternatingRowStyle BackColor="PaleGoldenrod" />
<Columns>
<asp:BoundField DataField="IdxODL" HeaderText="ODL" InsertVisible="False" ReadOnly="True" SortExpression="IdxODL" />
<asp:BoundField DataField="CodArticolo" HeaderText="Articolo" SortExpression="CodArticolo" />
<asp:BoundField DataField="NumPezzi" HeaderText="# Pezzi" SortExpression="NumPezzi" />
<asp:BoundField DataField="TCAssegnato" HeaderText="TC" SortExpression="TCAssegnato" DataFormatString="{0:N2}" />
<%--<asp:BoundField DataField="DescArticolo" HeaderText="DescArticolo" SortExpression="DescArticolo" />--%>
<asp:TemplateField HeaderText="Periodo" SortExpression="DataInizio">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("DataFine") %>' ForeColor="DarkBlue" /><br />
<asp:Label ID="Label1" runat="server" Text='<%# Eval("DataInizio") %>' ForeColor="DarkGreen" /><br />
</ItemTemplate>
<ItemStyle Font-Size="0.8em" />
</asp:TemplateField>
<asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" ItemStyle-Font-Size="0.7em">
<ItemStyle Font-Size="0.7em"></ItemStyle>
</asp:BoundField>
<asp:BoundField DataField="PzPallet" HeaderText="PzPallet" SortExpression="PzPallet" />
</Columns>
<FooterStyle BackColor="Tan" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<SortedAscendingCellStyle BackColor="#FAFAE7" />
<SortedAscendingHeaderStyle BackColor="#DAC09E" />
<SortedDescendingCellStyle BackColor="#E1DB9C" />
<SortedDescendingHeaderStyle BackColor="#C2A47B" />
</asp:GridView>
<asp:ObjectDataSource ID="odsLastODL" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getByMacchinaPeriodo" TypeName="MapoDb.DS_ProdTempiTableAdapters.ODLTableAdapter">
<SelectParameters>
<asp:ControlParameter DefaultValue="0" ControlID="hfIdxMacchina" Name="IdxMacchina" PropertyName="Value" Type="String" />
<asp:ControlParameter ControlID="hfDataFrom" Name="dataFrom" PropertyName="Value" Type="DateTime" />
<asp:ControlParameter ControlID="hfDataTo" Name="dataTo" PropertyName="Value" Type="DateTime" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfIdxMacchina" />
<asp:HiddenField runat="server" ID="hfDataFrom" />
<asp:HiddenField runat="server" ID="hfDataTo" />
</div>
</div>
<div class="row my-3">
<div class="col-8">
<asp:DropDownList runat="server" ID="ddlODL" DataSourceID="odsOdlAvail" DataTextField="label" DataValueField="value" CssClass="form-control btn-secondary" OnSelectedIndexChanged="ddlODL_SelectedIndexChanged" AutoPostBack="True">
</asp:DropDownList>
<asp:ObjectDataSource ID="odsOdlAvail" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="getUnused" TypeName="MapoDb.DS_UtilityTableAdapters.v_selODLTableAdapter">
<SelectParameters>
<asp:ControlParameter DefaultValue="0" ControlID="hfIdxMacchina" Name="IdxMacchina" PropertyName="Value" Type="String" />
<asp:Parameter Name="showAll" Type="Boolean" />
<asp:ControlParameter ControlID="hfNumDayOdl" DefaultValue="999" Name="numDayAdd" PropertyName="Value" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:HiddenField runat="server" ID="hfNumDayOdl" />
</div>
<div class="col-4">
<asp:LinkButton runat="server" ID="lbtSetODL" CssClass="btn btn-warning btn-block" OnClick="lbtSetODL_Click"><i class="fa fa-plus"></i> Imposta ODL</asp:LinkButton>
<div class="col-12 col-md-4 col-lg-3 col-xl-2">
<uc1:mod_directLinks runat="server" ID="mod_directLinks" />
</div>
</div>
</div>
+9
View File
@@ -130,5 +130,14 @@ namespace MoonProTablet
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.LinkButton lbtSetODL;
/// <summary>
/// Controllo mod_directLinks.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_directLinks mod_directLinks;
}
}
+28
View File
@@ -0,0 +1,28 @@
[*.cs]
indent_style = space
indent_size = 4
#tab_width = 2
trim_trailing_whitespace = true
# Default severity for analyzer diagnostics with category 'Design'
dotnet_analyzer_diagnostic.category-Design.severity = none
# Default severity for analyzer diagnostics with category 'Redundancy'
dotnet_analyzer_diagnostic.category-Redundancy.severity = none
# Default severity for analyzer diagnostics with category 'Naming'
dotnet_analyzer_diagnostic.category-Naming.severity = none
# Default severity for analyzer diagnostics with category 'Globalization'
dotnet_analyzer_diagnostic.category-Globalization.severity = none
# CA1805: Non eseguire inutilmente l'inizializzazione
dotnet_diagnostic.CA1805.severity = none
# CA2227: Le proprietà delle raccolte devono essere di sola lettura
dotnet_diagnostic.CA2227.severity = none
# CA1825: Evitare allocazioni di matrice di lunghezza zero.
dotnet_diagnostic.CA1825.severity = none
# CA5372: Usa XmlReader per XPathDocument
dotnet_diagnostic.CA5372.severity = none
# RCS1155: Use StringComparison when comparing strings.
dotnet_diagnostic.RCS1155.severity = none
+5 -4
View File
@@ -37,11 +37,11 @@
<Reference Include="Crc32C.NET, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Crc32C.NET.1.0.5.0\lib\net20\Crc32C.NET.dll</HintPath>
</Reference>
<Reference Include="DnsClient, Version=1.2.0.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
<HintPath>..\packages\DnsClient.1.2.0\lib\net45\DnsClient.dll</HintPath>
<Reference Include="DnsClient, Version=1.3.2.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
<HintPath>..\packages\DnsClient.1.3.2\lib\net45\DnsClient.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.2.0.246, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.0.8, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.0\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.ReportViewer.Runtime.Common.12.0.2402.15\lib\Microsoft.ReportViewer.Common.dll</HintPath>
@@ -178,6 +178,7 @@
<Compile Include="utils.cs" />
</ItemGroup>
<ItemGroup>
<None Include=".editorconfig" />
<None Include="app.config" />
<None Include="DS_Mag.xsc">
<DependentUpon>DS_Mag.xsd</DependentUpon>
+8
View File
@@ -50,6 +50,14 @@
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.0.8" newVersion="1.3.0.8" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DnsClient" publicKeyToken="4574bb5573c51424" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.2.0" newVersion="1.3.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Crc32C.NET" version="1.0.5.0" targetFramework="net462" />
<package id="DnsClient" version="1.2.0" targetFramework="net462" />
<package id="DnsClient" version="1.3.2" targetFramework="net462" />
<package id="Microsoft.ReportViewer.Runtime.Common" version="12.0.2402.15" targetFramework="net472" />
<package id="Microsoft.ReportViewer.Runtime.WinForms" version="12.0.2402.15" targetFramework="net462" />
<package id="MongoDB.Bson" version="2.10.2" targetFramework="net462" />
@@ -12,7 +12,7 @@
<package id="NLog" version="4.6.8" targetFramework="net462" />
<package id="Pipelines.Sockets.Unofficial" version="2.1.1" targetFramework="net462" />
<package id="SharpCompress" version="0.24.0" targetFramework="net462" />
<package id="SharpZipLib" version="1.2.0" targetFramework="net462" />
<package id="SharpZipLib" version="1.3.0" targetFramework="net462" />
<package id="Snappy.NET" version="1.1.1.8" targetFramework="net462" />
<package id="StackExchange.Redis" version="2.0.601" targetFramework="net462" />
<package id="SteamWare.IO" version="4.0.2002.730" targetFramework="net462" />
+28
View File
@@ -0,0 +1,28 @@
[*.cs]
indent_style = space
indent_size = 4
#tab_width = 2
trim_trailing_whitespace = true
# Default severity for analyzer diagnostics with category 'Design'
dotnet_analyzer_diagnostic.category-Design.severity = none
# Default severity for analyzer diagnostics with category 'Redundancy'
dotnet_analyzer_diagnostic.category-Redundancy.severity = none
# Default severity for analyzer diagnostics with category 'Naming'
dotnet_analyzer_diagnostic.category-Naming.severity = none
# Default severity for analyzer diagnostics with category 'Globalization'
dotnet_analyzer_diagnostic.category-Globalization.severity = none
# CA1805: Non eseguire inutilmente l'inizializzazione
dotnet_diagnostic.CA1805.severity = none
# CA2227: Le proprietà delle raccolte devono essere di sola lettura
dotnet_diagnostic.CA2227.severity = none
# CA1825: Evitare allocazioni di matrice di lunghezza zero.
dotnet_diagnostic.CA1825.severity = none
# CA5372: Usa XmlReader per XPathDocument
dotnet_diagnostic.CA5372.severity = none
# RCS1155: Use StringComparison when comparing strings.
dotnet_diagnostic.RCS1155.severity = none
+289 -262
View File
@@ -8,285 +8,312 @@ using System.Text;
namespace MapoDb
{
/**************************************************************
* Classe gestione FluxLog
*
* automaticamente gestisce dati su SqlServer / Redis (+recenti)
* oppure su MongoDB (+ vecchi)
*
* rif x mongoDB
*
* rif x windows setup (abilitazione firewall, remote access, auth...)
*
* https://docs.mongodb.com/manual/tutorial/configure-windows-netsh-firewall/
* https://www.configserverfirewall.com/mongodb/mongodb-allow-remote-connections/
* https://www.shellhacks.com/mongodb-allow-remote-access/
* https://stackoverflow.com/questions/3891657/setup-mongodb-on-windows-server-2008
*
* (conf file in C:\Program Files\MongoDB\Server\4.2\bin)
*
*
* test rilettura: https://stackoverflow.com/questions/2943222/find-objects-between-two-dates-mongodb
* https://studio3t.com/knowledge-base/articles/mongodb-find-method/
* https://github.com/mongodb/mongo-csharp-driver
* http://www.binaryheap.com/tech/time-series-data-in-mongodb/
* https://www.codeproject.com/Tips/760099/Resampling-and-merging-time-series-data-using-LINQ
* https://docs.microsoft.com/it-it/aspnet/core/tutorials/first-mongo-app?view=aspnetcore-3.0&tabs=visual-studio
* https://www.codementor.io/pmbanugo/working-with-mongodb-in-net-1-basics-g4frivcvz
* https://www.codementor.io/pmbanugo/working-with-mongodb-in-net-2-retrieving-mrlbeanm5
* https://www.codementor.io/pmbanugo/working-with-mongodb-in-net-part-3-skip-sort-limit-and-projections-oqfwncyka
*************************************************************/
/**************************************************************
* Classe gestione FluxLog
*
* automaticamente gestisce dati su SqlServer / Redis (+recenti)
* oppure su MongoDB (+ vecchi)
*
* rif x mongoDB
*
* rif x windows setup (abilitazione firewall, remote access, auth...)
*
* https://docs.mongodb.com/manual/tutorial/configure-windows-netsh-firewall/
* https://www.configserverfirewall.com/mongodb/mongodb-allow-remote-connections/
* https://www.shellhacks.com/mongodb-allow-remote-access/
* https://stackoverflow.com/questions/3891657/setup-mongodb-on-windows-server-2008
*
* (conf file in C:\Program Files\MongoDB\Server\4.2\bin)
*
*
* test rilettura: https://stackoverflow.com/questions/2943222/find-objects-between-two-dates-mongodb
* https://studio3t.com/knowledge-base/articles/mongodb-find-method/
* https://github.com/mongodb/mongo-csharp-driver
* http://www.binaryheap.com/tech/time-series-data-in-mongodb/
* https://www.codeproject.com/Tips/760099/Resampling-and-merging-time-series-data-using-LINQ
* https://docs.microsoft.com/it-it/aspnet/core/tutorials/first-mongo-app?view=aspnetcore-3.0&tabs=visual-studio
* https://www.codementor.io/pmbanugo/working-with-mongodb-in-net-1-basics-g4frivcvz
* https://www.codementor.io/pmbanugo/working-with-mongodb-in-net-2-retrieving-mrlbeanm5
* https://www.codementor.io/pmbanugo/working-with-mongodb-in-net-part-3-skip-sort-limit-and-projections-oqfwncyka
*************************************************************/
/// <summary>
/// Classe che si occupa di gestire i dati di flusso
/// - i dati inizialmente sono in REDIS e DB quando accumulati da IOB
/// - successivamente i dati vengono archiviati come oggetti BSON in MongoDB
/// </summary>
public class FluxArchive
{
/// <summary>
/// Classe che si occupa di gestire i dati di flusso
/// - i dati inizialmente sono in REDIS e DB quando accumulati da IOB
/// - successivamente i dati vengono archiviati come oggetti BSON in MongoDB
/// </summary>
public class FluxArchive
{
#if false
string mdbConnString = "mongodb://W2019-MONGODB:27017";
//string mdbConnString = "mongodb://localhost:27017";
MongoClient client;
MongoClient client;
#endif
/// <summary>
/// Database corrente MongoDB
/// </summary>
IMongoDatabase database;
/// <summary>
/// Oggetto datalayer
/// </summary>
DataLayer DataLayerObj = new DataLayer();
/// <summary>
/// Classe gestione archivio allarmi
/// </summary>
public FluxArchive()
{
#region Private Fields
/// <summary>
/// Database corrente MongoDB
/// </summary>
private IMongoDatabase database;
/// <summary>
/// Oggetto datalayer
/// </summary>
private DataLayer DataLayerObj = new DataLayer();
#endregion Private Fields
#region Public Fields
public static FluxArchive man = new FluxArchive();
#endregion Public Fields
#region Public Constructors
/// <summary>
/// Classe gestione archivio allarmi
/// </summary>
public FluxArchive()
{
#if false
// rifare avvio con lettura da web.config...
client = new MongoClient(mdbConnString);
database = client.GetDatabase("MAPO");
#endif
database = memLayer.ML.getMongoDatabase("MAPO");
// init oggetto datalayer
DataLayerObj = new DataLayer();
}
public static FluxArchive man = new FluxArchive();
/// <summary>
/// Effettua il trasferimento dati da SqlDB a MongoDB
/// </summary>
/// <param name="data2transfer">data di aprtenza</param>
/// <param name="numDays">num giorni da trasferire</param>
public exeResult trasferDataFromDb(DateTime data2transfer, int numDays)
{
exeResult answ = new exeResult();
StringBuilder sb = new StringBuilder();
Stopwatch sw = new Stopwatch();
DateTime tStamp;
database = memLayer.ML.getMongoDatabase("MAPO");
// init oggetto datalayer
DataLayerObj = new DataLayer();
}
// oggetto gestione dati ts raggruppati
var collRawData = database.GetCollection<rawData>("FluxLogRawData");
var collHistData = database.GetCollection<histData>("FluxLogHistData");
var builderRaw = Builders<rawData>.Filter;
var builderHist = Builders<histData>.Filter;
string currDateStr = "";
int startYMD = 0;
int endYMD = 0;
int currYMD = 0;
#endregion Public Constructors
// Effettuo eliminazione records x TUTTO il periodo dei dati RAW e stats...
string startDateStr = data2transfer.ToString("yyyyMMdd");
string endDateStr = data2transfer.AddDays(numDays).ToString("yyyyMMdd");
int.TryParse(startDateStr, out startYMD);
int.TryParse(endDateStr, out endYMD);
// filtri e delete
var filtRawOld = builderRaw.Gte(u => u.dateYMD, startYMD) & builderRaw.Lte(u => u.dateYMD, endYMD);
collRawData.DeleteMany(filtRawOld);
var filtHistOld = builderHist.Gte(u => u.dateYMD, startYMD) & builderHist.Lte(u => u.dateYMD, endYMD);
collHistData.DeleteMany(filtHistOld);
#region Protected Methods
// faccio ciclo su OGNI macchina
sw.Start();
var elencoMacchine = DataLayerObj.taMacchine.GetData();
foreach (var macchina in elencoMacchine)
{
sb.AppendLine($"Inizio processing macchina {macchina.IdxMacchina}");
// faccio ciclo su gg richiesti...
for (int i = 0; i < numDays; i++)
/// <summary>
/// Calcola statistiche per i dati giornalieri processati
/// </summary>
/// <param name="datiGiornalieri"></param>
/// <returns></returns>
protected histData getStats(List<rawData> datiGiornalieri)
{
tStamp = data2transfer.AddDays(i);
currDateStr = tStamp.ToString("yyyyMMdd");
int.TryParse(currDateStr, out currYMD);
// leggo da DB i records...
DS_applicazione.FluxLogDataTable tabDati = DataLayerObj.taFL.getFiltOrd(macchina.IdxMacchina, tStamp, tStamp.AddDays(1), true);
// solo se ho dati...
if (tabDati.Count > 0)
{
// chiamo procedura x conversione
List<rawData> risultato = convertTable(tabDati, tStamp, timeWindow.day);
// salvo in blocco
if (risultato.Count > 0)
// init oggetti
histData currHist;
varStats currStat;
List<varStats> statistiche = new List<varStats>();
int sampleNumRec = 1;
float sampleTotal = 0;
float sampleMinVal = 0;
float sampleMaxVal = 0;
float sampleAvg = 0;
float currVal = 0;
bool fatto = false;
string macName = "";
int dateYMD = 0;
// ciclo x ogni variabile
foreach (var item in datiGiornalieri)
{
try
{
collRawData.InsertMany(risultato);
// calcolo la NUOVA statistica giornaliera...
var resStats = getStats(risultato);
// salvo!
collHistData.InsertOne(resStats);
}
catch (Exception exc)
{ }
if (item.samples != null)
{
if (string.IsNullOrEmpty(macName))
{
macName = item.macName;
dateYMD = item.dateYMD;
}
// reset vabiabili
sampleTotal = 0;
sampleMinVal = 0;
sampleMaxVal = 0;
sampleAvg = 0;
// calcolo statistiche
sampleNumRec = item.samples.Count;
foreach (var sample in item.samples)
{
fatto = float.TryParse(sample.value, out currVal);
if (fatto)
{
sampleTotal += currVal;
sampleMaxVal = sampleMaxVal < currVal ? currVal : sampleMaxVal;
sampleMinVal = sampleMinVal > currVal ? currVal : sampleMinVal;
}
}
if (sampleNumRec > 0)
{
sampleAvg = sampleTotal / sampleNumRec;
}
// salvo statistica
currStat = new varStats()
{
varName = item.varName,
numRec = sampleNumRec,
avg = sampleAvg,
min = sampleMinVal,
max = sampleMaxVal
};
statistiche.Add(currStat);
}
}
sb.AppendLine($"DB {tStamp}: {tabDati.Count}rec | MongoDb {risultato.Count} RAW DOC in {sw.ElapsedMilliseconds / 1000} sec");
}
}
}
// restituisco messaggio...
answ.esito = esitoExec.ok;
answ.message = sb.ToString();
return answ;
}
/// <summary>
/// Converte una tabella dati da DB in una lista di oggetti pronti x salvataggio su MongoDb
/// </summary>
/// <param name="tabDati">Tabelal dei dati RAW registrati</param>
/// <param name="tStamp">Data di riferimento</param>
/// <param name="periodo">Periodo del campionamento desiderato (e passato coi dati che sono relativi a tale periodo...)</param>
public List<rawData> convertTable(DS_applicazione.FluxLogDataTable tabDati, DateTime tStamp, timeWindow periodo)
{
// init oggetti
List<rawData> listaRecords = new List<rawData>();
rawData currRecord = null;
List<rawSample> valori = new List<rawSample>();
rawSample campione = null;
string currFlux = "";
string currMacc = "";
string tStampString = tStamp.ToString("yyyyMMdd");
int tStampYMD = 0;
int.TryParse(tStampString, out tStampYMD);
foreach (var item in tabDati)
{
// controllo flusso x nuovo record...
if (item.CodFlux != currFlux || item.IdxMacchina != currMacc)
{
// salvo il VECCHIO record...
if (currRecord != null)
{
currRecord.samples = valori;
listaRecords.Add(currRecord);
valori = null;
currRecord = null;
}
// nuovi record...
currFlux = item.CodFlux;
currMacc = item.IdxMacchina;
valori = new List<rawSample>();
currRecord = new rawData()
{
macName = currMacc,
varName = currFlux,
varType = plcDataType.Real, // fare!!!
dateYMD = tStampYMD,
period = periodo
};
}
campione = new rawSample()
{
timeStamp = item.dtEvento,
value = item.Valore
};
// aggiunta sample ai record prec...
if (campione != null && currRecord != null)
{
valori.Add(campione);
campione = null;
}
}
// aggiungo ultimo... salvo il VECCHIO record...
if (currRecord != null)
{
currRecord.samples = valori;
listaRecords.Add(currRecord);
}
return listaRecords;
}
/// <summary>
/// Calcola statistiche per i dati giornalieri processati
/// </summary>
/// <param name="datiGiornalieri"></param>
/// <returns></returns>
protected histData getStats(List<rawData> datiGiornalieri)
{
// init oggetti
histData currHist;
varStats currStat;
List<varStats> statistiche = new List<varStats>();
int sampleNumRec = 1;
float sampleTotal = 0;
float sampleMinVal = 0;
float sampleMaxVal = 0;
float sampleAvg = 0;
float currVal = 0;
bool fatto = false;
string macName = "";
int dateYMD = 0;
// ciclo x ogni variabile
foreach (var item in datiGiornalieri)
{
if (item.samples != null)
{
if (string.IsNullOrEmpty(macName))
{
macName = item.macName;
dateYMD = item.dateYMD;
}
// reset vabiabili
sampleTotal = 0;
sampleMinVal = 0;
sampleMaxVal = 0;
sampleAvg = 0;
// calcolo statistiche
sampleNumRec = item.samples.Count;
foreach (var sample in item.samples)
{
fatto = float.TryParse(sample.value, out currVal);
if (fatto)
currHist = new histData()
{
sampleTotal += currVal;
sampleMaxVal = sampleMaxVal < currVal ? currVal : sampleMaxVal;
sampleMinVal = sampleMinVal > currVal ? currVal : sampleMinVal;
}
}
if (sampleNumRec > 0)
{
sampleAvg = sampleTotal / sampleNumRec;
}
// salvo statistica
currStat = new varStats()
{
varName = item.varName,
numRec = sampleNumRec,
avg = sampleAvg,
min = sampleMinVal,
max = sampleMaxVal
};
statistiche.Add(currStat);
macName = macName,
varType = plcDataType.Real,
dateYMD = dateYMD,
period = timeWindow.day,
stats = statistiche
};
// restituisco...
return currHist;
}
}
currHist = new histData()
{
macName = macName,
varType = plcDataType.Real,
dateYMD = dateYMD,
period = timeWindow.day,
stats = statistiche
};
// restituisco...
return currHist;
#endregion Protected Methods
#region Public Methods
/// <summary>
/// Converte una tabella dati da DB in una lista di oggetti pronti x salvataggio su MongoDb
/// </summary>
/// <param name="tabDati">Tabelal dei dati RAW registrati</param>
/// <param name="tStamp">Data di riferimento</param>
/// <param name="periodo">Periodo del campionamento desiderato (e passato coi dati che sono relativi a tale periodo...)</param>
public List<rawData> convertTable(DS_applicazione.FluxLogDataTable tabDati, DateTime tStamp, timeWindow periodo)
{
// init oggetti
List<rawData> listaRecords = new List<rawData>();
rawData currRecord = null;
List<rawSample> valori = new List<rawSample>();
rawSample campione = null;
string currFlux = "";
string currMacc = "";
string tStampString = tStamp.ToString("yyyyMMdd");
int tStampYMD = 0;
int.TryParse(tStampString, out tStampYMD);
foreach (var item in tabDati)
{
// controllo flusso x nuovo record...
if (item.CodFlux != currFlux || item.IdxMacchina != currMacc)
{
// salvo il VECCHIO record...
if (currRecord != null)
{
currRecord.samples = valori;
listaRecords.Add(currRecord);
valori = null;
currRecord = null;
}
// nuovi record...
currFlux = item.CodFlux;
currMacc = item.IdxMacchina;
valori = new List<rawSample>();
currRecord = new rawData()
{
macName = currMacc,
varName = currFlux,
varType = plcDataType.Real, // fare!!!
dateYMD = tStampYMD,
period = periodo
};
}
campione = new rawSample()
{
timeStamp = item.dtEvento,
value = item.Valore
};
// aggiunta sample ai record prec...
if (campione != null && currRecord != null)
{
valori.Add(campione);
campione = null;
}
}
// aggiungo ultimo... salvo il VECCHIO record...
if (currRecord != null)
{
currRecord.samples = valori;
listaRecords.Add(currRecord);
}
return listaRecords;
}
/// <summary>
/// Effettua il trasferimento dati da SqlDB a MongoDB
/// </summary>
/// <param name="data2transfer">data di aprtenza</param>
/// <param name="numDays">num giorni da trasferire</param>
public exeResult trasferDataFromDb(DateTime data2transfer, int numDays)
{
exeResult answ = new exeResult();
StringBuilder sb = new StringBuilder();
Stopwatch sw = new Stopwatch();
DateTime tStamp;
// oggetto gestione dati ts raggruppati
var collRawData = database.GetCollection<rawData>("FluxLogRawData");
var collHistData = database.GetCollection<histData>("FluxLogHistData");
var builderRaw = Builders<rawData>.Filter;
var builderHist = Builders<histData>.Filter;
string currDateStr = "";
int startYMD = 0;
int endYMD = 0;
int currYMD = 0;
// Effettuo eliminazione records x TUTTO il periodo dei dati RAW e stats...
string startDateStr = data2transfer.ToString("yyyyMMdd");
string endDateStr = data2transfer.AddDays(numDays).ToString("yyyyMMdd");
int.TryParse(startDateStr, out startYMD);
int.TryParse(endDateStr, out endYMD);
// filtri e delete
var filtRawOld = builderRaw.Gte(u => u.dateYMD, startYMD) & builderRaw.Lte(u => u.dateYMD, endYMD);
collRawData.DeleteMany(filtRawOld);
var filtHistOld = builderHist.Gte(u => u.dateYMD, startYMD) & builderHist.Lte(u => u.dateYMD, endYMD);
collHistData.DeleteMany(filtHistOld);
// faccio ciclo su OGNI macchina
sw.Start();
var elencoMacchine = DataLayerObj.taMacchine.GetData();
foreach (var macchina in elencoMacchine)
{
sb.AppendLine($"Inizio processing macchina {macchina.IdxMacchina}");
// faccio ciclo su gg richiesti...
for (int i = 0; i < numDays; i++)
{
tStamp = data2transfer.AddDays(i);
currDateStr = tStamp.ToString("yyyyMMdd");
int.TryParse(currDateStr, out currYMD);
// leggo da DB i records...
DS_applicazione.FluxLogDataTable tabDati = DataLayerObj.taFL.getFiltOrd(macchina.IdxMacchina, tStamp, tStamp.AddDays(1), true);
// solo se ho dati...
if (tabDati.Count > 0)
{
// chiamo procedura x conversione
List<rawData> risultato = convertTable(tabDati, tStamp, timeWindow.day);
// salvo in blocco
if (risultato.Count > 0)
{
try
{
collRawData.InsertMany(risultato);
// calcolo la NUOVA statistica giornaliera...
var resStats = getStats(risultato);
// salvo!
collHistData.InsertOne(resStats);
}
catch (Exception exc)
{
logger.lg.scriviLog($"trasferDataFromDb eccezione{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
}
}
sb.AppendLine($"DB {tStamp}: {tabDati.Count}rec | MongoDb {risultato.Count} RAW DOC in {sw.ElapsedMilliseconds / 1000} sec");
}
}
}
// restituisco messaggio...
answ.esito = esitoExec.ok;
answ.message = sb.ToString();
return answ;
}
#endregion Public Methods
}
}
}
}
+1
View File
@@ -275,6 +275,7 @@
<Compile Include="utility.cs" />
</ItemGroup>
<ItemGroup>
<None Include=".editorconfig" />
<None Include="app.config" />
<None Include="App_Readme\SteamWare_demo\example-app.config" />
<None Include="App_Readme\SteamWare_demo\example-NLog.config" />
+24
View File
@@ -1,4 +1,28 @@
[*.cs]
indent_style = space
indent_size = 4
#tab_width = 2
trim_trailing_whitespace = true
# Default severity for analyzer diagnostics with category 'Design'
dotnet_analyzer_diagnostic.category-Design.severity = none
# Default severity for analyzer diagnostics with category 'Redundancy'
dotnet_analyzer_diagnostic.category-Redundancy.severity = none
# Default severity for analyzer diagnostics with category 'Naming'
dotnet_analyzer_diagnostic.category-Naming.severity = none
# Default severity for analyzer diagnostics with category 'Globalization'
dotnet_analyzer_diagnostic.category-Globalization.severity = none
# CA1805: Non eseguire inutilmente l'inizializzazione
dotnet_diagnostic.CA1805.severity = none
# CA2227: Le proprietà delle raccolte devono essere di sola lettura
dotnet_diagnostic.CA2227.severity = none
# CA1825: Evitare allocazioni di matrice di lunghezza zero.
dotnet_diagnostic.CA1825.severity = none
# CA5372: Usa XmlReader per XPathDocument
dotnet_diagnostic.CA5372.severity = none
# RCS1155: Use StringComparison when comparing strings.
dotnet_diagnostic.RCS1155.severity = none
+1 -1
View File
@@ -5,4 +5,4 @@
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Naming", "CA1707:Gli identificatori non devono contenere caratteri di sottolineatura", Justification = "<In sospeso>", Scope = "type", Target = "~T:MapoSDK.VC_func")]
[assembly: SuppressMessage("Naming", "CA1707:Gli identificatori non devono contenere caratteri di sottolineatura", Justification = "<In sospeso>", Scope = "type", Target = "~T:MapoSDK.VC_func")]
+79 -88
View File
@@ -16,6 +16,38 @@ namespace MapoSDK
public int next_IdxMicroStato;
#endregion Public Fields
#region Public Methods
public static bool operator !=(hwMachineState left, hwMachineState right)
{
return !(left == right);
}
public static bool operator ==(hwMachineState left, hwMachineState right)
{
return left.Equals(right);
}
public override bool Equals(object obj)
{
if (!(obj is hwMachineState item))
return false;
if (IdxTipoEvento != item.IdxTipoEvento)
return false;
if (next_IdxMicroStato != item.next_IdxMicroStato)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
#endregion Public Methods
}
/// <summary>
@@ -66,6 +98,50 @@ namespace MapoSDK
public string[] wBrowsBoxUrls;
#endregion Public Fields
#region Public Methods
public static bool operator !=(inputComandoMapo left, inputComandoMapo right)
{
return !(left == right);
}
public static bool operator ==(inputComandoMapo left, inputComandoMapo right)
{
return left.Equals(right);
}
public override bool Equals(object obj)
{
if (!(obj is inputComandoMapo item))
return false;
if (descrComando != item.descrComando)
return false;
if (idxTipoEvento != item.idxTipoEvento)
return false;
if (isValid != item.isValid)
return false;
if (needStatusRefresh != item.needStatusRefresh)
return false;
if (outValue != item.outValue)
return false;
if (precInput != item.precInput)
return false;
if (text2show != item.text2show)
return false;
if (wBrowsBoxUrls != item.wBrowsBoxUrls)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
#endregion Public Methods
}
/// <summary>
@@ -621,22 +697,6 @@ namespace MapoSDK
public bool writable { get; set; } = false;
#endregion Public Properties
#if false
/// <summary>
/// Indica se il parametro sia stato salvato (value = newValue) oppure newValue NON impostato
/// </summary>
public bool saved
{
get
{
bool hasData = !string.IsNullOrWhiteSpace(value);
bool areEqual = value == newValue;
bool noWriteReq = string.IsNullOrWhiteSpace(newValue);
return (areEqual || (hasData && noWriteReq));
}
}
#endif
}
/// <summary>
@@ -780,18 +840,18 @@ namespace MapoSDK
switch (vcType)
{
case plcDataType.Boolean:
bool.TryParse(strValue, out currBool);
_ = bool.TryParse(strValue, out currBool);
answ = currBool;
break;
case plcDataType.Int:
case plcDataType.DInt:
int.TryParse(strValue, out currInt);
_ = int.TryParse(strValue, out currInt);
answ = currInt;
break;
case plcDataType.Real:
double.TryParse(strValue, out currDouble);
_ = double.TryParse(strValue, out currDouble);
answ = currDouble;
break;
@@ -922,73 +982,4 @@ namespace MapoSDK
#endregion Public Properties
}
#if false
/// <summary>
/// Calendario eventi
/// </summary>
public class EventsCalendar
{
/// <summary>
/// Lista di eventi
/// </summary>
public List<EventDetail> EventsList { get; set; }
}
#endif
#if false
/// <summary>
/// Classe definizione parametri singolo ordine produzione
/// </summary>
public class OrdineProdArt
{
/// <summary>
/// Codice univoco ordine
/// </summary>
public string OrdNum;
/// <summary>
/// Articolo associato ad ordine
/// </summary>
public Articolo ArtOrd;
/// <summary>
/// Quantità Articolo
/// </summary>
public int Qta;
}
/// <summary>
/// Oggetto generico articolo
/// </summary>
public class Articolo
{
/// <summary>
/// Codice articolo
/// </summary>
public string Codice;
/// <summary>
/// Descrizione Articolo
/// </summary>
public string Descrizione;
}
/// <summary>
/// Classe definizione parametri ordine x KIT di articoli
/// </summary>
public class OrdineProdKit
{
/// <summary>
/// Codice univoco ordine
/// </summary>
public string OrdNum;
/// <summary>
/// Codice KIT
/// </summary>
public string Codice;
/// <summary>
/// Vettore ordini articolo associati a KIT
/// </summary>
public List<OrdineProdArt> OrdiniArt;
/// <summary>
/// Quantità KIT
/// </summary>
public int Qta;
}
#endif
}
+30 -21
View File
@@ -2,28 +2,37 @@
using System.Net;
namespace MapoSDK
{
/// <summary>
/// Override metodo WebClient con gestione TimeOut corto
/// </summary>
public class WebClientWT : WebClient
{
{
/// <summary>
/// timeout da conf
/// Override metodo WebClient con gestione TimeOut corto
/// </summary>
protected int urlCallTOut
public class WebClientWT : WebClient
{
get
{
// 10 sec timeout
return 10000;
}
#region Protected Properties
/// <summary>
/// timeout da conf
/// </summary>
protected static int urlCallTOut
{
get
{
// 10 sec timeout
return 10000;
}
}
#endregion Protected Properties
#region Protected Methods
protected override WebRequest GetWebRequest(Uri address)
{
WebRequest wr = base.GetWebRequest(address);
wr.Timeout = urlCallTOut; // timeout in milliseconds (ms)
return wr;
}
#endregion Protected Methods
}
protected override WebRequest GetWebRequest(Uri address)
{
WebRequest wr = base.GetWebRequest(address);
wr.Timeout = urlCallTOut; // timeout in milliseconds (ms)
return wr;
}
}
}
}
+28
View File
@@ -0,0 +1,28 @@
[*.cs]
indent_style = space
indent_size = 4
#tab_width = 2
trim_trailing_whitespace = true
# Default severity for analyzer diagnostics with category 'Design'
dotnet_analyzer_diagnostic.category-Design.severity = none
# Default severity for analyzer diagnostics with category 'Redundancy'
dotnet_analyzer_diagnostic.category-Redundancy.severity = none
# Default severity for analyzer diagnostics with category 'Naming'
dotnet_analyzer_diagnostic.category-Naming.severity = none
# Default severity for analyzer diagnostics with category 'Globalization'
dotnet_analyzer_diagnostic.category-Globalization.severity = none
# CA1805: Non eseguire inutilmente l'inizializzazione
dotnet_diagnostic.CA1805.severity = none
# CA2227: Le proprietà delle raccolte devono essere di sola lettura
dotnet_diagnostic.CA2227.severity = none
# CA1825: Evitare allocazioni di matrice di lunghezza zero.
dotnet_diagnostic.CA1825.severity = none
# CA5372: Usa XmlReader per XPathDocument
dotnet_diagnostic.CA5372.severity = none
# RCS1155: Use StringComparison when comparing strings.
dotnet_diagnostic.RCS1155.severity = none
+1
View File
@@ -51,6 +51,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include=".editorconfig" />
<None Include="MoonPro.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>MoonPro.cs</LastGenOutput>
+2 -8
View File
@@ -10,24 +10,18 @@ ECHO off
set baseBranch=%1
set pushRemote=%2
git push . %baseBranch%:beta
git push . %baseBranch%:develop
git push gitlab.steamware %baseBranch%:%baseBranch%
REM Faccio push remoto condizionale
if %pushRemote% GTR 0 ( git push . %baseBranch%:ES3 )
if %pushRemote% GTR 0 ( git push . %baseBranch%:Giancarlo )
if %pushRemote% GTR 0 ( git push . %baseBranch%:MongoDb )
if %pushRemote% GTR 0 ( git push gitlab.steamware %baseBranch%:beta )
if %pushRemote% GTR 0 ( git push . %baseBranch%:beta )
if %pushRemote% GTR 0 ( git push gitlab.steamware %baseBranch%:develop )
if %pushRemote% GTR 1 ( git push . %baseBranch%:ADM )
if %pushRemote% GTR 1 ( git push . %baseBranch%:MAG )
if %pushRemote% GTR 1 ( git push . %baseBranch%:TAB )
if %pushRemote% GTR 1 ( git push . %baseBranch%:SDK )
if %pushRemote% GTR 1 ( git push gitlab.steamware %baseBranch%:ES3 )
if %pushRemote% GTR 1 ( git push gitlab.steamware %baseBranch%:Giancarlo )
if %pushRemote% GTR 1 ( git push gitlab.steamware %baseBranch%:MongoDb )
if %pushRemote% GTR 1 ( git push gitlab.steamware %baseBranch%:beta )
if %pushRemote% GTR 2 ( git push . %baseBranch%:master )
if %pushRemote% GTR 2 ( git push . %baseBranch%:stable )