Example #1
0
        private void zedGraphControl_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
        {
            int?replicateIndexFromPoint = ReplicateIndexFromPoint(mousePt);

            if (replicateIndexFromPoint.HasValue)
            {
                ToolStripMenuItem excludeStandardMenuItem = MakeExcludeStandardMenuItem(replicateIndexFromPoint.Value);
                if (excludeStandardMenuItem != null)
                {
                    menuStrip.Items.Clear();
                    menuStrip.Items.Add(excludeStandardMenuItem);
                    return;
                }
            }

            showSampleTypesContextMenuItem.DropDownItems.Clear();
            foreach (var sampleType in SampleType.ListSampleTypes())
            {
                showSampleTypesContextMenuItem.DropDownItems.Add(MakeShowSampleTypeMenuItem(sampleType));
            }
            logPlotContextMenuItem.Checked       = Options.LogPlot;
            showLegendContextMenuItem.Checked    = Options.ShowLegend;
            showSelectionContextMenuItem.Checked = Options.ShowSelection;
            ZedGraphHelper.BuildContextMenu(sender, menuStrip, true);
            if (!menuStrip.Items.Contains(logPlotContextMenuItem))
            {
                int index = 0;
                menuStrip.Items.Insert(index++, logPlotContextMenuItem);
                menuStrip.Items.Insert(index++, showSampleTypesContextMenuItem);
                menuStrip.Items.Insert(index++, showLegendContextMenuItem);
                menuStrip.Items.Insert(index++, showSelectionContextMenuItem);
                menuStrip.Items.Insert(index++, new ToolStripSeparator());
            }
        }
Example #2
0
 private void graphControl_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
 {
     ZedGraphHelper.BuildContextMenu(graphControl, menuStrip, true);
     showScanNumberContextMenuItem.Checked = Settings.Default.ShowFullScanNumber;
     menuStrip.Items.Add(new ToolStripSeparator());
     menuStrip.Items.Add(showScanNumberContextMenuItem);
 }
Example #3
0
        private void zedGraphControl_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
        {
            var calibrationCurveOptions = Settings.Default.CalibrationCurveOptions;

            singleBatchContextMenuItem.Checked = calibrationCurveOptions.SingleBatch;
            if (IsEnableIsotopologResponseCurve())
            {
                singleBatchContextMenuItem.Visible     = true;
                showSampleTypesContextMenuItem.Visible = false;
            }
            else
            {
                singleBatchContextMenuItem.Visible     = CalibrationCurveFitter.AnyBatchNames(_skylineWindow.Document.Settings);
                showSampleTypesContextMenuItem.Visible = true;
            }
            var replicateIndexFromPoint = ReplicateIndexFromPoint(mousePt);

            if (replicateIndexFromPoint.HasValue && null == replicateIndexFromPoint.Value.LabelType)
            {
                ToolStripMenuItem excludeStandardMenuItem
                    = MakeExcludeStandardMenuItem(replicateIndexFromPoint.Value.ReplicateIndex);
                if (excludeStandardMenuItem != null)
                {
                    menuStrip.Items.Clear();
                    menuStrip.Items.Add(excludeStandardMenuItem);
                    return;
                }
            }

            showSampleTypesContextMenuItem.DropDownItems.Clear();
            foreach (var sampleType in SampleType.ListSampleTypes())
            {
                showSampleTypesContextMenuItem.DropDownItems.Add(MakeShowSampleTypeMenuItem(sampleType));
            }
            logXContextMenuItem.Checked               = Options.LogXAxis;
            logYAxisContextMenuItem.Checked           = Options.LogYAxis;
            showLegendContextMenuItem.Checked         = Options.ShowLegend;
            showSelectionContextMenuItem.Checked      = Options.ShowSelection;
            showFiguresOfMeritContextMenuItem.Checked = Options.ShowFiguresOfMerit;
            ZedGraphHelper.BuildContextMenu(sender, menuStrip, true);
            if (!menuStrip.Items.Contains(logXContextMenuItem))
            {
                int index = 0;
                menuStrip.Items.Insert(index++, logXContextMenuItem);
                menuStrip.Items.Insert(index++, logYAxisContextMenuItem);
                menuStrip.Items.Insert(index++, showSampleTypesContextMenuItem);
                menuStrip.Items.Insert(index++, singleBatchContextMenuItem);
                menuStrip.Items.Insert(index++, showLegendContextMenuItem);
                menuStrip.Items.Insert(index++, showSelectionContextMenuItem);
                menuStrip.Items.Insert(index++, showFiguresOfMeritContextMenuItem);
                menuStrip.Items.Insert(index++, new ToolStripSeparator());
            }
        }
Example #4
0
        protected virtual void BuildContextMenu(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
        {
            ZedGraphHelper.BuildContextMenu(sender, menuStrip, true);

            var index = 0;

            menuStrip.Items.Insert(index++, new ToolStripMenuItem(Resources.FoldChangeForm_BuildContextMenu_Grid, null, OnGridClick));
            if (!(sender.ParentForm is FoldChangeVolcanoPlot))
            {
                menuStrip.Items.Insert(index++, new ToolStripMenuItem(Resources.FoldChangeForm_BuildContextMenu_Volcano_Plot, null, OnVolcanoPlotClick));
            }
            if (!(sender.ParentForm is FoldChangeBarGraph))
            {
                menuStrip.Items.Insert(index++, new ToolStripMenuItem(Resources.FoldChangeForm_BuildContextMenu_Bar_Graph, null, OnBarGraphClick));
            }
            menuStrip.Items.Insert(index++, new ToolStripMenuItem(Resources.FoldChangeForm_BuildContextMenu_Settings, null, OnSettingsClick));
            menuStrip.Items.Insert(index++, new ToolStripSeparator());
        }
Example #5
0
        private void zedGraphControl_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
        {
            ZedGraphHelper.BuildContextMenu(sender, menuStrip, true);

            int iInsert = 0;

            menuStrip.Items.Insert(iInsert++, timePlotContextMenuItem);
            if (timePlotContextMenuItem.DropDownItems.Count == 0)
            {
                timePlotContextMenuItem.DropDownItems.AddRange(new ToolStripItem[]
                {
                    timeCorrelationContextMenuItem,
                    timeResidualsContextMenuItem
                });
            }
            timeCorrelationContextMenuItem.Checked = PlotType == PlotTypeRT.correlation;
            timeResidualsContextMenuItem.Checked   = PlotType == PlotTypeRT.residuals;
            menuStrip.Items.Insert(iInsert, new ToolStripSeparator());
        }
Example #6
0
        private void zedGraphControl_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
        {
            ZedGraphHelper.BuildContextMenu(sender, menuStrip, true);
            if (!menuStrip.Items.Contains(logPlotContextMenuItem))
            {
                int index = 0;
                menuStrip.Items.Insert(index++, logPlotContextMenuItem);
                menuStrip.Items.Insert(index++, showSampleTypesContextMenuItem);
                menuStrip.Items.Insert(index++, showLegendContextMenuItem);
                menuStrip.Items.Insert(index++, showSelectionContextMenuItem);
                menuStrip.Items.Insert(index++, new ToolStripSeparator());
            }

            showSampleTypesContextMenuItem.DropDownItems.Clear();
            foreach (var sampleType in SampleType.ListSampleTypes())
            {
                showSampleTypesContextMenuItem.DropDownItems.Add(MakeShowSampleTypeMenuItem(sampleType));
            }
            logPlotContextMenuItem.Checked       = Options.LogPlot;
            showLegendContextMenuItem.Checked    = Options.ShowLegend;
            showSelectionContextMenuItem.Checked = Options.ShowSelection;
        }
        private void zedGraphControl1_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
        {
            ZedGraphHelper.BuildContextMenu(sender, menuStrip, true);
            menuStrip.Items.Insert(0, new ToolStripSeparator());
            menuStrip.Items.Insert(0, new ToolStripMenuItem(Resources.HierarchicalClusterGraph_zedGraphControl1_ContextMenuBuilder_Y_Axis_Labels, null, ShowYAxisLabelsOnClick)
            {
                Checked = ShowYAxisLabels
            });
            menuStrip.Items.Insert(0, new ToolStripMenuItem(Resources.HierarchicalClusterGraph_zedGraphControl1_ContextMenuBuilder_X_Axis_Labels, null, ShowXAxisLabelsOnClick)
            {
                Checked = ShowXAxisLabels
            });
            menuStrip.Items.Insert(0, new ToolStripMenuItem(Resources.HierarchicalClusterGraph_zedGraphControl1_ContextMenuBuilder_Show_Selection, null, ShowSelectionOnClick)
            {
                Checked = ShowSelection
            });
            var pointObject = PointFromMousePoint(mousePt);

            if (pointObject?.ReplicateName != null || pointObject?.IdentityPath != null)
            {
                menuStrip.Items.Insert(0, new ToolStripSeparator());
                menuStrip.Items.Insert(0, new ToolStripMenuItem(Resources.HierarchicalClusterGraph_zedGraphControl1_ContextMenuBuilder_Select, null, (o, args) => SelectPoint(pointObject)));
            }
        }
 private void zgIsolationGraph_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
 {
     ZedGraphHelper.BuildContextMenu(sender, menuStrip, true);
 }
Example #9
0
 private void zedGraph_ContextMenuBuilder(ZedGraphControl graphControl, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState)
 {
     ZedGraphHelper.BuildContextMenu(graphControl, menuStrip);
 }