public override void ViewDidDisappear(bool animated)
        {
            base.ViewDidDisappear(animated);
            if (BackgroundImageView != null)
            {
                BackgroundImageView.RemoveFromSuperview();
                BackgroundImageView.Dispose();
                BackgroundImageView = null;
            }
            if (LogoImageView != null)
            {
                LogoImageView.RemoveFromSuperview();
                LogoImageView.Dispose();
                LogoImageView = null;
            }

            if (loadingOverlay != null)
            {
                loadingOverlay.Hide();
                loadingOverlay = null;
                //loadingOverlay.Dispose();
            }
            //classifications.Clear();
            //CollectionView.ReloadData();
            //CollectionView.DataSource = null;
        }
Example #2
0
        /// <summary>
        /// Updates the user interface to match the content.
        /// </summary>
        private void UpdateUserInterfaceFromContent()
        {
            BackgroundImageView.SetImageBitmap(BackgroundImage);

            MenuBarView.SetButtons(MenuData.Buttons.Select(b => b.Title).ToList());
            MenuBarView.RequestFocus();
        }
        void ReleaseDesignerOutlets()
        {
            if (BackgroundImageView != null)
            {
                BackgroundImageView.Dispose();
                BackgroundImageView = null;
            }

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

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

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

            if (Title != null)
            {
                Title.Dispose();
                Title = null;
            }
        }
Example #4
0
        void ReleaseDesignerOutlets()
        {
            if (TableView != null)
            {
                TableView.Dispose();
                TableView = null;
            }

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

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

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

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

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

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

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

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
Example #5
0
        public async override void ViewDidLoad()
        {
            base.ViewDidLoad();

            Title.SetControl(TitleControl);
            Description.SetControl(DescriptionControl);
            await Image.SetControl(ImageControl);

            await BackgroundImageView.SetControl(BackgroundImage);
        }
Example #6
0
        private void CustomizeBackgroundImage()
        {
            BackgroundImageView.Image = RestaurantMO.GetImage();
            var blurEffect     = UIBlurEffect.FromStyle(UIBlurEffectStyle.Light);
            var blurEffectView = new UIVisualEffectView(blurEffect);

            blurEffectView.Frame = View.Bounds;
            BackgroundImageView.AddSubview(blurEffectView);

            blurEffectView.TranslatesAutoresizingMaskIntoConstraints = false;
            blurEffectView.TopAnchor.ConstraintEqualTo(BackgroundImageView.TopAnchor).Active       = true;
            blurEffectView.BottomAnchor.ConstraintEqualTo(BackgroundImageView.BottomAnchor).Active = true;
            blurEffectView.LeftAnchor.ConstraintEqualTo(BackgroundImageView.LeftAnchor).Active     = true;
            blurEffectView.RightAnchor.ConstraintEqualTo(BackgroundImageView.RightAnchor).Active   = true;
        }
        void ReleaseDesignerOutlets()
        {
            if (BackgroundImageView != null) {
                BackgroundImageView.Dispose ();
                BackgroundImageView = null;
            }

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

            if (TitleLabel != null) {
                TitleLabel.Dispose ();
                TitleLabel = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AttachmentImageView != null)
            {
                AttachmentImageView.Dispose();
                AttachmentImageView = null;
            }

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

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

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

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

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

            if (StatusTick != null)
            {
                StatusTick.Dispose();
                StatusTick = null;
            }
        }
Example #9
0
        void ReleaseDesignerOutlets()
        {
            if (AngryButton != null)
            {
                AngryButton.Dispose();
                AngryButton = null;
            }

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

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

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

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

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

            if (SadButton != null)
            {
                SadButton.Dispose();
                SadButton = null;
            }
        }
Example #10
0
        async void Update(Album album)
        {
            LineView.BackgroundColor = NSColor.SecondaryLabelColor;
            TitleLabel.StringValue   = album?.Name ?? "";
            var detailString = album?.Artist ?? "";

            if (album?.Year > 0)
            {
                detailString = $"{album.Artist} • {album.Year}";
            }

            DetailLabel.StringValue = detailString;
            TableView.Source        = new AlbumDetailsTwinListViewModel {
                Album = album, AutoPlayOnSelect = false
            };
            this.ResizeSubviewsWithOldSize(Bounds.Size);
            await Task.WhenAll(ImageView.LoadFromItem(album),
                               BackgroundImageView.LoadFromItem(album, (float)ImageView.Bounds.Width));
        }
Example #11
0
        void ReleaseDesignerOutlets()
        {
            if (DriveButton != null)
            {
                DriveButton.Dispose();
                DriveButton = null;
            }

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

            if (BackgroundImageView != null)
            {
                BackgroundImageView.Dispose();
                BackgroundImageView = null;
            }
        }
Example #12
0
        /// <summary>
        /// Updates the user interface to match our content.
        /// </summary>
        private void UpdateUserInterfaceFromContent()
        {
            BackgroundImageView.SetImageBitmap(BackgroundImage);
            TitleView.Text = PosterData.Title;

            //
            // Initialize the adapter list.
            //
            PosterItemsAdapter.Clear();
            foreach (var item in PosterData.Items)
            {
                PosterItemsAdapter.Add(item.Title);
            }

            //
            // Notify the list view that the content has changed and give it
            // input focus.
            //
            PosterItemsAdapter.NotifyDataSetChanged();
            PosterItems.RequestFocus();
        }
Example #13
0
        void ReleaseDesignerOutlets()
        {
            if (BackButton != null)
            {
                BackButton.Dispose();
                BackButton = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if (WhatIsSeekiosButton != null)
            {
                WhatIsSeekiosButton.Dispose();
                WhatIsSeekiosButton = null;
            }
        }
Example #14
0
        void ReleaseDesignerOutlets()
        {
            if (ActivityIndicator != null)
            {
                ActivityIndicator.Dispose();
                ActivityIndicator = null;
            }

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

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

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

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

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

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

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

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

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

            if (TwitterButtonCenterYConstraint != null)
            {
                TwitterButtonCenterYConstraint.Dispose();
                TwitterButtonCenterYConstraint = null;
            }
        }
        public void LoadBackgroundImages()
        {
            if (BackgroundImageView != null)
            {
                BackgroundImageView.RemoveFromSuperview();
                BackgroundImageView.Dispose();
                BackgroundImageView = null;
            }
            if (LogoImageView != null)
            {
                LogoImageView.RemoveFromSuperview();
                LogoImageView.Dispose();
                LogoImageView = null;
            }


            Random rnd          = new Random();
            var    randomDouble = (int)(rnd.NextDouble() * 10) - 1;

            if (randomDouble < 0 || randomDouble > 9)
            {
                randomDouble = 0;
            }

            var imageName = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ? "tablet_back" : "background";
            //var sourceImage = HelperMethods.GetImageFromCacheOrDefault(AppDelegate.FirstAd.ImageURL);
            var sourceImage  = UIImage.FromBundle(imageName + randomDouble + ".png");
            var resizedImage = sourceImage.ScaleImageToPreventHorizontalWhiteSpace(View.Frame.Size.Width);

            BackgroundImageView             = new UIImageView(resizedImage);
            BackgroundImageView.ContentMode = UIViewContentMode.ScaleAspectFit;

            var extraYForNewFrameBelowNavBar = UIApplication.SharedApplication.StatusBarFrame.Height + NavigationController.NavigationBar.Bounds.Height;

            var currentFrame = BackgroundImageView.Frame;

            BackgroundImageView.Frame = new CoreGraphics.CGRect(currentFrame.X, currentFrame.Y + extraYForNewFrameBelowNavBar, currentFrame.Width, currentFrame.Height);

            //this.CollectionView.Add(BackgroundImageView);

            this.CollectionView.BackgroundView = BackgroundImageView;
            var logoImage        = UIImage.FromBundle("home_logo.png");
            var resizedLogoImage = logoImage.ScaleImageToPreventHorizontalWhiteSpace(View.Frame.Size.Width * .8f);

            LogoImageView             = new UIImageView(resizedLogoImage);
            LogoImageView.ContentMode = UIViewContentMode.ScaleAspectFit;

            var currentLogoFrame = LogoImageView.Frame;

            LogoImageView.Frame = new CoreGraphics.CGRect((View.Bounds.Width - currentLogoFrame.Width) / 2, View.Bounds.Height * (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ? .525 : .6), currentLogoFrame.Width, currentLogoFrame.Height);

            this.View.Add(LogoImageView);

            //View.SendSubviewToBack(LogoImageView);

            this.CollectionView.BackgroundColor = UIColor.White.ColorWithAlpha(.8f);

            //this.View.BringSubviewToFront(this.CollectionView);



            classifications = new List <IClassification>();

            if (!Settings.IsRegistered)
            {
                classifications.Add(new Amphibian());
                classifications.Add(new Commercial());

                classifications.Add(new Experimental());
                classifications.Add(new Helicopter());

                classifications.Add(new LightSport());
                classifications.Add(new Jet());
                classifications.Add(new SingleEngine());
                classifications.Add(new PCL.Single());
                classifications.Add(new TwinPiston());
                classifications.Add(new TwinTurbine());
                classifications.Add(new Vintage());
                classifications.Add(new Warbird());
            }
            else
            {
                if (Settings.IsAmphibian)
                {
                    classifications.Add(new Amphibian());
                }

                if (Settings.IsCommercial)
                {
                    classifications.Add(new Commercial());
                }



                if (Settings.IsExperimental)
                {
                    classifications.Add(new Experimental());
                }
                if (Settings.IsHelicopter)
                {
                    classifications.Add(new Helicopter());
                }



                if (Settings.IsLightSport)
                {
                    classifications.Add(new LightSport());
                }


                if (Settings.IsJets)
                {
                    classifications.Add(new Jet());
                }
                if (Settings.IsSingleEngine)
                {
                    classifications.Add(new SingleEngine());
                }
                if (Settings.IsSingles)
                {
                    classifications.Add(new PCL.Single());
                }
                if (Settings.IsTwinPistons)
                {
                    classifications.Add(new TwinPiston());
                }
                if (Settings.IsTwinTurbines)
                {
                    classifications.Add(new TwinTurbine());
                }
                if (Settings.IsVintage)
                {
                    classifications.Add(new Vintage());
                }
                if (Settings.IsWarbirds)
                {
                    classifications.Add(new Warbird());
                }
            }
        }
Example #16
0
        void ReleaseDesignerOutlets()
        {
            if (BackgroundImageView != null)
            {
                BackgroundImageView.Dispose();
                BackgroundImageView = null;
            }

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

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

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

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

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

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

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

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

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

            if (AccountsView != null)
            {
                AccountsView.Dispose();
                AccountsView = null;
            }
        }
Example #17
0
 /// <summary>
 /// Updates the user interface to match the content.
 /// </summary>
 private void UpdateUserInterfaceFromContent()
 {
     BackgroundImageView.SetImageBitmap(BackgroundImage);
     BackgroundImageView.RequestFocus();
 }