private void ScTextView_MouseDown(object sender, ScMouseEventArgs e) { metricsList = null; Focus(); hitTestMetrics[0] = CurrentTextLayout.HitTestPoint( (float)e.Location.X, (float)e.Location.Y, out isTrailingHit[0], out isInside[0]); hitTestMetrics[1] = hitTestMetrics[0]; isInside[1] = isInside[0]; isTrailingHit[1] = isTrailingHit[0]; cursorIdx = 0; int x = (int)Math.Round(hitTestMetrics[cursorIdx].Left); int y = (int)Math.Round(hitTestMetrics[cursorIdx].Top); SetImeWindowsPos(x, y); StopAnim(); StartAnim(); Refresh(); }
void _HeaderItemHitEvent(ScLayerLayoutViewerHeaderItem headerItem, ScMouseEventArgs e) { if (HeaderItemHitEvent != null) { HeaderItemHitEvent(headerItem.ItemDataName); } }
private void ScTextView_MouseUp(object sender, ScMouseEventArgs e) { if (metricsList == null) { selectedTxt = ""; } }
private void HitLayer_MouseDoubleClick(object sender, ScMouseEventArgs e) { if (MouseDoubleDownEvent != null) { MouseDoubleDownEvent(this, e); } }
private void Slider_MouseDown(object sender, ScMouseEventArgs e) { switch (ScrollOrientation) { case ScScrollOrientation.VERTICAL_SCROLL: downSliderPos = e.Location.Y + slider.Location.Y; downSliderLocation = slider.Location.Y; if (SliderDownEvent != null) { SliderDownEvent(downSliderPos); } break; case ScScrollOrientation.HORIZONTAL_SCROLL: downSliderPos = e.Location.X + slider.Location.X; downSliderLocation = slider.Location.X; if (SliderDownEvent != null) { SliderDownEvent(downSliderPos); } break; } }
private void PrePlane_MouseDown(object sender, ScMouseEventArgs e) { preBtnMouseState = 2; prePlane.Refresh(); scTabHead.PreBtnDown(); }
private void Item_MouseEnterEvent(ScLayerLayoutViewerItem viewerItem, ScMouseEventArgs e) { if (ViewerItemMouseEnterEvent != null) { ViewerItemMouseEnterEvent(viewerItem, e); } }
private void PrePlane_MouseUp(object sender, ScMouseEventArgs e) { preBtnMouseState = 1; prePlane.Refresh(); scTabHead.PreOrNextBtnUp(); }
private void NextPlane_MouseDown(object sender, ScMouseEventArgs e) { nextBtnMouseState = 2; nextPlane.Refresh(); scTabHead.NextBtnDown(); }
private void Slider_MouseMove(object sender, ScMouseEventArgs e) { if (e.Button == MouseButtons.Left) { float offsetX; float offsetY; float x = contentLayer.Location.X; float y = contentLayer.Location.Y; if (canHorSlider) { offsetX = e.Location.X - downWrapperX; x = GetContentPositionX(offsetX); } if (canVerSlider) { offsetY = e.Location.Y - downWrapperY; y = GetContentPositionY(offsetY); } contentLayer.Location = new PointF(x, y); Refresh(); } }
private void HitLayer_MouseEnter(object sender, ScMouseEventArgs e) { if (MouseEnterEvent != null) { MouseEnterEvent(this, e); } }
private void BtnLayer_MouseDown(object sender, ScMouseEventArgs e) { if (e.Button == MouseButtons.Left) { isSelected = true; Refresh(); } }
public void ScMouseWheel(ScMouseEventArgs mouseEventArgs) { if (MouseWheel == null || Enable == false || dispose == true) { return; } MouseWheel(this, mouseEventArgs); }
private void ScVxSlideScreen_MouseDown(object sender, ScMouseEventArgs e) { if (e.Button == MouseButtons.Left) { mouseDownPos.X = e.Location.X; mouseDownPos.Y = e.Location.Y; mouseDownSlideRectPos = new PointF(slideRect.X, slideRect.Y); } }
public void ScMouseDoubleClick(ScMouseEventArgs mouseEventArgs) { if (MouseDoubleClick == null || Enable == false || dispose == true) { return; } MouseDoubleClick(this, mouseEventArgs); }
private void ScScrollContainer_MouseDown(object sender, ScMouseEventArgs e) { downWrapperY = e.Location.Y; downWrapperLocationY = wrapper.Location.Y; if (ContainerDownEvent != null) { ContainerDownEvent(downWrapperY); } }
private void ScScrollContainer_MouseMove(object sender, ScMouseEventArgs e) { if (e.Button == MouseButtons.Left) { float offsetY = e.Location.Y - downWrapperY; ScrollMouseMove(offsetY); Refresh(); } }
private void RootScLayer_MouseDown(object sender, ScMouseEventArgs e) { //点击窗体时,记录鼠标位置,启动移动 if (e.Button == MouseButtons.Left) { controlOrgLocation = control.Location; mouseOrgLocation = Control.MousePosition; isMouseDown = true; } }
private void PrePlane_MouseDown(object sender, ScMouseEventArgs e) { preBtnMouseState = 2; prePlane.Refresh(); if (PevBtnDownEvent != null) { PevBtnDownEvent(); } }
private void NextPlane_MouseDown(object sender, ScMouseEventArgs e) { nextBtnMouseState = 2; nextPlane.Refresh(); if (NextBtnDownEvent != null) { PevBtnDownEvent(); } }
private void NextPlane_MouseUp(object sender, ScMouseEventArgs e) { nextBtnMouseState = 1; nextPlane.Refresh(); if (PevOrNextBtnUpEvent != null) { PevOrNextBtnUpEvent(); } }
private void SimpleTabHeadItem_MouseDown(object sender, ScMouseEventArgs e) { if (this == scTabHead.GetSelectedItem()) { return; } StartAnim(selectedColor); scTabHead.MouseDownItem(this); }
private void ScListViewItem_MouseHover(object sender, ScMouseEventArgs e) { state = 2; if (MouseHoverEvent != null) { MouseHoverEvent(sender); } Refresh(); }
private void Item_MouseDown(object sender, ScMouseEventArgs e) { foreach (ScVxButton2 item in itemList) { if (item != sender) { item.isSelected = false; item.Refresh(); } } }
private void ScTabHeadItem_MouseEnter(object sender, ScMouseEventArgs e) { ScTabHeadItem item = scTabHead.GetSelectedItem(); if (item == this) { return; } StartAnim(enterColor); }
private void RootScLayer_MouseMove(object sender, ScMouseEventArgs e) { //确定开启了移动模式后 if (isMouseDown) { //移动的位置计算 Point mousePos = Control.MousePosition; mousePos.Offset(mouseOffset.X, mouseOffset.Y); control.Location = mousePos; } }
private void ScCheckBox_MouseUp(object sender, ScMouseEventArgs e) { state = 1; RectangleF rect = new RectangleF(0, 0, Width, Height); if (rect.Contains(e.Location)) { isChecked = !isChecked; DrawCheckLayer.Refresh(); } }
private void ScVxImageLoopView_MouseUp(object sender, ScMouseEventArgs e) { if (!isAutoPlay) { return; } if (!isStopPlay) { StartProgressAnim(); } }
private void ScTabHeadItem_MouseEnter(object sender, ScMouseEventArgs e) { if (GetSelectedItemEvent != null) { if (this == GetSelectedItemEvent()) { return; } } StartAnim(enterColor); }
private void ScVxImageLoopView_MouseDown(object sender, ScMouseEventArgs e) { if (!canSlide) { return; } progressAnim.Stop(); downWrapperX = e.Location.X; downLeftScreenLocationX = leftScreen.Location.X; downRightScreenLocationX = rightScreen.Location.X + rightScreen.Width; }