Bilder werden wieder im Ausdruck angefügt
This commit is contained in:
@@ -61,7 +61,23 @@ namespace SanSystem
|
||||
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||
{
|
||||
if (txt_schachtnummer.Text == "")
|
||||
openFileDialog.InitialDirectory = @"C:\K2000w\BILDER";
|
||||
{
|
||||
bool found = false;
|
||||
foreach(string directory in Directory.EnumerateDirectories(@"C:\K2000w\BILDER"))
|
||||
{
|
||||
if(directory.Contains(Global.Instance.ProjektNummer))
|
||||
{
|
||||
found = true;
|
||||
openFileDialog.InitialDirectory = directory;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
{
|
||||
openFileDialog.InitialDirectory = @"C:\K2000w\BILDER";
|
||||
}
|
||||
}
|
||||
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string source = openFileDialog.FileName;
|
||||
|
||||
Reference in New Issue
Block a user