Ejemplo n.º 1
0
        // METHODS
        private void SetUpApplications()
        {
            // Delete all buttons
            ApplicationsStackPanel.Children.Clear();

            // Update setup's applications, in case something has changed
            setup.UpdateApplications();

            // Update the Application's List
            ApplicationsManager.Initialize(setup.ApplicationInfo);

            // Create a Button for each found application
            foreach (var app in ApplicationsManager.ApplicationsList)
            {
                if (File.Exists(app.Path))
                {
                    // Create Button UI
                    var newAppButton = new ApplicationButton(app, ref SettingsStackPanel, ref TopBar);
                    var buttonUI     = newAppButton.Button;

                    // Add button to the panel
                    ApplicationsStackPanel.Children.Add(buttonUI);
                }
            }

            // Create "Add New Application" Button
            CreateNewApplicationButton();
        }
Ejemplo n.º 2
0
        public IndexModel(ApplicationDbContext context, IServiceProvider serviceProvider, IConfiguration configuration)
        {
            this.context         = context;
            this.configuration   = configuration;
            this.serviceProvider = serviceProvider;

            applicationsManager = new ApplicationsManager(this.context);
        }
Ejemplo n.º 3
0
        public EditModel(IServiceProvider serviceProvider, IConfiguration configuration, ApplicationDbContext context)
        {
            this.context         = context;
            this.serviceProvider = serviceProvider;
            this.configuration   = configuration;

            applicationsManager = new ApplicationsManager(this.context);
        }