Ejemplo n.º 1
0
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            IErrorService errorService = new ErrorService();
            var           manager      = new ProductManager();

            try
            {
                using (var splash = new WorkingSplash())
                {
                    splash.DisableProgressBar();
                    splash.Show();
                    var t = new Task(() => manager.Load(manager.DefaultFeed, true));
                    t.Start();
                    t.Wait();
                }
            }
            catch (Exception e)
            {
                errorService.ShowError("An unrecoverable error occured. Please check the Event Log to see the details.", e);
                Application.Exit();
            }

            Application.Run(new DependencyCheckerForm(errorService, manager));
        }
Ejemplo n.º 2
0
        private void Scan()
        {
            foreach (DependencyGroupView dependencyGroupView in this.dependencyGroupViews.Values)
            {
                dependencyGroupView.Reset();
            }

            var splash = new WorkingSplash();

            splash.Show();
            splash.MaxDependencies = this.dependenciesInfo.Dependencies.Count;
            Application.DoEvents();

            int current = 0;

            foreach (Dependency d in this.dependenciesInfo.Dependencies)
            {
                splash.ScanningPrompt = "Scanning for " + d.Title;
                splash.ShowCurrentProgress(current++);
                this.AddDependencyControl(d, this.dependenciesInfo.EvaluationContext);
            }

            splash.Close();
        }