Files
GPW/GPW_Admin/WebUserControls/mod_menuBottomFullpage.ascx.cs
2022-02-03 07:29:11 +01:00

70 lines
2.3 KiB
C#

using GPW_data;
using SteamWare;
using System;
using System.Configuration;
namespace GPW_Admin.WebUserControls
{
public partial class mod_menuBottomFullpage : System.Web.UI.UserControl
{
#region Private Methods
private void setClock()
{
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
{ }
}
/// <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("intUpdatePagina_ms");
}
#endregion Private Methods
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
// 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"));
setTimer();
setClock();
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;
}
}
protected void Timer1_Tick(object sender, EventArgs e)
{
setClock();
}
#endregion Protected Methods
}
}