Exemplo n.º 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();
        }
Exemplo n.º 2
0
 void _HeaderItemHitEvent(ScLayerLayoutViewerHeaderItem headerItem, ScMouseEventArgs e)
 {
     if (HeaderItemHitEvent != null)
     {
         HeaderItemHitEvent(headerItem.ItemDataName);
     }
 }
Exemplo n.º 3
0
 private void ScTextView_MouseUp(object sender, ScMouseEventArgs e)
 {
     if (metricsList == null)
     {
         selectedTxt = "";
     }
 }
Exemplo n.º 4
0
 private void HitLayer_MouseDoubleClick(object sender, ScMouseEventArgs e)
 {
     if (MouseDoubleDownEvent != null)
     {
         MouseDoubleDownEvent(this, e);
     }
 }
Exemplo n.º 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;
            }
        }
Exemplo n.º 6
0
        private void PrePlane_MouseDown(object sender, ScMouseEventArgs e)
        {
            preBtnMouseState = 2;
            prePlane.Refresh();

            scTabHead.PreBtnDown();
        }
Exemplo n.º 7
0
 private void Item_MouseEnterEvent(ScLayerLayoutViewerItem viewerItem, ScMouseEventArgs e)
 {
     if (ViewerItemMouseEnterEvent != null)
     {
         ViewerItemMouseEnterEvent(viewerItem, e);
     }
 }
Exemplo n.º 8
0
        private void PrePlane_MouseUp(object sender, ScMouseEventArgs e)
        {
            preBtnMouseState = 1;
            prePlane.Refresh();

            scTabHead.PreOrNextBtnUp();
        }
Exemplo n.º 9
0
        private void NextPlane_MouseDown(object sender, ScMouseEventArgs e)
        {
            nextBtnMouseState = 2;
            nextPlane.Refresh();

            scTabHead.NextBtnDown();
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 11
0
 private void HitLayer_MouseEnter(object sender, ScMouseEventArgs e)
 {
     if (MouseEnterEvent != null)
     {
         MouseEnterEvent(this, e);
     }
 }
Exemplo n.º 12
0
 private void BtnLayer_MouseDown(object sender, ScMouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         isSelected = true;
         Refresh();
     }
 }
Exemplo n.º 13
0
Arquivo: ScLayer.cs Projeto: lypvc/Sc
        public void ScMouseWheel(ScMouseEventArgs mouseEventArgs)
        {
            if (MouseWheel == null || Enable == false || dispose == true)
            {
                return;
            }

            MouseWheel(this, mouseEventArgs);
        }
Exemplo n.º 14
0
 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);
     }
 }
Exemplo n.º 15
0
        public void ScMouseDoubleClick(ScMouseEventArgs mouseEventArgs)
        {
            if (MouseDoubleClick == null || Enable == false || dispose == true)
            {
                return;
            }

            MouseDoubleClick(this, mouseEventArgs);
        }
Exemplo n.º 16
0
        private void ScScrollContainer_MouseDown(object sender, ScMouseEventArgs e)
        {
            downWrapperY         = e.Location.Y;
            downWrapperLocationY = wrapper.Location.Y;

            if (ContainerDownEvent != null)
            {
                ContainerDownEvent(downWrapperY);
            }
        }
Exemplo n.º 17
0
        private void ScScrollContainer_MouseMove(object sender, ScMouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                float offsetY = e.Location.Y - downWrapperY;

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

            if (PevBtnDownEvent != null)
            {
                PevBtnDownEvent();
            }
        }
Exemplo n.º 20
0
        private void NextPlane_MouseDown(object sender, ScMouseEventArgs e)
        {
            nextBtnMouseState = 2;
            nextPlane.Refresh();

            if (NextBtnDownEvent != null)
            {
                PevBtnDownEvent();
            }
        }
Exemplo n.º 21
0
        private void NextPlane_MouseUp(object sender, ScMouseEventArgs e)
        {
            nextBtnMouseState = 1;
            nextPlane.Refresh();

            if (PevOrNextBtnUpEvent != null)
            {
                PevOrNextBtnUpEvent();
            }
        }
Exemplo n.º 22
0
        private void SimpleTabHeadItem_MouseDown(object sender, ScMouseEventArgs e)
        {
            if (this == scTabHead.GetSelectedItem())
            {
                return;
            }

            StartAnim(selectedColor);
            scTabHead.MouseDownItem(this);
        }
Exemplo n.º 23
0
        private void ScListViewItem_MouseHover(object sender, ScMouseEventArgs e)
        {
            state = 2;

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

            Refresh();
        }
Exemplo n.º 24
0
 private void Item_MouseDown(object sender, ScMouseEventArgs e)
 {
     foreach (ScVxButton2 item in itemList)
     {
         if (item != sender)
         {
             item.isSelected = false;
             item.Refresh();
         }
     }
 }
Exemplo n.º 25
0
        private void ScTabHeadItem_MouseEnter(object sender, ScMouseEventArgs e)
        {
            ScTabHeadItem item = scTabHead.GetSelectedItem();

            if (item == this)
            {
                return;
            }

            StartAnim(enterColor);
        }
Exemplo n.º 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;
     }
 }
Exemplo n.º 27
0
        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();
            }
        }
Exemplo n.º 28
0
        private void ScVxImageLoopView_MouseUp(object sender, ScMouseEventArgs e)
        {
            if (!isAutoPlay)
            {
                return;
            }

            if (!isStopPlay)
            {
                StartProgressAnim();
            }
        }
Exemplo n.º 29
0
        private void ScTabHeadItem_MouseEnter(object sender, ScMouseEventArgs e)
        {
            if (GetSelectedItemEvent != null)
            {
                if (this == GetSelectedItemEvent())
                {
                    return;
                }
            }

            StartAnim(enterColor);
        }
Exemplo n.º 30
0
        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;
        }