Inheritance: YamuiButton
示例#1
0
        public void Init()
        {
            // draw the go back button
            _goBackButton = new YamuiButtonChar()
            {
                UseWingdings = true,
                ButtonChar   = "ç",
                FakeDisabled = true,
                Size         = new Size(27, 27),
                TabStop      = false,
            };
            _goBackButton.ButtonPressed += GoBackButtonOnButtonPressed;
            Controls.Add(_goBackButton);
            _goBackButton.Location = new Point(0, 6);


            // draw the menus
            _mainButtons = new YamuiTabButtons(CurrentMainMenuList, 0)
            {
                Font             = FontManager.GetFont(FontFunction.MenuMain),
                Height           = 32,
                SpaceBetweenText = 15,
                Location         = new Point(XOffsetTabButton, 0),
                Width            = Width - XOffsetTabButton,
                Anchor           = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right,
                TabStop          = false
            };
            _mainButtons.TabPressed += MainButtonsOnTabPressed;
            Controls.Add(_mainButtons);
            _secondaryButtons = new YamuiTabButtons(CurrentSecondaryMenuList, 0)
            {
                Font             = FontManager.GetFont(FontFunction.MenuSecondary),
                Height           = 18,
                SpaceBetweenText = 13,
                Location         = new Point(XOffsetTabButton + 15, 32),
                Width            = Width - XOffsetTabButton - 15,
                Anchor           = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right,
                TabStop          = false
            };
            _secondaryButtons.TabPressed += SecondaryButtonsOnTabPressed;
            Controls.Add(_secondaryButtons);

            // display the page
            CurrentPage = new Point(0, 0);
        }
示例#2
0
文件: YamuiTab.cs 项目: jcaillon/3P
        public void Init()
        {
            // draw the go back button
            _goBackButton = new YamuiButtonChar() {
                UseWingdings = true,
                ButtonChar = "ç",
                FakeDisabled = true,
                Size = new Size(27, 27),
                TabStop = false,
            };
            _goBackButton.ButtonPressed += GoBackButtonOnButtonPressed;
            Controls.Add(_goBackButton);
            _goBackButton.Location = new Point(0, 6);

            // draw the menus
            _mainButtons = new YamuiTabButtons(CurrentMainMenuList, 0) {
                Font = FontManager.GetFont(FontFunction.MenuMain),
                Height = 32,
                SpaceBetweenText = 15,
                Location = new Point(XOffsetTabButton, 0),
                Width = Width - XOffsetTabButton,
                Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right,
                TabStop = false
            };
            _mainButtons.TabPressed += MainButtonsOnTabPressed;
            Controls.Add(_mainButtons);
            _secondaryButtons = new YamuiTabButtons(CurrentSecondaryMenuList, 0) {
                Font = FontManager.GetFont(FontFunction.MenuSecondary),
                Height = 18,
                SpaceBetweenText = 13,
                Location = new Point(XOffsetTabButton + 15, 32),
                Width = Width - XOffsetTabButton - 15,
                Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right,
                TabStop = false
            };
            _secondaryButtons.TabPressed += SecondaryButtonsOnTabPressed;
            Controls.Add(_secondaryButtons);

            // display the page
            CurrentPage = new Point(0, 0);
        }