Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
MistressPlague committed Dec 24, 2023
1 parent 5ac8af7 commit 9a0ee1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Easy Minecraft Modpacks/MainUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ModInfo
public static ConfigLib<Configuration> Config;

private static WebClient client = new WebClient();
private readonly string FileExt = "Modpack.json";
private const string FileExt = "Modpack.json";

public MainUI()
{
Expand All @@ -48,7 +48,7 @@ private void openToolStripMenuItem_Click(object sender, EventArgs e)
}

using var popup = new OpenFileDialog();
popup.Filter = "Modpack Config|*.Modpack.json";
popup.Filter = $"Modpack Config|*.{FileExt}";

if (popup.ShowDialog() == DialogResult.OK)
{
Expand Down Expand Up @@ -93,8 +93,8 @@ private void saveToolStripMenuItem_Click(object sender, EventArgs e)
if (Config == null)
{
using var popup = new SaveFileDialog();
popup.Filter = "Modpack Config|*.Modpack.json";
popup.FileName = "NoName.Modpack.json";
popup.Filter = $"Modpack Config|*.{FileExt}";
popup.FileName = $"NoName.{FileExt}";

if (popup.ShowDialog() == DialogResult.OK)
{
Expand Down

0 comments on commit 9a0ee1d

Please sign in to comment.