Ejemplo n.º 1
0
        public ScScrollContainer()
        {
            view = new ScLayer();
            Add(view);

            wrapper = new ScWrapper();
            view.Add(wrapper);

            hScrollBar                 = new ScScrollBar();
            hScrollBar.Visible         = false;
            hScrollBar.IsHitThrough    = false;
            hScrollBar.scrollContainer = this;
            hScrollBar.SetScrollContainerMoveEvent();
            Add(hScrollBar);

            hScrollBar.SliderMoveEvent += HScrollBar_SliderMoveEvent;
            hScrollBar.SliderDownEvent += HScrollBar_SliderDownEvent;

            MouseDown += ScScrollContainer_MouseDown;
            MouseMove += ScScrollContainer_MouseMove;
            MouseUp   += ScScrollContainer_MouseUp;

            mouseHook.MouseWheel += MouseHook_MouseWheel;
            // mouseHook.Start();

            SizeChanged += ScScrollContainer_SizeChanged;
        }
Ejemplo n.º 2
0
        public ScScrollContainer(int w, int h)
        {
            Width  = w;
            Height = h;

            wrapper          = new ScWrapper(w, h);
            wrapper.Location = new PointF(0, 0);
            Add(wrapper);

            hScrollBar                 = new ScScrollBar(8, h);
            hScrollBar.Location        = new Point(w - 8, 0);
            hScrollBar.Visible         = false;
            hScrollBar.IsHitThrough    = false;
            hScrollBar.scrollContainer = this;
            hScrollBar.SetScrollContainerMoveEvent();
            Add(hScrollBar);

            hScrollBar.SliderMoveEvent += HScrollBar_SliderMoveEvent;
            hScrollBar.SliderDownEvent += HScrollBar_SliderDownEvent;

            MouseDown += ScScrollContainer_MouseDown;
            MouseMove += ScScrollContainer_MouseMove;
            MouseUp   += ScScrollContainer_MouseUp;

            mouseHook.MouseWheel += MouseHook_MouseWheel;
            // mouseHook.Start();
        }
Ejemplo n.º 3
0
        public ScGridViewCoreContainer(ScMgr scmgr)
            : base(scmgr)
        {
            IsUseDebugPanitCode = true;

            seletorScreen      = new ScLayer(scmgr);
            seletorScreen.Name = "seletorScreen";
            seletorScreen.IsUseDebugPanitCode = true;

            gridViewPack      = new ScLayer(scmgr);
            gridViewPack.Name = "gridViewPack";
            gridViewPack.IsUseDebugPanitCode = true;
            Add(gridViewPack);

            gridViewCore      = new ScGridViewCore(scmgr);
            gridViewCore.Name = "gridViewCore";
            gridViewCore.IsUseDebugPanitCode             = true;
            gridViewCore.ItemDirectClipLayer             = seletorScreen;
            gridViewCore.HeaderItemValueChangedEvent    += GridViewContainer_HeaderItemValueChangedEvent;
            gridViewCore.ContentSizeChangedEvent        += GridViewContainer_ContentSizeChangedEvent;
            gridViewCore.HeaderItemHitEvent             += GridViewContainer_HeaderItemHitEvent;
            gridViewCore.CreateHeaderItemDataLayerEvent += GridViewContainer_CreateHeaderItemDataLayerEvent;
            gridViewCore.CreateDataItemDataLayerEvent   += GridViewContainer_CreateDataItemDataLayerEvent;
            gridViewCore.ItemDataSetValueEvent          += GridViewContainer_ItemDataSetValueEvent;
            gridViewCore.UserLayerValueChangedEvent     += GridViewContainer_UserLayerValueChangedEvent;
            gridViewCore.ViewerItemMouseEnterEvent      += GridViewContainer_ViewerItemMouseEnterEvent;
            gridViewCore.ViewerItemMouseDownEvent       += GridViewContainer_ViewerItemMouseDownEvent;
            gridViewCore.ViewerItemMouseLeaveEvent      += GridViewContainer_ViewerItemMouseLeaveEvent;
            gridViewCore.ViewerItemMouseDoubleDownEvent += GridViewContainer_ViewerItemMouseDoubleDownEvent;

            gridViewPack.Add(gridViewCore);

            Add(seletorScreen);


            //
            scrollBarVertical = new ScScrollBar(scmgr);
            scrollBarVertical.ScrollOrientation = ScScrollOrientation.VERTICAL_SCROLL;
            scrollBarVertical.Visible           = false;
            scrollBarVertical.SliderMoveEvent  += ScrollBarVertical_SliderMoveEvent;
            Add(scrollBarVertical);

            scrollBarHorizontal = new ScScrollBar(scmgr);
            scrollBarHorizontal.ScrollOrientation = ScScrollOrientation.HORIZONTAL_SCROLL;
            scrollBarHorizontal.Visible           = false;
            scrollBarHorizontal.SliderMoveEvent  += ScrollBarHorizontal_SliderMoveEvent;
            Add(scrollBarHorizontal);


            //
            shadow = new ScShadow(scmgr);
            shadow.CornersRadius = ShadowCornersRadius;
            shadow.ShadowRadius  = ShadowRange;
            shadow.ShadowColor   = ShadowColor;
            ShadowLayer          = shadow;

            SizeChanged     += ScGridView_SizeChanged;
            LocationChanged += ScGridView_LocationChanged;
            D2DPaint        += ScGridView_D2DPaint;
        }