Bilder werden wieder im Ausdruck angefügt
This commit is contained in:
@@ -67,6 +67,7 @@ namespace SanSystem
|
||||
Database.Datenbank.Instance.loadedProjekt = null;
|
||||
|
||||
if (!Directory.Exists(Projektpfad)) Directory.CreateDirectory(Projektpfad);
|
||||
Database.Datenbank.Instance.TeufelDB.Projekte.Add(projekt);
|
||||
Database.Datenbank.Instance.InitProjekt(projekt, Projektpfad);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -253,6 +253,7 @@ namespace SanSystem
|
||||
{
|
||||
ausdruck.Add((InlinerSanierung)san);
|
||||
}
|
||||
/*
|
||||
else if(san is SchachtAnbindung)
|
||||
{
|
||||
foreach(SavedBilder bild in (san as SchachtAnbindung).SavedBilders)
|
||||
@@ -270,12 +271,33 @@ namespace SanSystem
|
||||
});
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
foreach(InlinerSanierung san in ausdruck)
|
||||
{
|
||||
bilder.Clear();
|
||||
foreach (Sanierung d in san.Inspektionsobjekt.Sanierung)
|
||||
{
|
||||
if (d is SchachtAnbindung)
|
||||
{
|
||||
foreach(SavedBilder c in (d as SchachtAnbindung).SavedBilders)
|
||||
{
|
||||
string komment = String.Empty;
|
||||
if ((d as SchachtAnbindung).SchachtNummer != null)
|
||||
{
|
||||
komment = string.Format("{0} von Schacht: {1}", c.Bildname, (d as SchachtAnbindung).SchachtNummer);
|
||||
}
|
||||
bilder.Add(new BilderObject()
|
||||
{
|
||||
Path = c.Speicherpfad,
|
||||
Kommentar = komment
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
string destinationPath = san.CheckVerzeichnisse(Global.Instance.Projektpfad);
|
||||
Hashtable hashtable = san.MakeProtokoll(destinationPath, Database.Datenbank.Instance.loadedProjekt, DateTime.MinValue);
|
||||
DirectoryInfo directory = Directory.GetParent(destinationPath);
|
||||
|
||||
Reference in New Issue
Block a user