Exemplo n.º 1
0
        public void SwitchPage(Enums.Pages page)
        {
            HideAllPages();
            switch (page)
            {
            case Enums.Pages.Home:
                SettingsCoverImage.gameObject.SetActive(true);

                HomePanel.SetActive(true);

                break;

            case Enums.Pages.Score:
                SettingsCoverImage.gameObject.SetActive(false);
                HomePanel.SetActive(true);
                ScorePanel.SetActive(true);
                break;

            case Enums.Pages.Shop:
                SettingsCoverImage.gameObject.SetActive(false);
                HomePanel.SetActive(true);
                PowerUpPanel.SetActive(true);
                break;

            case Enums.Pages.Tutorial:
                SettingsCoverImage.gameObject.SetActive(false);
                HomePanel.SetActive(true);
                TutorialPanel.SetActive(true);
                break;
            }
        }
Exemplo n.º 2
0
 public ActionResult Translate(Enums.Pages page, Languages lang, string tagId)
 {
     using (AbcUEMDbEntities db = new AbcUEMDbEntities())
     {
         if (lang == Languages.Mk)
         {
             return(Json(db.GetTranslate((int)page, tagId).ToList().Select(x => new
             {
                 Id = x.Id,
                 Title = x.TitleMk,
                 Description = x.DescriptionMk,
                 ImgPath = x.ImgPath
             }), JsonRequestBehavior.AllowGet));
         }
         else
         {
             return(Json(db.GetTranslate((int)page, tagId).ToList().Select(x => new
             {
                 Id = x.Id,
                 Title = x.TitleFr,
                 Description = x.DescriptionFr,
                 ImgPath = x.ImgPath
             }), JsonRequestBehavior.AllowGet));
         }
     }
 }
Exemplo n.º 3
0
        public void GoToPage(string fromPage, Enums.Pages page)
        {
            SetLastPage(fromPage);

            switch (fromPage)
            {
            case "Sensors":
                switch (page)
                {
                case Enums.Pages.ConfigurationVm:
                    ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.CurrentSensorsPage = ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.ConfigurationVm;
                    break;

                case Enums.Pages.ControllerVm:
                    ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.CurrentSensorsPage = ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.ControllerVm;
                    break;

                case Enums.Pages.SensorVm:
                    ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.CurrentSensorsPage = ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.SensorVm;
                    break;
                }
                break;

            case "Controllers":
                switch (page)
                {
                case Enums.Pages.ConfigurationVm:
                    ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.CurrentControllersPage = ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.ConfigurationVm;
                    break;

                case Enums.Pages.ControllerVm:
                    ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.CurrentControllersPage = ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.ControllerVm;
                    break;

                case Enums.Pages.SensorVm:
                    ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.CurrentControllersPage = ((ViewModelLocator)Application.Current.Resources["ViewModelLocator"]).VehicleConfigVm.SensorVm;
                    break;
                }
                break;
            }
        }