bug fixes
This commit is contained in:
parent
f105533c64
commit
b995afe019
|
|
@ -1182,6 +1182,7 @@ namespace NovetusLauncher
|
||||||
}
|
}
|
||||||
|
|
||||||
string mapname = Path.GetFileName(ofd.FileName);
|
string mapname = Path.GetFileName(ofd.FileName);
|
||||||
|
bool success = true;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -1190,13 +1191,16 @@ namespace NovetusLauncher
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Novetus has experienced an error when adding your map file: " + ex.Message + "\n\nYour file has not been added. Please try again.", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show("Novetus has experienced an error when adding your map file: " + ex.Message + "\n\nYour file has not been added. Please try again.", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
success = false;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (File.Exists(GlobalPaths.MapsDir + @"\\" + mapname))
|
if (success)
|
||||||
{
|
{
|
||||||
|
RefreshMaps();
|
||||||
Tree.SelectedNode = TreeNodeHelper.SearchTreeView(mapname, Tree.Nodes);
|
Tree.SelectedNode = TreeNodeHelper.SearchTreeView(mapname, Tree.Nodes);
|
||||||
MessageBox.Show("The map '" + mapname + "' was successfully added to Novetus!" , "Novetus - Map Upload Confirmation");
|
Tree.Focus();
|
||||||
|
MessageBox.Show("The map '" + mapname + "' was successfully added to Novetus!" , "Novetus - Map Added", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue