inizio ad inserire gestione update e download in title di TAB...
This commit is contained in:
@@ -37,13 +37,14 @@
|
||||
</system.web>
|
||||
<appSettings>
|
||||
<!--area redis!-->
|
||||
<add key="RedEnab" value="true"/>
|
||||
<add key="RedEnab" value="true" />
|
||||
<!--Impostazione gestione serializzazione variabili in sessione (es per Redis)-->
|
||||
<add key="serializeSession" value="true" />
|
||||
<add key="maxAgeAppConf_min" value="10" />
|
||||
<!--gestione timeout "esteso" x chiamate SQL critiche, in secondi -->
|
||||
<add key="sqlLongCommandTimeout" value="600" />
|
||||
<!--Conf generale-->
|
||||
<add key="appVers" value="develop" />
|
||||
<add key="doShrinkFolder" value="true" />
|
||||
<add key="CodModulo" value="MoonPro" />
|
||||
<!--impostazione cambio tempo calcolato tra minuti-ore-gg-->
|
||||
|
||||
@@ -1,23 +1,30 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_title.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_title" %>
|
||||
<div class="ui-grid-solo" style="color: white;">
|
||||
<div class="divSx">
|
||||
<div style="margin: 0px 4px; text-align: left; font-size: 2.4em">
|
||||
<asp:Image ID="logoSW" ImageUrl="~/images/logoSteamware.png" runat="server" Height="40px" />
|
||||
MoonProTablet
|
||||
</div>
|
||||
<div class="divSx">
|
||||
<div style="margin: 0px 4px; text-align: left; font-size: 2.4em">
|
||||
<asp:Image ID="logoSW" ImageUrl="~/images/logoSteamware.png" runat="server" Height="40px" />
|
||||
MoonProTablet
|
||||
</div>
|
||||
<div class="divDx">
|
||||
<div style="margin: 0px 4px; text-align: right;font-size: 11pt;">
|
||||
<asp:Label runat="server" ID="lblSwData" />
|
||||
|
|
||||
</div>
|
||||
<div class="divDx">
|
||||
<div style="margin: 0px 4px; text-align: right; font-size: 11pt;">
|
||||
<asp:Label runat="server" ID="lblSwData" />
|
||||
|
|
||||
<asp:Label runat="server" ID="lblData" />
|
||||
</div>
|
||||
<div style="margin: 0px 4px; text-align: right; font-size: 9pt;">
|
||||
<asp:Label runat="server" ID="lblIpData" />
|
||||
|
|
||||
<asp:Label runat="server" ID="lblVers" />
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 0px 4px; text-align: right; font-size: 9pt;">
|
||||
<asp:Label runat="server" ID="lblIpData" />
|
||||
|
|
||||
<asp:Label runat="server" ID="lblVers" />
|
||||
|
||||
<div class="divDx" runat="server" id="divCheckVers" style="padding:0 0.5em;">
|
||||
<asp:LinkButton runat="server" ID="lbtCheckUpdate" OnClick="lbtCheckUpdate_Click">
|
||||
<i class="fa fa-question-circle-o fa-lg"></i>
|
||||
</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="lbtDownloadUpdate" Visible="false" OnClick="lbtDownloadUpdate_Click" Text="DOWNLOAD"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- timer refresh intera pagina: 1 minuti, 0'000 ms -->
|
||||
<asp:Timer ID="Timer1" runat="server" Interval="60000" OnTick="Timer1_Tick">
|
||||
|
||||
@@ -16,6 +16,16 @@ namespace MoonProTablet.WebUserControls
|
||||
/// </summary>
|
||||
protected string postazione_IP = "";
|
||||
/// <summary>
|
||||
/// Versione corrente sw
|
||||
/// </summary>
|
||||
protected Version currVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// caricamento pagina
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
@@ -57,7 +67,7 @@ namespace MoonProTablet.WebUserControls
|
||||
}
|
||||
lblSwData.Text = swData;
|
||||
//lblVers.Text = string.Format("{0}.{1}", memLayer.ML.CRS("mainRev"), memLayer.ML.CRS("minRev"));
|
||||
lblVers.Text = string.Format("v.{0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
|
||||
lblVers.Text = string.Format("v.{0}", currVersion);// System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica al presenza di un cookie VALIDO per autorizzare il device
|
||||
@@ -138,5 +148,41 @@ namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
lblData.Text = string.Format("{0:dd/MM/yyyy - HH:mm:ss}", DateTime.Now);
|
||||
}
|
||||
/// <summary>
|
||||
/// Effettua verifica versione...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void lbtCheckUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
// controllo versione
|
||||
Version remoteVersion = UpdateMan.obj.lastVers(updateUrl).CurrentVersion;
|
||||
// se c'è update mostro download...
|
||||
if (remoteVersion > currVersion)
|
||||
{
|
||||
lbtDownloadUpdate.Text = string.Format("DOWNLOAD --> {0}", remoteVersion);
|
||||
lbtDownloadUpdate.Visible = true;
|
||||
lbtCheckUpdate.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void lbtDownloadUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
// scarico...
|
||||
|
||||
// nascondo button download
|
||||
lbtDownloadUpdate.Visible = false;
|
||||
lbtCheckUpdate.Visible = true;
|
||||
}
|
||||
/// <summary>
|
||||
/// URLK stringa di UPDATE...
|
||||
/// </summary>
|
||||
protected string updateUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format("http://seriate.steamware.net:8083/SWS/MAPO/TAB/{0}/manifest.xml", memLayer.ML.CRS("appVers"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+53
-27
@@ -1,69 +1,95 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// <generato automaticamente>
|
||||
// Codice generato da uno strumento.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </generato automaticamente>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MoonProTablet.WebUserControls
|
||||
{
|
||||
|
||||
|
||||
namespace MoonProTablet.WebUserControls {
|
||||
|
||||
|
||||
public partial class mod_title {
|
||||
|
||||
/// <summary>
|
||||
/// logoSW control.
|
||||
/// Controllo logoSW.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Image logoSW;
|
||||
|
||||
/// <summary>
|
||||
/// lblSwData control.
|
||||
/// Controllo lblSwData.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblSwData;
|
||||
|
||||
/// <summary>
|
||||
/// lblData control.
|
||||
/// Controllo lblData.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblData;
|
||||
|
||||
/// <summary>
|
||||
/// lblIpData control.
|
||||
/// Controllo lblIpData.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblIpData;
|
||||
|
||||
/// <summary>
|
||||
/// lblVers control.
|
||||
/// Controllo lblVers.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblVers;
|
||||
|
||||
/// <summary>
|
||||
/// Timer1 control.
|
||||
/// Controllo divCheckVers.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divCheckVers;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtCheckUpdate.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtCheckUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo lbtDownloadUpdate.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbtDownloadUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// Controllo Timer1.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Campo generato automaticamente.
|
||||
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.Timer Timer1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user