Beispiel #1
0
        public HobbyProjects()
        {
            InitializeComponent();

            mainMenu = MenuBuilderFactory.Build <UserControl>(mainMenuPanel,
                                                              MenuLayout.vertical,
                                                              MenuLocation.left,
                                                              appearance: MenuAppearance.GetDefaultAppearance()
                                                              .SetTabSize(new Size(150, 50))
                                                              .SetTabBackColor(Color.FromArgb(50, 50, 50))
                                                              .SetTabFont(Font)
                                                              .SetTabBorderColor(Color.White)
                                                              .SetTextColor(Color.White),
                                                              eventFunction: OnTabChange);

            mainMenu.CreateTab("Game of Life", new GameOfLife());
            mainMenu.CreateTab("Dot Product", new UserControl());
            mainMenu.CreateTab("Mazes", new UserControl());

            mainMenu.ChangeTab(0);
        }
Beispiel #2
0
        public Form1()
        {
            InitializeComponent();

            horizontalMenu = MenuBuilderFactory.Build <int>(horizontalMenuPanel, MenuLayout.horizontal, MenuLocation.top, eventFunction: OnTabChange);
            verticalMenu   = MenuBuilderFactory.Build <Color>(verticalMenuPanel, eventFunction: OnTabChange, appearance: MenuAppearance.GetDefaultAppearance(new Size(50, 100)).SetTabBackColor(Color.Red).SetBorderWidth(3));

            for (int i = 0; i < 3; i++)
            {
                horizontalMenu.CreateTab(i.ToString(), i);
            }

            verticalMenu.CreateTab("Red", Color.Red);
            verticalMenu.CreateTab("White", Color.White);
            verticalMenu.CreateTab("Blue", Color.Blue);
        }