update simulatore x status macchine

This commit is contained in:
Samuele Locatelli
2021-07-01 15:35:15 +02:00
parent 38e553a5bd
commit c1f5ce18ed
3 changed files with 66 additions and 18 deletions
+24 -6
View File
@@ -2,9 +2,12 @@
<asp:HiddenField runat="server" ID="hfMachine" Value="NE00" />
<asp:HiddenField runat="server" ID="hfMachClass" Value="light" />
<asp:HiddenField runat="server" ID="hfStat01" Value="warning" />
<asp:HiddenField runat="server" ID="hfStat02" Value="success" />
<asp:HiddenField runat="server" ID="hfStat03" Value="danger" />
<asp:HiddenField runat="server" ID="hfStat01" Value="01" />
<asp:HiddenField runat="server" ID="hfStat02" Value="01" />
<asp:HiddenField runat="server" ID="hfStat03" Value="01" />
<asp:HiddenField runat="server" ID="hfCss01" Value="warning" />
<asp:HiddenField runat="server" ID="hfCss02" Value="success" />
<asp:HiddenField runat="server" ID="hfCss03" Value="danger" />
<div class="row" runat="server" id="divSelect">
<asp:DropDownList runat="server" ID="ddlMachine" CssClass="form-control" AutoPostBack="True" OnSelectedIndexChanged="ddlMachine_SelectedIndexChanged">
@@ -23,9 +26,24 @@
</div>
<div class="col-9">
<div class="d-flex text-center">
<div class="p-2 bg-<%: hfStat01.Value %> flex-fill"><i class="fa fa-qrcode" aria-hidden="true"></i>&nbsp;<%: traduci("print") %></div>
<div class="p-2 bg-<%: hfStat02.Value %> flex-fill"><i class="fa fa-cogs" aria-hidden="true"></i>&nbsp;<%: traduci("CNC") %></div>
<div class="p-2 bg-<%: hfStat03.Value %> flex-fill"><i class="fa fa-hand-rock-o" aria-hidden="true"></i>&nbsp;<%: traduci("unload") %></div>
<div class="p-2 bg-<%: hfCss01.Value %> flex-fill">
<b><i class="fa fa-qrcode" aria-hidden="true"></i>&nbsp;<%: traduci("print") %>&nbsp;|&nbsp;<%: hfStat01.Value %></b>
<div class="small">
<%: traduci($"print_state_{hfStat01.Value}") %>
</div>
</div>
<div class="p-2 bg-<%: hfCss02.Value %> flex-fill">
<b><i class="fa fa-cogs" aria-hidden="true"></i>&nbsp;<%: traduci("CNC") %>&nbsp;|&nbsp;<%: hfStat02.Value %></b>
<div class="small">
<%: traduci($"CNC_state_{hfStat02.Value}") %>
</div>
</div>
<div class="p-2 bg-<%: hfCss03.Value %> flex-fill">
<b><i class="fa fa-hand-rock-o" aria-hidden="true"></i>&nbsp;<%: traduci("unload") %>&nbsp;|&nbsp;<%: hfStat03.Value %></b>
<div class="small">
<%: traduci($"unload_state_{hfStat03.Value}") %>
</div>
</div>
</div>
</div>
</div>
+15 -12
View File
@@ -101,28 +101,31 @@ namespace NKC_WF.WebUserControls
// FIXME TODO: fake....
DateTime adesso = DateTime.Now;
int numsec = adesso.Second;
hfStat01.Value = "success";
hfStat02.Value = "warning";
hfStat03.Value = "danger";
hfCss01.Value = "success";
hfCss02.Value = "warning";
hfCss03.Value = "danger";
hfStat01.Value = $"{adesso.Second - 1 % 10:00}";
hfStat02.Value = $"{adesso.Second + 3 % 10:00}";
hfStat03.Value = $"{adesso.Second + 1 % 10:00}";
switch (numsec % 3)
{
case 1:
hfStat01.Value = "warning";
hfStat02.Value = "danger";
hfStat03.Value = "success";
hfCss01.Value = "warning";
hfCss02.Value = "danger";
hfCss03.Value = "success";
break;
case 2:
hfStat01.Value = "danger";
hfStat02.Value = "success";
hfStat03.Value = "warning";
hfCss01.Value = "danger";
hfCss02.Value = "success";
hfCss03.Value = "warning";
break;
case 0:
default:
hfStat01.Value = "success";
hfStat02.Value = "warning";
hfStat03.Value = "danger";
hfCss01.Value = "success";
hfCss02.Value = "warning";
hfCss03.Value = "danger";
break;
}
}
+27
View File
@@ -59,6 +59,33 @@ namespace NKC_WF.WebUserControls
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfStat03;
/// <summary>
/// hfCss01 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfCss01;
/// <summary>
/// hfCss02 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfCss02;
/// <summary>
/// hfCss03 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hfCss03;
/// <summary>
/// divSelect control.
/// </summary>