MainForm.cs - Rename 'LoadFromPath' to 'LoadPck'

This commit is contained in:
miku-666
2023-01-13 16:48:39 +01:00
parent 3c94ced692
commit 0b32b8470a
2 changed files with 6 additions and 6 deletions

View File

@@ -88,7 +88,7 @@ namespace PckStudio
};
}
public void LoadFromPath(string filepath)
public void LoadPck(string filepath)
{
treeViewMain.Nodes.Clear();
currentPCK = openPck(filepath);
@@ -147,7 +147,7 @@ namespace PckStudio
ofd.Filter = "PCK (Minecraft Console Package)|*.pck";
if (ofd.ShowDialog() == DialogResult.OK)
{
LoadFromPath(ofd.FileName);
LoadPck(ofd.FileName);
}
}
}
@@ -1887,7 +1887,7 @@ namespace PckStudio
string[] Filepaths = (string[])e.Data.GetData(DataFormats.FileDrop, false);
if (Filepaths.Length > 1)
MessageBox.Show("Only one pck file at a time is currently supported");
LoadFromPath(Filepaths[0]);
LoadPck(Filepaths[0]);
}
private void OpenPck_DragLeave(object sender, EventArgs e)

View File

@@ -23,10 +23,10 @@ namespace PckStudio
System.Globalization.CultureInfo.CurrentCulture.NumberFormat = System.Globalization.NumberFormatInfo.InvariantInfo;
var f = new MainForm();
var mianForm = new MainForm();
if (args.Length > 0 && File.Exists(args[0]) && args[0].EndsWith(".pck"))
f.LoadFromPath(args[0]);
Application.Run(f);
mianForm.LoadPck(args[0]);
Application.Run(mianForm);
}
}
}