private void ShowHalfLifeForm(Peptide peptide, string proteinName, string cohort) { if (0 != (GetKeyState(0x10) & 0x8000)) { var halfLifeRowDataForm = new HalfLifeRowDataForm(_form.Workspace) { Protein = proteinName, }; if (peptide != null) { halfLifeRowDataForm.Peptide = peptide.ToString(); } var resultData = HalfLives[cohort].Value; halfLifeRowDataForm.RowDatas = resultData.RowDatas; halfLifeRowDataForm.Show(_form.DockPanel, _form.DockState); return; } var halfLifeForm = new HalfLifeForm(_form.Workspace) { Peptide = peptide == null ? "" : peptide.Sequence, ProteinName = proteinName, Cohort = cohort, }; halfLifeForm.SetHalfLifeSettings(_form.HalfLifeSettings); for (int i = 0; i < _form.checkedListBoxTimePoints.Items.Count; i++) { halfLifeForm.SetTimePointExcluded((double)_form.checkedListBoxTimePoints.Items[i], !_form.checkedListBoxTimePoints.GetItemChecked(i)); } 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); }); }
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); }; }