modifica sequencer stati x colore blu...
This commit is contained in:
Binary file not shown.
@@ -64,6 +64,7 @@
|
||||
<add key="codV" value="Lavora" />
|
||||
<add key="codG" value="???" />
|
||||
<add key="codR" value="Ferma" />
|
||||
<add key="codB" value="Attesa" />
|
||||
<add key="codS" value="Spenta" />
|
||||
<add key="authSenzaDominio" value="true" />
|
||||
<add key="TcMaxFactor" value="2" />
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonPro.WebUserControls
|
||||
{
|
||||
@@ -96,7 +88,7 @@ namespace MoonPro.WebUserControls
|
||||
{
|
||||
// nuovo plotting
|
||||
Chart1.Width = larghezza;
|
||||
Chart1.AntiAliasing = System.Web.UI.DataVisualization.Charting.AntiAliasingStyles.All;
|
||||
Chart1.AntiAliasing = AntiAliasingStyles.All;
|
||||
Chart1.Height = graphHeight;
|
||||
// definizione intervallo asse Y (che qui è anche asse X...)
|
||||
Chart1.ChartAreas["Sequencer"].AxisY.Minimum = datiSequencer.intervallo.inizio.ToOADate();
|
||||
@@ -109,9 +101,9 @@ namespace MoonPro.WebUserControls
|
||||
Chart1.ChartAreas["Sequencer"].AxisY.LabelStyle = lbst;
|
||||
|
||||
// definizioni x chart area sequencer (tipo valori e nascondere asse)
|
||||
Chart1.Series["SeqV"].XValueType = System.Web.UI.DataVisualization.Charting.ChartValueType.Int32;
|
||||
Chart1.Series["SeqV"].YValueType = System.Web.UI.DataVisualization.Charting.ChartValueType.DateTime;
|
||||
Chart1.ChartAreas["Sequencer"].AxisX.Enabled = System.Web.UI.DataVisualization.Charting.AxisEnabled.False;
|
||||
Chart1.Series["SeqV"].XValueType = ChartValueType.Int32;
|
||||
Chart1.Series["SeqV"].YValueType = ChartValueType.DateTime;
|
||||
Chart1.ChartAreas["Sequencer"].AxisX.Enabled = AxisEnabled.False;
|
||||
// per impostare grafici allineati
|
||||
Chart1.Series["SeqV"]["DrawSideBySide"] = "false";
|
||||
// colori e stile 3D
|
||||
@@ -121,17 +113,21 @@ namespace MoonPro.WebUserControls
|
||||
Chart1.Series["SeqR"]["DrawingStyle"] = "Cylinder";
|
||||
Chart1.Series["SeqG"].Color = System.Drawing.Color.Yellow;
|
||||
Chart1.Series["SeqG"]["DrawingStyle"] = "Cylinder";
|
||||
Chart1.Series["SeqB"].Color = System.Drawing.Color.Blue;
|
||||
Chart1.Series["SeqB"]["DrawingStyle"] = "Cylinder";
|
||||
Chart1.Series["SeqS"].Color = System.Drawing.Color.Gray;
|
||||
Chart1.Series["SeqS"]["DrawingStyle"] = "Cylinder";
|
||||
// imposto tipo grafico
|
||||
Chart1.Series["SeqV"].ChartType = SeriesChartType.RangeBar;
|
||||
Chart1.Series["SeqR"].ChartType = SeriesChartType.RangeBar;
|
||||
Chart1.Series["SeqG"].ChartType = SeriesChartType.RangeBar;
|
||||
Chart1.Series["SeqB"].ChartType = SeriesChartType.RangeBar;
|
||||
Chart1.Series["SeqS"].ChartType = SeriesChartType.RangeBar;
|
||||
// impostazione larghezza relativa grafico
|
||||
Chart1.Series["SeqV"]["PointWidth"] = "2.0";
|
||||
Chart1.Series["SeqR"]["PointWidth"] = "2.0";
|
||||
Chart1.Series["SeqG"]["PointWidth"] = "2.0";
|
||||
Chart1.Series["SeqB"]["PointWidth"] = "2.0";
|
||||
Chart1.Series["SeqS"]["PointWidth"] = "2.0";
|
||||
|
||||
int tipo = 1;
|
||||
@@ -143,6 +139,7 @@ namespace MoonPro.WebUserControls
|
||||
string codV = memLayer.ML.confReadString("codV");
|
||||
string codG = memLayer.ML.confReadString("codG");
|
||||
string codR = memLayer.ML.confReadString("codR");
|
||||
string codB = memLayer.ML.confReadString("codB");
|
||||
string codS = memLayer.ML.confReadString("codS");
|
||||
foreach (DataLayer_generic.serieDatiRow riga in dati)
|
||||
{
|
||||
@@ -156,7 +153,7 @@ namespace MoonPro.WebUserControls
|
||||
{
|
||||
inizio = rigaPrec.timeData;
|
||||
fine = rigaPrec.timeData.AddMinutes(valore);
|
||||
accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codS);
|
||||
accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codB, codS);
|
||||
// reset valore e colore...
|
||||
valore = riga.valore;
|
||||
rigaPrec = riga;
|
||||
@@ -171,12 +168,12 @@ namespace MoonPro.WebUserControls
|
||||
// aggiungo la riga precedente eventualmente non finita...
|
||||
inizio = rigaPrec.timeData;
|
||||
fine = rigaPrec.timeData.AddMinutes(rigaPrec.valore);
|
||||
accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codS);
|
||||
accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codB, codS);
|
||||
// aggiungo ultimo dato che è stato escluso
|
||||
rigaPrec = (DataLayer_generic.serieDatiRow)dati[dati.Rows.Count - 1];
|
||||
inizio = rigaPrec.timeData;
|
||||
fine = rigaPrec.timeData.AddMinutes(rigaPrec.valore);
|
||||
accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codS);
|
||||
accodaDati(ref tipo, ref inizio, ref fine, rigaPrec, codV, codG, codR, codB, codS);
|
||||
}
|
||||
/// <summary>
|
||||
/// accoda i dati alla serie corretta
|
||||
@@ -188,33 +185,41 @@ namespace MoonPro.WebUserControls
|
||||
/// <param name="codV"></param>
|
||||
/// <param name="codG"></param>
|
||||
/// <param name="codR"></param>
|
||||
/// <param name="codB"></param>
|
||||
/// <param name="codS"></param>
|
||||
private void accodaDati(ref int tipo, ref DateTime inizio, ref DateTime fine, DataLayer_generic.serieDatiRow rigaPrec, string codV, string codG, string codR, string codS)
|
||||
private void accodaDati(ref int tipo, ref DateTime inizio, ref DateTime fine, DataLayer_generic.serieDatiRow rigaPrec, string codV, string codG, string codR, string codB, string codS)
|
||||
{
|
||||
switch (rigaPrec.colore)
|
||||
{
|
||||
case "V":
|
||||
case "sVe":
|
||||
tipo = 1;
|
||||
Chart1.Series["SeqV"].Points.AddXY(tipo, inizio, fine);
|
||||
// aggiungo tooltip
|
||||
Chart1.Series["SeqV"].Points[Chart1.Series["SeqV"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codV);
|
||||
Chart1.Series["SeqV"].Points[Chart1.Series["SeqV"].Points.Count - 1].PostBackValue = inizio.ToString();
|
||||
break;
|
||||
case "G":
|
||||
case "sGi":
|
||||
tipo = 1;
|
||||
Chart1.Series["SeqG"].Points.AddXY(tipo, inizio, fine);
|
||||
// aggiungo tooltip
|
||||
Chart1.Series["SeqG"].Points[Chart1.Series["SeqG"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codG);
|
||||
Chart1.Series["SeqG"].Points[Chart1.Series["SeqG"].Points.Count - 1].PostBackValue = inizio.ToString();
|
||||
break;
|
||||
case "R":
|
||||
case "sRo":
|
||||
tipo = 1;
|
||||
Chart1.Series["SeqR"].Points.AddXY(tipo, inizio, fine);
|
||||
// aggiungo tooltip
|
||||
Chart1.Series["SeqR"].Points[Chart1.Series["SeqR"].Points.Count - 1].ToolTip = string.Format("{2} | {0:dd/MM HH:mm:ss} -->{1:dd/MM HH:mm:ss}", inizio, fine, codR);
|
||||
Chart1.Series["SeqR"].Points[Chart1.Series["SeqR"].Points.Count - 1].PostBackValue = inizio.ToString();
|
||||
break;
|
||||
case "S":
|
||||
case "sBl":
|
||||
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].PostBackValue = inizio.ToString();
|
||||
break;
|
||||
case "sGr":
|
||||
tipo = 1;
|
||||
Chart1.Series["SeqS"].Points.AddXY(tipo, inizio, fine);
|
||||
// aggiungo tooltip
|
||||
@@ -255,6 +260,7 @@ namespace MoonPro.WebUserControls
|
||||
double valR = 0.0;
|
||||
double valG = 0.0;
|
||||
double valV = 0.0;
|
||||
double valB = 0.0;
|
||||
double valS = 0.0;
|
||||
DateTime _t_0 = new DateTime(9999, 1, 1);
|
||||
string _mostCodArticolo = "";
|
||||
@@ -276,16 +282,19 @@ namespace MoonPro.WebUserControls
|
||||
// accumulo valori...
|
||||
switch (riga.colore)
|
||||
{
|
||||
case "V":
|
||||
case "sVe":
|
||||
valV = valV + riga.valore;
|
||||
break;
|
||||
case "G":
|
||||
case "sGi":
|
||||
valG = valG + riga.valore;
|
||||
break;
|
||||
case "R":
|
||||
case "sRo":
|
||||
valR = valR + riga.valore;
|
||||
break;
|
||||
case "S":
|
||||
case "sBl":
|
||||
valB = valB + riga.valore;
|
||||
break;
|
||||
case "sGr":
|
||||
valS = valS + riga.valore;
|
||||
break;
|
||||
}
|
||||
@@ -295,22 +304,27 @@ namespace MoonPro.WebUserControls
|
||||
// determino il colore...
|
||||
if (valV / valRigaCum >= minVerde)
|
||||
{
|
||||
colore = "V";
|
||||
colore = "sVe";
|
||||
valV = 0.0;
|
||||
}
|
||||
else if (valR / valRigaCum >= minRosso)
|
||||
{
|
||||
colore = "R";
|
||||
colore = "sRo";
|
||||
valR = 0.0;
|
||||
}
|
||||
else if (valS / valRigaCum >= minSpento)
|
||||
{
|
||||
colore = "S";
|
||||
colore = "sGr";
|
||||
valS = 0.0;
|
||||
}
|
||||
else if (valB / valRigaCum >= minSpento)
|
||||
{
|
||||
colore = "sBl";
|
||||
valB = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
colore = "G";
|
||||
colore = "sGi";
|
||||
valG = 0.0;
|
||||
}
|
||||
// salvo riga dati
|
||||
|
||||
+5
-2
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for resoconti
|
||||
@@ -385,6 +385,7 @@ public class resoconti
|
||||
/// <returns></returns>
|
||||
public string cssDaCodColore(string codColore)
|
||||
{
|
||||
#if false
|
||||
string cssClass = "";
|
||||
switch (codColore)
|
||||
{
|
||||
@@ -404,7 +405,9 @@ public class resoconti
|
||||
cssClass = "semaforoSpento";
|
||||
break;
|
||||
}
|
||||
return cssClass;
|
||||
return cssClass;
|
||||
#endif
|
||||
return codColore;
|
||||
}
|
||||
/// <summary>
|
||||
/// fornisce una torta stati
|
||||
|
||||
Reference in New Issue
Block a user