コード例 #1
0
        private void MainPageLoaded(object sender, RoutedEventArgs e)
        {
            //Land Events
            landRequest.LandReceived += LandChanged;
            landRequest.LandsReceived += landRequest_LandsReceived;
            landRequest.VerifiedLandCodesReceived += landRequest_VerifiedLandCodesReceived;
            landRequest.CheckPercentageReceived += landRequest_CheckPercentageReceived;
            landRequest.PresicionPercentageReceived += landRequest_PresicionPercentageReceived;

            //Jaguar, DailyMessage, Contest Events
            jaguarRequests.PositionReceived += jaguarRequests_PositionReceived;
            popupMessageRequests.MessageReceived += popupMessageRequests_MessageReceived;
            contestRequests.ContestReceived += contestRequests_ContestReceived;

            //Tutorial Events
            StoryBoardTutorialUI0.Completed += StoryBoardTutorialUI0_Completed; //termino de mostrar el mapa y los textos
            StoryBoardLoadingTutorialUI0.Completed += StoryBoardLoadingTutorialUI0_Completed; //termino de mostrar el mapa y el loading para cargarlos
            StoryBoardTutorialUI1.Completed += StoryBoardTutorialUI1_Completed; //termino de presentarle la parcela y dejo el boton [mi parcela] titilando

            //Layers Events
            this.OpacitiesStoryBoard.Completed += OpacitiesStoryBoard_Completed;
            this.layerList.ChangingOpacity += layerList_ChangingOpacity;
            this.layerList.HexLayerVisibilityChanged += layerList_HexLayerVisibilityChanged;
            this.layerList.ArgentineLawLayerLayerVisibilityChanged += layerList_ArgentineLawLayerLayerVisibilityChanged;
            this.layerList.ArgentineLawLoaded += layerList_ArgentineLawLoaded;
            this.layerList.ArgentineLawLoading += layerList_ArgentineLawLoading;
            this.ChangeOpacityStoryBoard.Completed += ChangeOpacityStoryBoard_Completed;

            HtmlPage.RegisterScriptableObject("Credentials", this);

            //Create and set map
            var map = new Map();
            mapControl.Map = map;

            //Initialize the singleton
            Current.Instance.MapControl = mapControl;

            //Pass the LayerCollection used on the map to the helper, this is used to distinguish base, normal, ... layers
            layerHelper = new LayerHelper(map.Layers);

            //Activate GeoHexCode Search only if admin
            if (Current.Instance.Earthwatcher.Role == Role.Admin)
            {
                this.TestGeoHexTextBox.Visibility = Visibility.Visible;
            }

            Current.Instance.LayerHelper = layerHelper;

            //Load the preset layers
            LayerInitialization.Initialize(layerHelper);
            layerList.SetLayerHelper(layerHelper);

            //Report Window First And Unic Inicialization
            reportWindow = new ReportWindow(new Land(), Current.Instance.Earthwatcher);
            reportWindow.ReportWindowClosed += reportWindow_ReportWindowClosed;
            reportWindow.CollectionCompleted += reportWindow_CollectionCompleted;
            reportWindow.ReportWindowDemand += reportWindow_ReportWindowDemand;
            reportWindow.Shared += reportWindow_Shared;
            reportWindow.ReportWindowConfirmationEnded += reportWindow_ReportWindowConfirmationEnded;
            reportWindow.ReportWindowLandStatusChanged += reportWindow_ReportWindowLandStatusChanged;
            landInfoWrapper.Children.Add(reportWindow);

            //Get PlayingRegion Object
            regionRequest.GetById(Current.Instance.Earthwatcher.PlayingRegion);

            //GetShareTexts for region and language
            customShareTextRequest.GetByRegionIdAndLanguage(Current.Instance.Earthwatcher.PlayingRegion, Current.Instance.Earthwatcher.Language);

            MapControl_zoomFinished(null, null);
            MapControl_zoomStarted(null, null);
            scoreRequest.GetByUser(Current.Instance.Earthwatcher.Id);
        }
コード例 #2
0
 private void Report_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     this.HighlightStoryBoard.Stop();
     if (selectedLand.DemandAuthorities)
     {
         DemandWindow demandWindow = new DemandWindow(selectedLand, selectedEarthwatcher);
         demandWindow.Demand += reportWindow_Demand;
         demandWindow.Show();
     }
     else
     {
         ReportWindow reportWindow = new ReportWindow(selectedLand, selectedEarthwatcher);
         reportWindow.Closed += reportWindow_Closed;
         reportWindow.ConfirmationEnded += reportWindow_ConfirmationEnded;
         reportWindow.Demand += reportWindow_Demand;
         reportWindow.LandStatusChanged += reportWindow_LandStatusChanged;
         reportWindow.Shared += reportWindow_Shared;
         reportWindow.Show();
     }
 }