Beispiel #1
0
        /// <summary>
        /// Navigates to the next node in the navigation graph.
        /// </summary>
        /// <param name="nextNode">The next node.</param>
        public override void Navigate(string nextNode)
        {
            string previousView = CurrentState.CurrentView;

            CurrentState.NavigateValue = nextNode;

            UIPManager.InvokeEventHandlers(CurrentState);

            ViewSettings nextView = UIPConfiguration.Config.GetNextViewSettings(
                Name,
                CurrentState.CurrentView,
                CurrentState.NavigateValue);

            CurrentState.CurrentView   = nextView.Name;
            CurrentState.NavigateValue = "";
            CurrentState.Save();

            try
            {
                ActivateNextView(previousView, CurrentState.CurrentView);
            }
            catch (System.Threading.ThreadAbortException) {}
            catch (Exception ex)
            {
                throw new UIPException(Resource.ResourceManager.FormatMessage(Resource.Exceptions.RES_ExceptionCantActivateView, nextView.Name) + UIPException.GetFirstExceptionMessage(ex), ex);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Activates the next view.
        /// </summary>
        /// <param name="nextView">The name of the next view to be activated.</param>
        public override void Navigate(string nextView)
        {
            string previousView = CurrentState.CurrentView;

            CurrentState.CurrentView   = nextView;
            CurrentState.NavigateValue = "";

            UIPManager.InvokeEventHandlers(CurrentState);
            CurrentState.Save();
            try
            {
                ViewManager.ActivateView(previousView, CurrentState.CurrentView, this);
            }
            catch (System.Threading.ThreadAbortException) {}
            catch (Exception ex)
            {
                throw new UIPException(Resource.ResourceManager.FormatMessage(Resource.Exceptions.RES_ExceptionCantActivateView, nextView) + UIPException.GetFirstExceptionMessage(ex), ex);
            }
        }