mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
catch exceptions during app command line parsing.
This commit is contained in:
parent
b2d0e15215
commit
1e390eed1e
14
App.xaml.cs
14
App.xaml.cs
@ -67,20 +67,20 @@ namespace GARbro.GUI
|
|||||||
Trace.AutoFlush = true;
|
Trace.AutoFlush = true;
|
||||||
#endif
|
#endif
|
||||||
Trace.WriteLine ("ApplicationStartup --------------------------------", "GARbro.GUI.App");
|
Trace.WriteLine ("ApplicationStartup --------------------------------", "GARbro.GUI.App");
|
||||||
if (0 != e.Args.Length)
|
try
|
||||||
{
|
{
|
||||||
InitPath = Path.GetFullPath (e.Args[0]);
|
if (0 != e.Args.Length)
|
||||||
}
|
{
|
||||||
else if (!string.IsNullOrEmpty (Settings.Default.appLastDirectory))
|
InitPath = Path.GetFullPath (e.Args[0]);
|
||||||
{
|
}
|
||||||
try
|
else if (!string.IsNullOrEmpty (Settings.Default.appLastDirectory))
|
||||||
{
|
{
|
||||||
string last_dir = Settings.Default.appLastDirectory;
|
string last_dir = Settings.Default.appLastDirectory;
|
||||||
Directory.SetCurrentDirectory (last_dir);
|
Directory.SetCurrentDirectory (last_dir);
|
||||||
InitPath = last_dir;
|
InitPath = last_dir;
|
||||||
}
|
}
|
||||||
catch { }
|
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
if (string.IsNullOrEmpty (InitPath))
|
if (string.IsNullOrEmpty (InitPath))
|
||||||
InitPath = Directory.GetCurrentDirectory();
|
InitPath = Directory.GetCurrentDirectory();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user