コード例 #1
0
        private void ViewApp(CIF_UserInterface.StoreApp app)
        {
            if (currentAppView != null)
            {
                PagePanel.Controls.Remove(currentAppView);
            }
            pageTitle.Text        = app.appTitle.Replace(" (Installed)", "").ToUpper();
            listPanel.Visible     = false;
            SearchBox.Visible     = false;
            BtnUpdateRepo.Visible = false;
            var appView = new storeAppView
            {
                AppName   = app.appTitle.Replace(" (Installed)", ""),
                AppConfig = app.appConfig,
                AppIcon   = app.appIcon,
                Dock      = DockStyle.Fill
            };

            appView.ClickedBack += delegate
            {
                pageTitle.Text        = "Script Store";
                listPanel.Visible     = true;
                SearchBox.Visible     = true;
                BtnUpdateRepo.Visible = true;
                if (currentAppView != null)
                {
                    PagePanel.Controls.Remove(currentAppView);
                }
            };

            PagePanel.Controls.Add(appView);
            currentAppView = appView;
        }
コード例 #2
0
        private void LoadApp(string appName)
        {
            CIF_UserInterface.StoreApp SAP = new CIF_UserInterface.StoreApp();
            var appIcon = Core.GetImage($"https://raw.githubusercontent.com/cyber-intelligence/cyber-intelligence/master/ScriptStore/{appName}/icon.png");;

            if (appIcon != null)
            {
                SAP.appIcon = appIcon;
            }
            if (SAP.appIcon == null)
            {
                return;
            }
            SAP.OnClick    += ClickedStoreApp;
            SAP.appTitle    = appName;
            SAP.appConfig   = Core.GetAppConfig(appName);
            SAP.IsInstalled = Core.CheckInstalled(appName);
            BeginInvoke((MethodInvoker) delegate()
            {
                listPanel.Controls.Add(SAP);
            });
        }