Files
ArchiSteamFarm/ConfigGenerator/EnhancedPropertyGrid.cs

26 lines
610 B
C#
Raw Normal View History

2016-03-20 05:27:30 +01:00
using System.Windows.Forms;
namespace ConfigGenerator {
internal sealed class EnhancedPropertyGrid : PropertyGrid {
2016-03-20 08:29:27 +01:00
private ASFConfig ASFConfig;
2016-03-20 06:41:12 +01:00
internal EnhancedPropertyGrid(ASFConfig config) : base() {
if (config == null) {
2016-03-20 05:27:30 +01:00
return;
}
2016-03-20 08:29:27 +01:00
ASFConfig = config;
2016-03-20 06:41:12 +01:00
SelectedObject = config;
2016-03-20 05:27:30 +01:00
Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
Dock = DockStyle.Fill;
HelpVisible = false;
ToolbarVisible = false;
}
2016-03-20 08:29:27 +01:00
protected override void OnPropertyValueChanged(PropertyValueChangedEventArgs e) {
base.OnPropertyValueChanged(e);
ASFConfig.Save();
}
2016-03-20 05:27:30 +01:00
}
}