Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        public HelperKinskyTouch(IntPtr aInstance)
            : base(aInstance)
        {
            iHelper = new HelperKinsky(new string[] {}, new Invoker());

            UIDevice.CurrentDevice.BatteryMonitoringEnabled = true;
            NSNotificationCenter.DefaultCenter.AddObserver(UIDevice.BatteryStateDidChangeNotification, delegate {
                EventOptionAutoLockValueChanged(this, EventArgs.Empty);
            });

            iCrashLogDumper = new CrashLogDumper(iHelper.Title, iHelper.Product, iHelper.Version);
            iHelper.AddCrashLogDumper(iCrashLogDumper);

            iOptionPageGeneral = new OptionPageGeneral("General");
            iHelper.AddOptionPage(iOptionPageGeneral);

            iOptionInsertMode = new OptionInsertMode();
            iHelper.AddOption(iOptionInsertMode);

            iOptionPageGeneral.OptionAutoLock.EventValueChanged         += EventOptionAutoLockValueChanged;
            iOptionPageGeneral.OptionAutoSendCrashLog.EventValueChanged += EventOptionAutoSendCrashLogValueChanged;

            iHelper.ProcessOptionsFileAndCommandLine();

            EventOptionAutoLockValueChanged(this, EventArgs.Empty);
            EventOptionAutoSendCrashLogValueChanged(this, EventArgs.Empty);
        }
Exemplo n.º 3
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)
        {
            //NSImage img = new NSImage(NSBundle.MainBundle.PathForImageResource("Icon106x106.png"));

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

            CrashLogDumper d = new CrashLogDumper(iHelper.Title, iHelper.Product, iHelper.Version);

            iHelper.AddCrashLogDumper(d);

            // create the xapp components
            iXapp      = new Framework <Session>(Path.Combine(OpenHome.Xen.Environment.AppPath, "PageHtml"));
            iWebServer = new WebServer(iXapp);

            // create and show the main window
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            viewController            = new WizardViewController();
            window.RootViewController = viewController;
            window.MakeKeyAndVisible();

            return(true);
        }