From b5816f258560934c02ff3cbcb9b57c64d4185bb9 Mon Sep 17 00:00:00 2001 From: HuskyTeufel Date: Thu, 3 Sep 2020 13:15:22 +0200 Subject: [PATCH] =?UTF-8?q?Prefix=20und=20Suffix=20k=C3=B6nnen=20nun=20bea?= =?UTF-8?q?rbeitet=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SanSystem/FrmPrefixSuffix.Designer.cs | 119 +++++++++++++++++++++++++ SanSystem/FrmPrefixSuffix.cs | 37 ++++++++ SanSystem/FrmPrefixSuffix.resx | 120 ++++++++++++++++++++++++++ SanSystem/SanSystem.csproj | 9 ++ SanSystem/frmMain.Designer.cs | 12 ++- SanSystem/frmMain.cs | 6 ++ 6 files changed, 302 insertions(+), 1 deletion(-) create mode 100644 SanSystem/FrmPrefixSuffix.Designer.cs create mode 100644 SanSystem/FrmPrefixSuffix.cs create mode 100644 SanSystem/FrmPrefixSuffix.resx diff --git a/SanSystem/FrmPrefixSuffix.Designer.cs b/SanSystem/FrmPrefixSuffix.Designer.cs new file mode 100644 index 0000000..6d33a6f --- /dev/null +++ b/SanSystem/FrmPrefixSuffix.Designer.cs @@ -0,0 +1,119 @@ +namespace SanSystem +{ + partial class FrmPrefixSuffix + { + /// + /// 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_prefix = new System.Windows.Forms.TextBox(); + this.txt_suffix = new System.Windows.Forms.TextBox(); + this.btn_safe = 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(18, 14); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(61, 25); + this.label1.TabIndex = 0; + this.label1.Text = "Prefix"; + // + // 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(18, 97); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(61, 25); + this.label2.TabIndex = 1; + this.label2.Text = "Suffix"; + // + // txt_prefix + // + this.txt_prefix.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txt_prefix.Location = new System.Drawing.Point(171, 9); + this.txt_prefix.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.txt_prefix.Name = "txt_prefix"; + this.txt_prefix.Size = new System.Drawing.Size(456, 30); + this.txt_prefix.TabIndex = 2; + // + // txt_suffix + // + this.txt_suffix.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txt_suffix.Location = new System.Drawing.Point(171, 95); + this.txt_suffix.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.txt_suffix.Name = "txt_suffix"; + this.txt_suffix.Size = new System.Drawing.Size(456, 30); + this.txt_suffix.TabIndex = 3; + // + // btn_safe + // + this.btn_safe.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btn_safe.Location = new System.Drawing.Point(26, 180); + this.btn_safe.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.btn_safe.Name = "btn_safe"; + this.btn_safe.Size = new System.Drawing.Size(603, 162); + this.btn_safe.TabIndex = 4; + this.btn_safe.Text = "Speichern"; + this.btn_safe.UseVisualStyleBackColor = true; + this.btn_safe.Click += new System.EventHandler(this.Btn_safe_Click); + // + // FrmPrefixSuffix + // + this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(692, 380); + this.ControlBox = false; + this.Controls.Add(this.btn_safe); + this.Controls.Add(this.txt_suffix); + this.Controls.Add(this.txt_prefix); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.Name = "FrmPrefixSuffix"; + this.Text = "Prefix Suffix Bearbeiten"; + this.Load += new System.EventHandler(this.FrmPrefixSuffix_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txt_prefix; + private System.Windows.Forms.TextBox txt_suffix; + private System.Windows.Forms.Button btn_safe; + } +} \ No newline at end of file diff --git a/SanSystem/FrmPrefixSuffix.cs b/SanSystem/FrmPrefixSuffix.cs new file mode 100644 index 0000000..96582c3 --- /dev/null +++ b/SanSystem/FrmPrefixSuffix.cs @@ -0,0 +1,37 @@ +using Database; +using KlassenBIB; +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 FrmPrefixSuffix : Form + { + Projekt aktuelleProjekt; + public FrmPrefixSuffix() + { + InitializeComponent(); + aktuelleProjekt = Datenbank.Instance.loadedProjekt; + } + + private void FrmPrefixSuffix_Load(object sender, EventArgs e) + { + txt_prefix.DataBindings.Add("text", aktuelleProjekt, "SanierungsIDPrefix"); + txt_suffix.DataBindings.Add("text", aktuelleProjekt, "SanierungsIDSuffix"); + } + + private void Btn_safe_Click(object sender, EventArgs e) + { + txt_prefix.DataBindings.Clear(); + txt_suffix.DataBindings.Clear(); + this.Close(); + } + } +} diff --git a/SanSystem/FrmPrefixSuffix.resx b/SanSystem/FrmPrefixSuffix.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SanSystem/FrmPrefixSuffix.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/SanSystem.csproj b/SanSystem/SanSystem.csproj index 7a11532..db82a9a 100644 --- a/SanSystem/SanSystem.csproj +++ b/SanSystem/SanSystem.csproj @@ -185,6 +185,12 @@ frmOffsetSet.cs + + Form + + + FrmPrefixSuffix.cs + Form @@ -287,6 +293,9 @@ frmOffsetSet.cs + + FrmPrefixSuffix.cs + frmProjektList.cs diff --git a/SanSystem/frmMain.Designer.cs b/SanSystem/frmMain.Designer.cs index 6009b79..e99b443 100644 --- a/SanSystem/frmMain.Designer.cs +++ b/SanSystem/frmMain.Designer.cs @@ -48,6 +48,7 @@ this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripStatus_projekt_Label = new System.Windows.Forms.ToolStripStatusLabel(); this.toolstrip_gesamtLiner = new System.Windows.Forms.ToolStripStatusLabel(); + this.prefixSuffixToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.mainmenu.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.SuspendLayout(); @@ -77,7 +78,8 @@ this.neuToolStripMenuItem, this.öffnenToolStripMenuItem, this.stammdatenImportierenToolStripMenuItem, - this.auftraggeberToolStripMenuItem}); + this.auftraggeberToolStripMenuItem, + this.prefixSuffixToolStripMenuItem}); this.projektToolStripMenuItem.Name = "projektToolStripMenuItem"; this.projektToolStripMenuItem.Size = new System.Drawing.Size(88, 32); this.projektToolStripMenuItem.Text = "Projekt"; @@ -191,6 +193,13 @@ this.toolstrip_gesamtLiner.Size = new System.Drawing.Size(138, 20); this.toolstrip_gesamtLiner.Text = "Insgesammt Einbau"; // + // prefixSuffixToolStripMenuItem + // + this.prefixSuffixToolStripMenuItem.Name = "prefixSuffixToolStripMenuItem"; + this.prefixSuffixToolStripMenuItem.Size = new System.Drawing.Size(318, 32); + this.prefixSuffixToolStripMenuItem.Text = "Prefix / Suffix"; + this.prefixSuffixToolStripMenuItem.Click += new System.EventHandler(this.PrefixSuffixToolStripMenuItem_Click); + // // frmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); @@ -233,6 +242,7 @@ private System.Windows.Forms.ToolStripMenuItem massenberichteToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem verbrauchToolStripMenuItem; private System.Windows.Forms.ToolStripStatusLabel toolstrip_gesamtLiner; + private System.Windows.Forms.ToolStripMenuItem prefixSuffixToolStripMenuItem; } } diff --git a/SanSystem/frmMain.cs b/SanSystem/frmMain.cs index c2586e0..283481c 100644 --- a/SanSystem/frmMain.cs +++ b/SanSystem/frmMain.cs @@ -339,5 +339,11 @@ namespace SanSystem File.WriteAllLines("linercharges.txt", datencontent); } + + private void PrefixSuffixToolStripMenuItem_Click(object sender, EventArgs e) + { + FrmPrefixSuffix frmPrefixSuffix = new FrmPrefixSuffix(); + frmPrefixSuffix.ShowDialog(); + } } }