Büroexporter geschrieben
Bug behoben, falls der Ordner von K2000 nicht excistiert
This commit is contained in:
@@ -63,15 +63,24 @@ namespace SanSystem
|
||||
if (txt_schachtnummer.Text == "")
|
||||
{
|
||||
bool found = false;
|
||||
foreach(string directory in Directory.EnumerateDirectories(@"C:\K2000w\BILDER"))
|
||||
try
|
||||
{
|
||||
if(directory.Contains(Global.Instance.ProjektNummer))
|
||||
IEnumerable<string> directories = Directory.EnumerateDirectories(@"C:\K2000w\BILDER");
|
||||
foreach (string directory in directories)
|
||||
{
|
||||
found = true;
|
||||
openFileDialog.InitialDirectory = directory;
|
||||
break;
|
||||
if(directory.Contains(Global.Instance.ProjektNummer))
|
||||
{
|
||||
found = true;
|
||||
openFileDialog.InitialDirectory = directory;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(DirectoryNotFoundException)
|
||||
{
|
||||
// Do Nothing
|
||||
}
|
||||
|
||||
if(!found)
|
||||
{
|
||||
openFileDialog.InitialDirectory = @"C:\K2000w\BILDER";
|
||||
|
||||
Reference in New Issue
Block a user