From 1112644cfed0786cc6794a825e20fbbc834faa52 Mon Sep 17 00:00:00 2001 From: HuskyTeufel Date: Thu, 29 Apr 2021 12:42:49 +0200 Subject: [PATCH] Es wird nach aktuelle Besatzung gefragt --- SanSystem/FrmAktuelleBesatzung.Designer.cs | 114 ++++++++++++++++++++ SanSystem/FrmAktuelleBesatzung.cs | 26 +++++ SanSystem/FrmAktuelleBesatzung.resx | 120 +++++++++++++++++++++ SanSystem/Global.cs | 2 + SanSystem/SanSystem.csproj | 9 ++ SanSystem/UCInliner.Designer.cs | 57 +++++----- SanSystem/UCInliner.cs | 8 ++ SanSystem/frmMain.cs | 4 + SanSystem/frmStrassenList.cs | 2 +- 9 files changed, 313 insertions(+), 29 deletions(-) create mode 100644 SanSystem/FrmAktuelleBesatzung.Designer.cs create mode 100644 SanSystem/FrmAktuelleBesatzung.cs create mode 100644 SanSystem/FrmAktuelleBesatzung.resx diff --git a/SanSystem/FrmAktuelleBesatzung.Designer.cs b/SanSystem/FrmAktuelleBesatzung.Designer.cs new file mode 100644 index 0000000..b0add2b --- /dev/null +++ b/SanSystem/FrmAktuelleBesatzung.Designer.cs @@ -0,0 +1,114 @@ + +namespace SanSystem +{ + partial class FrmAktuelleBesatzung + { + /// + /// 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.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.txt_vorarbeiter = new System.Windows.Forms.TextBox(); + this.txt_nacharbeiter = new System.Windows.Forms.TextBox(); + this.btn_ok = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(415, 20); + this.label1.TabIndex = 0; + this.label1.Text = "Wer möchte sich Heute die Weltherschaft an sich reißen?"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(244, 35); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(13, 20); + this.label2.TabIndex = 1; + this.label2.Text = "/"; + // + // txt_vorarbeiter + // + this.txt_vorarbeiter.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txt_vorarbeiter.Location = new System.Drawing.Point(12, 32); + this.txt_vorarbeiter.Name = "txt_vorarbeiter"; + this.txt_vorarbeiter.Size = new System.Drawing.Size(226, 26); + this.txt_vorarbeiter.TabIndex = 2; + // + // txt_nacharbeiter + // + this.txt_nacharbeiter.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txt_nacharbeiter.Location = new System.Drawing.Point(263, 32); + this.txt_nacharbeiter.Name = "txt_nacharbeiter"; + this.txt_nacharbeiter.Size = new System.Drawing.Size(226, 26); + this.txt_nacharbeiter.TabIndex = 3; + // + // btn_ok + // + this.btn_ok.BackColor = System.Drawing.SystemColors.InactiveCaption; + this.btn_ok.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btn_ok.Location = new System.Drawing.Point(12, 64); + this.btn_ok.Name = "btn_ok"; + this.btn_ok.Size = new System.Drawing.Size(477, 87); + this.btn_ok.TabIndex = 4; + this.btn_ok.Text = "OK"; + this.btn_ok.UseVisualStyleBackColor = false; + this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click); + // + // FrmAktuelleBesatzung + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(503, 168); + this.ControlBox = false; + this.Controls.Add(this.btn_ok); + this.Controls.Add(this.txt_nacharbeiter); + this.Controls.Add(this.txt_vorarbeiter); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FrmAktuelleBesatzung"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txt_vorarbeiter; + private System.Windows.Forms.TextBox txt_nacharbeiter; + private System.Windows.Forms.Button btn_ok; + } +} \ No newline at end of file diff --git a/SanSystem/FrmAktuelleBesatzung.cs b/SanSystem/FrmAktuelleBesatzung.cs new file mode 100644 index 0000000..d4fb7ad --- /dev/null +++ b/SanSystem/FrmAktuelleBesatzung.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace SanSystem +{ + public partial class FrmAktuelleBesatzung : Form + { + public FrmAktuelleBesatzung() + { + InitializeComponent(); + } + + private void btn_ok_Click(object sender, EventArgs e) + { + Global.Instance.AktuelleBesatzung = string.Format("{0} / {1}", txt_vorarbeiter.Text, txt_nacharbeiter.Text); + this.Close(); + } + } +} diff --git a/SanSystem/FrmAktuelleBesatzung.resx b/SanSystem/FrmAktuelleBesatzung.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SanSystem/FrmAktuelleBesatzung.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 diff --git a/SanSystem/Global.cs b/SanSystem/Global.cs index 376e24a..964d8d4 100644 --- a/SanSystem/Global.cs +++ b/SanSystem/Global.cs @@ -23,6 +23,8 @@ namespace SanSystem const string speicherpfad_to_projekts = "projekte"; private readonly string programmversion = string.Empty; + public string AktuelleBesatzung = string.Empty; + string projektpfad = "18-850"; string statusMessage = ""; diff --git a/SanSystem/SanSystem.csproj b/SanSystem/SanSystem.csproj index b579df8..0494ab0 100644 --- a/SanSystem/SanSystem.csproj +++ b/SanSystem/SanSystem.csproj @@ -120,6 +120,12 @@ + + Form + + + FrmAktuelleBesatzung.cs + Form @@ -263,6 +269,9 @@ UCWerkseitigImprägniert.cs + + FrmAktuelleBesatzung.cs + frmAuftraggeberEdit.cs diff --git a/SanSystem/UCInliner.Designer.cs b/SanSystem/UCInliner.Designer.cs index 2cb79ba..10809d4 100644 --- a/SanSystem/UCInliner.Designer.cs +++ b/SanSystem/UCInliner.Designer.cs @@ -104,11 +104,11 @@ this.tabPage2.Controls.Add(this.cb_stvo); this.tabPage2.Controls.Add(this.cb_wasserhaltung); this.tabPage2.Controls.Add(this.cb_genehmigung); - this.tabPage2.Location = new System.Drawing.Point(4, 34); + this.tabPage2.Location = new System.Drawing.Point(4, 29); this.tabPage2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.tabPage2.Size = new System.Drawing.Size(1336, 664); + this.tabPage2.Size = new System.Drawing.Size(1336, 669); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "Vorraussetzungen"; this.tabPage2.UseVisualStyleBackColor = true; @@ -128,7 +128,7 @@ this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(713, 337); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(42, 25); + this.label6.Size = new System.Drawing.Size(34, 20); this.label6.TabIndex = 42; this.label6.Text = "Bar"; // @@ -136,7 +136,7 @@ // this.txt_einbaudruck.Location = new System.Drawing.Point(564, 334); this.txt_einbaudruck.Name = "txt_einbaudruck"; - this.txt_einbaudruck.Size = new System.Drawing.Size(138, 30); + this.txt_einbaudruck.Size = new System.Drawing.Size(138, 26); this.txt_einbaudruck.TabIndex = 41; // // label5 @@ -144,7 +144,7 @@ this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(398, 337); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(121, 25); + this.label5.Size = new System.Drawing.Size(98, 20); this.label5.TabIndex = 40; this.label5.Text = "Einbaudruck"; // @@ -167,7 +167,7 @@ this.cb_preliner.Location = new System.Drawing.Point(8, 130); this.cb_preliner.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cb_preliner.Name = "cb_preliner"; - this.cb_preliner.Size = new System.Drawing.Size(253, 29); + this.cb_preliner.Size = new System.Drawing.Size(205, 24); this.cb_preliner.TabIndex = 38; this.cb_preliner.Text = "Preliner wurde verwendet"; this.cb_preliner.UseVisualStyleBackColor = true; @@ -176,15 +176,16 @@ // this.txt_besatzung.Location = new System.Drawing.Point(564, 264); this.txt_besatzung.Name = "txt_besatzung"; - this.txt_besatzung.Size = new System.Drawing.Size(296, 30); + this.txt_besatzung.Size = new System.Drawing.Size(296, 26); this.txt_besatzung.TabIndex = 37; + this.txt_besatzung.Enter += new System.EventHandler(this.txt_besatzung_Enter); // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(398, 267); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(105, 25); + this.label2.Size = new System.Drawing.Size(86, 20); this.label2.TabIndex = 36; this.label2.Text = "Besatzung"; // @@ -205,7 +206,7 @@ this.cb_mech.AutoSize = true; this.cb_mech.Location = new System.Drawing.Point(6, 90); this.cb_mech.Name = "cb_mech"; - this.cb_mech.Size = new System.Drawing.Size(140, 29); + this.cb_mech.Size = new System.Drawing.Size(113, 24); this.cb_mech.TabIndex = 2; this.cb_mech.Text = "Mechanisch"; this.cb_mech.UseVisualStyleBackColor = true; @@ -215,7 +216,7 @@ this.cb_roboter.AutoSize = true; this.cb_roboter.Location = new System.Drawing.Point(6, 60); this.cb_roboter.Name = "cb_roboter"; - this.cb_roboter.Size = new System.Drawing.Size(102, 29); + this.cb_roboter.Size = new System.Drawing.Size(86, 24); this.cb_roboter.TabIndex = 1; this.cb_roboter.Text = "Roboter"; this.cb_roboter.UseVisualStyleBackColor = true; @@ -227,7 +228,7 @@ this.cb_hd.CheckState = System.Windows.Forms.CheckState.Checked; this.cb_hd.Location = new System.Drawing.Point(6, 29); this.cb_hd.Name = "cb_hd"; - this.cb_hd.Size = new System.Drawing.Size(67, 29); + this.cb_hd.Size = new System.Drawing.Size(56, 24); this.cb_hd.TabIndex = 0; this.cb_hd.Text = "HD "; this.cb_hd.UseVisualStyleBackColor = true; @@ -265,7 +266,7 @@ this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(398, 237); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(132, 25); + this.label1.Size = new System.Drawing.Size(108, 20); this.label1.TabIndex = 27; this.label1.Text = "Eingebaut am"; // @@ -273,7 +274,7 @@ // this.dt_eingebaut.Location = new System.Drawing.Point(562, 232); this.dt_eingebaut.Name = "dt_eingebaut"; - this.dt_eingebaut.Size = new System.Drawing.Size(325, 30); + this.dt_eingebaut.Size = new System.Drawing.Size(325, 26); this.dt_eingebaut.TabIndex = 26; // // cb_fertig @@ -283,7 +284,7 @@ this.cb_fertig.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cb_fertig.Location = new System.Drawing.Point(13, 323); this.cb_fertig.Name = "cb_fertig"; - this.cb_fertig.Size = new System.Drawing.Size(122, 43); + this.cb_fertig.Size = new System.Drawing.Size(100, 35); this.cb_fertig.TabIndex = 25; this.cb_fertig.Text = "Fertig"; this.cb_fertig.UseVisualStyleBackColor = true; @@ -299,7 +300,7 @@ "Schnee - Eisschmelze"}); this.cbb_wetter.Location = new System.Drawing.Point(564, 296); this.cbb_wetter.Name = "cbb_wetter"; - this.cbb_wetter.Size = new System.Drawing.Size(191, 33); + this.cbb_wetter.Size = new System.Drawing.Size(191, 28); this.cbb_wetter.TabIndex = 23; // // label24 @@ -308,7 +309,7 @@ this.label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label24.Location = new System.Drawing.Point(398, 300); this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(70, 25); + this.label24.Size = new System.Drawing.Size(57, 20); this.label24.TabIndex = 24; this.label24.Text = "Wetter"; // @@ -334,14 +335,14 @@ // this.txt_einbau_temp.Location = new System.Drawing.Point(229, 166); this.txt_einbau_temp.Name = "txt_einbau_temp"; - this.txt_einbau_temp.Size = new System.Drawing.Size(100, 30); + this.txt_einbau_temp.Size = new System.Drawing.Size(100, 26); this.txt_einbau_temp.TabIndex = 22; // // txt_lagerung_temp // this.txt_lagerung_temp.Location = new System.Drawing.Point(229, 123); this.txt_lagerung_temp.Name = "txt_lagerung_temp"; - this.txt_lagerung_temp.Size = new System.Drawing.Size(100, 30); + this.txt_lagerung_temp.Size = new System.Drawing.Size(100, 26); this.txt_lagerung_temp.TabIndex = 21; // // label4 @@ -349,7 +350,7 @@ this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(15, 171); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(168, 25); + this.label4.Size = new System.Drawing.Size(136, 20); this.label4.TabIndex = 20; this.label4.Text = "Liner beim Einbau"; // @@ -358,7 +359,7 @@ this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(15, 123); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(131, 25); + this.label3.Size = new System.Drawing.Size(106, 20); this.label3.TabIndex = 19; this.label3.Text = "Linerlagerung"; // @@ -376,14 +377,14 @@ // this.txt_temp_kanal.Location = new System.Drawing.Point(229, 75); this.txt_temp_kanal.Name = "txt_temp_kanal"; - this.txt_temp_kanal.Size = new System.Drawing.Size(100, 30); + this.txt_temp_kanal.Size = new System.Drawing.Size(100, 26); this.txt_temp_kanal.TabIndex = 18; // // txt_temp_aussen // this.txt_temp_aussen.Location = new System.Drawing.Point(229, 32); this.txt_temp_aussen.Name = "txt_temp_aussen"; - this.txt_temp_aussen.Size = new System.Drawing.Size(100, 30); + this.txt_temp_aussen.Size = new System.Drawing.Size(100, 26); this.txt_temp_aussen.TabIndex = 17; // // label23 @@ -391,7 +392,7 @@ this.label23.AutoSize = true; this.label23.Location = new System.Drawing.Point(15, 80); this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(63, 25); + this.label23.Size = new System.Drawing.Size(49, 20); this.label23.TabIndex = 1; this.label23.Text = "Kanal"; // @@ -400,7 +401,7 @@ this.label22.AutoSize = true; this.label22.Location = new System.Drawing.Point(15, 34); this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(79, 25); + this.label22.Size = new System.Drawing.Size(63, 20); this.label22.TabIndex = 0; this.label22.Text = "Aussen"; // @@ -413,7 +414,7 @@ this.cb_stvo.Location = new System.Drawing.Point(8, 91); this.cb_stvo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cb_stvo.Name = "cb_stvo"; - this.cb_stvo.Size = new System.Drawing.Size(323, 29); + this.cb_stvo.Size = new System.Drawing.Size(263, 24); this.cb_stvo.TabIndex = 16; this.cb_stvo.Text = "Es wurde nach StVO abgesichert"; this.cb_stvo.UseVisualStyleBackColor = true; @@ -427,7 +428,7 @@ this.cb_wasserhaltung.Location = new System.Drawing.Point(8, 57); this.cb_wasserhaltung.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cb_wasserhaltung.Name = "cb_wasserhaltung"; - this.cb_wasserhaltung.Size = new System.Drawing.Size(329, 29); + this.cb_wasserhaltung.Size = new System.Drawing.Size(269, 24); this.cb_wasserhaltung.TabIndex = 15; this.cb_wasserhaltung.Text = "Wasserhaltung wurde eingerichtet"; this.cb_wasserhaltung.UseVisualStyleBackColor = true; @@ -441,14 +442,14 @@ this.cb_genehmigung.Location = new System.Drawing.Point(8, 23); this.cb_genehmigung.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cb_genehmigung.Name = "cb_genehmigung"; - this.cb_genehmigung.Size = new System.Drawing.Size(299, 29); + this.cb_genehmigung.Size = new System.Drawing.Size(245, 24); this.cb_genehmigung.TabIndex = 14; this.cb_genehmigung.Text = "Genehmigung wurde eingeholt"; this.cb_genehmigung.UseVisualStyleBackColor = true; // // UCInliner // - this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.tabControl1); this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); diff --git a/SanSystem/UCInliner.cs b/SanSystem/UCInliner.cs index d5d078c..d5fe08a 100644 --- a/SanSystem/UCInliner.cs +++ b/SanSystem/UCInliner.cs @@ -396,5 +396,13 @@ namespace SanSystem generateDichtheitsprüfung.Start(); } + + private void txt_besatzung_Enter(object sender, EventArgs e) + { + if (txt_besatzung.Text.Equals(string.Empty) && Global.Instance.AktuelleBesatzung != string.Empty) + { + txt_besatzung.Text = Global.Instance.AktuelleBesatzung; + } + } } } diff --git a/SanSystem/frmMain.cs b/SanSystem/frmMain.cs index 83b7398..2767471 100644 --- a/SanSystem/frmMain.cs +++ b/SanSystem/frmMain.cs @@ -81,6 +81,10 @@ namespace SanSystem frmLinerReste.Show(); +#if !DEBUG + FrmAktuelleBesatzung frmAktuelleBesatzung = new FrmAktuelleBesatzung(); + frmAktuelleBesatzung.ShowDialog(); +#endif // Insgesammt eingebaut double gesamt = 0.0; diff --git a/SanSystem/frmStrassenList.cs b/SanSystem/frmStrassenList.cs index 9b4b692..b579e2e 100644 --- a/SanSystem/frmStrassenList.cs +++ b/SanSystem/frmStrassenList.cs @@ -105,7 +105,7 @@ namespace SanSystem counter++; } } - return new Tuple(objekte.Count(), counter); + return new Tuple(counter,objekte.Count()); } private void buildUnsortedStreetList()