InitializeElement() public static method

public static InitializeElement ( Control c ) : void
c System.Windows.Forms.Control
return void
Ejemplo n.º 1
0
        private void InitializeTabs()
        {
            Tabs = new List <TabInterface> {
                new MainTab(), new SettingsTab(), new HuntsTab(), new LogsTab(), new NotificationsTab(), new PopupsTab(), new DatabaseTab(), new AutoHotkeyTab(), new ScreenshotTab(), new BrowseTab(), new HelpTab(), new SystemTab(), new SummaryTab(), new HUDTab(), new HealthListTab(), new PortraitTab(), new AdvancedTab(), new AboutTab(), new TaskTab(), new Outfiter()
            };
            foreach (TabInterface tab in Tabs)
            {
                List <Control> controlList = new List <Control>();
                foreach (Control c in (tab as Form).Controls)
                {
                    controlList.Add(c);
                    c.Location = new Point(c.Location.X + mainButton.Location.X + mainButton.Width + 4, c.Location.Y + 24);
                    StyleManager.InitializeElement(c);
                    StyleManager.StyleElement(c);
                }
                (tab as Form).Controls.Clear();
                tabControls.Add(controlList);
            }

            foreach (Control c in this.Controls)
            {
                StyleManager.InitializeElement(c);
                StyleManager.StyleElement(c);
            }

            // Manually add controls that appear on multiple pages
            tabControls[3].Add((Tabs[2] as HuntsTab).GetHuntList());
            tabControls[3].Add((Tabs[2] as HuntsTab).GetHuntLabel());
        }