private void SelectObject(ModConfig modConfig) { modConfig.PropertyChanged += (sender, args) => { propertyGrid1.Refresh(); _pendingChanges = true; // propertyGrid1.ExpandAllGridItems(); }; ModConfig = modConfig; bool expand = propertyGrid1.SelectedObject == null; propertyGrid1.SelectedObject = modConfig; if (expand) propertyGrid1.ExpandAllGridItems(); }
private void CopyTheaters(ModConfig modConfig) { (propertyGrid1.SelectedObject as ModConfig).Theaters = modConfig.Theaters; TypeDescriptor.Refresh(propertyGrid1.SelectedObject); }