public void Register()
        {
            Scheduler.PageBuilderAndMenu.clsPageBuilder pageToRegister;

            _hs.RegisterPage(_pageName, Utility.PluginName, Utility.InstanceFriendlyName);

            var linkText = _pageName;

            linkText = linkText.Replace("MelCloud_", "").Replace("_", " ").Replace(Utility.PluginName, "");
            var pageTitle = linkText;

            var wpd = new WebPageDesc
            {
                link       = _pageName,
                plugInName = Utility.PluginName
            };

            _callback.RegisterConfigLink(wpd);

            var webPageDescription = new WebPageDesc
            {
                plugInName = Utility.PluginName,
                link       = _pageName,
                linktext   = pageTitle,
                page_title = pageTitle
            };

            _hs.RegisterPage(_pageName, Utility.PluginName, string.Empty);
            _callback.RegisterLink(webPageDescription);
        }
        private void RegisterPlugin()
        {
            var wpd = new WebPageDesc
            {
                link       = MelcloudGeneralConfig,
                plugInName = Utility.PluginName
            };

            _callbackApi.RegisterConfigLink(wpd);
        }
Example #3
0
        public void RegisterConfigs()
        {
            var wpd = new WebPageDesc
            {
                link       = _dataCurveGeneralConfig,
                plugInName = Utility.PluginName
            };

            _callback.RegisterConfigLink(wpd);

            if (_configPages == null)
            {
                _configPages = new List <IConfigPage>();
            }
            _configPages.Add(CreateConfigPage(_dataCurveGeneralConfig));
            _configPages.Add(CreateConfigPage(_dataCurveAboutConfig));
        }
Example #4
0
        public string InitIO(string port)
        {
            Console.WriteLine("InitIO called!");
            Thread.Sleep(5000);
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            Thread.CurrentThread.CurrentCulture   = new CultureInfo("en-US");

            mCore = new EnOceanManager(hsHost, hsHostCB, this);
            mCore.Initialize();
            hsHostCB.RegisterEventCB(Enums.HSEvent.CONFIG_CHANGE, Name, "");
            //hsHostCB.RegisterEventCB(Enums.HSEvent.LOG, Name, "");
            hsHostCB.RegisterEventCB(Enums.HSEvent.SETUP_CHANGE, Name, "");
            //hsHostCB.RegisterEventCB(Enums.HSEvent.STRING_CHANGE, Name, "");
            hsHostCB.RegisterEventCB(Enums.HSEvent.GENERIC, Name, "");

            this.mPageBuilder = new PageBuilder(hsHost, hsHostCB, this, mCore);

            hsHost.RegisterPage(Constants.PLUGIN_STRING_ID, Name, "");
            hsHost.RegisterPage(Constants.PLUGIN_STRING_ID + "_Interfaces", Name, "");

            WebPageDesc wpd = new WebPageDesc();

            wpd.link       = Constants.PLUGIN_STRING_ID;
            wpd.linktext   = "Configuration";
            wpd.page_title = "Configuration";
            wpd.plugInName = Name;
            hsHostCB.RegisterLink(wpd);
            hsHostCB.RegisterConfigLink(wpd);

            WebPageDesc wpi = new WebPageDesc();

            wpi.link       = Constants.PLUGIN_STRING_ID + "_Interfaces";
            wpi.linktext   = "Interfaces";
            wpi.page_title = "Interfaces";
            wpi.plugInName = Name;
            hsHostCB.RegisterLink(wpi);

            Console.WriteLine("INIT IO complete");
            return(""); // empty == OK
        }