public void UpdateCell (Patient patient) { this.nameLabel.Text = patient.Name.ToString(); this.companyLabel.Text = "Class C"; this.image.Image = UIImage.FromBundle(patient.ProfilePicture); }
public PatientCell(UITableViewCellStyle style, NSString ident, Patient showSpeaker) : base(style, ident) { SelectionStyle = UITableViewCellSelectionStyle.Blue; nameLabel = new UILabel() { TextAlignment = UITextAlignment.Left, Font = bigFont, BackgroundColor = UIColor.FromWhiteAlpha(0f, 0f) }; companyLabel = new UILabel() { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.FromWhiteAlpha(0f, 0f) }; image = new UIImageView(); UpdateCell(showSpeaker); ContentView.Add(nameLabel); ContentView.Add(companyLabel); ContentView.Add(image); }
public PatientTableViewCell (UITableViewCellStyle style, NSString ident, Patient showPatient) : base (style, ident) { this.SelectionStyle = UITableViewCellSelectionStyle.Blue; showPatient.ItemUpdated += (sender, args) => this.UpdateCell(showPatient); this.nameLabel = new UILabel () { TextAlignment = UITextAlignment.Left, Font = bigFont, BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; this.companyLabel = new UILabel () { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; this.image = new UIImageView(); this.UpdateCell(showPatient); this.ContentView.Add (this.nameLabel); this.ContentView.Add (this.companyLabel); this.ContentView.Add (this.image); }
public void Update(Patient patient) { this.currentPatient = patient; this.patientDetailView.Update(this.currentPatient); this.patientDetailView.SetNeedsDisplay(); if (this.Popover != null) { this.Popover.Dismiss (true); } }
public override void ViewWillAppear (bool animated) { base.ViewWillAppear (animated); this.patient = this.PatientManager.GetById (this.patientId); // this shouldn't be null, but it gets that way when the data // "shifts" underneath it. need to reload the screen or prevent // selection via loading overlay - neither great UIs :-( if (this.patient != null) { this.LayoutSubviews (); this.Update (); } }
public void SavePatient(Patient patient) { this.PatientDatabase.SavePatient(patient); patient.OnItemUpdated(); }
public void SavePatient(Patient patient) { lock (staticLock) { // update list of known conditions this.Table<PatientKnownCondition>() .Where(x => x.PatientId == patient.Id) .ForEach(x => this.Delete(x)); this.SaveItem(patient); patient.KnownConditions .ForEach( condition => { var existingCondition = this.GetKnownConditionByName(condition.Name); if (existingCondition == null) { this.SaveItem(condition); existingCondition = condition; } this.Insert(new PatientKnownCondition { PatientId = patient.Id, KnownConditionId = existingCondition.Id }); }); } }
/// <summary> /// Initializes a new instance of the <see cref="PatientElement" /> class. /// </summary> /// <param name="patient">The patient to display.</param> /// <param name="splitView">The split view controller to be used.</param> public PatientElement(Patient patient, PatientsSplitView splitView) : base(patient.DisplayName) { this.Patient = patient; this.PatientsSplitView = splitView; }
/// <summary> /// Initializes a new instance of the <see cref="PatientElement" /> class. /// </summary> /// <param name="patient">The patient to display.</param> public PatientElement(Patient patient) : base(patient.DisplayName) { this.Patient = patient; }
public void UpdateCell(Patient patient) { nameLabel.Text = patient.DisplayName; companyLabel.Text = patient.DisplaySummary; if (!string.IsNullOrWhiteSpace(patient.ImageUrl)) { var u = new Uri(patient.ImageUrl); image.Image = ImageLoader.DefaultRequestImage(u, this); } }
public void Save(Patient patient) { this.DataManager.SavePatient(patient); }
public void ShowPatient (Patient patient) { this.patientDetailController = this.ViewControllers[1] as PatientDetailViewController; this.patientDetailController.Update(patient); }
// for masterdetail public void Update(Patient patient) { this.patient = patient; this.Update(); this.LayoutSubviews (); }
public void Clear() { this.patient = null; this.nameField.Text = ""; this.dateOfBirthField.Text = ""; this.image.Image = null; this.LayoutSubviews (); // show the grey 'no Patient' message }