public MSGraphControl() { InitializeComponent(); GraphPane = new MSGraphPane(new LabelBoundsCache()); // replace default ZedGraph.GraphPane IsZoomOnMouseCenter = true; IsEnableVZoom = false; IsEnableVPan = false; IsEnableHEdit = false; IsEnableVEdit = false; EditButtons = MouseButtons.Left; EditModifierKeys = Keys.None; _unzoomButtons = new MouseButtonClicks( MouseButtons.Middle ); _unzoomButtons2 = new MouseButtonClicks( MouseButtons.None ); _unzoomAllButtons = new MouseButtonClicks( MouseButtons.Left, 2 ); _unzoomAllButtons2 = new MouseButtonClicks( MouseButtons.None ); ZoomEvent += MSGraphControl_ZoomEvent; MouseMoveEvent += MSGraphControl_MouseMoveEvent; MouseClick += MSGraphControl_MouseClick; MouseDoubleClick += MSGraphControl_MouseClick; Resize += MSGraphControl_Resize; }
public MSGraphControl() { InitializeComponent(); GraphPane = new MSGraphPane(new LabelBoundsCache()); // replace default ZedGraph.GraphPane IsZoomOnMouseCenter = true; IsEnableVZoom = false; IsEnableVPan = false; IsEnableHEdit = false; IsEnableVEdit = false; EditButtons = MouseButtons.Left; EditModifierKeys = Keys.None; _unzoomButtons = new MouseButtonClicks(MouseButtons.Middle); _unzoomButtons2 = new MouseButtonClicks(MouseButtons.None); _unzoomAllButtons = new MouseButtonClicks(MouseButtons.Left, 2); _unzoomAllButtons2 = new MouseButtonClicks(MouseButtons.None); ZoomEvent += MSGraphControl_ZoomEvent; MouseMoveEvent += MSGraphControl_MouseMoveEvent; MouseClick += MSGraphControl_MouseClick; MouseDoubleClick += MSGraphControl_MouseClick; Resize += MSGraphControl_Resize; }
public DockableGraphForm() { zedGraphControl = new ZedGraphControl { Dock = DockStyle.Fill }; zedGraphControl.GraphPane.Title.IsVisible = false; Controls.Add(zedGraphControl); zedGraphControl.ContextMenuBuilder += zedGraphControl_ContextMenuBuilder; zedGraphControl.MouseClick += zedGraphControl_MouseClick; zedGraphControl.MouseDoubleClick += zedGraphControl_MouseClick; UnzoomButtons = new MouseButtonClicks(MouseButtons.Middle); UnzoomAllButtons = new MouseButtonClicks(MouseButtons.Left, 2); UnzoomModifierKeys = Keys.None; zedGraphControl.PanButtons = MouseButtons.Left; zedGraphControl.PanModifierKeys = Keys.Control; // graphs can't be closed FormClosing += (sender, e) => { e.Cancel = true; }; }
public DockableGraphForm () { zedGraphControl = new ZedGraphControl { Dock = DockStyle.Fill }; zedGraphControl.GraphPane.Title.IsVisible = false; Controls.Add(zedGraphControl); zedGraphControl.ContextMenuBuilder += zedGraphControl_ContextMenuBuilder; zedGraphControl.MouseClick += zedGraphControl_MouseClick; zedGraphControl.MouseDoubleClick += zedGraphControl_MouseClick; UnzoomButtons = new MouseButtonClicks(MouseButtons.Middle); UnzoomAllButtons = new MouseButtonClicks(MouseButtons.Left, 2); UnzoomModifierKeys = Keys.None; zedGraphControl.PanButtons = MouseButtons.Left; zedGraphControl.PanModifierKeys = Keys.Control; // graphs can't be closed FormClosing += (sender, e) => { e.Cancel = true; }; }