Пример #1
0
        public override void ViewDidDisappear(bool animated)
        {
            base.ViewDidDisappear(animated);

            //like, share, and email broker button event wiring

            AdEmail1.TouchUpInside -= SendEmail_TouchUpInside;
            AdEmail2.TouchUpInside -= SendEmail_TouchUpInside;
            AdEmail3.TouchUpInside -= SendEmail_TouchUpInside;
            AdEmail4.TouchUpInside -= SendEmail_TouchUpInside;

            AdShare1.TouchUpInside -= AdShare_TouchUpInside;
            AdShare2.TouchUpInside -= AdShare_TouchUpInside;
            AdShare3.TouchUpInside -= AdShare_TouchUpInside;
            AdShare4.TouchUpInside -= AdShare_TouchUpInside;

            AdLike1.TouchUpInside -= AdLike_TouchUpInside;
            AdLike2.TouchUpInside -= AdLike_TouchUpInside;
            AdLike3.TouchUpInside -= AdLike_TouchUpInside;
            AdLike4.TouchUpInside -= AdLike_TouchUpInside;

            //Ad1TechnicalSpecButton.TouchUpInside -= TechnicalSpecButton_TouchUpInside;
            //Ad2TechnicalSpecButton.TouchUpInside -= TechnicalSpecButton_TouchUpInside;
            //Ad3TechnicalSpecButton.TouchUpInside -= TechnicalSpecButton_TouchUpInside;
            //Ad4TechnicalSpecButton.TouchUpInside -= TechnicalSpecButton_TouchUpInside;

            Ad1NameButton.TouchUpInside -= AdSortButton_TouchUpInside;
            Ad2NameButton.TouchUpInside -= AdSortButton_TouchUpInside;
            Ad3NameButton.TouchUpInside -= AdSortButton_TouchUpInside;
            Ad4NameButton.TouchUpInside -= AdSortButton_TouchUpInside;

            Ad1BrokerButton.TouchUpInside -= AdSortButton_TouchUpInside;
            Ad2BrokerButton.TouchUpInside -= AdSortButton_TouchUpInside;
            Ad3BrokerButton.TouchUpInside -= AdSortButton_TouchUpInside;
            Ad4BrokerButton.TouchUpInside -= AdSortButton_TouchUpInside;

            AdImage1.RemoveGestureRecognizer(tapGesture1);
            AdImage2.RemoveGestureRecognizer(tapGesture2);
            AdImage3.RemoveGestureRecognizer(tapGesture3);
            AdImage4.RemoveGestureRecognizer(tapGesture4);

            Ad1MessageButton.TouchUpInside -= AdMessages_TouchUpInside;
            Ad2MessageButton.TouchUpInside -= AdMessages_TouchUpInside;
            Ad3MessageButton.TouchUpInside -= AdMessages_TouchUpInside;
            Ad4MessageButton.TouchUpInside -= AdMessages_TouchUpInside;

            //Ad1RGButton.TouchUpInside -= AdRGButton_TouchUpInside;
            //Ad2RGButton.TouchUpInside -= AdRGButton_TouchUpInside;
            //Ad3RGButton.TouchUpInside -= AdRGButton_TouchUpInside;
            //Ad4RGButton.TouchUpInside -= AdRGButton_TouchUpInside;
        }
        void ReleaseDesignerOutlets()
        {
            if (Ad1BrokerButton != null)
            {
                Ad1BrokerButton.Dispose();
                Ad1BrokerButton = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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