private ControllerBase GetControllerForView(IView view) { string viewForController = view.ViewName; if (!_viewManager.IsRequestCurrentView(view, _state.CurrentView)) { if (UIPConfiguration.Config.AllowBackButton) { viewForController = _viewManager.GetViewNameForCurrentRequest(view); if (RunningInNavGraph) { if (UIPConfiguration.Config.ViewExistsInNavigationGraph(_state.NavigationGraph, viewForController)) { _state.CurrentView = viewForController; } } else { _state.CurrentView = viewForController; } } } return(ControllerFactory.Create(viewForController, this)); }
private void StartTask(TaskArgumentsHolder args) { ControllerBase firstController = ControllerFactory.Create(_startView.Name, this); firstController.EnterTask(null); CurrentState.CurrentView = _startView.Name; CurrentState.Save(); try { ViewManager.ActivateView(null, _startView.Name, this, args); } catch (System.Threading.ThreadAbortException) {} catch (Exception ex) { throw new UIPException(Resource.ResourceManager.FormatMessage(Resource.Exceptions.RES_ExceptionCantActivateView, _startView.Name) + UIPException.GetFirstExceptionMessage(ex), ex); } }
private void StartTask(TaskArgumentsHolder holder) { CurrentState.NavigationGraph = Name; if (CurrentState.CurrentView != null && CurrentState.CurrentView.Length > 0) { _startView = UIPConfiguration.Config.GetViewSettingsFromName(CurrentState.CurrentView); } ControllerBase firstController = ControllerFactory.Create(StartView.Name, this); firstController.EnterTask(holder); CurrentState.CurrentView = StartView.Name; CurrentState.NavigateValue = ""; CurrentState.Save(); try { ViewManager.ActivateView(null, StartView.Name, this); } catch (System.Threading.ThreadAbortException) {} catch (Exception ex) { throw new UIPException(Resource.ResourceManager.FormatMessage(Resource.Exceptions.RES_ExceptionCantActivateView, StartView.Name) + UIPException.GetFirstExceptionMessage(ex), ex); } }