using SanShared; using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace BerichtGen { public partial class Options : Form { Thread generateProtokollThread; Hashtable grundDaten; string firma; string vorlage; string speicherpfad; string source; List bilderObjects; DataTable tableContent = null; public Options(string firma, string vorlage, string speicherpfad, Hashtable grunddaten, List bilderObjects, DataTable tableContent = null) { InitializeComponent(); this.firma = firma; this.vorlage = vorlage; this.speicherpfad = speicherpfad; this.grundDaten = grunddaten; this.bilderObjects = bilderObjects; this.tableContent = tableContent; this.source = Path.Combine("documents",firma, vorlage); } void Gen() { Bericht bericht = new Bericht(); bericht.Erzeuge(source, speicherpfad, grundDaten,bilderObjects,tableContent); } private void btn_start_Click(object sender, EventArgs e) { generateProtokollThread = new Thread(Gen); generateProtokollThread.IsBackground = true; generateProtokollThread.Start(); while (generateProtokollThread.IsAlive) { } if(rb_yes.Checked) { } this.Close(); } } }