mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-21 00:38:37 +00:00
52 lines
1.0 KiB
C#
52 lines
1.0 KiB
C#
using System.IO;
|
|
using System.Windows.Forms;
|
|
|
|
namespace ConfigGenerator {
|
|
internal sealed class GlobalConfigPage : TabPage {
|
|
|
|
internal GlobalConfig GlobalConfig { get; private set; }
|
|
|
|
private EnhancedPropertyGrid EnhancedPropertyGrid;
|
|
|
|
internal GlobalConfigPage(string filePath) : base() {
|
|
if (string.IsNullOrEmpty(filePath)) {
|
|
return;
|
|
}
|
|
|
|
GlobalConfig = GlobalConfig.Load(filePath);
|
|
if (GlobalConfig == null) {
|
|
Logging.LogNullError("GlobalConfig");
|
|
return;
|
|
}
|
|
|
|
Text = Path.GetFileNameWithoutExtension(filePath);
|
|
|
|
EnhancedPropertyGrid = new EnhancedPropertyGrid(GlobalConfig);
|
|
Controls.Add(EnhancedPropertyGrid);
|
|
|
|
Panel panel = new Panel() {
|
|
Height = 20,
|
|
Dock = DockStyle.Bottom,
|
|
};
|
|
|
|
panel.Controls.Add(new Button() {
|
|
Dock = DockStyle.Left,
|
|
Text = "Load"
|
|
});
|
|
|
|
panel.Controls.Add(new Button() {
|
|
Dock = DockStyle.Right,
|
|
Text = "Save"
|
|
});
|
|
|
|
Controls.Add(panel);
|
|
}
|
|
|
|
private void InitializeComponent() {
|
|
this.SuspendLayout();
|
|
this.ResumeLayout(false);
|
|
|
|
}
|
|
}
|
|
}
|