Projekte werden jetzt angezeigt
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -77,6 +77,12 @@
|
||||
<Compile Include="frmObjekteList.Designer.cs">
|
||||
<DependentUpon>frmObjekteList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmProjektList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmProjektList.Designer.cs">
|
||||
<DependentUpon>frmProjektList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FrmSelectNewSan.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -116,6 +122,9 @@
|
||||
<EmbeddedResource Include="frmObjekteList.resx">
|
||||
<DependentUpon>frmObjekteList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmProjektList.resx">
|
||||
<DependentUpon>frmProjektList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmSelectNewSan.resx">
|
||||
<DependentUpon>FrmSelectNewSan.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
27
SanSystem/frmMain.Designer.cs
generated
27
SanSystem/frmMain.Designer.cs
generated
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,4 +120,7 @@
|
||||
<metadata name="mainmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>127, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
69
SanSystem/frmObjektEdit.Designer.cs
generated
69
SanSystem/frmObjektEdit.Designer.cs
generated
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
72
SanSystem/frmProjektList.Designer.cs
generated
Normal file
72
SanSystem/frmProjektList.Designer.cs
generated
Normal file
@@ -0,0 +1,72 @@
|
||||
namespace SanSystem
|
||||
{
|
||||
partial class frmProjektList
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
43
SanSystem/frmProjektList.cs
Normal file
43
SanSystem/frmProjektList.cs
Normal file
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
SanSystem/frmProjektList.resx
Normal file
120
SanSystem/frmProjektList.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in New Issue
Block a user