Exemple #1
0
        public void Shutdown()
        {
            if (NewActivePatient != null)
            {
                foreach (Delegate d in NewActivePatient.GetInvocationList())
                {
                    NewActivePatient -= (NewActivePatientEventHandler)d;
                }
            }
            if (RelativeSelected != null)
            {
                foreach (Delegate d in RelativeSelected.GetInvocationList())
                {
                    RelativeSelected -= (RelativeSelectedEventHandler)d;
                }
            }
            if (AppointmentSelected != null)
            {
                foreach (Delegate d in AppointmentSelected.GetInvocationList())
                {
                    AppointmentSelected -= (AppointmentSelectedEventHandler)d;
                }
            }


            // remove patient model listeners
            if (activePatient != null)
            {
                activePatient.ReleaseProband(null);
            }

            this.MetaData.ReleaseListeners(null);
        }
Exemple #2
0
        private void ReleaseListenersForTarget(object target)
        {
            // remove local listerners
            if (NewActivePatient != null)
            {
                foreach (Delegate d in NewActivePatient.GetInvocationList())
                {
                    if (d.Target == target)
                    {
                        NewActivePatient -= (NewActivePatientEventHandler)d;
                    }
                }
            }
            if (RelativeSelected != null)
            {
                foreach (Delegate d in RelativeSelected.GetInvocationList())
                {
                    if (d.Target == target)
                    {
                        RelativeSelected -= (RelativeSelectedEventHandler)d;
                    }
                }
            }
            if (AppointmentSelected != null)
            {
                foreach (Delegate d in AppointmentSelected.GetInvocationList())
                {
                    if (d.Target == target)
                    {
                        AppointmentSelected -= (AppointmentSelectedEventHandler)d;
                    }
                }
            }

            // remove patient model listeners
            if (activePatient != null)
            {
                activePatient.ReleaseProband(target);
            }

            this.MetaData.ReleaseListeners(target);
        }
Exemple #3
0
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();
            string firstString         = "Appointment.Details.Feedback.Button".Translate();
            var    strAttributedResult = new NSMutableAttributedString();

            strAttributedResult.Append(new NSAttributedString(firstString, Fonts.GetMediumFont(14), Colors.HyperLinkButtonTextColor, underlineStyle: NSUnderlineStyle.Single));
            CancelButton.SetAttributedTitle(strAttributedResult, UIControlState.Normal);
            AppointmentDetailsView.AddGestureRecognizer(new UITapGestureRecognizer(() => AppointmentSelected?.Invoke(this, appointment)));

            AppointmentDetailsView.AddBorder(Colors.UnselectedLabelBorderColor, 14);
            CircleView.Layer.BorderWidth = 1;
            CircleView.Layer.BorderColor = Colors.UnselectedLabelBorderColor.CGColor;

            VideoCallButton.UserInteractionEnabled = true;

            if (videoCallButtonGesture == null)
            {
                videoCallButtonGesture = new UITapGestureRecognizer(VideoCallButton_Tapped);
            }
            VideoCallButton.RemoveGestureRecognizer(videoCallButtonGesture);
            VideoCallButton.AddGestureRecognizer(videoCallButtonGesture);
        }
Exemple #4
0
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();
            AppointmentDetailsView.AddGestureRecognizer(new UITapGestureRecognizer(() => AppointmentSelected?.Invoke(this, appointment)));

            AppointmentDetailsView.AddBorder(Colors.AppointmentOtherViewBorderColor, 14);
            CircleView.Layer.BorderWidth = 1;
            CircleView.Layer.BorderColor = Colors.AppointmentOtherViewCircleBorderColor.CGColor;
        }