コード例 #1
0
        void SetupSendEmailAction()
        {
            SendEmailImageView.Image = UIImage.FromBundle("email");

            // UIImageView doesn't accept touch events by default, so we have to explcitly enable user interaction
            SendEmailImageView.UserInteractionEnabled = true;

            SendEmailImageView.AddGestureRecognizer(new UITapGestureRecognizer(() => {
                // we're using the Messaging plugin from Carel Lotz here (included as a NuGet)
                var emailTask = MessagingPlugin.EmailMessenger;
                if (emailTask.CanSendEmail && IsRealDevice)
                {
                    emailTask.SendEmail(Acquaintance.Email, "");
                }
                else
                {
                    DisplaySimulatorNotSupportedErrorAlertView("Email composition is not supported in the iOS simulator.");
                }
            }));
        }
コード例 #2
0
        void ReleaseDesignerOutlets()
        {
            if (CityLabel != null)
            {
                CityLabel.Dispose();
                CityLabel = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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