コード例 #1
0
        void AddTapGestureToNextLabel()
        {
            NextLabel.UserInteractionEnabled = true;
            NextLabel.AddGestureRecognizer(new UITapGestureRecognizer(async() =>
            {
                Console.WriteLine("NextLabel tapped");

                //check if fields are filled
                if (string.IsNullOrWhiteSpace(SecretFileNameLabel.Text) || string.IsNullOrWhiteSpace(DescriptionTextView.Text) ||
                    string.Equals(SecretFileNameLabel.Text, SecretFileNameLabel.Placeholder) || string.Equals(DescriptionTextView.Text, descriptionPlaceholderText))
                {
                    UserDialogs.Instance.Alert("Please fill in all fields");
                }
                else
                {
                    //create new secret file in DB
                    var saved = await GlobalVars.CloudDB.SaveGroupsItemsTaskAsync(new GroupItem
                    {
                        groupName  = SecretFileNameLabel.Text,
                        groupDesc  = DescriptionTextView.Text,
                        groupImage = ""
                    });

                    //go to next page if saved
                    if (saved)
                    {
                        GoToNextPage();
                    }
                    else
                    {
                        UserDialogs.Instance.Alert("Couldn't save the Secret File. Please check your internet connection");
                    }
                }
            }));
        }
コード例 #2
0
        void ReleaseDesignerOutlets()
        {
            if (CloseButton != null)
            {
                CloseButton.Dispose();
                CloseButton = null;
            }

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

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

            if (SecretFileNameLabel != null)
            {
                SecretFileNameLabel.Dispose();
                SecretFileNameLabel = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (BackgroundView != null)
            {
                BackgroundView.Dispose();
                BackgroundView = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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