private void GuiToWin_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.ShiftKey) { shiftKeyDown = false; KChartSKControl.OnShiftKeyUp(); } }
public KChartSKControl() : base() { chartControl = this; chartControl.Location = new Point(0, 0); Label toolTip = WinGui.winGui.label_Tooltip; toolTip.Visible = false; toolTip.BackColor = WinControls.cPanelButtonDeselected; toolTip.Font = WinGui.winGui.GetFont(8, true); toolTip.MouseEnter += (object sender, EventArgs e) => { UpdateTooltip(new Point(0, 0), ""); }; /* Initialize Interface KTouchClient with a locally-sourced KTouchClientData closure */ touch = new KTouchClientData( invalidateSurface: () => { InvalidateAndUpdate(); }, setManualPinchPan: (Swipe pinchPan) => { KChartHandler.SetManualPinchPan(pinchPan); } ); touch.onTouchSwipeOrMouseDrag = OnMouseDrag; touch.onTouchSwipeOrMouseDragEnd = OnMouseDragEnd; touch.onTouchDoubletapOrMouseClick = OnMouseClick; touch.onTouchPinchOrMouseZoom = OnMouseZoom; touch.lastPinchPan = Swipe.Id(); touch.incrementalScaling = Swipe.Id(); touch.incrementalTranslation = Swipe.Id(); KChartHandler.RegisterKTouchClientData(touch); }
public /* Interface KGuiControl */ void GuiChartUpdate() { if (!this.InvokeRequired) { KChartHandler.VisibilityRestore(); // this is needed to hide the series in the chart KChartSKControl.SetSize(panel_KChart.Size); KChartSKControl.InvalidateAndUpdate(); } else { this.Invoke((Action) delegate { GuiChartUpdate(); }); } }
private void panel_KChart_SizeChanged(object sender, EventArgs e) { KChartSKControl.SetSize(this.panel_KChart.Size); }