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;
        }
        public CommentScreen(int landId, ObservableCollection<Earthwatchers.Models.Comment> comments)
        {
            if (comments == null) return;

            InitializeComponent();
            commentRequests = new CommentRequests(Constants.BaseApiUrl);
            this.landId = landId;
            this.comments = comments;
            KeyDown += CommentScreenKeyDown;
            LoadComments();
        }
Exemplo n.º 3
0
        public HexagonInfo()
        {
            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;
            Current.Instance.MapControl.zoomFinished += MapControlZoomFinished;
            Current.Instance.MapControl.zoomStarted += MapControlZoomStarted;

            HtmlPage.RegisterScriptableObject("HexagonInfo", this);
            collectionRequests.GetTotalItems(Current.Instance.Earthwatcher.Id);
        }