diff --git a/BerichtGen/Bericht.cs b/BerichtGen/Bericht.cs
index 79f11f5..47bb42a 100644
--- a/BerichtGen/Bericht.cs
+++ b/BerichtGen/Bericht.cs
@@ -3,6 +3,7 @@ using Syncfusion.DocIO.DLS;
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
@@ -56,6 +57,7 @@ namespace BerichtGen
fieldvalues[counter] = hashtable.Value.ToString();
}
counter++;
+
}
@@ -66,7 +68,7 @@ namespace BerichtGen
//string[] fieldValues = new string[] { "test.png" };
wordDocument.MailMerge.Execute(fieldnames, fieldvalues);
wordDocument.Save("test.docx", Syncfusion.DocIO.FormatType.Docx);
- wordDocument.Close();
+ //wordDocument.Close();
//wordDocument.MailMerge.ExecuteGroup()
}
private readonly double _cmPixel = 0.393700787;
diff --git a/BerichtGen/Options.cs b/BerichtGen/Options.cs
index 85c7889..2948f62 100644
--- a/BerichtGen/Options.cs
+++ b/BerichtGen/Options.cs
@@ -4,6 +4,7 @@ using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
+using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
@@ -45,7 +46,10 @@ namespace BerichtGen
generateProtokollThread.IsBackground = true;
generateProtokollThread.Start();
- while (generateProtokollThread.IsAlive) ;
+ while (generateProtokollThread.IsAlive)
+ {
+
+ }
if(rb_yes.Checked)
{
diff --git a/Database/Datenbank.cs b/Database/Datenbank.cs
index 5b1f397..03fe903 100644
--- a/Database/Datenbank.cs
+++ b/Database/Datenbank.cs
@@ -15,6 +15,7 @@ namespace Database
public class Datenbank
{
public const string pfad = "./";
+ public string projekt;
public static readonly Datenbank instance = new Datenbank();
public static Datenbank Instance
{
@@ -27,11 +28,14 @@ namespace Database
public KlassenBIB.Projekt loadedProjekt = null;
private string projektpfad = string.Empty;
- public bool LoadProjekt(string filepath)
+ public bool LoadProjekt(string projekt, string projektpfad)
{
+ this.projekt = projekt;
//UnPackProject("18-850","willyteufelchen");
//PackSystem("./projekte/18-850.zip", "./projekte/18-850","willyteufelchen");
- projektpfad = filepath;
+
+ string filepath = Path.Combine(projektpfad, string.Format("{0}.xaml", projekt));
+ this.projektpfad = filepath;
if (File.Exists(filepath))
loadedProjekt = XamlServices.Load(filepath) as KlassenBIB.Projekt;
else
diff --git a/SanSystem/SanSystem.csproj b/SanSystem/SanSystem.csproj
index 9eb6456..d398d5c 100644
--- a/SanSystem/SanSystem.csproj
+++ b/SanSystem/SanSystem.csproj
@@ -77,6 +77,12 @@
frmObjekteList.cs
+
+ Form
+
+
+ frmProjektList.cs
+
Form
@@ -116,6 +122,9 @@
frmObjekteList.cs
+
+ frmProjektList.cs
+
FrmSelectNewSan.cs
diff --git a/SanSystem/frmMain.Designer.cs b/SanSystem/frmMain.Designer.cs
index 7a8bf3f..b0d955a 100644
--- a/SanSystem/frmMain.Designer.cs
+++ b/SanSystem/frmMain.Designer.cs
@@ -32,7 +32,10 @@
this.projektToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.neuToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.öffnenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.statusStrip1 = new System.Windows.Forms.StatusStrip();
+ this.toolStripStatus_projekt_Label = new System.Windows.Forms.ToolStripStatusLabel();
this.mainmenu.SuspendLayout();
+ this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// mainmenu
@@ -66,22 +69,42 @@
this.öffnenToolStripMenuItem.Name = "öffnenToolStripMenuItem";
this.öffnenToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.öffnenToolStripMenuItem.Text = "Öffnen";
+ this.öffnenToolStripMenuItem.Click += new System.EventHandler(this.öffnenToolStripMenuItem_Click);
+ //
+ // statusStrip1
+ //
+ this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripStatus_projekt_Label});
+ this.statusStrip1.Location = new System.Drawing.Point(0, 351);
+ this.statusStrip1.Name = "statusStrip1";
+ this.statusStrip1.Size = new System.Drawing.Size(596, 22);
+ this.statusStrip1.TabIndex = 3;
+ this.statusStrip1.Text = "statusStrip1";
+ //
+ // toolStripStatus_projekt_Label
+ //
+ this.toolStripStatus_projekt_Label.Name = "toolStripStatus_projekt_Label";
+ this.toolStripStatus_projekt_Label.Size = new System.Drawing.Size(44, 17);
+ this.toolStripStatus_projekt_Label.Text = "Projekt";
//
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(596, 373);
+ this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.mainmenu);
this.IsMdiContainer = true;
this.MainMenuStrip = this.mainmenu;
- this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+ this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "frmMain";
this.Text = "Kanalsanierungsverwaltung";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frm_main_FormClosing);
this.Load += new System.EventHandler(this.frm_main_Load);
this.mainmenu.ResumeLayout(false);
this.mainmenu.PerformLayout();
+ this.statusStrip1.ResumeLayout(false);
+ this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -93,6 +116,8 @@
private System.Windows.Forms.ToolStripMenuItem projektToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem neuToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem öffnenToolStripMenuItem;
+ private System.Windows.Forms.StatusStrip statusStrip1;
+ private System.Windows.Forms.ToolStripStatusLabel toolStripStatus_projekt_Label;
}
}
diff --git a/SanSystem/frmMain.cs b/SanSystem/frmMain.cs
index cff0c14..26620c4 100644
--- a/SanSystem/frmMain.cs
+++ b/SanSystem/frmMain.cs
@@ -24,7 +24,7 @@ namespace SanSystem
if (!Directory.Exists(Global.Instance.Projektpfad)) Directory.CreateDirectory(Global.Instance.Projektpfad);
- Datenbank.Instance.LoadProjekt(Path.Combine(Global.Instance.Projektpfad,"18-850.xaml"));
+ Datenbank.Instance.LoadProjekt("18-850", Global.Instance.Projektpfad);// Path.Combine(Global.Instance.Projektpfad,"18-850.xaml"));
//Datenbank.Instance.CreateProjekt("");
@@ -38,6 +38,7 @@ namespace SanSystem
neuToolStripMenuItem.Text = Global.Instance.language.Labels["mainmenu_projekt_new"];
öffnenToolStripMenuItem.Text = Global.Instance.language.Labels["mainmenu_projekt_open"];
+ toolStripStatus_projekt_Label.Text = Datenbank.Instance.projekt;
}
@@ -65,5 +66,12 @@ namespace SanSystem
{
}
+
+ private void öffnenToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ //
+ frmProjektList frmProjektList = new frmProjektList();
+ frmProjektList.ShowDialog();
+ }
}
}
diff --git a/SanSystem/frmMain.resx b/SanSystem/frmMain.resx
index 8376617..907dbc2 100644
--- a/SanSystem/frmMain.resx
+++ b/SanSystem/frmMain.resx
@@ -120,4 +120,7 @@
17, 17
+
+ 127, 17
+
\ No newline at end of file
diff --git a/SanSystem/frmObjektEdit.Designer.cs b/SanSystem/frmObjektEdit.Designer.cs
index 9ae78c0..12a473c 100644
--- a/SanSystem/frmObjektEdit.Designer.cs
+++ b/SanSystem/frmObjektEdit.Designer.cs
@@ -56,6 +56,7 @@
this.label1 = new System.Windows.Forms.Label();
this.btn_close = new System.Windows.Forms.Button();
this.btn_add_san = new System.Windows.Forms.Button();
+ this.btn_delete = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox2.SuspendLayout();
@@ -97,11 +98,11 @@
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.label1);
this.tabPage1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tabPage1.Location = new System.Drawing.Point(4, 34);
+ this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
- this.tabPage1.Size = new System.Drawing.Size(1256, 574);
+ this.tabPage1.Size = new System.Drawing.Size(1256, 579);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Grunddaten";
this.tabPage1.UseVisualStyleBackColor = true;
@@ -111,7 +112,7 @@
this.txt_objekt_name.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_objekt_name.Location = new System.Drawing.Point(192, 67);
this.txt_objekt_name.Name = "txt_objekt_name";
- this.txt_objekt_name.Size = new System.Drawing.Size(330, 30);
+ this.txt_objekt_name.Size = new System.Drawing.Size(330, 26);
this.txt_objekt_name.TabIndex = 2;
//
// lbl_objektname
@@ -120,7 +121,7 @@
this.lbl_objektname.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_objektname.Location = new System.Drawing.Point(9, 70);
this.lbl_objektname.Name = "lbl_objektname";
- this.lbl_objektname.Size = new System.Drawing.Size(118, 25);
+ this.lbl_objektname.Size = new System.Drawing.Size(95, 20);
this.lbl_objektname.TabIndex = 25;
this.lbl_objektname.Text = "Objektname";
//
@@ -165,7 +166,7 @@
"Ziegelwerk"});
this.cb_material.Location = new System.Drawing.Point(192, 252);
this.cb_material.Name = "cb_material";
- this.cb_material.Size = new System.Drawing.Size(323, 33);
+ this.cb_material.Size = new System.Drawing.Size(323, 28);
this.cb_material.TabIndex = 6;
//
// groupBox2
@@ -187,7 +188,7 @@
this.txt_haltungslaenge.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_haltungslaenge.Location = new System.Drawing.Point(188, 21);
this.txt_haltungslaenge.Name = "txt_haltungslaenge";
- this.txt_haltungslaenge.Size = new System.Drawing.Size(136, 30);
+ this.txt_haltungslaenge.Size = new System.Drawing.Size(136, 26);
this.txt_haltungslaenge.TabIndex = 11;
//
// txt_laenge_schacht
@@ -195,7 +196,7 @@
this.txt_laenge_schacht.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_laenge_schacht.Location = new System.Drawing.Point(188, 112);
this.txt_laenge_schacht.Name = "txt_laenge_schacht";
- this.txt_laenge_schacht.Size = new System.Drawing.Size(136, 30);
+ this.txt_laenge_schacht.Size = new System.Drawing.Size(136, 26);
this.txt_laenge_schacht.TabIndex = 13;
//
// label21
@@ -204,7 +205,7 @@
this.label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label21.Location = new System.Drawing.Point(6, 114);
this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(132, 25);
+ this.label21.Size = new System.Drawing.Size(107, 20);
this.label21.TabIndex = 21;
this.label21.Text = "Schachtlänge";
//
@@ -214,7 +215,7 @@
this.checkBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.checkBox1.Location = new System.Drawing.Point(9, 75);
this.checkBox1.Name = "checkBox1";
- this.checkBox1.Size = new System.Drawing.Size(210, 29);
+ this.checkBox1.Size = new System.Drawing.Size(172, 24);
this.checkBox1.TabIndex = 12;
this.checkBox1.Text = "Geschlossene Ende";
this.checkBox1.UseVisualStyleBackColor = true;
@@ -226,7 +227,7 @@
this.label6.Location = new System.Drawing.Point(5, 26);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(137, 25);
+ this.label6.Size = new System.Drawing.Size(112, 20);
this.label6.TabIndex = 5;
this.label6.Text = "Haltungslänge";
//
@@ -239,7 +240,7 @@
this.dt_haltunggemessen_datum.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dt_haltunggemessen_datum.Name = "dt_haltunggemessen_datum";
this.dt_haltunggemessen_datum.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.dt_haltunggemessen_datum.Size = new System.Drawing.Size(354, 30);
+ this.dt_haltunggemessen_datum.Size = new System.Drawing.Size(354, 26);
this.dt_haltunggemessen_datum.TabIndex = 10;
//
// label20
@@ -249,7 +250,7 @@
this.label20.Location = new System.Drawing.Point(8, 300);
this.label20.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label20.Name = "label20";
- this.label20.Size = new System.Drawing.Size(265, 25);
+ this.label20.Size = new System.Drawing.Size(216, 20);
this.label20.TabIndex = 16;
this.label20.Text = "Haltungslänge gemessen am";
//
@@ -259,7 +260,7 @@
this.txt_hausnummer.Location = new System.Drawing.Point(758, 85);
this.txt_hausnummer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_hausnummer.Name = "txt_hausnummer";
- this.txt_hausnummer.Size = new System.Drawing.Size(148, 30);
+ this.txt_hausnummer.Size = new System.Drawing.Size(148, 26);
this.txt_hausnummer.TabIndex = 8;
//
// txt_strasse
@@ -268,7 +269,7 @@
this.txt_strasse.Location = new System.Drawing.Point(758, 35);
this.txt_strasse.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_strasse.Name = "txt_strasse";
- this.txt_strasse.Size = new System.Drawing.Size(320, 30);
+ this.txt_strasse.Size = new System.Drawing.Size(320, 26);
this.txt_strasse.TabIndex = 7;
//
// label19
@@ -278,7 +279,7 @@
this.label19.Location = new System.Drawing.Point(560, 89);
this.label19.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label19.Name = "label19";
- this.label19.Size = new System.Drawing.Size(129, 25);
+ this.label19.Size = new System.Drawing.Size(105, 20);
this.label19.TabIndex = 13;
this.label19.Text = "Hausnummer";
//
@@ -289,7 +290,7 @@
this.label18.Location = new System.Drawing.Point(560, 40);
this.label18.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label18.Name = "label18";
- this.label18.Size = new System.Drawing.Size(79, 25);
+ this.label18.Size = new System.Drawing.Size(64, 20);
this.label18.TabIndex = 12;
this.label18.Text = "Strasse";
//
@@ -299,7 +300,7 @@
this.txt_dn.Location = new System.Drawing.Point(192, 201);
this.txt_dn.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_dn.Name = "txt_dn";
- this.txt_dn.Size = new System.Drawing.Size(330, 30);
+ this.txt_dn.Size = new System.Drawing.Size(330, 26);
this.txt_dn.TabIndex = 5;
//
// txt_punkt_bis
@@ -308,7 +309,7 @@
this.txt_punkt_bis.Location = new System.Drawing.Point(192, 153);
this.txt_punkt_bis.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_punkt_bis.Name = "txt_punkt_bis";
- this.txt_punkt_bis.Size = new System.Drawing.Size(330, 30);
+ this.txt_punkt_bis.Size = new System.Drawing.Size(330, 26);
this.txt_punkt_bis.TabIndex = 4;
//
// txt_punkt_von
@@ -317,7 +318,7 @@
this.txt_punkt_von.Location = new System.Drawing.Point(192, 107);
this.txt_punkt_von.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_punkt_von.Name = "txt_punkt_von";
- this.txt_punkt_von.Size = new System.Drawing.Size(330, 30);
+ this.txt_punkt_von.Size = new System.Drawing.Size(330, 26);
this.txt_punkt_von.TabIndex = 3;
//
// txt_pro_nr
@@ -326,7 +327,7 @@
this.txt_pro_nr.Location = new System.Drawing.Point(192, 31);
this.txt_pro_nr.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_pro_nr.Name = "txt_pro_nr";
- this.txt_pro_nr.Size = new System.Drawing.Size(330, 30);
+ this.txt_pro_nr.Size = new System.Drawing.Size(330, 26);
this.txt_pro_nr.TabIndex = 1;
//
// label5
@@ -336,7 +337,7 @@
this.label5.Location = new System.Drawing.Point(9, 255);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(81, 25);
+ this.label5.Size = new System.Drawing.Size(65, 20);
this.label5.TabIndex = 4;
this.label5.Text = "Material";
//
@@ -347,7 +348,7 @@
this.label4.Location = new System.Drawing.Point(9, 204);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(128, 25);
+ this.label4.Size = new System.Drawing.Size(104, 20);
this.label4.TabIndex = 3;
this.label4.Text = "Durchmesser";
//
@@ -358,7 +359,7 @@
this.label3.Location = new System.Drawing.Point(9, 156);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(94, 25);
+ this.label3.Size = new System.Drawing.Size(76, 20);
this.label3.TabIndex = 2;
this.label3.Text = "Bis Punkt";
//
@@ -369,7 +370,7 @@
this.label2.Location = new System.Drawing.Point(9, 110);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(103, 25);
+ this.label2.Size = new System.Drawing.Size(83, 20);
this.label2.TabIndex = 1;
this.label2.Text = "Von Punkt";
//
@@ -380,7 +381,7 @@
this.label1.Location = new System.Drawing.Point(9, 35);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(143, 25);
+ this.label1.Size = new System.Drawing.Size(116, 20);
this.label1.TabIndex = 0;
this.label1.Text = "Projektnummer";
//
@@ -398,21 +399,32 @@
// btn_add_san
//
this.btn_add_san.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btn_add_san.Location = new System.Drawing.Point(224, 644);
+ this.btn_add_san.Location = new System.Drawing.Point(224, 641);
this.btn_add_san.Name = "btn_add_san";
- this.btn_add_san.Size = new System.Drawing.Size(202, 47);
+ this.btn_add_san.Size = new System.Drawing.Size(202, 50);
this.btn_add_san.TabIndex = 30;
this.btn_add_san.Text = "Add San";
this.btn_add_san.UseVisualStyleBackColor = true;
this.btn_add_san.Click += new System.EventHandler(this.btn_add_san_Click);
//
+ // btn_delete
+ //
+ this.btn_delete.Location = new System.Drawing.Point(569, 642);
+ this.btn_delete.Name = "btn_delete";
+ this.btn_delete.Size = new System.Drawing.Size(166, 49);
+ this.btn_delete.TabIndex = 31;
+ this.btn_delete.Text = "Löschen";
+ this.btn_delete.UseVisualStyleBackColor = true;
+ this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click);
+ //
// frmObjektEdit
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(1290, 702);
this.ControlBox = false;
+ this.Controls.Add(this.btn_delete);
this.Controls.Add(this.btn_add_san);
this.Controls.Add(this.btn_close);
this.Controls.Add(this.tabControl1);
@@ -461,5 +473,6 @@
private System.Windows.Forms.TextBox txt_objekt_name;
private System.Windows.Forms.Label lbl_objektname;
private System.Windows.Forms.Button btn_add_san;
+ private System.Windows.Forms.Button btn_delete;
}
}
\ No newline at end of file
diff --git a/SanSystem/frmObjektEdit.cs b/SanSystem/frmObjektEdit.cs
index 9e390f5..2351002 100644
--- a/SanSystem/frmObjektEdit.cs
+++ b/SanSystem/frmObjektEdit.cs
@@ -10,6 +10,7 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using SanShared;
using System.Collections;
+using Database;
namespace SanSystem
{
@@ -163,6 +164,9 @@ namespace SanSystem
tabControl1.TabPages.Add(tab);
}
-
+ private void btn_delete_Click(object sender, EventArgs e)
+ {
+ Datenbank.Instance.loadedProjekt.Objekte.Remove(inspektionsobjekt);
+ }
}
}
diff --git a/SanSystem/frmProjektList.Designer.cs b/SanSystem/frmProjektList.Designer.cs
new file mode 100644
index 0000000..0ab5476
--- /dev/null
+++ b/SanSystem/frmProjektList.Designer.cs
@@ -0,0 +1,72 @@
+namespace SanSystem
+{
+ partial class frmProjektList
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.lb_projekte = new System.Windows.Forms.ListBox();
+ this.btn_ok = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // lb_projekte
+ //
+ this.lb_projekte.FormattingEnabled = true;
+ this.lb_projekte.Location = new System.Drawing.Point(20, 17);
+ this.lb_projekte.Name = "lb_projekte";
+ this.lb_projekte.Size = new System.Drawing.Size(176, 381);
+ this.lb_projekte.TabIndex = 0;
+ //
+ // btn_ok
+ //
+ this.btn_ok.Location = new System.Drawing.Point(202, 17);
+ this.btn_ok.Name = "btn_ok";
+ this.btn_ok.Size = new System.Drawing.Size(146, 60);
+ this.btn_ok.TabIndex = 1;
+ this.btn_ok.Text = "OK";
+ this.btn_ok.UseVisualStyleBackColor = true;
+ this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+ //
+ // frmProjektList
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(357, 424);
+ this.Controls.Add(this.btn_ok);
+ this.Controls.Add(this.lb_projekte);
+ this.Name = "frmProjektList";
+ this.Text = "Verfügbare Projekte";
+ this.Load += new System.EventHandler(this.frmProjektList_Load);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ListBox lb_projekte;
+ private System.Windows.Forms.Button btn_ok;
+ }
+}
\ No newline at end of file
diff --git a/SanSystem/frmProjektList.cs b/SanSystem/frmProjektList.cs
new file mode 100644
index 0000000..2d5b0fa
--- /dev/null
+++ b/SanSystem/frmProjektList.cs
@@ -0,0 +1,43 @@
+using System;
+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.Tasks;
+using System.Windows.Forms;
+
+namespace SanSystem
+{
+ public partial class frmProjektList : Form
+ {
+ public frmProjektList()
+ {
+ InitializeComponent();
+ }
+
+ private void frmProjektList_Load(object sender, EventArgs e)
+ {
+
+ foreach(DirectoryInfo projekte in (new DirectoryInfo("./projekte").GetDirectories()))
+ {
+ lb_projekte.Items.Add(projekte.Name);
+ }
+ }
+
+ private void btn_ok_Click(object sender, EventArgs e)
+ {
+ string projekt = (string)lb_projekte.SelectedItem;
+ if (projekt == null) return;
+
+ if(Database.Datenbank.Instance.projekt != projekt)
+ {
+ Database.Datenbank.Instance.SaveProjekt();
+ Database.Datenbank.Instance.LoadProjekt(projekt, Global.Instance.Projektpfad);
+ }
+ this.Close();
+ }
+ }
+}
diff --git a/SanSystem/frmProjektList.resx b/SanSystem/frmProjektList.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/SanSystem/frmProjektList.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file