- <%: System.Web.Configuration.WebConfigurationManager.AppSettings["Environment"] %>
+ <%: System.Web.Configuration.WebConfigurationManager.AppSettings["Environment"] %> | <%: videoSize %>
- <%: System.Web.Configuration.WebConfigurationManager.AppSettings["Environment"] %>
+ <%: System.Web.Configuration.WebConfigurationManager.AppSettings["Environment"] %> | <%: videoSize %>
Powered by
diff --git a/MP-Tablet/WebUserControls/mod_footer.ascx.cs b/MP-Tablet/WebUserControls/mod_footer.ascx.cs
index ddb861f5..82d41dc3 100644
--- a/MP-Tablet/WebUserControls/mod_footer.ascx.cs
+++ b/MP-Tablet/WebUserControls/mod_footer.ascx.cs
@@ -24,5 +24,20 @@ namespace MoonProTablet.WebUserControls
private void updateLabels()
{
}
+ ///
+ /// Dimensione schermata video attuale
+ ///
+ public string videoSize
+ {
+ get
+ {
+ string answ = "?x?";
+ if (Session["BrowserWidth"] != null)
+ {
+ answ = string.Format("{0} x {1}", Session["BrowserWidth"], Session["BrowserHeight"]);
+ }
+ return answ;
+ }
+ }
}
}
\ No newline at end of file
diff --git a/MP-Tablet/windowSize.ashx b/MP-Tablet/windowSize.ashx
new file mode 100644
index 00000000..0e9f7c3f
--- /dev/null
+++ b/MP-Tablet/windowSize.ashx
@@ -0,0 +1 @@
+<%@ WebHandler Language="C#" CodeBehind="windowSize.ashx.cs" Class="MoonProTablet.windowSize" %>
diff --git a/MP-Tablet/windowSize.ashx.cs b/MP-Tablet/windowSize.ashx.cs
new file mode 100644
index 00000000..5d9b275f
--- /dev/null
+++ b/MP-Tablet/windowSize.ashx.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace MoonProTablet
+{
+ ///
+ /// Descrizione di riepilogo per windowSize
+ /// vedere https://techbrij.com/browser-height-width-server-responsive-design-asp-net
+ ///
+ public class windowSize : IHttpHandler, System.Web.SessionState.IRequiresSessionState
+ {
+ ///
+ /// Processa la richeista andando a recuperare width-height del browser
+ ///
+ ///
+ public void ProcessRequest(HttpContext context)
+ {
+ context.Response.ContentType = "application/json";
+
+ var json = new System.Web.Script.Serialization.JavaScriptSerializer();
+ var output = json.Serialize(new { isFirst = context.Session["BrowserWidth"] == null });
+ context.Response.Write(output);
+
+ context.Session["BrowserWidth"] = context.Request.QueryString["Width"];
+ context.Session["BrowserHeight"] = context.Request.QueryString["Height"];
+ // modificare: salvare in REDIS come conteggio... poi emttere in ABOUT PAGE il resoconto dei conteggi...
+ }
+
+ public bool IsReusable
+ {
+ get
+ {
+ return false;
+ }
+ }
+ }
+}
\ No newline at end of file