Options fenster repariert
This commit is contained in:
67
BerichtGen/FrmOptions.cs
Normal file
67
BerichtGen/FrmOptions.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using SanShared;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
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 FrmOptions : Form
|
||||
{
|
||||
Thread generateProtokollThread;
|
||||
Hashtable grundDaten;
|
||||
string firma;
|
||||
string vorlage;
|
||||
string speicherpfad;
|
||||
string source;
|
||||
List<BilderObject> bilderObjects;
|
||||
|
||||
DataTable tableContent = null;
|
||||
public FrmOptions(string firma, string vorlage, string speicherpfad, Hashtable grunddaten, List<BilderObject> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user