private void ShowModelControl(PlusPlayDBGenLib.Business.Models model) { if (!PanelControls.Controls.Contains(new ModelViewerControl())) { var control = new ModelViewerControl(model); PanelControls.Controls.Add(control); control.Dock = DockStyle.Fill; } }
public ModelViewerControl(PlusPlayDBGenLib.Business.Models model) { InitializeComponent(); _processor = new PlusPlayProcessors.ModelViewerProcessor(model); TextBoxChangeMode(ChangeMode.ReadOnly); BindingSourceModel.DataSource = _processor.CurrentModel; BindingSourceModel.ResetBindings(false); BindingSourceModelGalleriesList.DataSource = _processor.ModelGalleries; BindingSourceModelGalleriesList.ResetBindings(false); }