コード例 #1
0
        void ReleaseDesignerOutlets()
        {
            if (DistanceLabel != null)
            {
                DistanceLabel.Dispose();
                DistanceLabel = null;
            }

            if (MapView != null)
            {
                MapView.Dispose();
                MapView = null;
            }

            if (PhotosButton != null)
            {
                PhotosButton.Dispose();
                PhotosButton = null;
            }

            if (RatingLabel != null)
            {
                RatingLabel.Dispose();
                RatingLabel = null;
            }

            if (ReviewsButton != null)
            {
                ReviewsButton.Dispose();
                ReviewsButton = null;
            }

            if (StartImage != null)
            {
                StartImage.Dispose();
                StartImage = null;
            }

            if (PlaceNameLabel != null)
            {
                PlaceNameLabel.Dispose();
                PlaceNameLabel = null;
            }
        }
コード例 #2
0
        public override void Awake(NSObject context)
        {
            viewModel = ServiceContainer.Resolve <DetailsViewModel> ();

            RatingLabel.SetText(viewModel.Place.Rating.ToString());
            DistanceLabel.SetText(CoffeeFilterViewModel.GetDistanceToPlace(viewModel.Place, viewModel.Position));
            PlaceNameLabel.SetText(viewModel.Place.Name);

            SetMapRegion();
            AddMapAnnotation();
            EnableButtons(false);
            UpdatePlaceInfo();

                        #if !DEBUG
            Xamarin.Insights.Track("AppNav", new Dictionary <string, string> {
                { "page", "details" },
                { "name", viewModel.Place.Name }
            });
                        #endif
        }