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

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

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

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

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

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

            if (ContainerDownEvent != null)
            {
                ContainerDownEvent(downWrapperY);
            }
        }
Esempio 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();
            }
        }
Esempio n. 18
0
 private void RootScLayer_MouseDown(object sender, ScMouseEventArgs e)
 {
     //点击窗体时,记录鼠标位置,启动移动
     if (e.Button == MouseButtons.Left)
     {
         controlOrgLocation = control.Location;
         mouseOrgLocation   = Control.MousePosition;
         isMouseDown        = true;
     }
 }
Esempio n. 19
0
        private void PrePlane_MouseDown(object sender, ScMouseEventArgs e)
        {
            preBtnMouseState = 2;
            prePlane.Refresh();

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

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

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

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

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

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

            if (item == this)
            {
                return;
            }

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

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

            StartAnim(enterColor);
        }
Esempio 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;
        }