private void EditTracerDef(TracerDefData tracerDefData) { using (var dlg = new DefineLabelDialog(Workspace, tracerDefData)) { dlg.ShowDialog(this); } }
public DefineLabelDialog(Workspace workspace, TracerDefData tracerDefData) : base(workspace) { InitializeComponent(); _originalTracerDef = tracerDefData; if (_originalTracerDef != null) { SetTracerDef(_originalTracerDef); } }
private void SetTracerDef(TracerDefData tracerDef) { tbxTracerName.Text = tracerDef.Name; tbxTracerSymbol.Text = tracerDef.TracerSymbol; tbxMassDifference.Text = tracerDef.DeltaMass.ToString(CultureInfo.CurrentCulture); tbxAtomCount.Text = tracerDef.AtomCount.ToString(CultureInfo.CurrentCulture); tbxAtomicPercentEnrichment.Text = tracerDef.AtomPercentEnrichment.ToString(CultureInfo.CurrentCulture); cbxEluteEarlier.Checked = tracerDef.IsotopesEluteEarlier; cbxEluteLater.Checked = tracerDef.IsotopesEluteLater; tbxInitialApe.Text = tracerDef.InitialEnrichment.ToString(CultureInfo.CurrentCulture); tbxFinalApe.Text = tracerDef.FinalEnrichment.ToString(CultureInfo.CurrentCulture); }
public TracerDef(Workspace workspace, TracerDefData tracerDefData) { Workspace = workspace; Name = tracerDefData.Name; TraceeSymbol = tracerDefData.TracerSymbol; char aminoAcidSymbol; if (AminoAcidFormulas.LongNames.TryGetValue(TraceeSymbol, out aminoAcidSymbol)) { AminoAcidSymbol = aminoAcidSymbol; } DeltaMass = tracerDefData.DeltaMass; AtomCount = tracerDefData.AtomCount; AtomPercentEnrichment = tracerDefData.AtomPercentEnrichment; InitialApe = tracerDefData.InitialEnrichment; FinalApe = tracerDefData.FinalEnrichment; IsotopesEluteEarlier = tracerDefData.IsotopesEluteEarlier; IsotopesEluteLater = tracerDefData.IsotopesEluteLater; ComputeMasses(); }
private ListViewItem MakeListViewItem(TracerDefData tracerDef) { return(new ListViewItem(tracerDef.Name)); }