diff --git a/KlassenBIB/Sanierung/Renovation/AbstractImprägnier.cs b/KlassenBIB/Sanierung/Renovation/AbstractImprägnier.cs index 8eb43e5..72d63c4 100644 --- a/KlassenBIB/Sanierung/Renovation/AbstractImprägnier.cs +++ b/KlassenBIB/Sanierung/Renovation/AbstractImprägnier.cs @@ -28,6 +28,5 @@ namespace KlassenBIB public double Vakuum { get; set; } public string HarzTyp { get; set; } public double Walzenabstand { get; set; } - } } diff --git a/KlassenBIB/Sanierung/Renovation/InlinerSanierung.cs b/KlassenBIB/Sanierung/Renovation/InlinerSanierung.cs index 72b3499..b4df355 100644 --- a/KlassenBIB/Sanierung/Renovation/InlinerSanierung.cs +++ b/KlassenBIB/Sanierung/Renovation/InlinerSanierung.cs @@ -31,6 +31,9 @@ namespace KlassenBIB uint rueckholgeschwindigkeit; bool geschlosseneEnde = false; // Todo Rausschmeißen bool preliner = false; + int lagerungTemperatur = 6; + int temperaturEinbau = 19; + double inversionsDruck = 0.6; DateTime anfangAushaertung; DateTime endeAushaertung; string ort; @@ -39,6 +42,7 @@ namespace KlassenBIB DateTime endeKalibirierung; AbstractImprägnier imprägnierungsbericht; + Dictionary lagerungZeiten = new Dictionary(); public double GetGesamtHarzbedarf(double haltungslaenge) @@ -148,7 +152,12 @@ namespace KlassenBIB {"harz_type","" }, {"preliner_verwendet","" }, {"geschlossene_ende","" }, - {"schlauch_dn","" } + {"schlauch_dn","" }, + {"TV_Kontrolle","" }, + {"Einbau_Temperatur","" }, + {"Inversion_Druck","" }, + {"Lagerung_Text","" }, + {"Lagerung_Temp","" } }; double LaengeGesamt = this.Inspektionsobjekt.Haltungslaenge + this.Inspektionsobjekt.Schachtlaenge; @@ -198,16 +207,56 @@ namespace KlassenBIB grunddaten["UVImageSpeed"] = Path.Combine(destinationPath, "linerGraph_speed.jpg"); grunddaten["rueckhol_speed"] = rueckholgeschwindigkeit; grunddaten["liner_type"] = LinerTyp; + grunddaten["TV_Kontrolle"] = string.Format("Ja, am {0}", Inspektionsobjekt.HaltungGemessen.ToString()); grunddaten["harz_type"] = this.imprägnierungsbericht == null ? HarzTyp : this.imprägnierungsbericht.HarzTyp; + grunddaten["Lagerung_Temp"] = lagerungTemperatur; + grunddaten["Einbau_Temperatur"] = temperaturEinbau; + grunddaten["Inversion_Druck"] = inversionsDruck; + grunddaten["Lagerung_Text"] = GetLagerungText(DateTime.Parse(imprägnierungsbericht.ImprägnierDatum), this.Datum,lagerungTemperatur); return grunddaten; } public InlinerSanierung() { //datumKalibrierung = new DateTime(); + lagerungZeiten.Add(10, TimeSpan.FromDays(90)); + lagerungZeiten.Add(20, TimeSpan.FromDays(30)); + lagerungZeiten.Add(25, TimeSpan.FromDays(7)); + lagerungZeiten.Add(31, TimeSpan.FromDays(3)); Verzeichnispfad = "UVAnlage"; if (datumKalibrierung <= DateTime.MinValue || datumKalibrierung >= DateTime.MaxValue) datumKalibrierung = DateTime.Now; } + + private TimeSpan GetMaxLagerung(int lagerungTemp) + { + Dictionary.KeyCollection x = lagerungZeiten.Keys; + + int laufer = 0; + if (lagerungTemp > 31) lagerungTemp = 31; + + foreach(int temp in x) + { + if(lagerungTemp <= temp) + { + laufer = temp; + break; + } + } + + return lagerungZeiten[laufer]; + } + + private string GetLagerungText(DateTime Kalibrierdatum, DateTime Einbaudatum, int lagerungTemperatur) + { + TimeSpan lagerungszeit = GetMaxLagerung(lagerungTemperatur); + + if(Einbaudatum.Subtract(Kalibrierdatum) <= lagerungszeit) + { + return "Die Lagerungsdauer wurde somit nicht überschritten"; + } + + return "Die Lagerungsdauer wurde somit überschritten"; + } public double KalibrierUnterdruck { get => kalibrierUnterdruck; set => kalibrierUnterdruck = value; } @@ -256,6 +305,9 @@ namespace KlassenBIB public DateTime EndeKalibirierung { get => endeKalibirierung; set => endeKalibirierung = value; } public bool Preliner { get => preliner; set => preliner = value; } + public int LagerungTemperatur { get => lagerungTemperatur; set => lagerungTemperatur = value; } + public int EinbauTemperatur { get => temperaturEinbau; set => temperaturEinbau = value; } + public double InversionsDruck { get => inversionsDruck; set => inversionsDruck = value; } public AbstractImprägnier Imprägnierungsbericht { get => imprägnierungsbericht; set => imprägnierungsbericht = value; } } } diff --git a/SanSystem/FrmKalibrierungFestlegung.Designer.cs b/SanSystem/FrmKalibrierungFestlegung.Designer.cs index 99ae523..7c75821 100644 --- a/SanSystem/FrmKalibrierungFestlegung.Designer.cs +++ b/SanSystem/FrmKalibrierungFestlegung.Designer.cs @@ -28,24 +28,24 @@ /// private void InitializeComponent() { - this.ucLinerGrundlagen1 = new SanSystem.UCLinerGrundlagenBrawo(); + this.ucWerkseitigImprägniert1 = new SanSystem.UCWerkseitigImprägniert(); this.SuspendLayout(); // - // ucLinerGrundlagen1 + // ucWerkseitigImprägniert1 // - this.ucLinerGrundlagen1.BackColor = System.Drawing.SystemColors.Window; - this.ucLinerGrundlagen1.Location = new System.Drawing.Point(12, 12); - this.ucLinerGrundlagen1.Name = "ucLinerGrundlagen1"; - this.ucLinerGrundlagen1.Size = new System.Drawing.Size(731, 456); - this.ucLinerGrundlagen1.TabIndex = 0; + this.ucWerkseitigImprägniert1.Location = new System.Drawing.Point(12, 22); + this.ucWerkseitigImprägniert1.Name = "ucWerkseitigImprägniert1"; + this.ucWerkseitigImprägniert1.Size = new System.Drawing.Size(949, 343); + this.ucWerkseitigImprägniert1.TabIndex = 0; // - // FrmKalibrierungFestlegung + // frmKalibrierungFestlegung // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(757, 478); - this.Controls.Add(this.ucLinerGrundlagen1); - this.Name = "FrmKalibrierungFestlegung"; + this.ClientSize = new System.Drawing.Size(1009, 588); + this.Controls.Add(this.ucWerkseitigImprägniert1); + this.Margin = new System.Windows.Forms.Padding(4); + this.Name = "frmKalibrierungFestlegung"; this.Text = "FrmKalibrierungFestlegung"; this.ResumeLayout(false); @@ -53,6 +53,6 @@ #endregion - private UCLinerGrundlagenBrawo ucLinerGrundlagen1; + private UCWerkseitigImprägniert ucWerkseitigImprägniert1; } } \ No newline at end of file diff --git a/SanSystem/FrmKalibrierungFestlegung.cs b/SanSystem/FrmKalibrierungFestlegung.cs index d3ea574..4925902 100644 --- a/SanSystem/FrmKalibrierungFestlegung.cs +++ b/SanSystem/FrmKalibrierungFestlegung.cs @@ -22,7 +22,8 @@ namespace SanSystem public frmKalibrierungFestlegung(List inspektionsobjekts) { InitializeComponent(); - ucLinerGrundlagen1.inspektionsobjekts = inspektionsobjekts; + //ucWerkseitigImprägniert1. + //ucLinerGrundlagen1.inspektionsobjekts = inspektionsobjekts; } } } diff --git a/SanSystem/SanSystem.csproj b/SanSystem/SanSystem.csproj index 230dbe7..f74b309 100644 --- a/SanSystem/SanSystem.csproj +++ b/SanSystem/SanSystem.csproj @@ -203,9 +203,7 @@ frmSelectNewSan.cs - - Form - + frmStrassenList.cs @@ -232,11 +230,11 @@ UCLinerGrundlagenBrawo.cs - + UserControl - - UCSchachtanbindung.cs + + UCWeitereFotos.cs UserControl @@ -308,8 +306,8 @@ UCLinerGrundlagenBrawo.cs - - UCSchachtanbindung.cs + + UCWeitereFotos.cs PreserveNewest diff --git a/SanSystem/UCInliner.cs b/SanSystem/UCInliner.cs index 95c03ff..1cf9b02 100644 --- a/SanSystem/UCInliner.cs +++ b/SanSystem/UCInliner.cs @@ -312,11 +312,17 @@ namespace SanSystem foreach(SavedBilder bild in schacht.SavedBilders) { + string komment = String.Empty; + if (schacht.SchachtNummer != null) + { + komment = string.Format("{0} von Schacht: {1}", bild.Bildname, schacht.SchachtNummer); + } bilderObjects.Add(new BilderObject() { Path = bild.Speicherpfad, - Kommentar = string.Format("{0} von Schacht: {1}", bild.Bildname, schacht.SchachtNummer) - }); + + Kommentar = komment + }) ; } diff --git a/SanSystem/UCSchachtanbindung.Designer.cs b/SanSystem/UCWeitereFotos.Designer.cs similarity index 86% rename from SanSystem/UCSchachtanbindung.Designer.cs rename to SanSystem/UCWeitereFotos.Designer.cs index 1623064..e538545 100644 --- a/SanSystem/UCSchachtanbindung.Designer.cs +++ b/SanSystem/UCWeitereFotos.Designer.cs @@ -1,6 +1,6 @@ namespace SanSystem { - partial class UCSchachtanbindung + partial class UCWeitereFotos { /// /// Erforderliche Designervariable. @@ -39,6 +39,7 @@ this.löschenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.cb_erledigt = new System.Windows.Forms.CheckBox(); this.dt_datum = new System.Windows.Forms.DateTimePicker(); + this.txt_FotoBezeichnung = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.pt_box)).BeginInit(); this.contextMenuStrip1.SuspendLayout(); this.SuspendLayout(); @@ -47,7 +48,7 @@ // 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, 22); + this.label1.Location = new System.Drawing.Point(14, 44); this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(155, 25); @@ -57,16 +58,16 @@ // txt_schachtnummer // this.txt_schachtnummer.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_schachtnummer.Location = new System.Drawing.Point(188, 18); - this.txt_schachtnummer.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txt_schachtnummer.Location = new System.Drawing.Point(190, 44); + this.txt_schachtnummer.Margin = new System.Windows.Forms.Padding(4); this.txt_schachtnummer.Name = "txt_schachtnummer"; this.txt_schachtnummer.Size = new System.Drawing.Size(208, 30); this.txt_schachtnummer.TabIndex = 1; // // pt_box // - this.pt_box.Location = new System.Drawing.Point(17, 58); - this.pt_box.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.pt_box.Location = new System.Drawing.Point(19, 83); + this.pt_box.Margin = new System.Windows.Forms.Padding(4); this.pt_box.Name = "pt_box"; this.pt_box.Size = new System.Drawing.Size(800, 401); this.pt_box.TabIndex = 2; @@ -75,10 +76,10 @@ // btn_add_bild // this.btn_add_bild.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btn_add_bild.Location = new System.Drawing.Point(837, 242); - this.btn_add_bild.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btn_add_bild.Location = new System.Drawing.Point(827, 271); + this.btn_add_bild.Margin = new System.Windows.Forms.Padding(4); this.btn_add_bild.Name = "btn_add_bild"; - this.btn_add_bild.Size = new System.Drawing.Size(97, 217); + this.btn_add_bild.Size = new System.Drawing.Size(115, 213); this.btn_add_bild.TabIndex = 3; this.btn_add_bild.Text = "Bild Laden"; this.btn_add_bild.UseVisualStyleBackColor = true; @@ -88,10 +89,10 @@ // this.lb_pictures.FormattingEnabled = true; this.lb_pictures.ItemHeight = 16; - this.lb_pictures.Location = new System.Drawing.Point(827, 58); - this.lb_pictures.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.lb_pictures.Location = new System.Drawing.Point(827, 83); + this.lb_pictures.Margin = new System.Windows.Forms.Padding(4); this.lb_pictures.Name = "lb_pictures"; - this.lb_pictures.Size = new System.Drawing.Size(107, 180); + this.lb_pictures.Size = new System.Drawing.Size(115, 180); this.lb_pictures.TabIndex = 4; this.lb_pictures.SelectedIndexChanged += new System.EventHandler(this.lb_pictures_SelectedIndexChanged); this.lb_pictures.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lb_pictures_MouseDown); @@ -122,8 +123,8 @@ // this.cb_erledigt.AutoSize = true; this.cb_erledigt.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cb_erledigt.Location = new System.Drawing.Point(405, 17); - this.cb_erledigt.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.cb_erledigt.Location = new System.Drawing.Point(406, 44); + this.cb_erledigt.Margin = new System.Windows.Forms.Padding(4); this.cb_erledigt.Name = "cb_erledigt"; this.cb_erledigt.Size = new System.Drawing.Size(119, 33); this.cb_erledigt.TabIndex = 6; @@ -134,16 +135,25 @@ // this.dt_datum.CalendarFont = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.dt_datum.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.dt_datum.Location = new System.Drawing.Point(537, 18); - this.dt_datum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.dt_datum.Location = new System.Drawing.Point(538, 45); + this.dt_datum.Margin = new System.Windows.Forms.Padding(4); this.dt_datum.Name = "dt_datum"; this.dt_datum.Size = new System.Drawing.Size(396, 30); this.dt_datum.TabIndex = 7; // - // UCSchachtanbindung + // txt_FotoBezeichnung + // + this.txt_FotoBezeichnung.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txt_FotoBezeichnung.Location = new System.Drawing.Point(190, 3); + this.txt_FotoBezeichnung.Name = "txt_FotoBezeichnung"; + this.txt_FotoBezeichnung.Size = new System.Drawing.Size(208, 30); + this.txt_FotoBezeichnung.TabIndex = 8; + // + // UCWeitereFotos // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.txt_FotoBezeichnung); this.Controls.Add(this.dt_datum); this.Controls.Add(this.cb_erledigt); this.Controls.Add(this.lb_pictures); @@ -151,9 +161,9 @@ this.Controls.Add(this.pt_box); this.Controls.Add(this.txt_schachtnummer); this.Controls.Add(this.label1); - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.Name = "UCSchachtanbindung"; - this.Size = new System.Drawing.Size(949, 479); + this.Margin = new System.Windows.Forms.Padding(4); + this.Name = "UCWeitereFotos"; + this.Size = new System.Drawing.Size(1054, 618); this.Load += new System.EventHandler(this.UCSchachtanbindung_Load); ((System.ComponentModel.ISupportInitialize)(this.pt_box)).EndInit(); this.contextMenuStrip1.ResumeLayout(false); @@ -174,5 +184,6 @@ private System.Windows.Forms.ToolStripMenuItem löschenToolStripMenuItem; private System.Windows.Forms.CheckBox cb_erledigt; private System.Windows.Forms.DateTimePicker dt_datum; + private System.Windows.Forms.TextBox txt_FotoBezeichnung; } } diff --git a/SanSystem/UCSchachtanbindung.cs b/SanSystem/UCWeitereFotos.cs similarity index 95% rename from SanSystem/UCSchachtanbindung.cs rename to SanSystem/UCWeitereFotos.cs index 80fe06b..4732758 100644 --- a/SanSystem/UCSchachtanbindung.cs +++ b/SanSystem/UCWeitereFotos.cs @@ -16,7 +16,7 @@ namespace SanSystem /// /// /// - public partial class UCSchachtanbindung : UserControl + public partial class UCWeitereFotos : UserControl { SchachtAnbindung schacht = null; string mydestination = string.Empty; @@ -24,7 +24,7 @@ namespace SanSystem /// /// /// - public UCSchachtanbindung(SchachtAnbindung schacht) + public UCWeitereFotos(SchachtAnbindung schacht) { InitializeComponent(); this.schacht = schacht; @@ -33,7 +33,7 @@ namespace SanSystem /// /// Sollte nicht verwendet werden /// - public UCSchachtanbindung() + public UCWeitereFotos() { } @@ -72,6 +72,7 @@ namespace SanSystem if (pt_box == null) throw new Exception(); string speicherpfad = Path.Combine(mydestination, targetname); File.Copy(source, speicherpfad); + bilder.Bildname = "Anbindung"; bilder.Speicherpfad = speicherpfad; schacht.SavedBilders.Add(bilder); @@ -106,7 +107,6 @@ namespace SanSystem schacht.SavedBilders.Remove(bild); pt_box.Image = null; pt_box.Dispose(); - //File.Delete(bild.Speicherpfad); lb_pictures.DataSource = null; lb_pictures.DataSource = schacht.SavedBilders; } diff --git a/SanSystem/UCSchachtanbindung.resx b/SanSystem/UCWeitereFotos.resx similarity index 100% rename from SanSystem/UCSchachtanbindung.resx rename to SanSystem/UCWeitereFotos.resx diff --git a/SanSystem/UCWerkseitigImprägniert.cs b/SanSystem/UCWerkseitigImprägniert.cs index 8f44360..72cc884 100644 --- a/SanSystem/UCWerkseitigImprägniert.cs +++ b/SanSystem/UCWerkseitigImprägniert.cs @@ -14,6 +14,11 @@ namespace SanSystem public partial class UCWerkseitigImprägniert : UserControl { InlinerSanierung inliner; + + public UCWerkseitigImprägniert() + { + InitializeComponent(); + } public UCWerkseitigImprägniert(InlinerSanierung inliner) { @@ -39,6 +44,7 @@ namespace SanSystem index++; } if (index > Database.Datenbank.Instance.MainDatenbank.ImprägnierBerichtListe.Capacity) index = 0; + lst_imprägnierberichte.SelectedIndex = index; } diff --git a/SanSystem/documents/JUME/liner_einbauBlueLight.docx b/SanSystem/documents/JUME/liner_einbauBlueLight.docx index 8a12228..41c8616 100644 Binary files a/SanSystem/documents/JUME/liner_einbauBlueLight.docx and b/SanSystem/documents/JUME/liner_einbauBlueLight.docx differ diff --git a/SanSystem/frmMain.cs b/SanSystem/frmMain.cs index 7b6a93e..279ad8b 100644 --- a/SanSystem/frmMain.cs +++ b/SanSystem/frmMain.cs @@ -199,6 +199,7 @@ namespace SanSystem private void MassenberichteToolStripMenuItem_Click(object sender, EventArgs e) { List ausdruck = new List(); + List bilder = new List(); foreach(Inspektionsobjekt objekte in Database.Datenbank.Instance.loadedProjekt.Objekte) { foreach(AbstractSanieren san in objekte.Sanierung) @@ -207,6 +208,23 @@ namespace SanSystem { ausdruck.Add((InlinerSanierung)san); } + else if(san is SchachtAnbindung) + { + foreach(SavedBilder bild in (san as SchachtAnbindung).SavedBilders) + { + string komment = String.Empty; + if ((san as SchachtAnbindung).SchachtNummer != null) + { + komment = string.Format("{0} von Schacht: {1}", bild.Bildname, (san as SchachtAnbindung).SchachtNummer); + } + bilder.Add(new BilderObject() + { + Path = bild.Speicherpfad, + + Kommentar = komment + }); + } + } } } @@ -217,7 +235,7 @@ namespace SanSystem Hashtable hashtable = san.MakeProtokoll(destinationPath, Database.Datenbank.Instance.loadedProjekt, DateTime.MinValue); DirectoryInfo directory = Directory.GetParent(destinationPath); string speicherpfad = Path.Combine(directory.FullName,"Einbauprotokolle"); - BerichtGen.FrmOptions options = new BerichtGen.FrmOptions("JUME", "liner_einbauBlueLight.docx", speicherpfad, san.Inspektionsobjekt.Objektbezeichnung, hashtable, new List(),null,true); + BerichtGen.FrmOptions options = new BerichtGen.FrmOptions("JUME", "liner_einbauBlueLight.docx", speicherpfad, san.Inspektionsobjekt.Objektbezeichnung, hashtable, bilder,null,true); } //options.ShowDialog(); diff --git a/SanSystem/frmObjektEdit.cs b/SanSystem/frmObjektEdit.cs index fd862c2..4248bef 100644 --- a/SanSystem/frmObjektEdit.cs +++ b/SanSystem/frmObjektEdit.cs @@ -54,7 +54,7 @@ namespace SanSystem else if(san is SchachtAnbindung) { tab.Text = "Schachtanbindung"; - UCSchachtanbindung uCSchachtanbindung = new UCSchachtanbindung(san as SchachtAnbindung); + UCWeitereFotos uCSchachtanbindung = new UCWeitereFotos(san as SchachtAnbindung); uCSchachtanbindung.Dock = DockStyle.Fill; tab.Controls.Add(uCSchachtanbindung); tabControl1.TabPages.Add(tab); @@ -145,7 +145,7 @@ namespace SanSystem inspektionsobjekt.Sanierung.Add(schachtAnbindung); TabPage tab = new TabPage(); tab.Text = "Schachtanbindung"; - UCSchachtanbindung uCSchachtanbindung = new UCSchachtanbindung(schachtAnbindung); + UCWeitereFotos uCSchachtanbindung = new UCWeitereFotos(schachtAnbindung); uCSchachtanbindung.Dock = DockStyle.Fill; tab.Controls.Add(uCSchachtanbindung); tabControl1.TabPages.Add(tab);