Exemplo n.º 1
0
 public static void Main(string[] args)
 {
     Application.Init();
     MainWindow win = new MainWindow();
     win.Show();
     Application.Run();
 }
Exemplo n.º 2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            var controllers = new AsyncControllerFactory();
            controllers.Register("Wizard", () => new WizardController());

            var routes = new ControllerRouteCatalog(controllers);
            routes.MapRoute("wizard/{action}", new { controller = "Wizard"});

            var navigation = new NavigatorFactory(routes);

            var main = new MainWindow();
            navigation.ProgressListeners.Add(main);
            main.Show();

            var navigator = navigation.CreateNavigator(main.MainFrame);
            navigator.Navigate<WizardController>(x => x.Welcome());

            DispatcherUnhandledException += OnDispatcherUnhandledException;
            base.OnStartup(e);

            Magellan.Diagnostics.TraceSources.MagellanSource.Switch.Level = SourceLevels.Verbose;
        }