Exemple #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            var application = Application.Current;
            Window window = Bootstrapper.BootstrapShell(true);
            window.Title = "StoryTeller";

            application.DispatcherUnhandledException += application_DispatcherUnhandledException;

            window.Show();

            if (e.Args.Length > 0)
            {
                var controller = ObjectFactory.GetInstance<IProjectController>();

                var args = ArgPreprocessor.Process(e.Args);
                var queue = new Queue<string>(args);
                var input = new RunCommand().Usages.BuildInput(queue).As<RunInput>();
                var project = input.LoadProject();

                controller.StartNewProject(project);
            }

            //application.Run(window);
        }