/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AxisApplyButton_Click(object sender, EventArgs e) { Hide(); if (_graphPanel == null) { return; } if (_applyAllYChanges) { AxisApplyAll(); } _graphParams.GraphTabPanel.Cst.MainPan.YAxisMin = (double)YAxisMin.Value; _graphParams.GraphTabPanel.Cst.MainPan.YAxisMax = (double)YAxisMax.Value; _graphParams.GraphTabPanel.SetXAxisMin((double)XAxisMin.Value, _applyAllXChanges); _graphParams.GraphTabPanel.SetXAxisMax((double)XAxisMax.Value, _applyAllXChanges); _graphParams.GraphTabPanel.SetXAxisSpan((double)XAxisTimeSpan.Value, _applyAllXChanges); if (_xChanged) { if (XAxisAuto.Checked) { _graphParams.GraphTabPanel.SetXAxisType(XAxisType.Auto, _applyAllXChanges); } else if (XAxisFixed.Checked) { _graphParams.GraphTabPanel.SetXAxisType(XAxisType.SetSpan, _applyAllXChanges); } else if (XAxisFixedMinMax.Checked) { _graphParams.GraphTabPanel.SetXAxisType(XAxisType.MinMax, _applyAllXChanges); } _graphPanel.ResetX(); } if (_yChanged) { if (YAxisAutoFixed.Checked) { _graphParams.GraphTabPanel.Cst.MainPan.YAxisType = YAxisType.Auto; } else if (YAxisAutoFree.Checked) { _graphParams.GraphTabPanel.Cst.MainPan.YAxisType = YAxisType.Free; } else if (YAXisFixedMinMax.Checked) { _graphParams.GraphTabPanel.Cst.MainPan.YAxisType = YAxisType.MinMax; } _graphPanel.ResetY(_graphParams.GraphTabPanel.Cst.MainPan); } _graphPanel.RedrawAll(); _xChanged = false; _yChanged = false; }
private void OK_Click(object sender, EventArgs e) { Hide(); if (_graphPanel == null || _panelControl == null) { return; } if (_yChanged) { SetPanel(_panelControl); _graphPanel.RedrawAll(); UpdateYCallers(); } _yChanged = false; }
public void HighlightChanged(object sender, EventArgs e) { if (_legend.DoNotUpdate) { return; } var cb = (CheckBox)sender; var tt = (Legend.HlTag)cb.Tag; _graphPanel.GraphParameters.SetGraphHighlightPan(tt.PanelControl, tt.GraphTagId, cb.Checked); _graphPanel.RedrawAll(); }
private void ShowCursor(bool seen) { _graphParameters.DisplayCursor = seen; _graphPanel.RedrawAll(); }
internal void GrPan_MouseDoubleClick(object sender, MouseEventArgs e) { _currentX = e.X; _currentY = e.Y; var tim = (e.X + _graphicsTabPanel.Cst.MainPan.XOffset) / _graphicsTabPanel.Cst.MainPan.XScale; _graphParameters.LastDoubleClickTime = tim; if (_graphParameters.DoubleClickCallback != null) { _graphParameters.DoubleClickCallback(); } else { CancelRectCursor(); _graphParameters.SetInitVisible(true); _graphParameters.DontAddToContextMenu(true); _graphBoundary.AddGeneralMarker(tim); _graphParameters.DontAddToContextMenu(false); _graphPanel.RedrawAll(); } }
internal void RemoveBoundaryClick(object sender, EventArgs e) { var id = -1; var cnt = 0; if (_graphTabPanel.Cst.Graphs == null) { return; } var len = _graphTabPanel.Cst.Graphs.Length; foreach (var t in _graphTabPanel.Cst.Graphs) { if (t.ObjectTag.TypeId == GraphManipulationType.WbWaferStartStop) { ++cnt; } } if (cnt == 1) { MessageBox.Show(@"You Can't Remove The Last Zone There Has To Be At Least One"); return; } for (var i = 0; i < len; i++) { if (_graphTabPanel.Cst.Graphs[i].TagId != _graphParameters.LastBoundaryMoveId) { continue; } id = i; break; } if (id < 0 || id >= len) { return; } if (_graphTabPanel.Cst.Graphs[id].ObjectTag == null) { return; } _graphPanel.RemoveGraph(_graphTabPanel.Cst.Graphs[id].TagId); _graphPanel.RedrawAll(); _graphParameters.BoundaryChangeCallback?.Invoke(); if (BoundaryCallback == null) { return; } try { var ev = new BoundaryEventArgs { BoundarySetId = -1 }; BoundaryCallback(this, ev); } // ReSharper disable once EmptyGeneralCatchClause catch { } }