예제 #1
0
        private void method_4()
        {
            string  surveyStart    = SurveyHelper.SurveyStart;
            string  roadMapVersion = SurveyHelper.RoadMapVersion;
            NavBase navBase        = new NavBase();

            navBase.StartPage(surveyStart, roadMapVersion);
            string uriString = string.Format("pack://application:,,,/View/{0}.xaml", navBase.RoadMap.FORM_NAME);

            base.NavigationService.Navigate(new Uri(uriString));
            if (SurveyHelper.NavLoad == 0)
            {
                SurveyHelper.SurveySequence = 1;
            }
            SurveyHelper.NavCurPage  = navBase.RoadMap.PAGE_ID;
            SurveyHelper.CurPageName = navBase.RoadMap.FORM_NAME;
        }
        /// <summary>
        /// Property Name: GetNavigationStrategy.
        /// Method Purpose: This method used to create new navigation strategy object based on the passed navigation type.
        /// Author: Mena Armanyous.
        /// Modification Date: May 04, 2011.
        /// </summary>
        private void GetNavigationStrategyFromURL()
        {
            // clear all states from session before start a new navigation process.
            NavBase.ClearAllStates();

            // create a new navigation strategy object based on the passed navigation type.
            string lNavigationType = this.NavigationType;

            if (lNavigationType == enumNavigationStrategyType.CardPurchaseStrategy.ToString())
            {
                _NavBase = new NavCardPurchase(true);
            }
            else if (lNavigationType == enumNavigationStrategyType.ProductPurchaseStrategy.ToString())
            {
                _NavBase = new NavCardTopup(true);
            }
            else if (lNavigationType == enumNavigationStrategyType.CardRegisterationStrategy.ToString())
            {
                _NavBase = new NavCardRegistration(true);
            }
        }
예제 #3
0
        public MainPage()
        {
            MAINPAGE = this;

            ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar;

            titleBar.BackgroundColor               = Colors.Black;
            titleBar.ForegroundColor               = Colors.White;
            titleBar.ButtonBackgroundColor         = Colors.Black;
            titleBar.ButtonForegroundColor         = Colors.White;
            titleBar.InactiveBackgroundColor       = Colors.Black;
            titleBar.InactiveForegroundColor       = App.Colors.BUTTON_CLICK.Color;
            titleBar.ButtonInactiveBackgroundColor = Colors.Black;
            titleBar.ButtonHoverBackgroundColor    = App.Colors.BUTTON_IDLE_LEFT.Color;
            titleBar.ButtonHoverForegroundColor    = Colors.White;

            InitializeComponent();
            NavCharacter.SetPageType(PageType.CHARACTER);
            NavBase.SetPageType(PageType.BASE);
            NavCombat.SetPageType(PageType.COMBAT);
            NavSkills.SetPageType(PageType.SKILLS);
            NavFeats.SetPageType(PageType.FEATS);
            NavInventory.SetPageType(PageType.INVENTORY);
            NavSpells.SetPageType(PageType.SPELLS);
            NavParty.SetPageType(PageType.PARTY);
            NavSettings.SetPageType(PageType.SETTINGS);
            NavSettings1.SetPageType(PageType.SETTINGS);

            NewCharacter.SetLoadType(LoadType.NEW);
            LoadCharacter.SetLoadType(LoadType.LOAD);
            DeleteCharacter.SetLoadType(LoadType.DELETE);
            SortOptions.SetLoadType(LoadType.SORT);
            NavCharactersMenu.SetLoadType(LoadType.MENU);

            LoadCharacters();

            //ChangePage(NavCharacter);
        }
예제 #4
0
        public bool NextPage(NavBase navBase_0, NavigationService navigationService_0)
        {
            int    surveySequence = SurveyHelper.SurveySequence;
            string roadMapVersion = SurveyHelper.RoadMapVersion;
            string surveyID       = SurveyHelper.SurveyID;
            string navCurPage     = SurveyHelper.NavCurPage;

            navBase_0.PageStartTime   = SurveyHelper.PageStartTime;
            navBase_0.RecordFileName  = SurveyHelper.RecordFileName;
            navBase_0.RecordStartTime = SurveyHelper.RecordStartTime;
            SurveyRoadMap byPageId = oSurveyRoadMapDal.GetByPageId(navCurPage, roadMapVersion);
            string        text     = "#CircleGuide#CircleStart#EmptyJump#Recode#";
            string        value    = "#" + byPageId.FORM_NAME.ToUpper() + "#";
            bool          flag     = text.ToUpper().Contains(value);

            if (SurveyHelper.AutoCapture && !flag)
            {
                string str = SurveyHelper.SurveyID + "_" + SurveyHelper.NavCurPage + ((SurveyHelper.CircleACode == "") ? "" : ("_A" + SurveyHelper.CircleACode)) + ((SurveyHelper.CircleBCode == "") ? "" : ("_B" + SurveyHelper.CircleBCode)) + ".jpg";
                str = Directory.GetCurrentDirectory() + "\\Photo\\" + str;
                if (File.Exists(str))
                {
                    str = SurveyHelper.SurveyID + "_" + SurveyHelper.NavCurPage + ((SurveyHelper.CircleACode == "") ? "" : ("_A" + SurveyHelper.CircleACode)) + ((SurveyHelper.CircleBCode == "") ? "" : ("_B" + SurveyHelper.CircleBCode)) + "_" + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + ".jpg";
                    str = Directory.GetCurrentDirectory() + "\\Photo\\" + str;
                }
                method_0(str, (int)SurveyHelper.Screen_LeftTop);
            }
            try
            {
                if (navBase_0.GroupLevel == "")
                {
                    navBase_0.NextPage(surveyID, surveySequence, navCurPage, roadMapVersion);
                }
                else
                {
                    navBase_0.NextCirclePage(surveyID, surveySequence, navCurPage, roadMapVersion);
                    SurveyHelper.CircleACount   = navBase_0.CircleACount;
                    SurveyHelper.CircleACurrent = navBase_0.CircleACurrent;
                    if (navBase_0.IsLastA && (navBase_0.GroupPageType == 0 || navBase_0.GroupPageType == 2))
                    {
                        SurveyHelper.CircleACode     = "";
                        SurveyHelper.CircleACodeText = "";
                    }
                    if (navBase_0.GroupLevel == "B")
                    {
                        SurveyHelper.CircleBCount   = navBase_0.CircleBCount;
                        SurveyHelper.CircleBCurrent = navBase_0.CircleBCurrent;
                        if (navBase_0.IsLastB && (navBase_0.GroupPageType == 10 || navBase_0.GroupPageType == 12 || navBase_0.GroupPageType == 30 || navBase_0.GroupPageType == 32))
                        {
                            SurveyHelper.CircleBCode     = "";
                            SurveyHelper.CircleBCodeText = "";
                        }
                    }
                }
                string text2 = oLogicEngine.Route(navBase_0.RoadMap.FORM_NAME);
                SurveyHelper.RoadMapVersion = navBase_0.RoadMap.VERSION_ID.ToString();
                string uriString = string.Format("pack://application:,,,/View/{0}.xaml", text2);
                if (text2.Substring(0, 1) == "A")
                {
                    uriString = string.Format("pack://application:,,,/ViewProject/{0}.xaml", text2);
                }
                if (text2 == SurveyHelper.CurPageName)
                {
                    navigationService_0.Refresh();
                }
                else
                {
                    if (!FormIsOK(text2))
                    {
                        string text3 = string.Format(SurveyMsg.MsgErrorJump, surveyID, navCurPage, navBase_0.RoadMap.VERSION_ID, navBase_0.RoadMap.PAGE_ID, navBase_0.RoadMap.FORM_NAME);
                        MessageBox.Show(SurveyMsg.MsgErrorRoadmap + Environment.NewLine + Environment.NewLine + text3 + SurveyMsg.MsgErrorEnd, SurveyMsg.MsgCaption, MessageBoxButton.OK, MessageBoxImage.Hand);
                        oLogicEngine.OutputResult(text3, "CapiDebug.Log");
                        return(false);
                    }
                    navigationService_0.RemoveBackEntry();
                    navigationService_0.Navigate(new Uri(uriString));
                }
                SurveyHelper.SurveySequence = surveySequence + 1;
                SurveyHelper.NavCurPage     = navBase_0.RoadMap.PAGE_ID;
                SurveyHelper.CurPageName    = text2;
                SurveyHelper.NavGoBackTimes = 0;
                SurveyHelper.NavOperation   = "Normal";
                SurveyHelper.NavLoad        = 0;
            }
            catch (Exception)
            {
                string text4 = string.Format(SurveyMsg.MsgErrorJump, surveyID, navCurPage, navBase_0.RoadMap.VERSION_ID, navBase_0.RoadMap.PAGE_ID, navBase_0.RoadMap.FORM_NAME);
                MessageBox.Show(SurveyMsg.MsgErrorRoadmap + Environment.NewLine + Environment.NewLine + text4 + SurveyMsg.MsgErrorEnd, SurveyMsg.MsgCaption, MessageBoxButton.OK, MessageBoxImage.Hand);
                oLogicEngine.OutputResult(text4, "CapiDebug.Log");
                return(false);
            }
            return(true);
        }