示例#1
0
        private void tsbOptions_Click(object sender, EventArgs e)
        {
            string optionsPageUrl = Helper.PathCombine(AppConfig.AppsFiles, "~\\Systems\\Options\\index.html");

            var       appScript = new Hydra.Win.ExtensionScript.ObjectScript();
            UCBrowser browser   = CreateBrowser(appScript, optionsPageUrl, "", "", "", true);

            pnlBrowser.Controls.Clear();
            pnlBrowser.Controls.Add(browser);
        }
示例#2
0
        private void OpeningApplication(object sender, АpplicationModel e)
        {
            var       appScript = new Hydra.Win.ExtensionScript.ObjectScript();
            UCBrowser browser   = CreateBrowser(appScript, e.AppUrl, "", "", "", true);

            _QuickMenu.Add(new QuickMenuItemModel()
            {
                App      = e,
                WBrowser = browser
            });

            pnlBrowser.Controls.Clear();
            pnlBrowser.Controls.Add(browser);
        }
示例#3
0
        private void FHydraForm_Load(object sender, EventArgs e)
        {
            HideToolBar();
            // Зарежда Default приложението, ако има зададен път
            string defaultAppBasePath = AppConfig.DefaultAppBasePath;

            if (defaultAppBasePath != "")
            {
                string    defaultAppInitPath = Helper.PathCombine(defaultAppBasePath, AppConfig.DefaultAppStartPage);
                var       appScript          = new Hydra.Win.ExtensionScript.ObjectScript();
                UCBrowser browser            = CreateBrowser(appScript
                                                             , defaultAppInitPath
                                                             , defaultAppBasePath
                                                             , AppConfig.DefaultAppCompany
                                                             , AppConfig.DefaultAppName
                                                             , AppConfig.DefaultAppIsOnline);

                pnlBrowser.Controls.Clear();
                pnlBrowser.Controls.Add(browser);
            }
            // Зарежда магазина
            else
            {
                var appScript = new Hydra.Win.ExtensionScript.ObjectScript();
                appScript.WebApp.Opening += OpeningApplication;

                UCBrowser browser = CreateBrowser(appScript, _BaseUrl, "", "", "", true);
                pnlBrowser.Controls.Clear();
                pnlBrowser.Controls.Add(browser);

                _QuickMenu.Add(new QuickMenuItemModel()
                {
                    App = new АpplicationModel()
                    {
                        Name   = "Store",
                        AppUrl = _BaseUrl
                    },
                    WBrowser = browser
                });
            }
        }