Exemplo n.º 1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            // create helpers
            iHelper = new Helper(e.Args);
            iHelper.ProcessOptionsFileAndCommandLine();

            ICrashLogDumper d = new CrashLogDumperWindow(ResourceManager.IconLarge, iHelper.Title, iHelper.Product, iHelper.Version);

            iHelper.AddCrashLogDumper(d);

            iHelperAutoUpdate = new HelperAutoUpdate(iHelper, new Linn.Toolkit.Wpf.ViewAutoUpdateStandard(Konfig.ResourceManager.Icon, Konfig.Properties.Resources.IconLarge), new Invoker(this.Dispatcher));
            iHelperAutoUpdate.Start();

            // create the main window
            iMainWindow = new MainWindow(iHelper.Product, iHelper.Title);
            iMainWindow.Show();

            Preferences preferences = new Preferences(iHelper);

            Model.Instance = new Model(preferences);

            // create the xapp controller and view
            Invoker invoker = new Invoker(this.Dispatcher);
            SettingsPageAdvanced   settings  = new SettingsPageAdvanced(invoker, Model.Instance, preferences, iHelperAutoUpdate, "settings", "settings");
            UpdateListenerRepeater listeners = new UpdateListenerRepeater(new IUpdateListener[] { iMainWindow, settings });

            iXappController = new XappController(invoker, iHelper, Model.Instance, preferences, settings, listeners);
            iViewer         = new ViewerBrowser(iMainWindow.WebBrowser, iXappController.MainPageUri);
        }
Exemplo n.º 2
0
        public override void FinishedLaunching(NSObject notification)
        {
            // load some images from the bundle
            NSImage largeIcon = new NSImage(NSBundle.MainBundle.PathForImageResource("IconLarge.png"));

            // create the app helper
            iHelper = new Helper(Environment.GetCommandLineArgs());
            iHelper.ProcessOptionsFileAndCommandLine();

            // add a crash log dumper
            CrashLogDumperWindowController d = new CrashLogDumperWindowController(largeIcon, iHelper.Title, iHelper.Product, iHelper.Version);

            d.LoadWindow();
            iHelper.AddCrashLogDumper(d);

            // create auto update view and helper
            iHelperAutoUpdate = new HelperAutoUpdate(iHelper, new Linn.Toolkit.Mac.ViewAutoUpdateStandard(largeIcon), new Invoker());
            iHelperAutoUpdate.Start();

            iMainWindowController = new MainWindowController(iHelper.Product);
            MainWindowDelegate windowDelegate = new MainWindowDelegate(iMainWindowController.Window, iHelper.Title, largeIcon);

            iMainWindowController.Window.Delegate = windowDelegate;
            iMainWindowController.Window.MakeKeyAndOrderFront(this);

            Preferences preferences = new Preferences(iHelper);

            Model.Instance = new Model(preferences);

            // create the xapp controller and view
            Invoker invoker = new Invoker();
            SettingsPageAdvanced   settings  = new SettingsPageAdvanced(invoker, Model.Instance, preferences, iHelperAutoUpdate, "settings", "settings");
            UpdateListenerRepeater listeners = new UpdateListenerRepeater(new IUpdateListener[] { windowDelegate, settings });

            iXappController = new XappController(invoker, iHelper, Model.Instance, preferences, settings, listeners);
            iViewer         = new ViewerBrowser(iMainWindowController.WebView, iXappController.MainPageUri);
        }