Beispiel #1
0
        public void BookmarkListFrameConstructorTest()
        {
            BackgroundMapLayer.Instance.setLayoutProperties(500, 500, Orientation.Vertical);

            Point pt = new Point(200, 200);
            double orientation = 180.00;
            BookmarkListFrame target = new BookmarkListFrame(pt, orientation);
            Assert.AreEqual(pt, target.Center);
            Assert.AreEqual(orientation, target.Orientation);
        }
Beispiel #2
0
        public void AddBookmarkTest()
        {
            BackgroundMapLayer tpScatterView = BackgroundMapLayer.Instance;
            tpScatterView.setLayoutProperties(500, 500, Orientation.Vertical);

            Point pt = new Point(200, 200);
            double orientation = 180.00;
            BookmarkListFrame target = new BookmarkListFrame(pt, orientation);
            Bookmark bookmark = new Bookmark(new ESRI.ArcGIS.Client.Geometry.Envelope(), "Test Description", "123", Bookmark.BookmarkPriority.High);
            BookmarkListItem expected = new BookmarkListItem(bookmark);
            BookmarkListItem actual;
            actual = target.AddBookmark(bookmark);
            Assert.AreEqual(expected, actual);
        }
 /// <summary>
 /// Removes a BookmarkListFrame, if it already exists on the layer.
 /// </summary>
 /// <param name="deleteFrame">BookmarkListFrame to be deleted</param>
 public void RemoveBookmarkListFrame(BookmarkListFrame deleteFrame)
 {
     if (bookmarkListFramesList.Contains(deleteFrame))
         bookmarkListFramesList.Remove(deleteFrame);
     if (BackgroundScatterView.Items.Contains(deleteFrame))
         BackgroundScatterView.Items.Remove(deleteFrame);
 }
        /// <summary>
        /// Add the bookmark list widget to the background layer.
        /// </summary>
        /// <param name="pt">Location where the list should be placed</param>
        /// <param name="orientation">Orientation of the bookmark list widget</param>
        /// <returns></returns>
        public BookmarkListFrame AddBookmarkListFrame(Point pt, double orientation)
        {
            BookmarkListFrame ttlFrame = new BookmarkListFrame(pt, orientation);
            bookmarkListFramesList.Add(ttlFrame);

            BackgroundScatterView.Items.Add(ttlFrame);

            return ttlFrame;
        }