/// <summary> /// Main functions which generates page HTML /// Calls virtual BuildContent function /// </summary> /// <returns></returns> public virtual string GetHTML(bool addHeaderFooter = false, NameValueCollection queryPairs = null) { watch = new StopwatchEx(PageName); reset(); suppressDefaultFooter = true; string html = BuildContent(queryPairs); if (addHeaderFooter) { string title = plugin.Name + " " + PageName + ""; // Instance string header = hs.GetPageHeader(PageName, title, "", "", false, false); AddHeader(header); ////////////////////////////// AddBody(html); ////////////////////////////// AddFooter(hs.GetPageFooter()); } Utils.Log($"Duration '{PageName}': {duration} ms."); if (addHeaderFooter) { return(BuildPage()); } else { return(html); } }
/// <summary> /// Called from HSPI.ConfigDevice /// Return HTML for the device config page /// </summary> /// <param name="deviceId"></param> /// <returns></returns> public virtual string ConfigDevice(int deviceId) { StopwatchEx watch = new StopwatchEx("ConfigDevice"); // TEMP - Update device list? UpdateDeviceList(); return("ConfigDevice"); }
/// <summary> /// Called from HSPI.ConfigDevice /// Return HTML for the device config page /// </summary> /// <param name="deviceId"></param> /// <returns></returns> public virtual string ConfigDevice(int deviceId) { StopwatchEx watch = new StopwatchEx("ConfigDevice"); // TEMP - Update device list? UpdateDeviceList(); DeviceBase dev = GetDevice(deviceId); return(dev.GetDeviceConfig()); }