public ControlPanel() { tabControl = new TabControl { Pages = { new TabPage { Text = "Output", Content = outputModeEditor = new OutputModeEditor() }, new TabPage { Text = "Filters", Padding = 5, Content = filterEditor = new PluginSettingStoreCollectionEditor <IPositionedPipelineElement <IDeviceReport> >() }, new TabPage { Text = "Pen Settings", Content = penBindingEditor = new PenBindingEditor() }, new TabPage { Text = "Auxiliary Settings", Content = auxBindingEditor = new AuxiliaryBindingEditor() }, new TabPage { Text = "Mouse Settings", Content = mouseBindingEditor = new MouseBindingEditor() }, new TabPage { Text = "Tools", Padding = 5, Content = toolEditor = new PluginSettingStoreCollectionEditor <ITool>() }, new TabPage { Text = "Console", Padding = 5, Content = new LogView() } } }; outputModeEditor.ProfileBinding.Bind(ProfileBinding); penBindingEditor.ProfileBinding.Bind(ProfileBinding); auxBindingEditor.ProfileBinding.Bind(ProfileBinding); mouseBindingEditor.ProfileBinding.Bind(ProfileBinding); filterEditor.StoreCollectionBinding.Bind(ProfileBinding.Child(p => p.Filters)); toolEditor.StoreCollectionBinding.Bind(App.Current, a => a.Settings.Tools); var virtualScreen = AppInfo.PluginManager.BuildServiceProvider().GetService <IVirtualScreen>(); outputModeEditor.SetDisplaySize(virtualScreen.Displays); this.Content = tabControl; }
public ControlPanel() { tabControl = new TabControl { Pages = { new TabPage { Text = "Output", Content = outputModeEditor = new OutputModeEditor() }, new TabPage { Text = "Bindings", Content = bindingEditor = new BindingEditor() }, new TabPage { Text = "Filters", Padding = 5, Content = filterEditor = new PluginSettingStoreCollectionEditor <IPositionedPipelineElement <IDeviceReport> >() }, new TabPage { Text = "Tools", Padding = 5, Content = toolEditor = new PluginSettingStoreCollectionEditor <ITool>() }, new TabPage { Text = "Console", Padding = 5, Content = new LogView() } } }; outputModeEditor.ProfileBinding.Bind(ProfileBinding); bindingEditor.SettingsBinding.Bind(ProfileBinding.Child(p => p.BindingSettings)); filterEditor.StoreCollectionBinding.Bind(ProfileBinding.Child(p => p.Filters)); toolEditor.StoreCollectionBinding.Bind(App.Current, a => a.Settings.Tools); outputModeEditor.SetDisplaySize(DesktopInterop.VirtualScreen.Displays); this.Content = tabControl; }