コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: ScGridViewCore.cs プロジェクト: zanderzhg/Sc
 void _HeaderItemHitEvent(ScLayerLayoutViewerHeaderItem headerItem, ScMouseEventArgs e)
 {
     if (HeaderItemHitEvent != null)
     {
         HeaderItemHitEvent(headerItem.ItemDataName);
     }
 }
コード例 #3
0
 private void ScTextView_MouseUp(object sender, ScMouseEventArgs e)
 {
     if (metricsList == null)
     {
         selectedTxt = "";
     }
 }
コード例 #4
0
 private void HitLayer_MouseDoubleClick(object sender, ScMouseEventArgs e)
 {
     if (MouseDoubleDownEvent != null)
     {
         MouseDoubleDownEvent(this, e);
     }
 }
コード例 #5
0
        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;
            }
        }
コード例 #6
0
ファイル: ScTabPreNexBtn.cs プロジェクト: zanderzhg/Sc
        private void PrePlane_MouseDown(object sender, ScMouseEventArgs e)
        {
            preBtnMouseState = 2;
            prePlane.Refresh();

            scTabHead.PreBtnDown();
        }
コード例 #7
0
 private void Item_MouseEnterEvent(ScLayerLayoutViewerItem viewerItem, ScMouseEventArgs e)
 {
     if (ViewerItemMouseEnterEvent != null)
     {
         ViewerItemMouseEnterEvent(viewerItem, e);
     }
 }
コード例 #8
0
ファイル: ScTabPreNexBtn.cs プロジェクト: zanderzhg/Sc
        private void PrePlane_MouseUp(object sender, ScMouseEventArgs e)
        {
            preBtnMouseState = 1;
            prePlane.Refresh();

            scTabHead.PreOrNextBtnUp();
        }
コード例 #9
0
ファイル: ScTabPreNexBtn.cs プロジェクト: zanderzhg/Sc
        private void NextPlane_MouseDown(object sender, ScMouseEventArgs e)
        {
            nextBtnMouseState = 2;
            nextPlane.Refresh();

            scTabHead.NextBtnDown();
        }
コード例 #10
0
        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();
            }
        }
コード例 #11
0
 private void HitLayer_MouseEnter(object sender, ScMouseEventArgs e)
 {
     if (MouseEnterEvent != null)
     {
         MouseEnterEvent(this, e);
     }
 }
コード例 #12
0
 private void BtnLayer_MouseDown(object sender, ScMouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         isSelected = true;
         Refresh();
     }
 }
コード例 #13
0
ファイル: ScLayer.cs プロジェクト: lypvc/Sc
        public void ScMouseWheel(ScMouseEventArgs mouseEventArgs)
        {
            if (MouseWheel == null || Enable == false || dispose == true)
            {
                return;
            }

            MouseWheel(this, mouseEventArgs);
        }
コード例 #14
0
ファイル: ScVxSlideScreen.cs プロジェクト: zanderzhg/Sc
 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);
     }
 }
コード例 #15
0
ファイル: ScLayer.cs プロジェクト: zanderzhg/Sc
        public void ScMouseDoubleClick(ScMouseEventArgs mouseEventArgs)
        {
            if (MouseDoubleClick == null || Enable == false || dispose == true)
            {
                return;
            }

            MouseDoubleClick(this, mouseEventArgs);
        }
コード例 #16
0
ファイル: ScScrollContainer.cs プロジェクト: zanderzhg/Sc
        private void ScScrollContainer_MouseDown(object sender, ScMouseEventArgs e)
        {
            downWrapperY         = e.Location.Y;
            downWrapperLocationY = wrapper.Location.Y;

            if (ContainerDownEvent != null)
            {
                ContainerDownEvent(downWrapperY);
            }
        }
コード例 #17
0
ファイル: ScScrollContainer.cs プロジェクト: zanderzhg/Sc
        private void ScScrollContainer_MouseMove(object sender, ScMouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                float offsetY = e.Location.Y - downWrapperY;

                ScrollMouseMove(offsetY);
                Refresh();
            }
        }
コード例 #18
0
 private void RootScLayer_MouseDown(object sender, ScMouseEventArgs e)
 {
     //点击窗体时,记录鼠标位置,启动移动
     if (e.Button == MouseButtons.Left)
     {
         controlOrgLocation = control.Location;
         mouseOrgLocation   = Control.MousePosition;
         isMouseDown        = true;
     }
 }
コード例 #19
0
        private void PrePlane_MouseDown(object sender, ScMouseEventArgs e)
        {
            preBtnMouseState = 2;
            prePlane.Refresh();

            if (PevBtnDownEvent != null)
            {
                PevBtnDownEvent();
            }
        }
コード例 #20
0
        private void NextPlane_MouseDown(object sender, ScMouseEventArgs e)
        {
            nextBtnMouseState = 2;
            nextPlane.Refresh();

            if (NextBtnDownEvent != null)
            {
                PevBtnDownEvent();
            }
        }
コード例 #21
0
        private void NextPlane_MouseUp(object sender, ScMouseEventArgs e)
        {
            nextBtnMouseState = 1;
            nextPlane.Refresh();

            if (PevOrNextBtnUpEvent != null)
            {
                PevOrNextBtnUpEvent();
            }
        }
コード例 #22
0
ファイル: ScTabHeadItem.cs プロジェクト: zanderzhg/Sc
        private void SimpleTabHeadItem_MouseDown(object sender, ScMouseEventArgs e)
        {
            if (this == scTabHead.GetSelectedItem())
            {
                return;
            }

            StartAnim(selectedColor);
            scTabHead.MouseDownItem(this);
        }
コード例 #23
0
ファイル: ScListViewItem.cs プロジェクト: zanderzhg/Sc
        private void ScListViewItem_MouseHover(object sender, ScMouseEventArgs e)
        {
            state = 2;

            if (MouseHoverEvent != null)
            {
                MouseHoverEvent(sender);
            }

            Refresh();
        }
コード例 #24
0
ファイル: ScVxSlideTools.cs プロジェクト: zanderzhg/Sc
 private void Item_MouseDown(object sender, ScMouseEventArgs e)
 {
     foreach (ScVxButton2 item in itemList)
     {
         if (item != sender)
         {
             item.isSelected = false;
             item.Refresh();
         }
     }
 }
コード例 #25
0
ファイル: ScTabHeadItem.cs プロジェクト: zanderzhg/Sc
        private void ScTabHeadItem_MouseEnter(object sender, ScMouseEventArgs e)
        {
            ScTabHeadItem item = scTabHead.GetSelectedItem();

            if (item == this)
            {
                return;
            }

            StartAnim(enterColor);
        }
コード例 #26
0
 private void RootScLayer_MouseMove(object sender, ScMouseEventArgs e)
 {
     //确定开启了移动模式后
     if (isMouseDown)
     {
         //移动的位置计算
         Point mousePos = Control.MousePosition;
         mousePos.Offset(mouseOffset.X, mouseOffset.Y);
         control.Location = mousePos;
     }
 }
コード例 #27
0
ファイル: ScCheckBox.cs プロジェクト: zanderzhg/Sc
        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();
            }
        }
コード例 #28
0
ファイル: ScVxImageLoopView.cs プロジェクト: zanderzhg/Sc
        private void ScVxImageLoopView_MouseUp(object sender, ScMouseEventArgs e)
        {
            if (!isAutoPlay)
            {
                return;
            }

            if (!isStopPlay)
            {
                StartProgressAnim();
            }
        }
コード例 #29
0
        private void ScTabHeadItem_MouseEnter(object sender, ScMouseEventArgs e)
        {
            if (GetSelectedItemEvent != null)
            {
                if (this == GetSelectedItemEvent())
                {
                    return;
                }
            }

            StartAnim(enterColor);
        }
コード例 #30
0
ファイル: ScVxImageLoopView.cs プロジェクト: zanderzhg/Sc
        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;
        }