public override void ChangePresentation(MvxPresentationHint hint) { var closeHint = hint as MvxClosePresentationHint; if (closeHint != null) { if (_currentModal != null) { ((UIViewController)_currentModal).DismissViewController(true, null); return; } for (int i = _generalNavigationController.ViewControllers.Length - 1; i >= 1; i--) { var vc = _generalNavigationController.ViewControllers[i]; var touchView = vc as IMvxTouchView; if (touchView != null && touchView.ViewModel == closeHint.ViewModelToClose) { _generalNavigationController.PopToViewController(_generalNavigationController.ViewControllers[i - 1], true); return; } } //If it didnt trigger above it's because it was probably the root. _generalNavigationController.PopToRootViewController(true); } }
public bool ChangePresentation(MvxPresentationHint hint) { if (hint is MvxClosePresentationHint) CloseRequests.Add((MvxClosePresentationHint)hint); return true; }
public async void ChangePresentation(MvxPresentationHint hint) { if (hint is MvxClosePresentationHint) { // TODO - perhaps we should do more here... also async void is a boo boo await _navigationPage.PopAsync(); } }
public override void ChangePresentation(MvxPresentationHint hint) { ProcessActivePanelPresentation(hint); ProcessResetRootPresentation(hint); ProcessPopToRootPresentation(hint); base.ChangePresentation(hint); }
public bool ChangePresentation(MvxPresentationHint hint) { Action action = () => { MvxTrace.TaggedTrace("MacNavigation", "Change presentation requested"); _presenter.ChangePresentation(hint); }; return RequestMainThreadAction(action); }
public override void ChangePresentation(MvxPresentationHint hint) { if (hint is MvxClosePresentationHint) { return; } base.ChangePresentation(hint); }
public override void ChangePresentation(Cirrious.MvvmCross.ViewModels.MvxPresentationHint hint) { if (hint is MvxClosePresentationHint && _window.RootViewController.ModalViewController is NewAppointmentView) { this.CloseModalViewController(); } base.ChangePresentation(hint); }
public virtual void ChangePresentation(MvxPresentationHint hint) { if (hint is MvxClosePresentationHint) { Close((hint as MvxClosePresentationHint).ViewModelToClose); return; } MvxTrace.Warning("Hint ignored {0}", hint.GetType().Name); }
public override void ChangePresentation(MvxPresentationHint hint) { if (hint is MvxClosePresentationHint) { Close((hint as MvxClosePresentationHint).ViewModelToClose); return; } base.ChangePresentation(hint); }
// TODO: There is no CLOSE Method for a view - any view changes come down as presentation hints public override void ChangePresentation(MvxPresentationHint hint) { if (hint is LogoutPresentationHint) { var service = Mvx.Resolve<IPropertyTrackerService>(); service.Logout(); CloseUpTo(_loginViewController); return; } base.ChangePresentation(hint); }
public override void ChangePresentation(MvxPresentationHint hint) { if (HandlePresentationChange(hint)) return; if (hint is MvxClosePresentationHint) { Close((hint as MvxClosePresentationHint).ViewModelToClose); return; } MvxTrace.Warning("Hint ignored {0}", hint.GetType().Name); }
public override void ChangePresentation(MvxPresentationHint hint) { if (hint is MvxClosePresentationHint) { var viewModel = (hint as MvxClosePresentationHint).ViewModelToClose; Activity activity = this.Activity; IMvxView mvxView = activity as IMvxView; activity.Finish (); return; } }
public virtual void ChangePresentation(MvxPresentationHint hint) { if (hint is MvxClosePresentationHint) { var finder = Mvx.Resolve<IMvxControlFinder>(); var control = finder.GetControl((hint as MvxClosePresentationHint).ViewModelToClose); if (control != null) control.ViewModel = null; else _viewPresenter.ChangePresentation(hint); } else _viewPresenter.ChangePresentation(hint); }
public override void ChangePresentation(MvxPresentationHint hint) { var closeHint = hint as MvxClosePresentationHint; if (closeHint != null && closeHint.ViewModelToClose.GetType() == typeof(SettingsViewModel)) { SettingsView.Current.Finish(); } else { base.ChangePresentation(hint); } }
public virtual async void ChangePresentation(MvxPresentationHint hint) { if (hint is MvxClosePresentationHint) { var mainPage = _mvxFormsApp.MainPage as NavigationPage; if (mainPage == null) { Mvx.TaggedTrace("MvxFormsPresenter:ChangePresentation()", "Shit, son! Don't know what to do"); } else { // TODO - perhaps we should do more here... also async void is a boo boo await mainPage.PopAsync(); } } }
public bool ChangePresentation(MvxPresentationHint hint) { throw new NotImplementedException(); }
public bool ChangePresentation(MvxPresentationHint hint) { var navigation = Mvx.Resolve<IMvxConsoleNavigation>(); return RequestMainThreadAction(() => navigation.ChangePresentation(hint)); }
private void ProcessActivePanelPresentation(MvxPresentationHint hint) { var activePresentationHint = hint as ActivePanelPresentationHint; if (activePresentationHint != null) { var panelHint = activePresentationHint; _activePanel = panelHint.ActivePanel; if (panelHint.ShowPanel) { ShowPanel(panelHint.ActivePanel); } } }
/// <summary> /// Changes the presentation. /// </summary> /// <param name="hint">The hint.</param> /// <returns>an exception.</returns> public bool ChangePresentation(MvxPresentationHint hint) { Hints.Add(hint); return true; }
public override void ChangePresentation(MvxPresentationHint hint) { _navigationStack.Pop(); var request = _navigationStack.Pop(); this.Show (request); }
public override void ChangePresentation(MvxPresentationHint hint) { base.ChangePresentation (hint); }
private void ProcessPopToRootPresentation(MvxPresentationHint hint) { var popHint = hint as PanelPopToRootPresentationHint; if (popHint != null) { var panelHint = popHint; switch (panelHint.Panel) { case PanelEnum.Center: if (CentrePanelUiNavigationController() != null) CentrePanelUiNavigationController().PopToRootViewController(false); break; case PanelEnum.Left: if (LeftPanelUiNavigationController() != null) LeftPanelUiNavigationController().PopToRootViewController(false); break; case PanelEnum.Right: if (RightPanelUiNavigationController() != null) RightPanelUiNavigationController().PopToRootViewController(false); break; } } }
private void ProcessResetRootPresentation(MvxPresentationHint hint) { var popHint = hint as PanelResetRootPresentationHint; if (popHint != null) { var panelHint = popHint; switch (panelHint.Panel) { case PanelEnum.Center: _jaSidePanelController.CenterPanel = null; break; case PanelEnum.Left: _jaSidePanelController.LeftPanel = null; break; case PanelEnum.Right: _jaSidePanelController.RightPanel = null; break; } } }
public override void ChangePresentation(Cirrious.MvvmCross.ViewModels.MvxPresentationHint hint) { base.ChangePresentation(hint); }
public override void ChangePresentation(MvxPresentationHint hint) { this.MasterNavigationController.PopViewController (true); }
public bool ChangePresentation(MvxPresentationHint hint) { CloseRequests.Add(null); return true; }
public override void ChangePresentation(MvxPresentationHint hint) { if (HandlePresentationChange(hint)) return; MvxTrace.Warning("Hint ignored {0}", hint.GetType().Name); }
public override void ChangePresentation(MvxPresentationHint hint) { MvxTrace.Warning("Hint ignored {0}", hint.GetType().Name); }
public bool ChangePresentation(MvxPresentationHint hint) { return RequestMainThreadAction(() => _presenter.ChangePresentation(hint)); }