protected void OnUpdatePeptideItem(UpdateMRMPairedPeptideItemEventArgs e) { if (PeptideItemUpdate != null) { PeptideItemUpdate(this, e); } }
private void DoUpdateFileModePeptide() { var fileItem = GetFileModeItem(); UpdateMRMPairedPeptideItemEventArgs args = new UpdateMRMPairedPeptideItemEventArgs(fileItem.PairedPeptide, viewOption); OnUpdateFileModePeptideItem(args); }
private SrmPairedPeptideItem DoUpdatePeptide() { var result = GetPeptide(); UpdateMRMPairedPeptideItemEventArgs args = new UpdateMRMPairedPeptideItemEventArgs(result, new SrmViewOption() { ViewGreenLine = true, ViewType = lastType }); OnUpdatePeptideItem(args); return(result); }
private void DoUpdateCompoundGraph() { if (compoundPeptide == null) { return; } UpdateMRMPairedPeptideItemEventArgs args = new UpdateMRMPairedPeptideItemEventArgs(compoundPeptide, viewOption); if (CompoundModePeptideItemUpdate != null) { CompoundModePeptideItemUpdate(this, args); } }
private SrmPairedPeptideItem DoUpdatePeptide() { var result = GetPeptide(); if (result != null) { UpdateMRMPairedPeptideItemEventArgs args = new UpdateMRMPairedPeptideItemEventArgs(result, new SrmViewOption() { ViewGreenLine = true, ViewType = _currentDisplayType }); OnUpdatePeptideItem(args); } return(result); }
private void UpdateGraph() { if (currentCompound == null) { return; } UpdateMRMPairedPeptideItemEventArgs args = new UpdateMRMPairedPeptideItemEventArgs(currentCompound, new SrmViewOption() { ViewGreenLine = true, ViewType = currentDisplayType }); peptideGraph.Update(this, args); rtGraph.Update(this, args); scanGraphs.ForEach(m => m.Update(this, args)); }
public void Update(object sender, UpdateMRMPairedPeptideItemEventArgs e) { MasterPane myMaster = zgcGraph.MasterPane; myMaster.Border.IsVisible = false; myMaster.PaneList.Clear(); try { myMaster.Margin.All = 1; myMaster.InnerPaneGap = 1; myMaster.Title.IsVisible = false; myMaster.Legend.IsVisible = false; var summary = e.Item; if (summary == null) { return; } for (int i = 0; i < summary.ProductIonPairs.Count; i++) { if (summary.ProductIonPairs[i] == null) { continue; } if (string.IsNullOrEmpty(FileName) || FileName.Equals(summary.ProductIonPairs[i].FileName)) { GraphPane panel = new GraphPane(); myMaster.Add(panel); ZedGraphMRMProductIonScans scan = new ZedGraphMRMProductIonScans(zgcGraph, panel); scan.Update(null, new UpdateMRMPairedProductIonEventArgs(summary.ProductIonPairs[i], e.ViewOption)); } } myMaster.SetLayout(g, PaneLayout.SquareColPreferred); zgcGraph.AxisChange(); } finally { ZedGraphicExtension.UpdateGraph(this.zgcGraph); } }
public void Update(object sender, UpdateMRMPairedPeptideItemEventArgs e) { MasterPane myMaster = zgcGraph.MasterPane; myMaster.Border.IsVisible = false; myMaster.PaneList.Clear(); bool updated = false; try { myMaster.Margin.All = 1; myMaster.InnerPaneGap = 1; myMaster.Title.IsVisible = false; myMaster.Legend.IsVisible = false; var summary = e.Item; if (summary == null) { return; } var ion = summary.ProductIonPairs.FirstOrDefault(m => m != null && m.FileName.Equals(FileName)); if (ion == null) { return; } ZedGraphMRMProductIonScansAndRegression scan = new ZedGraphMRMProductIonScansAndRegression(zgcGraph, g); scan.Update(null, new UpdateMRMPairedProductIonEventArgs(ion, e.ViewOption)); updated = true; } finally { if (!updated) { ZedGraphicExtension.UpdateGraph(this.zgcGraph); } } }
public void Update(object sender, UpdateMRMPairedPeptideItemEventArgs e) { panel.ClearData(); var peptide = e.Item; if (peptide == null || peptide.ProductIonPairs.Count == 0) { return; } var option = e.ViewOption; panel.Tag = peptide; panel.ClearData(); try { foreach (var summary in peptide.ProductIonPairs) { if (summary.Light != null && summary.Heavy != null && !option.ViewGreenLine) { AddAbsoluteCurve(summary.Light, "Light", Color.Blue, DashStyle.Solid); AddAbsoluteCurve(summary.Heavy, "Heavy", Color.Red, DashStyle.Dot); } } this.panel.Title.IsVisible = false; this.panel.YAxis.Scale.Min = 0; if (option.ViewType == DisplayType.PerfectSize || option.ViewType == DisplayType.FullHeight) { var range = (from summary in peptide.ProductIonPairs from scan in summary.Light.Intensities where scan.Enabled orderby scan.RetentionTime select scan.RetentionTime).ToList(); if (range.Count > 0) { var minRt = range.First() - 1; var maxRt = range.Last() + 1; panel.XAxis.Scale.Min = minRt; panel.XAxis.Scale.Max = maxRt; if (option.ViewType == DisplayType.PerfectSize) { var maxIntensity = Math.Max((from summary in peptide.ProductIonPairs from scan in summary.Light.Intensities where scan.Enabled select scan.Intensity).Max(), (from summary in peptide.ProductIonPairs from scan in summary.Heavy.Intensities where scan.Enabled select scan.Intensity).Max()); panel.YAxis.Scale.Max = maxIntensity * 1.2; } } } } finally { ZedGraphicExtension.UpdateGraph(this.zgcGraph); } }
public void UpdatePeptide(object sender, UpdateMRMPairedPeptideItemEventArgs e) { var s = e.Item; gvProductPair.DataSource = e.Item.ProductIonPairs; }
public void Update(object sender, UpdateMRMPairedPeptideItemEventArgs e) { var summary = e.Item; if (summary == null) { throw new ArgumentNullException("UpdateMRMPairedPeptideItemEventArgs.Item cannot be null"); } var myMaster = zgcGraph.GraphPane; myMaster.Title.Text = "Retention time ranges"; myMaster.XAxis.Title.Text = "Files"; myMaster.YAxis.Title.Text = "Retention time"; myMaster.CurveList.Clear(); try { var splRange = new PointPairList(); var splEnabled = new PointPairList(); var splAll = new StockPointList(); List <string> filenames = new List <string>(); int index = 0; List <double> median = new List <double>(); for (int i = 0; i < summary.ProductIonPairs.Count; i++) { if (summary.ProductIonPairs[i] == null) { continue; } index++; filenames.Add(summary.ProductIonPairs[i].FileName); var ints = summary.ProductIonPairs[i].Light.Intensities; var low = ints.First().RetentionTime; var high = ints.Last().RetentionTime; var firstEnabled = ints.Find(m => m.Enabled); var open = firstEnabled == null ? (low + high) / 2 : firstEnabled.RetentionTime; var lastEnabled = ints.FindLast(m => m.Enabled); var close = lastEnabled == null ? (low + high) / 2 : lastEnabled.RetentionTime; median.Add((open + close) / 2); splRange.Add(new PointPair(index, low, high)); splEnabled.Add(new PointPair(index, open, close)); splAll.Add(index, high, low, open, close, 1000); } myMaster.XAxis.Type = AxisType.Text; myMaster.XAxis.Scale.TextLabels = filenames.ToArray(); var item = myMaster.AddJapaneseCandleStick("", splAll); item.Stick.RisingFill = new Fill(Color.Red); item.Stick.FallingFill = new Fill(Color.Blue); zgcGraph.AxisChange(); } finally { ZedGraphicExtension.UpdateGraph(this.zgcGraph); } }