public static SkylineDocNode GetSkylineDocNodeFromRow(FoldChangeBindingSource.FoldChangeRow row) { if (row.Peptide != null) { return(row.Peptide); } else { return(row.Protein); } }
private bool IsSelected(FoldChangeBindingSource.FoldChangeRow row) { if (null == _skylineWindow) { return(false); } if (row.Peptide != null) { return(IsPathSelected(_skylineWindow.SelectedPath, row.Peptide.IdentityPath)); } return(IsPathSelected(_skylineWindow.SelectedPath, row.Protein.IdentityPath)); }
public bool MoveMouse(MouseButtons buttons, Point point) { // Pan if (ModifierKeys.HasFlag(Keys.Control) && buttons.HasFlag(MouseButtons.Left)) { AdjustLocations(zedGraphControl.GraphPane); } CurveItem nearestCurveItem = null; var index = -1; if (TryGetNearestCurveItem(point, ref nearestCurveItem, ref index)) { var lineItem = nearestCurveItem as LineItem; if (lineItem == null || index < 0 || index >= lineItem.Points.Count || lineItem[index].Tag == null) { return(false); } _selectedRow = (FoldChangeBindingSource.FoldChangeRow)lineItem[index].Tag; zedGraphControl.Cursor = Cursors.Hand; if (_tip == null) { _tip = new NodeTip(this) { Parent = ParentForm } } ; _tip.SetTipProvider(new FoldChangeRowTipProvider(_selectedRow), new Rectangle(point, new Size()), point); return(true); } else { if (_tip != null) { _tip.HideTip(); } _selectedRow = null; return(false); } }
public FoldChangeRowTipProvider(FoldChangeBindingSource.FoldChangeRow row) { _row = row; }
private int GetGlobalIndex(FoldChangeBindingSource.FoldChangeRow row) { return(row.Peptide != null ? row.Peptide.DocNode.Id.GlobalIndex : row.Protein.DocNode.Id.GlobalIndex); }
private bool IsSelected(FoldChangeBindingSource.FoldChangeRow row) { var docNode = row.Peptide ?? (SkylineDocNode)row.Protein; return(_skylineWindow != null && GetSelectedPath(docNode.IdentityPath) != null); }
private StringWrapper RowToString(MatchExpression expr, FoldChangeBindingSource.FoldChangeRow row) { return(new StringWrapper(expr.GetDisplayString(_volcanoPlot.Document, row.Protein, row.Peptide) ?? TextUtil.EXCEL_NA)); }