private EventHandler GetClickEventHandler(HalfLifeCalculationType halfLifeCalculationType) { return((sender, args) => { var cohortBuilder = new StringBuilder(); if (!string.IsNullOrEmpty(Cohort)) { cohortBuilder.Append(Cohort); } if (!string.IsNullOrEmpty(Sample)) { if (cohortBuilder.Length > 0) { cohortBuilder.Append(" "); } cohortBuilder.Append(Sample); } var halfLifeForm = new HalfLifeForm(_form.Workspace) { Peptide = _displayRow.Peptide == null ? "" : _displayRow.Peptide.Sequence, ProteinName = _displayRow.ProteinName, Cohort = cohortBuilder.ToString(), }; halfLifeForm.SetHalfLifeSettings(_displayRow.GetHalfLifeCalculator().HalfLifeSettings); halfLifeForm.Show(_form.DockPanel, _form.DockState); }); }
private EventHandler GetClickEventHandler(HalfLifeCalculationType halfLifeCalculationType) { return (sender, args) => { var cohortBuilder = new StringBuilder(); if (!string.IsNullOrEmpty(Cohort)) { cohortBuilder.Append(Cohort); } if (!string.IsNullOrEmpty(Sample)) { if (cohortBuilder.Length > 0) { cohortBuilder.Append(" "); } cohortBuilder.Append(Sample); } var halfLifeForm = new HalfLifeForm(_form.Workspace) { Peptide = _displayRow.Peptide == null ? "" : _displayRow.Peptide.Sequence, ProteinName = _displayRow.ProteinName, Cohort = cohortBuilder.ToString(), }; halfLifeForm.SetHalfLifeSettings(_displayRow.GetHalfLifeCalculator().HalfLifeSettings); halfLifeForm.Show(_form.DockPanel, _form.DockState); }; }