private void LoadFrameConfig(Type clazz, TabPage page, CfgBase config) { CoreConfig core = new CoreConfig(); TabControl sectionsTab = new TabControl(); TabPage sectionPage = new TabPage("Shared"); ConfigurationObjectControlPanel panel = new ConfigurationObjectControlPanel(config, core.Frames); panel.Dock = DockStyle.Fill; sectionPage.Controls.Add(panel); sectionsTab.Controls.Add(sectionPage); foreach (var frame in core.Frames) { config = InstantiateConfig(clazz, clazz.Assembly, frame); sectionPage = new TabPage(frame); panel = new ConfigurationObjectControlPanel(config, frame); panel.Dock = DockStyle.Fill; sectionPage.Controls.Add(panel); sectionsTab.Controls.Add(sectionPage); } sectionsTab.Dock = DockStyle.Fill; page.Controls.Add(sectionsTab); }
private void LoadConfig(TabPage page, CfgBase config) { ConfigurationObjectControlPanel panel = new ConfigurationObjectControlPanel(config); panel.Dock = DockStyle.Fill; page.Controls.Add(panel); }
private void Init(AxisConfig config) { foreach (var axis in mBindings.GetBoundClasses<IAxis>().Where(ax => !ax.IsAbstract)) { if (IsConstrained(axis)) { config.GetDeadzone(axis.Name); config.GetScale(axis.Name); } config.GetBinding(axis.Name); } mPanel = new ConfigurationObjectControlPanel(config); mPanel.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; mPanel.Location = new Point(0, reloadButton.Height); mPanel.Width = Width; mPanel.Height = Height - mPanel.Location.Y; Controls.Add(mPanel); }
private void Init(AxisConfig config) { foreach (var axis in mBindings.GetBoundClasses <IAxis>().Where(ax => !ax.IsAbstract)) { if (IsConstrained(axis)) { config.GetDeadzone(axis.Name); config.GetScale(axis.Name); } config.GetBinding(axis.Name); } mPanel = new ConfigurationObjectControlPanel(config); mPanel.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; mPanel.Location = new Point(0, reloadButton.Height); mPanel.Width = Width; mPanel.Height = Height - mPanel.Location.Y; Controls.Add(mPanel); }