///<summary> /// Registers the web page in HomeSeer ///</summary> ///<param name="linktext">The text to be shown</param> ///<param name="link">A short link to the page</param> ///<param name="page_title">The title of the page when loaded</param> /// <param name="config">RegisterConfigLink for "manage Interfaces" page</param> public void RegisterWebPageDesc(string linktext, string link, string page_title, bool config = false, bool helplink = false) { // Register page if (!helplink) { string err = HS.RegisterPage(link, this.Name, PluginInstance: ""); if (!String.IsNullOrEmpty(err)) { Console.WriteLine($"RegisterPage: {link} - {err}"); } } // Register callback //try { WebPageDesc wpd = new WebPageDesc { plugInName = (config || helplink) ? this.Name : this.PluginNameCleaned, link = link, linktext = linktext, page_title = page_title }; if (helplink) { // Link for Help Menu HS.RegisterHelpLink(wpd); } else if (config) { // Link for "Manage Plugins" page Callback.RegisterConfigLink(wpd); } else { // Link for Plugins Menu Callback.RegisterLink(wpd); } } //catch (Exception ex) //{ // Console.WriteLine("Registering Web Links (RegisterWebPage): " + ex.Message); //} }