예제 #1
0
        private void ScVxSlideTools_SizeChanged(object sender, SizeF oldSize)
        {
            wrapper.Height = Height;

            float itemTotalWidth = itemWidth * itemList.Count();

            if (itemTotalWidth < Width)
            {
                wrapper.Width = Width;
            }
            else
            {
                wrapper.Width = itemTotalWidth;
            }

            wrapper.Location = new PointF(0, 0);


            RectangleF tableRect  = new RectangleF(0, 0, wrapper.Width, wrapper.Height);
            Table      toolstable = new Table(tableRect, 1, itemList.Count());
            int        i          = 0;
            RectangleF itemRect;

            wrapper.Clear();

            foreach (ScLayer item in itemList)
            {
                itemRect      = toolstable.GetCellContentRect(0, i++);
                item.Location = new PointF((int)itemRect.X, (int)itemRect.Y);
                item.Width    = (int)itemRect.Width;
                item.Height   = (int)itemRect.Height;
                wrapper.Add(item);
            }
        }
예제 #2
0
파일: ScTab.cs 프로젝트: lypvc/Sc
        public ScTab(ScMgr scMgr)
            : base(scMgr)
        {
            IsUseDebugPanitCode          = true;
            scTabHead                    = new ScTabHeader(ScMgr);
            scTabHead.SelectedItemEvent += ScTabHead_SelectedItemEvent;

            scTabHead.IsUseDebugPanitCode = true;

            tabHeadBox = new ScLayer(scMgr);
            tabHeadBox.Add(scTabHead);
            Add(tabHeadBox);



            tabBodyBox = new ScLayer(scMgr);
            Add(tabBodyBox);

            tabBodyBox.D2DPaint += TabBodyBox_D2DPaint;

            tabBodyBox.MouseEnter += TabBodyBox_MouseEnter;
            tabBodyBox.MouseLeave += TabBodyBox_MouseLeave;

            SizeChanged += ScTabEx_SizeChanged;
        }
예제 #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 ScScrollBarEx(scmgr);
            scrollBarVertical.ScrollOrientation = ScScrollOrientation.VERTICAL_SCROLL;
            scrollBarVertical.Visible           = false;
            scrollBarVertical.SliderMoveEvent  += ScrollBarVertical_SliderMoveEvent;
            Add(scrollBarVertical);

            scrollBarHorizontal = new ScScrollBarEx(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;
        }
예제 #4
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;
        }
예제 #5
0
 public void AddDate(ScLayer dLayer)
 {
     dateLayer.Clear();
     dLayer.Width    = dateLayer.Width;
     dLayer.Height   = dateLayer.Height;
     dLayer.Location = new PointF(0, 0);
     dateLayer.Add(dLayer);
 }
예제 #6
0
        public void AddTitleLeft(ScLayer layer)
        {
            Remove(titleLeftLayer);

            RectangleF rect;

            if (titleTable != null)
            {
                rect           = titleTable.GetCellContentRect(0, 0);
                layer.Width    = rect.Width;
                layer.Height   = rect.Height;
                layer.Location = new PointF(rect.X, rect.Y);
            }

            titleLayer.Add(layer);
            titleLeftLayer = layer;
        }
예제 #7
0
 public void AddContent(ScLayer cLayer)
 {
     contentLayer.Clear();
     cLayer.Width    = contentLayer.Width - 40;
     cLayer.Height   = contentLayer.Height - 10;
     cLayer.Location = new PointF(20, 0);
     contentLayer.Add(cLayer);
 }
예제 #8
0
        public void AddView(ScLayer viewLayer)
        {
            viewContentLayer.Clear();

            viewLayer.Width  = viewContentLayer.Width;
            viewLayer.Height = viewContentLayer.Height;

            viewContentLayer.Add(viewLayer);
        }
예제 #9
0
        public void AddTools(ScLayer toolsLayer)
        {
            toolsContentLayer.Clear();

            toolsLayer.Width  = toolsContentLayer.Width;
            toolsLayer.Height = toolsContentLayer.Height;

            toolsContentLayer.Add(toolsLayer);
        }
예제 #10
0
파일: ScGridViewCore.cs 프로젝트: lypvc/Sc
        public void SetHeaderTitleLayer(ScLayer headerTitle)
        {
            if (headerTitle == null)
            {
                return;
            }

            headerTitle.IsHitThrough = true;
            headerTitleContainer.Add(headerTitle);
        }
예제 #11
0
        public void AddInfo(ScLayer iLayer)
        {
            float x = infoLayer.Location.X + infoLayer.Width / 4 * 2;
            float y = infoLayer.Location.Y;

            iLayer.Location = new PointF(x, y);
            iLayer.Width    = infoLayer.Width / 5 * 2;
            iLayer.Height   = infoLayer.Height;

            infoLayer.Add(iLayer);
        }
예제 #12
0
        void Init(float w, float h)
        {
            Width  = w;
            Height = h;

            float headHeight = 24;

            if (hideTabHeight)
            {
                headHeight = 0;
            }

            scTabHead = new ScTabHead(ScMgr, Width - 12, headHeight);
            scTabHead.SetItemSize(new SizeF(itemWidth, headHeight));
            scTabHead.upOrBottom         = upOrBottom;
            scTabHead.Location           = new Point(6, 0);
            scTabHead.SelectedItemEvent += ScTabHead_SelectedItemEvent;

            //
            tabHeadBox        = new ScLayer();
            tabHeadBox.Width  = Width;
            tabHeadBox.Height = headHeight;

            tabHeadBox.Add(scTabHead);
            Add(tabHeadBox);

            tabBodyBox = new ScLayer();

            if (upOrBottom == 0)
            {
                float y = tabHeadBox.Location.Y + tabHeadBox.Height;
                tabBodyBox.Location = new PointF(0, y);
                tabBodyBox.Width    = Width;
                tabBodyBox.Height   = Height - tabHeadBox.Height;
            }
            else
            {
                tabBodyBox.Location = new PointF(0, 0);
                tabBodyBox.Width    = Width;
                tabBodyBox.Height   = Height - tabHeadBox.Height;

                float y = tabBodyBox.Location.Y + tabBodyBox.Height - 1;
                tabHeadBox.Location = new PointF(0, y);
            }

            tabBodyBox.D2DPaint += TabBodyBox_D2DPaint;
            tabBodyBox.GDIPaint += TabBodyBox_GDIPaint;

            tabBodyBox.MouseEnter += TabBodyBox_MouseEnter;
            tabBodyBox.MouseLeave += TabBodyBox_MouseLeave;

            Add(tabBodyBox);
        }
예제 #13
0
        private void GridView_CreateHeaderItemDataLayerEvent(ScLayer contentLayer, string name)
        {
            ScLayer headerControl;

            foreach (ColumnSetting columnSetting in columnSettingList)
            {
                if (columnSetting.columnBaseInfo.dataName == name)
                {
                    headerControl = columnSetting.CreateHeaderControl(contentLayer.ScMgr, columnSetting);
                    contentLayer.Add(headerControl);
                    return;
                }
            }
        }
예제 #14
0
        private void GridView_CreateDataItemDataLayerEvent(ScLayerLayoutViewerItem dataItem, ScLayer contentLayer, string name)
        {
            ScLayer itemControl;

            foreach (ColumnSetting columnSetting in columnSettingList)
            {
                if (columnSetting.columnBaseInfo.dataName == name)
                {
                    itemControl = columnSetting.CreateItemControl(contentLayer.ScMgr, columnSetting);
                    contentLayer.Add(itemControl);
                    return;
                }
            }
        }
예제 #15
0
파일: ScTabSharp.cs 프로젝트: zanderzhg/Sc
        public ScTabSharp(int w, int h, int itemWidth = 112, int upOrBottom = 0, bool hideTabHeight = false)
        {
            InitializeComponent();

            Width  = w;
            Height = h;

            #region 防止打开闪烁
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
            SetStyle(ControlStyles.DoubleBuffer, true);         // 双缓冲
            #endregion

            scMgr = new ScMgr(Width, Height);
            scMgr.BackgroundColor = Color.FromArgb(255, 233, 233, 233);
            Controls.Add(scMgr.control);

            root = scMgr.GetRootLayer();

            //
            scTab                    = new ScTab(scMgr, root.Width, root.Height, itemWidth, upOrBottom, hideTabHeight);
            scTab.Location           = new Point(0, 0);
            scTab.SelectedItemEvent += ScTab_SelectedItemEvent;

            root.Add(scTab);



            //
            titleInfoLayer          = new ScLayer();
            titleInfoLayer.Width    = 60;
            titleInfoLayer.Height   = 25;
            titleInfoLayer.Location = new PointF(Width - 60, 0);
            root.Add(titleInfoLayer);

            titleInfoLayer.GDIPaint += TitleInfoLayer_GDIPaint;
        }
예제 #16
0
파일: ScTabHeader.cs 프로젝트: lypvc/Sc
        public ScTabHeaderItem AddItem(string name)
        {
            Size size = TextRenderer.MeasureText(name, font);
            int w = size.Width + 40;

            ScTabHeaderItem item = new ScTabHeaderItem(ScMgr);



            switch (sizeMode)
            {
                case SizeMode.Normal:
                    item.Width = itemSize.Width;
                    item.Height = itemSize.Height;
                    break;

                case SizeMode.Fixed:
                    item.Width = w;
                    item.Height = size.Height;
                    break;
            }

            item.index = tabHeadItemListLocation.Count;
            item.Name = name;
            item.GetSelectedItemEvent += Item_GetSelectedItemEvent;
            item.MouseDownItemEvent += Item_MouseDownItemEvent;
            item.AnimalStopEvent += Item_AnimalStopEvent;
            item.IsHitThrough = false;

            tabHeadItemListLocation.AddLast(item);
            tabHeadItemListDepth.AddLast(item);
            AdjustItemLocation();

            panelView.Add(item);

            return item;
        }
예제 #17
0
        public ScVxMainContentBox()
        {
            infoLayer         = new ScLayer();
            toolsLayer        = new ScLayer();
            toolsShadowLayer  = new ScLayer();
            toolsContentLayer = new ScLayer();


            viewLayer        = new ScLayer();
            viewShadowLayer  = new ScLayer();
            viewContentLayer = new ScLayer();

            toolsShadowLayer.IsHitThrough = true;
            viewShadowLayer.IsHitThrough  = true;

            Add(infoLayer);

            toolsLayer.Add(toolsContentLayer);
            toolsLayer.Add(toolsShadowLayer);
            Add(toolsLayer);

            viewLayer.Add(viewContentLayer);
            viewLayer.Add(viewShadowLayer);
            Add(viewLayer);

            SizeChanged += ScVxMainBox_SizeChanged;


            infoLayer.GDIPaint += InfoLayer_GDIPaint;

            toolsShadowLayer.GDIPaint += ToolsShadowLayer_GDIPaint;
            viewShadowLayer.GDIPaint  += ViewShadowLayer_GDIPaint;


            GDIPaint += ScVxMainBox_GDIPaint;
        }
예제 #18
0
        public ScTabHeadItem AddItem(string name)
        {
            Size size = TextRenderer.MeasureText(name, font);
            int  w    = size.Width + 40;

            ScTabHeadItem item = new ScTabHeadItem(ScMgr, this);

            item.upOrBottom = upOrBottom;
            item.Dock       = ScDockStyle.TopBottom;
            item.Name       = name;

            switch (sizeMode)
            {
            case SizeMode.Normal:
                item.Width  = itemSize.Width;
                item.Height = itemSize.Height;
                break;

            case SizeMode.Fixed:
                item.Width  = w;
                item.Height = size.Height;
                break;
            }

            item.index            = tabHeadItemListLocation.Count;
            item.AnimalStopEvent += Item_AnimalStopEvent;
            item.IsHitThrough     = false;

            tabHeadItemListLocation.AddLast(item);
            tabHeadItemListDepth.AddLast(item);
            AdjustItemLocation();

            panelView.Add(item);

            return(item);
        }
예제 #19
0
파일: ScTab.cs 프로젝트: lypvc/Sc
        private void ScTabHead_SelectedItemEvent(ScTabHeaderItem selectedItem)
        {
            if (tabPageDict.ContainsKey(selectedItem))
            {
                ScLayer tabBodyViewBox = tabPageDict[selectedItem];
                tabBodyBox.Clear();

                tabBodyBox.Add(tabBodyViewBox);

                if (SelectedItemEvent != null)
                {
                    SelectedItemEvent(selectedItem);
                }

                tabBodyViewBox.Refresh();
            }
        }
예제 #20
0
파일: ScTab.cs 프로젝트: lypvc/Sc
        public ScTabHeaderItem AddTabPageContentLayer(string name, ScLayer layer)
        {
            ScTabHeaderItem item = scTabHead.AddItem(name);

            ScLayer tabBodyViewBox = new ScLayer();

            tabBodyViewBox.Location = new Point(5, 5);
            tabBodyViewBox.Width    = tabBodyBox.Width - 10;
            tabBodyViewBox.Height   = tabBodyBox.Height - 10;

            if (layer != null)
            {
                tabBodyViewBox.Add(layer);
            }

            tabPageDict.Add(item, tabBodyViewBox);
            return(item);
        }
예제 #21
0
        void Init(int width, int height, DrawType drawType = DrawType.NOIMAGE)
        {
            cacheRootScLayer = rootScLayer;

            this.drawType     = drawType;
            this.graphicsType = GraphicsType.D2D;

            if (drawType == DrawType.NOIMAGE)
            {
                control        = new ScLayerControl(this);
                control.Width  = width;
                control.Height = height;
                control.Dock   = DockStyle.Fill;
            }
            else
            {
                bitmap = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppPArgb);
                var wicFactory = new ImagingFactory();
                wicBitmap = new WicBitmap(wicFactory, width, height, SharpDX.WIC.PixelFormat.Format32bppPBGRA, BitmapCreateCacheOption.CacheOnLoad);
            }


            GraphicsType = graphicsType;

            D2DGraphics d2dGraph  = (D2DGraphics)graphics;
            Size2       pixelSize = d2dGraph.renderTarget.PixelSize;
            Size2F      logicSize = d2dGraph.renderTarget.Size;

            sizeScale = new SizeF(logicSize.Width / pixelSize.Width, logicSize.Height / pixelSize.Height);


            rootScLayer.ScMgr     = this;
            rootScLayer.Dock      = ScDockStyle.Fill;
            rootScLayer.Name      = "__root__";
            rootScLayer.D2DPaint += RootScControl_D2DPaint;

            rootParent = new ScLayer(this);
            rootParent.DirectionRect = rootScLayer.DirectionRect;
            rootParent.DrawBox       = rootScLayer.DirectionRect;
            rootParent.Add(rootScLayer);

            RegControlEvent();
        }
예제 #22
0
        void Init(UpdateLayerFrm form)
        {
            cacheRootScLayer = rootScLayer;
            drawType         = DrawType.IMAGE;
            controlType      = ControlType.UPDATELAYERFORM;
            form.scMgr       = this;
            control          = form;

            bitmap = new Bitmap(control.Width, control.Height, System.Drawing.Imaging.PixelFormat.Format32bppPArgb);

            var wicFactory = new ImagingFactory();

            wicBitmap = new WicBitmap(
                wicFactory,
                control.Width, control.Height,
                SharpDX.WIC.PixelFormat.Format32bppPBGRA,
                BitmapCreateCacheOption.CacheOnLoad);

            form.bitmap = bitmap;

            this.graphicsType = GraphicsType.D2D;
            GraphicsType      = GraphicsType.D2D;

            D2DGraphics d2dGraph  = (D2DGraphics)graphics;
            Size2       pixelSize = d2dGraph.renderTarget.PixelSize;
            Size2F      logicSize = d2dGraph.renderTarget.Size;

            sizeScale = new SizeF(logicSize.Width / pixelSize.Width, logicSize.Height / pixelSize.Height);

            rootScLayer.ScMgr     = this;
            rootScLayer.Dock      = ScDockStyle.Fill;
            rootScLayer.Name      = "__root__";
            rootScLayer.D2DPaint += RootScControl_D2DPaint;

            rootParent = new ScLayer(this);
            rootParent.DirectionRect = rootScLayer.DirectionRect;
            rootParent.DrawBox       = rootScLayer.DirectionRect;
            rootParent.Add(rootScLayer);


            RegControlEvent();
        }
예제 #23
0
파일: ScVxButton.cs 프로젝트: zanderzhg/Sc
        public ScVxButton()
        {
            IsUsedProgressAnim = false;

            spaceLayer = new ScLayer();
            btnLayer   = new ScVxBtnContentLayer();
            imgLayer   = new ScLayer();

            Add(spaceLayer);
            spaceLayer.Add(btnLayer);
            Add(imgLayer);

            btnLayer.IsUseHitGeometryLayerBound = true;

            // PostTreatmentEffectGDI += ScVxButton_PostTreatmentEffectGDI;
            // ReleasePostTreatmentEffectGDI += ScVxButton_ReleasePostTreatmentEffectGDI;
            SizeChanged += ScVxButton_SizeChanged;

            LostFocus += ScVxButton_LostFocus;
            GotFocus  += ScVxButton_GotFocus;

            btnLayer.GDIPaint += BtnLayer_GDIPaint;
            imgLayer.GDIPaint += ImgLayer_GDIPaint;

            spaceLayer.MouseEnter += BtnLayer_MouseEnter;
            spaceLayer.MouseLeave += BtnLayer_MouseLeave;
            spaceLayer.MouseDown  += BtnLayer_MouseDown;

            GDIPaint += ScVxButton_GDIPaint;


            progressAnim = new ScAnimation(this, 400, true);
            progressAnim.AnimationEvent += ScAnim_AnimationEvent;


            haloAnim = new ScAnimation(this, 600, true);
            haloAnim.AnimationEvent += HaloAnim_AnimationEvent;


            //   zoomAnim = new ScAnimation(this, 20, true);
            //   zoomAnim.AnimationEvent += ZoomAnim_AnimationEvent;
        }
예제 #24
0
        public ScSharpTabHead()
        {
            InitializeComponent();

            #region 防止打开闪烁
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
            SetStyle(ControlStyles.DoubleBuffer, true);         // 双缓冲
            #endregion

            this.Dock = DockStyle.Fill;

            scMgr = new ScMgr(Width, Height);
            scMgr.BackgroundColor = Color.FromArgb(255, 246, 247, 251);
            Controls.Add(scMgr.control);

            root               = scMgr.GetRootLayer();
            scTabHead          = new ScTabHead(scMgr, root.Width, root.Height);
            scTabHead.Location = new Point(0, 0);
            scTabHead.Dock     = ScDockStyle.Fill;
            root.Add(scTabHead);
        }
예제 #25
0
        public ScMgr(int width, int height, GraphicsType graphicsType = GraphicsType.D2D, DrawType drawType = DrawType.NOIMAGE)
        {
            cacheRootScLayer = rootScLayer;

            this.drawType     = drawType;
            this.graphicsType = graphicsType;

            if (drawType == DrawType.NOIMAGE)
            {
                control        = new ScLayerControl(this);
                control.Width  = width;
                control.Height = height;
            }
            else
            {
                bitmap = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppPArgb);

                if (graphicsType == GraphicsType.D2D)
                {
                    var wicFactory = new ImagingFactory();
                    wicBitmap = new WicBitmap(wicFactory, width, height, SharpDX.WIC.PixelFormat.Format32bppPBGRA, BitmapCreateCacheOption.CacheOnLoad);
                }
            }


            GraphicsType = graphicsType;

            rootScLayer.ScMgr     = this;
            rootScLayer.Dock      = ScDockStyle.Fill;
            rootScLayer.Name      = "__root__";
            rootScLayer.D2DPaint += RootScControl_D2DPaint;

            rootParent = new ScLayer(this);
            rootParent.Add(rootScLayer);


            RegControlEvent();
        }
예제 #26
0
        public ScMgr(UpdateLayerFrm form, GraphicsType graphicsType = GraphicsType.D2D)
        {
            cacheRootScLayer = rootScLayer;
            drawType         = DrawType.IMAGE;
            controlType      = ControlType.UPDATELAYERFORM;
            form.scMgr       = this;
            control          = form;

            bitmap = new Bitmap(control.Width, control.Height, System.Drawing.Imaging.PixelFormat.Format32bppPArgb);

            if (graphicsType == GraphicsType.D2D)
            {
                var wicFactory = new ImagingFactory();
                wicBitmap = new WicBitmap(wicFactory, control.Width, control.Height, SharpDX.WIC.PixelFormat.Format32bppPBGRA, BitmapCreateCacheOption.CacheOnLoad);
            }

            form.bitmap = bitmap;

            this.graphicsType = graphicsType;
            GraphicsType      = graphicsType;

            rootScLayer.ScMgr     = this;
            rootScLayer.Dock      = ScDockStyle.Fill;
            rootScLayer.Width     = control.Width;
            rootScLayer.Height    = control.Height;
            rootScLayer.D2DPaint += RootScControl_D2DPaint;

            rootParent = new ScLayer(this);
            rootParent.DirectionRect = rootScLayer.DirectionRect;
            rootParent.DrawBox       = rootScLayer.DirectionRect;
            rootParent.Add(rootScLayer);

            rootScLayer.Layout();

            RegControlEvent();
        }
예제 #27
0
 public void AddContent(ScLayer layer)
 {
     contentLayer.Add(layer);
 }