Пример #1
0
        public PatientDetailViewController(IObjectFactory objectFactory)
        {
            this.ObjectFactory  = objectFactory;
            this.PatientManager = this.ObjectFactory.Create <IPatientManager>();

            this.navBar = new UINavigationBar(new RectangleF(0, 0, 768, 44));
            this.navBar.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
            this.navBar.SetItems(
                new[]
            {
                new UINavigationItem("Patient Information")
            }, false);

            this.navBar.TopItem.SetRightBarButtonItem(this.EditButtonItem, false);
            this.View.BackgroundColor = UIColor.LightGray;
            this.View.Frame           = new RectangleF(0, 0, 768, 768);

            this.patientDetailView                  = this.ObjectFactory.Create <PatientDetailView>();
            this.patientDetailView.Frame            = new RectangleF(0, 44, this.colWidth1 + this.colWidth2, 728);
            this.patientDetailView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight;


            this.View.AddSubview(this.patientDetailView);
            this.View.AddSubview(this.navBar);
        }
        public PatientDetailViewController(IObjectFactory objectFactory)
		{
		    this.ObjectFactory = objectFactory;
		    this.PatientManager = this.ObjectFactory.Create<IPatientManager>();
			
			this.navBar = new UINavigationBar(new RectangleF(0,0,768, 44));
            this.navBar.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
			this.navBar.SetItems(
                new[]
                {
                    new UINavigationItem("Patient Information")
                },false);
			
            this.navBar.TopItem.SetRightBarButtonItem(this.EditButtonItem, false);
			this.View.BackgroundColor = UIColor.LightGray;
			this.View.Frame = new RectangleF(0,0,768,768);

            this.patientDetailView = this.ObjectFactory.Create<PatientDetailView>();
			this.patientDetailView.Frame = new RectangleF(0,44,this.colWidth1 + this.colWidth2, 728);
			this.patientDetailView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight;

		
			this.View.AddSubview (this.patientDetailView);
			this.View.AddSubview (this.navBar);
		}