mirror of
https://github.com/WB3000/nusdownloader.git
synced 2024-11-17 07:09:21 +01:00
Small script changes
This commit is contained in:
parent
071894f8de
commit
97b010e8ec
@ -3129,6 +3129,7 @@ namespace NUS_Downloader
|
|||||||
//throw new NotImplementedException();
|
//throw new NotImplementedException();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// Add directories w/ scripts in \scripts\
|
||||||
foreach (string directory in Directory.GetDirectories(Path.Combine(CURRENT_DIR, "scripts"), "*", SearchOption.TopDirectoryOnly))
|
foreach (string directory in Directory.GetDirectories(Path.Combine(CURRENT_DIR, "scripts"), "*", SearchOption.TopDirectoryOnly))
|
||||||
{
|
{
|
||||||
if (Directory.GetFiles(directory, "*.nus", SearchOption.TopDirectoryOnly).Length > 0)
|
if (Directory.GetFiles(directory, "*.nus", SearchOption.TopDirectoryOnly).Length > 0)
|
||||||
@ -3146,11 +3147,26 @@ namespace NUS_Downloader
|
|||||||
nus_script_item.Text = finfo.Name;
|
nus_script_item.Text = finfo.Name;
|
||||||
nus_script_item.Image = Properties.Resources.script_go;
|
nus_script_item.Image = Properties.Resources.script_go;
|
||||||
folder_item.DropDownItems.Add(nus_script_item);
|
folder_item.DropDownItems.Add(nus_script_item);
|
||||||
|
|
||||||
|
// TODO: OnItemClicked...
|
||||||
}
|
}
|
||||||
|
|
||||||
scriptsLocalMenuEntry.DropDownItems.Add(folder_item);
|
scriptsLocalMenuEntry.DropDownItems.Add(folder_item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add scripts in \scripts\
|
||||||
|
foreach (string nusscript in Directory.GetFiles(Path.Combine(CURRENT_DIR, "scripts"), "*.nus", SearchOption.TopDirectoryOnly))
|
||||||
|
{
|
||||||
|
FileInfo finfo = new FileInfo(nusscript);
|
||||||
|
ToolStripMenuItem nus_script_item = new ToolStripMenuItem();
|
||||||
|
nus_script_item.Text = finfo.Name;
|
||||||
|
nus_script_item.Image = Properties.Resources.script_go;
|
||||||
|
scriptsLocalMenuEntry.DropDownItems.Add(nus_script_item);
|
||||||
|
|
||||||
|
// TODO: OnItemClicked...
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (DirectoryNotFoundException)
|
catch (DirectoryNotFoundException)
|
||||||
{
|
{
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
Make more compatible with mono.
|
Make more compatible with mono.
|
||||||
Finish scripting improvements.
|
Finish scripting improvements.
|
||||||
|
|
||||||
|
Routine:
|
||||||
|
Verify version number before releases!
|
Loading…
Reference in New Issue
Block a user