mirror of
https://github.com/kwsch/NHSE.git
synced 2026-09-26 20:07:11 -05:00
Add pattern bulk import
#443 Pattern names don't update on the left side (even for single-imports), don't bother for now. Just save & reopen the editor.
This commit is contained in:
@@ -76,6 +76,20 @@ private void B_DumpDesign_Click(object sender, EventArgs e)
|
||||
|
||||
private void B_LoadDesign_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ModifierKeys == Keys.Shift)
|
||||
{
|
||||
using var fbd = new FolderBrowserDialog();
|
||||
if (fbd.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
var dir = Path.GetDirectoryName(fbd.SelectedPath);
|
||||
if (dir == null || !Directory.Exists(dir))
|
||||
return;
|
||||
Patterns.Load(fbd.SelectedPath);
|
||||
LoadPattern(Patterns[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
var original = Patterns[Index];
|
||||
var name = original.DesignName;
|
||||
using var ofd = new OpenFileDialog
|
||||
|
||||
@@ -76,6 +76,20 @@ private void B_DumpDesign_Click(object sender, EventArgs e)
|
||||
|
||||
private void B_LoadDesign_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ModifierKeys == Keys.Shift)
|
||||
{
|
||||
using var fbd = new FolderBrowserDialog();
|
||||
if (fbd.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
var dir = Path.GetDirectoryName(fbd.SelectedPath);
|
||||
if (dir == null || !Directory.Exists(dir))
|
||||
return;
|
||||
Patterns.Load(fbd.SelectedPath);
|
||||
LoadPattern(Patterns[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
var original = Patterns[Index];
|
||||
var name = original.DesignName;
|
||||
using var ofd = new OpenFileDialog
|
||||
|
||||
Reference in New Issue
Block a user