示例#1
0
        ////////////////////////////////////////////////////////////////////////////       
        public Header(Manager manager, int _columns, int width)
            : base(manager)
        {
            SetDefaultSize(width, 1);
            this.Width = width;
            int defaultWidth = width / _columns;
            buttons = new List<HeaderButton>();
            HeaderButton btn;

            for (int i = 0; i < _columns; i++)
            {
            btn = new HeaderButton(manager);
            btn.Init();
            btn.Top = 0;
            btn.Left = i * defaultWidth;
            btn.Width = defaultWidth;
            buttons.Add(btn);
            this.Add(btn);
            }
            this.Height = buttons[0].Height;
            this.Color = Color.DimGray;
        }
示例#2
0
        private const string lrButton = "Control";       // Layer we will draw (from skin file)
        ////////////////////////////////////////////////////////////////////////////

        #endregion

        #region //// Construstors //////

        ////////////////////////////////////////////////////////////////////////////
        public Header(Manager manager, int _columns, int width)
            : base(manager)
        {
            SetDefaultSize(width, 1);
            this.Width = width;
            int defaultWidth = width / _columns;

            buttons = new List <HeaderButton>();
            HeaderButton btn;

            for (int i = 0; i < _columns; i++)
            {
                btn = new HeaderButton(manager);
                btn.Init();
                btn.Top   = 0;
                btn.Left  = i * defaultWidth;
                btn.Width = defaultWidth;
                buttons.Add(btn);
                this.Add(btn);
            }
            this.Height = buttons[0].Height;
            this.Color  = Color.DimGray;
        }