Esempio n. 1
0
        public AttractionPage()
        {
            InitializeComponent();
            //attractionImage.HeightRequest = Content.Height * 3 / 4;
            //attractionImage.WidthRequest = Content.Width;
            gc = GameController.getInstance();
            this.attraction = gc.currentTrip.GetCurrentAttraction();
            //attractionName.Text = this.attraction.name;
            string mainPictureUrl = this.attraction.GetMainPictureUrl();

            //attractionImage.Source = ImageSource.FromStream(
            //() => new MemoryStream(Convert.FromBase64String(mainPictureUrl)));
            //attractionImage.Source = mainPictureUrl;
            //attractionImage.IsVisible = !mainPictureUrl.Equals("");
            //watchAgainButton.IsVisible = !this.attraction.GetARURL().Equals("");
            entertainment = gc.currentTrip.GetCurrentAttraction().entertainment;
            //if (entertainment != null)
            //    missionButton.Text = entertainment.EntertainmentName();
            if (entertainment == null)
            {
                missionButton.IsVisible = false;
                or.IsVisible            = false;
            }
            //informationButton.Source = ServerConection.URL_MEDIA + "information.png";
            subtitles.Source = ServerConection.URL_MEDIA + "subtitles.jpg";
            info.Source      = ServerConection.URL_MEDIA + "info.jpg";
            playVideo.Source = ServerConection.URL_MEDIA + "playVideo.jpg";
            mapBtn.Source    = ServerConection.URL_MEDIA + "map.png";
            map           = MapPage.GetInstance();
            isFirstAppear = true;
        }
Esempio n. 2
0
 public static MapPage GetInstance()
 {
     if (instance == null)
     {
         instance = new MapPage();
     }
     return(instance);
 }
Esempio n. 3
0
        public NavigationPage()
        {
            InitializeComponent();
            gc = GameController.getInstance();
            leftArrow.Source           = ServerConection.URL_MEDIA + "leftArrow.jpg";
            rightArrow.Source          = ServerConection.URL_MEDIA + "rightArrow.jpg";
            temperature.Source         = ServerConection.URL_MEDIA + "thermometer.jpg";
            v.Source                   = ServerConection.URL_MEDIA + "v.png";
            odometer.Maximum           = 1;
            odometer.Minimum           = 0;
            odometer.MinimumTrackColor = Color.FromHex("#0066ff");
            odometer.MaximumTrackColor = Color.FromHex("#0066ff");
            odometer.Value             = 0;
            odometer.WidthRequest      = temperature.HeightRequest;
            //hintBtn.Padding = 0;
            //hintBtn.WidthRequest = hintFrame.Width;
            //hintBtn.Margin = new Thickness(
            //    leftArrow.Width + hintFrame.Margin.Left + hintFrame.Padding.Left - 5,
            //    10,
            //    hintFrame.Margin.Right + hintFrame.Padding.Right,
            //    10);
            nextAttraction = gc.currentTrip.GetCurrentAttraction();
            myMap          = MapPage.GetInstance();
            mapBtn.Source  = ServerConection.URL_MEDIA + "map.png";
            //mapBtn = myMap.map;
            AttachHint(0);

            lc            = LocationController.GetInstance();
            attractionLoc = new trumpeldor.SheredClasses.Point(nextAttraction.x, nextAttraction.y);
            if (isFirst)
            {
                isFirst = false;
                //Task.Run(() => TimerCheck()).ConfigureAwait(false);
                //TimerCheck();
            }
            myMap.AddCurrlocationToMap(gc.GetUserLocation());
            TimerCheck();
        }