Bilder werdem erstellt
This commit is contained in:
@@ -81,6 +81,77 @@ namespace BerichtGen
|
||||
|
||||
wordDocument.MailMerge.Execute(fieldnames, fieldvalues);
|
||||
|
||||
IWParagraph iWParagraph = null;
|
||||
var x = wordDocument.Sections;
|
||||
|
||||
foreach(IWSection section in wordDocument.Sections)
|
||||
{
|
||||
IWParagraphCollection paragraphs = section.Paragraphs;
|
||||
|
||||
foreach(IWParagraph item2 in paragraphs)
|
||||
{
|
||||
|
||||
if (item2.Text.StartsWith("@WeitereBilder")) {
|
||||
iWParagraph = item2;
|
||||
if(bilderObjects.Count > 0)
|
||||
{
|
||||
//section.ChildEntities.Clear();
|
||||
iWParagraph.Text = "Weitere Bilder";
|
||||
iWParagraph.AppendBreak(BreakType.LineBreak);
|
||||
IWTable wTable = section.Body.AddTable();
|
||||
wTable.ResetCells(1, 2);
|
||||
wTable.TableFormat.IsAutoResized = true;
|
||||
wTable.TableFormat.IsBreakAcrossPages = false;
|
||||
wTable.TableFormat.Borders.BorderType = BorderStyle.Dot;
|
||||
WTableRow wTableRow = wTable.Rows[0];
|
||||
bool flag = false;
|
||||
int num = -1;
|
||||
foreach (BilderObject foto in bilderObjects)
|
||||
{
|
||||
if (num == -1)
|
||||
num++;
|
||||
|
||||
if (flag)
|
||||
{
|
||||
wTableRow = wTable.AddRow();
|
||||
flag = false;
|
||||
}
|
||||
int index = 1;
|
||||
if (num % 2 == 0)
|
||||
{
|
||||
index = 0;
|
||||
flag = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
iWParagraph = wTableRow.Cells[index].AddParagraph();
|
||||
Image image2 = _listImages[num];
|
||||
if (image2 != null)
|
||||
{
|
||||
iWParagraph.AppendPicture(image2);
|
||||
if (foto != null)
|
||||
{
|
||||
iWParagraph.AppendBreak(BreakType.LineBreak);
|
||||
IWTextRange wTextRange = iWParagraph.AppendText(foto.Kommentar);
|
||||
wTextRange.CharacterFormat.FontName = "Arial";
|
||||
wTextRange.CharacterFormat.FontSize = 10f;
|
||||
}
|
||||
}
|
||||
num++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
iWParagraph.Text = "";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(erzeugeDOC)
|
||||
wordDocument.Save(Path.Combine(savepath,string.Format("{0}.doc",filename)), Syncfusion.DocIO.FormatType.Doc);
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace BerichtGen
|
||||
|
||||
ChartControl chartControl = new ChartControl();
|
||||
chartControl.Size = size;
|
||||
|
||||
|
||||
ChartAxis axis = chartControl.PrimaryYAxis;
|
||||
|
||||
@@ -30,7 +31,7 @@ namespace BerichtGen
|
||||
|
||||
|
||||
layout1.Spacing = 12;
|
||||
|
||||
|
||||
layout1.Axes.Add(axis);
|
||||
|
||||
|
||||
@@ -40,6 +41,7 @@ namespace BerichtGen
|
||||
|
||||
|
||||
int counter = 0;
|
||||
|
||||
|
||||
foreach (UVcsvStrukture pars in input)
|
||||
{
|
||||
@@ -73,7 +75,7 @@ namespace BerichtGen
|
||||
|
||||
axis.TitleFont = new Font("Segeo UI", 14F);
|
||||
|
||||
|
||||
|
||||
chartControl.LegendsPlacement = ChartPlacement.Outside;
|
||||
chartControl.LegendPosition = ChartDock.Bottom;
|
||||
chartControl.LegendAlignment = ChartAlignment.Center;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace KlassenBIB
|
||||
string linerTyp;
|
||||
double harzbedarf = 1.8;
|
||||
uint rueckholgeschwindigkeit;
|
||||
bool geschlosseneEnde = false;
|
||||
bool geschlosseneEnde = false; // Todo Rausschmeißen
|
||||
bool preliner = false;
|
||||
DateTime anfangAushaertung;
|
||||
DateTime endeAushaertung;
|
||||
@@ -191,7 +191,7 @@ namespace KlassenBIB
|
||||
grunddaten["time_start"] = this.AnfangAushaertung;
|
||||
grunddaten["time_ende"] = this.EndeAushaertung;
|
||||
grunddaten["preliner_verwendet"] = this.Preliner ? "ja" : "nein";
|
||||
grunddaten["geschlossene_ende"] = this.GeschlosseneEnde ? "Geschlossenes" : "Offenes";
|
||||
grunddaten["geschlossene_ende"] = Inspektionsobjekt.GeschlossenesEnde ? "Geschlossenes" : "Offenes";
|
||||
|
||||
grunddaten["UVImageTemp"] = Path.Combine(destinationPath, "linerGraph_temp.jpg");
|
||||
grunddaten["UVImageDruck"] = Path.Combine(destinationPath, "linerGraph_druck.jpg");
|
||||
|
||||
@@ -302,7 +302,27 @@ namespace SanSystem
|
||||
Hashtable hashtable = inliner.MakeProtokoll(destinationPath, Database.Datenbank.Instance.loadedProjekt,inliner.Offset);
|
||||
DirectoryInfo directory = Directory.GetParent(destinationPath);
|
||||
string speicherpfad = directory.FullName;
|
||||
BerichtGen.FrmOptions options = new BerichtGen.FrmOptions("JUME", "liner_einbauBlueLight.docx", speicherpfad, inliner.Inspektionsobjekt.Objektbezeichnung, hashtable, new List<BilderObject>());
|
||||
List<BilderObject> bilderObjects = new List<BilderObject>();
|
||||
foreach(Sanierung xsan in inliner.Inspektionsobjekt.Sanierung )
|
||||
{
|
||||
// Debugger.Break();
|
||||
if (xsan is SchachtAnbindung)
|
||||
{
|
||||
SchachtAnbindung schacht = (xsan as SchachtAnbindung);
|
||||
|
||||
foreach(SavedBilder bild in schacht.SavedBilders)
|
||||
{
|
||||
bilderObjects.Add(new BilderObject()
|
||||
{
|
||||
Path = bild.Speicherpfad,
|
||||
Kommentar = string.Format("{0} von Schacht: {1}", bild.Bildname, schacht.SchachtNummer)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
BerichtGen.FrmOptions options = new BerichtGen.FrmOptions("JUME", "liner_einbauBlueLight.docx", speicherpfad, inliner.Inspektionsobjekt.Objektbezeichnung, hashtable, bilderObjects);
|
||||
options.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user