diff --git a/Seedstarfield/.vs/Seedstarfield/DesignTimeBuild/.dtbcache.v2 b/Seedstarfield/.vs/Seedstarfield/DesignTimeBuild/.dtbcache.v2 index b37c330..93e91a2 100644 Binary files a/Seedstarfield/.vs/Seedstarfield/DesignTimeBuild/.dtbcache.v2 and b/Seedstarfield/.vs/Seedstarfield/DesignTimeBuild/.dtbcache.v2 differ diff --git a/Seedstarfield/.vs/Seedstarfield/v17/.futdcache.v2 b/Seedstarfield/.vs/Seedstarfield/v17/.futdcache.v2 index c0fd1f1..fdded6c 100644 Binary files a/Seedstarfield/.vs/Seedstarfield/v17/.futdcache.v2 and b/Seedstarfield/.vs/Seedstarfield/v17/.futdcache.v2 differ diff --git a/Seedstarfield/.vs/Seedstarfield/v17/.suo b/Seedstarfield/.vs/Seedstarfield/v17/.suo index 24ea7b9..e182658 100644 Binary files a/Seedstarfield/.vs/Seedstarfield/v17/.suo and b/Seedstarfield/.vs/Seedstarfield/v17/.suo differ diff --git a/Seedstarfield/Form1.Designer.cs b/Seedstarfield/Form1.Designer.cs index aae95ad..aeea5e7 100644 --- a/Seedstarfield/Form1.Designer.cs +++ b/Seedstarfield/Form1.Designer.cs @@ -41,6 +41,7 @@ private void InitializeComponent() label1 = new Label(); label2 = new Label(); generatordropbox = new ComboBox(); + loadesm = new Button(); SuspendLayout(); // // button1 @@ -151,11 +152,22 @@ private void InitializeComponent() generatordropbox.TabIndex = 19; generatordropbox.SelectedIndexChanged += generatordropbox_SelectedIndexChanged; // + // loadesm + // + loadesm.Location = new Point(281, 6); + loadesm.Name = "loadesm"; + loadesm.Size = new Size(102, 23); + loadesm.TabIndex = 20; + loadesm.Text = "Load ESM List"; + loadesm.UseVisualStyleBackColor = true; + loadesm.Click += loadesm_Click; + // // Form1 // AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(437, 718); + Controls.Add(loadesm); Controls.Add(generatordropbox); Controls.Add(label2); Controls.Add(label1); @@ -187,5 +199,6 @@ private void InitializeComponent() private Label label1; private Label label2; private ComboBox generatordropbox; + public Button loadesm; } } \ No newline at end of file diff --git a/Seedstarfield/Form1.cs b/Seedstarfield/Form1.cs index 4287058..cb2db83 100644 --- a/Seedstarfield/Form1.cs +++ b/Seedstarfield/Form1.cs @@ -24,9 +24,14 @@ public Form1() { InitializeComponent(); //Load settings - settings = YamlImporter.getObjectFromFile("settings.yaml"); - //Get list of ESMs - ESMDropdown.Items.AddRange(Utils.GetESM().ToArray()); + try + { + settings = YamlImporter.getObjectFromFile("settings.yaml"); + } + catch (Exception ex) + { + settings = new SeedStarfieldSettings(); + } //Add the generators generatordropbox.Items.Add("POI - Fort"); SSFEventLog.EventLogs = new Queue(); @@ -99,5 +104,12 @@ private void generatordropbox_SelectedIndexChanged(object sender, EventArgs e) { settings.GeneratorName = generatordropbox.SelectedText; } + + private void loadesm_Click(object sender, EventArgs e) + { + //Get list of ESMs + ESMDropdown.Items.AddRange(Utils.GetESM().ToArray()); + + } } } \ No newline at end of file