Пример #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);
        }
Пример #2
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create the app helper
            iHelper = new Helper(Environment.GetCommandLineArgs());
            iHelper.ProcessOptionsFileAndCommandLine();

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

            //d.SetAutoSend(false);
            iHelper.AddCrashLogDumper(d);

            iWindow = new UIWindow(UIScreen.MainScreen.Bounds);

            iViewController            = new KonfigViewController();
            iWindow.RootViewController = iViewController;

            Preferences preferences = new Preferences(iHelper);

            Model.Instance = new Model(preferences);

            // create the xapp controller and view
            Invoker  invoker = new Invoker();
            PageBase page    = new SettingsPageBasic(invoker, preferences, "settings", "settings");

            iXappController = new XappController(invoker, iHelper, Model.Instance, preferences, page, this);

            iWindow.MakeKeyAndVisible();

            iViewer = new ViewerBrowser(iViewController.WebView, iXappController.MainPageUri);

            return(true);
        }
Пример #3
0
        public override void WillTerminate(UIApplication application)
        {
            iXappController.Dispose();
            iXappController = null;

            iViewer.Dispose();
            iViewer = null;
        }
Пример #4
0
        public Controller(string[] aArgs)
        {
            iHelper = new Helper(aArgs);
            iHelper.ProcessOptionsFileAndCommandLine();

            iMainWindow = new MainWindow(iHelper);
            iMainWindow.ShowAll();

            Preferences preferences = new Preferences(iHelper);

            Model.Instance = new Model(preferences);

            // create the xapp controller and view
            Invoker  invoker = new Invoker();
            PageBase page    = new SettingsPageBasic(invoker, preferences, "settings", "settings");

            iXappController = new XappController(invoker, iHelper, Model.Instance, preferences, page, iMainWindow);
            iViewer         = new ViewerBrowser(iMainWindow.WebView, iXappController.MainPageUri);
        }
Пример #5
0
        private void Application_Exit(object sender, ExitEventArgs e)
        {
            if (iHelperAutoUpdate != null)
            {
                iHelperAutoUpdate.Dispose();
                iHelperAutoUpdate = null;
            }

            if (iXappController != null)
            {
                iXappController.Dispose();
                iXappController = null;
            }

            if (iViewer != null)
            {
                iViewer.Dispose();
                iViewer = null;
            }
        }
Пример #6
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);
        }