mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-21 19:40:58 +00:00
Fixed a crash when adding opening the dialog to add a directory resource on Mono Winforms
This commit is contained in:
parent
e1ce00aa84
commit
349a6b0953
1 changed files with 4 additions and 0 deletions
|
@ -283,6 +283,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
bool flag = false;
|
||||
|
||||
#if !MONO_WINFORMS
|
||||
if (Environment.OSVersion.Version.Major >= 6)
|
||||
{
|
||||
var r = new Reflector("System.Windows.Forms");
|
||||
|
@ -313,6 +314,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
var fbd = new FolderBrowserDialog();
|
||||
fbd.Description = this.Title;
|
||||
fbd.SelectedPath = this.InitialDirectory;
|
||||
|
@ -320,7 +322,9 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
if (fbd.ShowDialog(new WindowWrapper(hWndOwner)) != DialogResult.OK) return false;
|
||||
ofd.FileName = fbd.SelectedPath;
|
||||
flag = true;
|
||||
#if !MONO_WINFORMS
|
||||
}
|
||||
#endif
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue