87 lines
2.5 KiB
C#
87 lines
2.5 KiB
C#
using GPW_data;
|
|
using SteamWare;
|
|
using System;
|
|
using System.Configuration;
|
|
using System.Web.UI;
|
|
|
|
namespace GPW.WebUserControls
|
|
{
|
|
public partial class mod_menuBottomFullBCode : System.Web.UI.UserControl
|
|
{
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!Page.IsPostBack)
|
|
{
|
|
contatorePag = 0;
|
|
// sistemo le stringhe...
|
|
//lblApp.Text = string.Format("<b>{0}</b> v.{1}.{2}", ConfigurationManager.AppSettings.Get("appName"), ConfigurationManager.AppSettings.Get("mainRev"), ConfigurationManager.AppSettings.Get("minRev"));
|
|
lblApp.Text = string.Format("<b>{0}</b> v.{1}", ConfigurationManager.AppSettings.Get("appName"), System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
|
|
lblCopyRight.Text = string.Format("<b>{0}</b>", ConfigurationManager.AppSettings.Get("copyRight"));
|
|
setClock();
|
|
setTimer();
|
|
}
|
|
if (licenzeGPW.checkLicenze)
|
|
{
|
|
pnlCheck.CssClass = "btnVerdeGrad ui-corner-all shadowBox";
|
|
}
|
|
else
|
|
{
|
|
pnlCheck.CssClass = "btnRossoGrad ui-corner-all shadowBox";
|
|
//lblWarning.Text = "Attenzione: numero licenze superato! MR attiva.";
|
|
lblWarning.Visible = true;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// imposta il tempo di scadenza del timer x il refresh della pagina per refresh orario mostrato
|
|
/// </summary>
|
|
private void setTimer()
|
|
{
|
|
Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdateFooter_ms");
|
|
}
|
|
protected void Timer1_Tick(object sender, EventArgs e)
|
|
{
|
|
setClock();
|
|
}
|
|
protected int contatorePag
|
|
{
|
|
get
|
|
{
|
|
return memLayer.ML.IntSessionObj("numChiamatePaginaBCode");
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("numChiamatePaginaBCode", value);
|
|
}
|
|
}
|
|
private void setClock()
|
|
{
|
|
// controllo numero di "ri-chiamate": ogni tot (std = 100, 100sec di default quindi) ricarico pagina
|
|
if (contatorePag < memLayer.ML.confReadInt("maxRefreshToReload"))
|
|
{
|
|
contatorePag++;
|
|
}
|
|
else
|
|
{
|
|
contatorePag = 0;
|
|
Response.Redirect("Barcode.aspx");
|
|
}
|
|
|
|
string postazione_IP = Request.UserHostName;
|
|
lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss");
|
|
lblInfo.Text = "";
|
|
try
|
|
{
|
|
lblInfo.Text += string.Format("{0}", dnsUtils.DetermineCompName(postazione_IP));
|
|
}
|
|
catch
|
|
{ }
|
|
try
|
|
{
|
|
lblInfo.Text += string.Format(" ({0})", postazione_IP);
|
|
}
|
|
catch
|
|
{ }
|
|
}
|
|
}
|
|
} |