Exemplo n.º 1
0
 public static SkylineDocNode GetSkylineDocNodeFromRow(FoldChangeBindingSource.FoldChangeRow row)
 {
     if (row.Peptide != null)
     {
         return(row.Peptide);
     }
     else
     {
         return(row.Protein);
     }
 }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
 public FoldChangeRowTipProvider(FoldChangeBindingSource.FoldChangeRow row)
 {
     _row = row;
 }
Exemplo n.º 5
0
 private int GetGlobalIndex(FoldChangeBindingSource.FoldChangeRow row)
 {
     return(row.Peptide != null ? row.Peptide.DocNode.Id.GlobalIndex : row.Protein.DocNode.Id.GlobalIndex);
 }
Exemplo n.º 6
0
        private bool IsSelected(FoldChangeBindingSource.FoldChangeRow row)
        {
            var docNode = row.Peptide ?? (SkylineDocNode)row.Protein;

            return(_skylineWindow != null && GetSelectedPath(docNode.IdentityPath) != null);
        }
Exemplo n.º 7
0
 private StringWrapper RowToString(MatchExpression expr, FoldChangeBindingSource.FoldChangeRow row)
 {
     return(new StringWrapper(expr.GetDisplayString(_volcanoPlot.Document, row.Protein, row.Peptide) ??
                              TextUtil.EXCEL_NA));
 }