Ejemplo n.º 1
0
    //public OpenKeypad openKeypad;

    void Start()
    {
        numPad                      = transform.GetChild(0).GetChild(0).GetChild(2).gameObject;
        displayText                 = transform.GetChild(0).GetChild(0).GetChild(1).GetChild(0).GetComponentInChildren <Text>();
        displayText.text            = string.Empty;
        _input                      = string.Empty;
        openKeypad                  = GameObject.Find("OpenKeypad").GetComponent <OpenModal>();
        buttonPress                 = GetComponent <AudioSource>();
        GameController.FinishModal += DeactivateKeypad;
    }
Ejemplo n.º 2
0
        public HomeViewModel(IViewStackService viewStackService) : base(viewStackService)
        {
            OpenModal = ReactiveCommand
                        .CreateFromObservable(() =>
                                              this.ViewStackService.PushModal(new FirstModalViewModel(ViewStackService)),
                                              outputScheduler: RxApp.MainThreadScheduler);

            PushPage = ReactiveCommand
                       .CreateFromObservable(() =>
                                             this.ViewStackService.PushPage(new RedViewModel(ViewStackService)),
                                             outputScheduler: RxApp.MainThreadScheduler);

            OpenModal.Subscribe(x => Debug.WriteLine("PagePushed"));
        }
Ejemplo n.º 3
0
        public FirstModalViewModel(IViewStackService viewStackService) : base(viewStackService)
        {
            OpenModal = ReactiveCommand
                        .CreateFromObservable(() =>
                                              this.ViewStackService.PushModal(new SecondModalViewModel(viewStackService)),
                                              outputScheduler: RxApp.MainThreadScheduler);

            PopModal = ReactiveCommand
                       .CreateFromObservable(() =>
                                             this.ViewStackService.PopModal(),
                                             outputScheduler: RxApp.MainThreadScheduler);

            OpenModal.Subscribe(x => Debug.WriteLine("PagePushed"));
            PopModal.Subscribe(x => Debug.WriteLine("PagePoped"));
            PopModal.ThrownExceptions.Subscribe(error => Interactions.ErrorMessage.Handle(error).Subscribe());
        }
Ejemplo n.º 4
0
        public FirstModalViewModel(INavigationService navigationService) : base(navigationService)
        {
            OpenModal = ReactiveCommand
                        .CreateFromObservable(() =>
                                              NavigationService.PushModal(new SecondModalViewModel(NavigationService)),
                                              outputScheduler: RxApp.MainThreadScheduler);

            PopModal = ReactiveCommand
                       .CreateFromObservable(() =>
                                             NavigationService.PopModal(),
                                             outputScheduler: RxApp.MainThreadScheduler);

            OpenModal.Subscribe(x => System.Diagnostics.Debug.WriteLine("PagePushed"));
            PopModal.Subscribe(x => System.Diagnostics.Debug.WriteLine("PagePopped"));
            PopModal.ThrownExceptions.Subscribe(error => Interactions.ErrorMessage.Handle(error).Subscribe());
        }
Ejemplo n.º 5
0
 private void Start()
 {
     modalRegistrar = FindObjectOfType <OpenModal>();
 }