void ReleaseDesignerOutlets() { if (MapButton != null) { MapButton.Dispose(); MapButton = null; } if (RatingButton != null) { RatingButton.Dispose(); RatingButton = null; } if (RestaurantImageView != null) { RestaurantImageView.Dispose(); RestaurantImageView = null; } if (TableView != null) { TableView.Dispose(); TableView = null; } }
public MovieViewForm(Movie selectedMovie, Customer CurrentUser, bool canRate, CustomerForm parent) { this.parent = parent; this.canRate = canRate; movie = selectedMovie; user = CurrentUser; InitializeComponent(); NameLabel.Text = movie.Name; GenreLabel.Text = movie.Genre; RatingLabel.Text = movie.Rating.ToString(); CopyLabel.Text = movie.Num_copies.ToString(); BindingList <Actor> actors = DBEnvironment.RetrieveActors(); Starred starred = new Starred(actors.ToArray(), null, movie); actorsInMovie = DBEnvironment.GetStarred(movie); MovieCastLabel.Text = CreateStarredText(); RatingSlider.Hide(); RatingButton.Hide(); if (!canRate) { return; } RatingSlider.Show(); RatingButton.Show(); RentButton.Hide(); }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); NavigationItem.Title = ViewModel.Item.Name; NavigationController.HidesBarsOnSwipe = false; NavigationController.SetNavigationBarHidden(false, true); RatingButton.SetImage(UIImage.FromBundle(ViewModel.Rating.ToString()), UIControlState.Normal); }
public override void ViewDidLoad() { base.ViewDidLoad(); ObjCRuntime.Class.ThrowOnInitFailure = false; CallButton.TouchUpInside += delegate { var url = new NSUrl("tel:" + GelenMekan.telephone); UIApplication.SharedApplication.OpenUrl(url); }; RatingButton.SetTitle(Math.Round(Convert.ToDouble(GelenMekan.rating), 1).ToString(), UIControlState.Normal); mekanTitle.Text = GelenMekan.name; KonumButton.TouchUpInside += KonumButton_TouchUpInside; BekletmeButton.TouchUpInside += BekletmeButton_TouchUpInside; CheckinButton.TouchUpInside += CheckinButton_TouchUpInside; RatingButton.TouchUpInside += RatingButton_TouchUpInside; MekandakilerButton.TouchUpInside += MekandakilerButton_TouchUpInside; BackButton.TouchUpInside += BackButton_TouchUpInside; MessageButton.TouchUpInside += MessageButton_TouchUpInside; }