private void LoadObservationsOfEvent()
        {
            // Clear conteiner of Observations views

            // Remove all SubViews
            foreach (UIView observationView in ObservationContentView.Subviews)
            {
                observationView.RemoveFromSuperview();
            }

            // Set height of ObservationContentView
            AdjustSizeObservationsContentView();

            // Add observations in ObservationContentView
            for (int i = 0; i < EventDetail.Observaciones.Count; i++)
            {
                // Create observation view
                ObservationEventView observationView = ObservationEventView.Create();

                // Get top position of observation
                int topPosition = i * HeightObservationView;
                observationView.Frame = new CGRect(0, topPosition, ObservationContentView.Frame.Width, HeightObservationView);

                // Load observation object in View
                observationView.LoadObservationInView(EventDetail.Observaciones[i]);

                // Add Observation in Content View
                ObservationContentView.AddSubview(observationView);
            }
        }
Пример #2
0
        void ReleaseDesignerOutlets()
        {
            if (AddObservationView != null)
            {
                AddObservationView.Dispose();
                AddObservationView = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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