/// <summary>
        /// Creates a new popup page to edit live waypoint properties
        /// </summary>
        /// <param name="liveWaypoint">live waypoint to edit</param>
        public AddLiveWaypointPopupPage(Location liveWaypoint)
        {
            this.CloseWhenBackgroundIsClicked = true;

            this.InitializeComponent();

            this.BindingContext = this.viewModel = new AddLiveWaypointPopupViewModel(liveWaypoint);
        }
Пример #2
0
        public void TestDefaultCtor()
        {
            // set up
            var location = UnitTestHelper.GetDefaultLocation();

            location.Type = LocationType.LiveWaypoint;

            // run
            var viewModel = new AddLiveWaypointPopupViewModel(location);

            // check
            Assert.AreEqual(location.Name, viewModel.Name, "location mame must match");
            Assert.IsTrue(viewModel.Type.Any(), "location type must contain text");

            // modify values
            viewModel.Name = "Live42";
        }