public override void WillShowViewController(UISplitViewController svc, UIViewController aViewController, UIBarButtonItem button)
        {
            PatientDetailViewController dvc = svc.ViewControllers[1] as PatientDetailViewController;

            if (dvc != null)
            {
                dvc.RemoveNavBarButton();
                dvc.Popover = null;
            }
        }
        public override void WillHideViewController(UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc)
        {
            PatientDetailViewController dvc = svc.ViewControllers[1] as PatientDetailViewController;

            if (dvc != null)
            {
                dvc.AddNavBarButton(barButtonItem);
                dvc.Popover = pc;
            }
        }
		public PatientSplitViewController(IObjectFactory objectFactory)
		{
		    this.ObjectFactory = objectFactory;
		    this.Delegate = new PatientSplitViewDelegate();

            this.patientListController = this.ObjectFactory.Create<PatientListViewController>(new NamedParameterOverloads { { "patientSplitViewController", this } });
			this.patientDetailController = this.ObjectFactory.Create<PatientDetailViewController>();
			
			this.ViewControllers = new UIViewController[]
				{this.patientListController, this.patientDetailController};
		}
        public PatientSplitViewController(IObjectFactory objectFactory)
        {
            this.ObjectFactory = objectFactory;
            this.Delegate      = new PatientSplitViewDelegate();

            this.patientListController = this.ObjectFactory.Create <PatientListViewController>(new NamedParameterOverloads {
                { "patientSplitViewController", this }
            });
            this.patientDetailController = this.ObjectFactory.Create <PatientDetailViewController>();

            this.ViewControllers = new UIViewController[]
            { this.patientListController, this.patientDetailController };
        }
		public void ShowPatient (Patient patient)
		{
			this.patientDetailController = this.ViewControllers[1] as PatientDetailViewController;
			this.patientDetailController.Update(patient);
		}
 public void ShowPatient(Patient patient)
 {
     this.patientDetailController = this.ViewControllers[1] as PatientDetailViewController;
     this.patientDetailController.Update(patient);
 }