Exemple #1
0
        public void AddView(ScLayer viewLayer)
        {
            viewContentLayer.Clear();

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

            viewContentLayer.Add(viewLayer);
        }
Exemple #2
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);
            }
        }
Exemple #3
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);
 }
Exemple #4
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);
 }
Exemple #5
0
        public void AddTools(ScLayer toolsLayer)
        {
            toolsContentLayer.Clear();

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

            toolsContentLayer.Add(toolsLayer);
        }
Exemple #6
0
        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();
            }
        }
Exemple #7
0
        public void ReAddAllItems()
        {
            panelView.Clear();

            LinkedListNode<ScTabHeaderItem> node = tabHeadItemListDepth.First;
            for (; node != null; node = node.Next)
            {
                panelView.Add(node.Value);
            }

            if (panelView.Width > Width)
            {
                preNextBtn.Visible = true;
            }

            panelView.Refresh();
        }