예제 #1
0
        private void AddConfigTab(IOverlay overlay)
        {
            var label = overlay.GetType().Name;

            if (overlayNames.ContainsKey(label))
            {
                label = overlayNames[label];
            }

            var tabPage = new ConfigTabPage
            {
                Name      = overlay.Name,
                Text      = label,
                IsOverlay = true,
            };

            var control = overlay.CreateConfigControl();

            if (control != null)
            {
                control.Dock      = DockStyle.Fill;
                control.BackColor = SystemColors.ControlLightLight;
                tabPage.Controls.Add(control);

                this.tabControl.TabPages.Add(tabPage);
                ((GeneralConfigTab)_generalTab.Controls[0]).SetReadmeVisible(false);
            }
        }
예제 #2
0
        private void AddConfigTab(IOverlay overlay)
        {
            var tabPage = new TabPage
            {
                Name = overlay.Name,
                Text = overlay.GetType().Name
            };

            var control = overlay.CreateConfigControl();

            if (control != null)
            {
                control.Dock      = DockStyle.Fill;
                control.BackColor = SystemColors.ControlLightLight;
                tabPage.Controls.Add(control);

                this.tabControl.TabPages.Add(tabPage);
            }
        }