Gesamt Länge wird angezeigt

This commit is contained in:
HuskyTeufel
2020-07-16 15:33:46 +02:00
parent a38819f113
commit 2e432ec9ad
2 changed files with 34 additions and 7 deletions

View File

@@ -44,9 +44,10 @@
this.imprägnierberichteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.imprägnierberichteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.berichteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.berichteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.massenberichteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.massenberichteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.verbrauchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatus_projekt_Label = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripStatus_projekt_Label = new System.Windows.Forms.ToolStripStatusLabel();
this.verbrauchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolstrip_gesamtLiner = new System.Windows.Forms.ToolStripStatusLabel();
this.mainmenu.SuspendLayout(); this.mainmenu.SuspendLayout();
this.statusStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@@ -158,11 +159,19 @@
this.massenberichteToolStripMenuItem.Text = "Massenberichte"; this.massenberichteToolStripMenuItem.Text = "Massenberichte";
this.massenberichteToolStripMenuItem.Click += new System.EventHandler(this.MassenberichteToolStripMenuItem_Click); this.massenberichteToolStripMenuItem.Click += new System.EventHandler(this.MassenberichteToolStripMenuItem_Click);
// //
// verbrauchToolStripMenuItem
//
this.verbrauchToolStripMenuItem.Name = "verbrauchToolStripMenuItem";
this.verbrauchToolStripMenuItem.Size = new System.Drawing.Size(234, 32);
this.verbrauchToolStripMenuItem.Text = "Verbrauch";
this.verbrauchToolStripMenuItem.Click += new System.EventHandler(this.VerbrauchToolStripMenuItem_Click);
//
// statusStrip1 // statusStrip1
// //
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatus_projekt_Label}); this.toolStripStatus_projekt_Label,
this.toolstrip_gesamtLiner});
this.statusStrip1.Location = new System.Drawing.Point(0, 532); this.statusStrip1.Location = new System.Drawing.Point(0, 532);
this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0); this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0);
@@ -176,12 +185,11 @@
this.toolStripStatus_projekt_Label.Size = new System.Drawing.Size(55, 20); this.toolStripStatus_projekt_Label.Size = new System.Drawing.Size(55, 20);
this.toolStripStatus_projekt_Label.Text = "Projekt"; this.toolStripStatus_projekt_Label.Text = "Projekt";
// //
// verbrauchToolStripMenuItem // toolstrip_gesamtLiner
// //
this.verbrauchToolStripMenuItem.Name = "verbrauchToolStripMenuItem"; this.toolstrip_gesamtLiner.Name = "toolstrip_gesamtLiner";
this.verbrauchToolStripMenuItem.Size = new System.Drawing.Size(234, 32); this.toolstrip_gesamtLiner.Size = new System.Drawing.Size(138, 20);
this.verbrauchToolStripMenuItem.Text = "Verbrauch"; this.toolstrip_gesamtLiner.Text = "Insgesammt Einbau";
this.verbrauchToolStripMenuItem.Click += new System.EventHandler(this.VerbrauchToolStripMenuItem_Click);
// //
// frmMain // frmMain
// //
@@ -224,6 +232,7 @@
private System.Windows.Forms.ToolStripMenuItem berichteToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem berichteToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem massenberichteToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem massenberichteToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem verbrauchToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem verbrauchToolStripMenuItem;
private System.Windows.Forms.ToolStripStatusLabel toolstrip_gesamtLiner;
} }
} }

View File

@@ -76,6 +76,24 @@ namespace SanSystem
frmLinerReste.Show(); frmLinerReste.Show();
// Insgesammt eingebaut
double gesamt = 0.0;
int anzahl = 0;
foreach(Projekt projekt in Database.Datenbank.Instance.TeufelDB.Projekte)
{
foreach(Inspektionsobjekt objekt in projekt.Objekte)
{
if (objekt.Sanierung.Exists(x => (x is InlinerSanierung)))
{
anzahl++;
gesamt += (objekt.Haltungslaenge + objekt.Schachtlaenge);
}
}
}
toolstrip_gesamtLiner.Text = "Insgesamt wurde laut Erfassung " + gesamt.ToString() + "m an Liner eingebaut ("+anzahl.ToString()+")";
} }
private void FrmException_FormClosed(object sender, FormClosedEventArgs e) private void FrmException_FormClosed(object sender, FormClosedEventArgs e)