//public class D : ViewDeckControllerDelegate
        //{
        //    override 
        //}
        public override async void FinishedLaunching(UIApplication application)
        {
            // NB: GrossHackAlertTiemâ„¢:
            //
            // Monotouch appears to not load assemblies when you request them 
            // via Type.GetType, unlike every other platform (even 
            // Xamarin.Android). So, we've got to manually do what RxUI and 
            // Akavache would normally do for us
            var r = Locator.CurrentMutable;
            (new ReactiveUI.Cocoa.Registrations()).Register((f, t) => r.Register(f, t));
            //(new ReactiveUI.Mobile.Registrations()).Register((f, t) => r.Register(f, t));
            //(new Akavache.Registrations()).Register(r.Register);
            //(new Akavache.Mobile.Registrations()).Register(r.Register);
            //(new Akavache.Sqlite3.Registrations()).Register(r.Register);

            // Logger is slow right now
            var logger = new RxUiLogger();
            Locator.CurrentMutable.RegisterConstant(logger, typeof(ILogger));

            ViewModelLocator = new iOSViewModelLocator(_isAgent);

            var prevroot = this.Window.RootViewController;

            if (_isAgent)
            {
                var navpane = new NavigationPaneViewController(ViewModelLocator);
                ViewDeckController = new ViewDeckController(prevroot, navpane);
                ViewDeckController.LeftLedge = 704; // 1024 - 320 (width of the control)
            }
            else
            {
                ViewDeckController = new ViewDeckController(prevroot);
            }
            this.Window.RootViewController = ViewDeckController;

            var service = ViewModelLocator.MainService;

            await service.StartApp();
        }
 public virtual bool WillOpenRightView(ViewDeckController viewDeckController, bool animated)
 {
     return true;
 }
 public virtual bool WillCloseLeftView(ViewDeckController viewDeckController, bool animated)
 {
     return true;
 }
 public virtual void SlideOffsetChanged(ViewDeckController viewDeckController, nfloat offset)
 {
 }
 public virtual void DidShowCenterView(ViewDeckController viewDeckController, bool animated)
 {
 }
 public virtual void DidPanToOffset(ViewDeckController viewDeckController, nfloat offset)
 {
 }
 public virtual void DidOpenRightView(ViewDeckController viewDeckController, bool animated)
 {
 }
 public virtual void DidCloseLeftView(ViewDeckController viewDeckController, bool animated)
 {
 }
 public virtual void DidBounceWithClosingController(ViewDeckController viewDeckController, UIViewController openController)
 {
 }
 public virtual bool ApplyShadow(ViewDeckController viewDeckController, CALayer shadowLayer, CGRect rect)
 {
     return false;
 }
Example #11
0
        public void GotoDeck(Element element)
        {
            var leftController = new LeftController();
            var rightController = new RightController();

            var centerController = new CenterController(false);
            centerController.Title = "Center";

            var deckController = new ViewDeckController(centerController, leftController, rightController);
            deckController.RightLedge = 40;
            deckController.LeftLedge = 100;

            if (this.contained)
            {
                deckController.NavigationControllerBehavior = ViewDeckNavigationControllerBehavior.Contained;
            }
            else
            {
                deckController.NavigationControllerBehavior = ViewDeckNavigationControllerBehavior.Integrated;
            }

            this.NavigationController.PushViewController(deckController, true);
        }
Example #12
0
        public void StartSimpleSample(Element element)
        {
            var leftController = new LeftController();
            var rightController = new RightController();

            var centerController = new CenterController(true);

            var deckController = new ViewDeckController(centerController, leftController, rightController);
            deckController.RightLedge = 40;
            deckController.LeftLedge = 100;

            this.PresentViewController(deckController, true, null);
        }
Example #13
0
        public void StartMultiDeckSample(Element element)
        {
            var leftController = new MultiLeftController();
            var bottomController = new MultiBottomController();

            var centerController = new MultiCenterController();

            var secondDeckController = new ViewDeckController(leftController, bottomController);
            secondDeckController.LeftLedge = 100;

            var deckController = new ViewDeckController(centerController, secondDeckController);
            deckController.LeftLedge = 30;

            this.PresentViewController(deckController, true, null);
        }