示例#1
0
        public ReportWindow(Land land, Earthwatcher earthwatcher)
        {
            InitializeComponent();

            commentRequests    = new CommentRequests(Constants.BaseApiUrl);
            collectionRequests = new CollectionRequests(Constants.BaseApiUrl);
            landRequests       = new LandRequests(Constants.BaseApiUrl);
            hexagonLayer       = (HexagonLayer)Current.Instance.LayerHelper.FindLayer(Constants.Hexagonlayername);
            bcLayer            = (BasecampLayer)Current.Instance.LayerHelper.FindLayer(Constants.BasecampsLayer); //TEST
            //Add event listeners
            commentRequests.CommentsByLandReceived += CommentRequestCommentsByLandReceived;
            collectionRequests.NewItemReceived     += collectionRequests_NewItemReceived;
            collectionRequests.ItemsCountReceived  += collectionRequests_ItemsCountReceived;
            collectionRequests.GetTotalItems(Current.Instance.Earthwatcher.Id);
            Current.Instance.MapControl.zoomFinished += MapControlZoomFinished;
            Current.Instance.MapControl.zoomStarted  += MapControlZoomStarted;


            landRequests = new LandRequests(Constants.BaseApiUrl);
            landRequests.StatusChanged     += SetLandStatusStatusChanged;
            landRequests.ConfirmationAdded += landRequests_ConfirmationAdded;

            hexagonLayer = (HexagonLayer)Current.Instance.LayerHelper.FindLayer(Constants.Hexagonlayername);

            this.Loaded += ReportWindow_Loaded;

            this.ShareStoryBoard.Completed += ShareStoryBoard_Completed;
        }
示例#2
0
        //Initialization
        public UserPanel()
        {
            InitializeComponent();

            collectionRequests = new CollectionRequests(Constants.BaseApiUrl);
            collectionRequests.ItemsReceived += collectionRequests_ItemsReceived;

            this.Loaded += UserPanel_Loaded;

            this.DataContext = Current.Instance.Earthwatcher;
        }
示例#3
0
        public Collections(CollectionItem item)
        {
            InitializeComponent();
            _item = item;
            collectionRequests = new CollectionRequests(Constants.BaseApiUrl);
            collectionRequests.ItemsReceived          += collectionRequests_ItemsReceived;
            this.FoundedStoryBoard.Completed          += FoundedStoryBoard_Completed;
            this.HighlightFoundedStoryBoard.Completed += HighlightFoundedStoryBoard_Completed;

            rm = new System.Resources.ResourceManager(typeof(Earthwatchers.UI.Resources.Labels));
            this.PrizeText.Text          = rm.GetString(_item.Name).ToUpper();
            this.CollectionNameText.Text = rm.GetString(_item.CollectionName);
            this.Image3.Source           = Earthwatchers.UI.Resources.ResourceHelper.GetBitmap(string.Format("/Resources/Images/Collections/{0}", _item.Icon));
            ToolTipService.SetToolTip(this.Image3Border, rm.GetString(_item.Name));
        }