예제 #1
0
        public TaskMgrListHeader(TaskMgrList par)
        {
            parent = par;
            SetStyle(ControlStyles.Selectable, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            items                  = new TaskMgrListHeaderItemCollection();
            items.HearderAdd      += Items_HearderAdd;
            items.HearderRemoved  += Items_HearderRemoved;
            items.HearderInserted += Items_HearderInserted;
            t.Tick                += T_Tick;
            t.Interval             = 40;
            if (par != null)
            {
                vs          = new HScrollBar();
                vs.Name     = "HScrollBarBase";
                vs.Location = new Point(0, par.Height - 16);
                if (par.Width == 0)
                {
                    vs.Width = Width;
                }
                else
                {
                    vs.Width = par.Width - 16;
                }
                vs.Height        = 16;
                vs.Visible       = false;
                vs.ValueChanged += Vs_ValueChanged;
                vs.TabIndex      = 3;
                vs.TabStop       = true;
                vs.Anchor        = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
                vs.Text          = "列表水平滚动条";
                par.Controls.Add(vs);
            }
            lineBrush     = new LinearGradientBrush(new Point(0, 0), new Point(0, 60), Color.Transparent, Color.FromArgb(187, 187, 187));
            hotBrush      = new LinearGradientBrush(new Point(0, 0), new Point(0, 60), Color.FromArgb(254, 216, 200), Color.FromArgb(254, 192, 166));
            hotBrushHover = new LinearGradientBrush(new Point(0, 0), new Point(0, 60), Color.FromArgb(254, 242, 237), Color.FromArgb(254, 212, 194));
            tipToolTip    = new ToolTip();


            LoadAllFonts();
            CanSizeCloum = true;
        }
예제 #2
0
        public TaskMgrListHeader()
        {
            SetStyle(ControlStyles.Selectable, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            items                  = new TaskMgrListHeaderItemCollection();
            items.HearderAdd      += Items_HearderAdd;
            items.HearderRemoved  += Items_HearderRemoved;
            items.HearderInserted += Items_HearderInserted;
            t.Tick                += T_Tick;
            t.Interval             = 40;
            lineBrush              = new LinearGradientBrush(new Point(0, 0), new Point(0, 60), Color.Transparent, Color.FromArgb(187, 187, 187));
            hotBrush               = new LinearGradientBrush(new Point(0, 0), new Point(0, 60), Color.FromArgb(254, 216, 200), Color.FromArgb(254, 192, 166));
            hotBrushHover          = new LinearGradientBrush(new Point(0, 0), new Point(0, 60), Color.FromArgb(254, 242, 237), Color.FromArgb(254, 212, 194));
            tipToolTip             = new ToolTip();

            CanSizeCloum = true;
        }