59 lines
1.7 KiB
C#
59 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace MP_MON.Controllers
|
|
{
|
|
public class HomeController : Controller
|
|
{
|
|
public ActionResult Index()
|
|
{
|
|
// ricarico ogni minuto COMUNQUE tutto...
|
|
string pageRefreshSec = "60";
|
|
// refresh std ogni sec
|
|
int pageRefreshMs = 1000;
|
|
ViewBag.cssSemBase = "sem";
|
|
try
|
|
{
|
|
pageRefreshSec = System.Web.Configuration.WebConfigurationManager.AppSettings["pageRefreshSec"];
|
|
}
|
|
catch
|
|
{ }
|
|
if (pageRefreshSec == "") pageRefreshSec = "60";
|
|
ViewBag.pageRefreshMs = pageRefreshMs;
|
|
Response.AddHeader("Refresh", pageRefreshSec);
|
|
return View();
|
|
}
|
|
|
|
public ActionResult Blink()
|
|
{
|
|
// ricarico ogni minuto COMUNQUE tutto...
|
|
string pageRefreshSec = "60";
|
|
// se ho animazione refresh è ogni 2 sec...
|
|
int pageRefreshMs = 2000;
|
|
ViewBag.cssSemBase = "semBlink";
|
|
try
|
|
{
|
|
pageRefreshSec = System.Web.Configuration.WebConfigurationManager.AppSettings["pageRefreshSec"];
|
|
}
|
|
catch
|
|
{ }
|
|
if (pageRefreshSec == "") pageRefreshSec = "60";
|
|
ViewBag.pageRefreshMs = pageRefreshMs;
|
|
Response.AddHeader("Refresh", pageRefreshSec);
|
|
return View("Index");
|
|
}
|
|
|
|
public ActionResult GetClock()
|
|
{
|
|
return PartialView("_mmClock");
|
|
}
|
|
|
|
//public ActionResult Chat()
|
|
//{
|
|
// return View();
|
|
//}
|
|
}
|
|
} |