コード例 #1
0
        private void ShowImagesCollectionView()
        {
            if (AllowUserCompletion)
            {
                btnSubmitChallenge.UserInteractionEnabled = true;
                btnSubmitChallenge.SetBackgroundImage(UIImage.FromBundle("challenge-btn_submit"), UIControlState.Normal);//btnSubmitChallenge.Alpha = 1;
            }
            else
            {
                btnSubmitChallenge.UserInteractionEnabled = false;
                btnSubmitChallenge.SetBackgroundImage(new UIImage(), UIControlState.Normal);//btnSubmitChallenge.Alpha = 0.25f;
            }

            CollectionView.Hidden         = false;
            bottomButtonsContainer.Hidden = false;

            vCameraCenter.Hidden         = true;
            vDescriptionContainer.Hidden = true;
            submitContainer.Hidden       = true;

            CameraButton.SetBackgroundImage(UIImage.FromBundle("challenge-btn_photo"), UIControlState.Normal);

            UploadedCountText.Text = AllImagesCount.ToString();

            if (_collectionSource != null)
            {
                ImagesAttach.ForEach(x => x.Description = DescriptionText.Text);
                Images.AddRange(ImagesAttach);
                _collectionSource.Pictures = Images;
                RefreshCollections();
            }
        }
コード例 #2
0
        private void ShowAddDescriptionView()
        {
            vDescriptionContainer.Hidden = false;
            submitContainer.Hidden       = false;

            vCameraCenter.Hidden          = true;
            CollectionView.Hidden         = true;
            bottomButtonsContainer.Hidden = true;

            DescriptionText.Text      = placeholder;
            DescriptionText.TextColor = UIColor.LightGray;
            UploadedCountText.Text    = AllImagesCount.ToString();

            CollectionViewAttach.Hidden = ImagesAttach.Count <= 1;
            PreviewImage.Hidden         = ImagesAttach.Count > 1;

            if (AllImagesCount < TargetCount)
            {
                CameraButton.Alpha = 1;
                CameraButton.UserInteractionEnabled = true;
            }
            else
            {
                CameraButton.Alpha = 0.25f;
                CameraButton.UserInteractionEnabled = false;
            }

            _collectionSource.Pictures = ImagesAttach;

            RefreshCollections();
        }