Bilder können jetzt hinterlegt werden
This commit is contained in:
12
KlassenBIB/BilderCollection.cs
Normal file
12
KlassenBIB/BilderCollection.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace KlassenBIB
|
||||||
|
{
|
||||||
|
public class BilderCollection : List<SavedBilder>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -42,6 +42,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AbwasserTechnischeAnlageCollection.cs" />
|
<Compile Include="AbwasserTechnischeAnlageCollection.cs" />
|
||||||
|
<Compile Include="BilderCollection.cs" />
|
||||||
<Compile Include="InlinerSanierung.cs" />
|
<Compile Include="InlinerSanierung.cs" />
|
||||||
<Compile Include="Projekt.cs" />
|
<Compile Include="Projekt.cs" />
|
||||||
<Compile Include="Inspektionskuerzeln.cs" />
|
<Compile Include="Inspektionskuerzeln.cs" />
|
||||||
@@ -51,6 +52,7 @@
|
|||||||
<Compile Include="Sanieren.cs" />
|
<Compile Include="Sanieren.cs" />
|
||||||
<Compile Include="Sanierung.cs" />
|
<Compile Include="Sanierung.cs" />
|
||||||
<Compile Include="SanierungCollection.cs" />
|
<Compile Include="SanierungCollection.cs" />
|
||||||
|
<Compile Include="SavedBilder.cs" />
|
||||||
<Compile Include="SchachtAnbindung.cs" />
|
<Compile Include="SchachtAnbindung.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
|||||||
20
KlassenBIB/SavedBilder.cs
Normal file
20
KlassenBIB/SavedBilder.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace KlassenBIB
|
||||||
|
{
|
||||||
|
public class SavedBilder
|
||||||
|
{
|
||||||
|
public string Bildname { get; set; }
|
||||||
|
public string Speicherpfad { get; set; }
|
||||||
|
public string Bemerkung { get; set; }
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return Bildname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,11 +9,21 @@ namespace KlassenBIB
|
|||||||
{
|
{
|
||||||
public class SchachtAnbindung : Sanieren
|
public class SchachtAnbindung : Sanieren
|
||||||
{
|
{
|
||||||
|
string schachtNummer;
|
||||||
|
BilderCollection savedBilders;
|
||||||
|
|
||||||
|
#region GettersSetters
|
||||||
|
public string SchachtNummer { get => schachtNummer; set => schachtNummer = value; }
|
||||||
|
public BilderCollection SavedBilders { get => savedBilders; set => savedBilders = value; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
public SchachtAnbindung()
|
public SchachtAnbindung()
|
||||||
{
|
{
|
||||||
Verzeichnispfad = "Schachtanbindung";
|
Verzeichnispfad = "Schachtanbindung";
|
||||||
|
SavedBilders = new BilderCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override string CheckVerzeichnisse(string projektpfad)
|
public override string CheckVerzeichnisse(string projektpfad)
|
||||||
{
|
{
|
||||||
string path = Path.Combine(projektpfad, PfadZurSan);
|
string path = Path.Combine(projektpfad, PfadZurSan);
|
||||||
|
|||||||
@@ -87,6 +87,12 @@
|
|||||||
<Compile Include="UCInliner.Designer.cs">
|
<Compile Include="UCInliner.Designer.cs">
|
||||||
<DependentUpon>UCInliner.cs</DependentUpon>
|
<DependentUpon>UCInliner.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="UCSchachtanbindung.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCSchachtanbindung.Designer.cs">
|
||||||
|
<DependentUpon>UCSchachtanbindung.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<EmbeddedResource Include="frmObjektEdit.resx">
|
<EmbeddedResource Include="frmObjektEdit.resx">
|
||||||
<DependentUpon>frmObjektEdit.cs</DependentUpon>
|
<DependentUpon>frmObjektEdit.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
@@ -114,6 +120,9 @@
|
|||||||
<EmbeddedResource Include="UCInliner.resx">
|
<EmbeddedResource Include="UCInliner.resx">
|
||||||
<DependentUpon>UCInliner.cs</DependentUpon>
|
<DependentUpon>UCInliner.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UCSchachtanbindung.resx">
|
||||||
|
<DependentUpon>UCSchachtanbindung.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
<None Include="Properties\DataSources\KlassenBIB.Strasse.datasource" />
|
<None Include="Properties\DataSources\KlassenBIB.Strasse.datasource" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
|
|||||||
37
SanSystem/UCInliner.Designer.cs
generated
37
SanSystem/UCInliner.Designer.cs
generated
@@ -30,6 +30,8 @@
|
|||||||
{
|
{
|
||||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.dt_eingebaut = new System.Windows.Forms.DateTimePicker();
|
||||||
this.cb_fertig = new System.Windows.Forms.CheckBox();
|
this.cb_fertig = new System.Windows.Forms.CheckBox();
|
||||||
this.cbb_wetter = new System.Windows.Forms.ComboBox();
|
this.cbb_wetter = new System.Windows.Forms.ComboBox();
|
||||||
this.label24 = new System.Windows.Forms.Label();
|
this.label24 = new System.Windows.Forms.Label();
|
||||||
@@ -65,8 +67,6 @@
|
|||||||
this.label11 = new System.Windows.Forms.Label();
|
this.label11 = new System.Windows.Forms.Label();
|
||||||
this.label10 = new System.Windows.Forms.Label();
|
this.label10 = new System.Windows.Forms.Label();
|
||||||
this.label9 = new System.Windows.Forms.Label();
|
this.label9 = new System.Windows.Forms.Label();
|
||||||
this.dt_eingebaut = new System.Windows.Forms.DateTimePicker();
|
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
|
||||||
this.tabControl1.SuspendLayout();
|
this.tabControl1.SuspendLayout();
|
||||||
this.tabPage2.SuspendLayout();
|
this.tabPage2.SuspendLayout();
|
||||||
this.groupBox3.SuspendLayout();
|
this.groupBox3.SuspendLayout();
|
||||||
@@ -109,6 +109,22 @@
|
|||||||
this.tabPage2.Text = "Vorraussetzungen";
|
this.tabPage2.Text = "Vorraussetzungen";
|
||||||
this.tabPage2.UseVisualStyleBackColor = true;
|
this.tabPage2.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(47, 439);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(108, 20);
|
||||||
|
this.label1.TabIndex = 27;
|
||||||
|
this.label1.Text = "Eingebaut am";
|
||||||
|
//
|
||||||
|
// dt_eingebaut
|
||||||
|
//
|
||||||
|
this.dt_eingebaut.Location = new System.Drawing.Point(205, 434);
|
||||||
|
this.dt_eingebaut.Name = "dt_eingebaut";
|
||||||
|
this.dt_eingebaut.Size = new System.Drawing.Size(291, 26);
|
||||||
|
this.dt_eingebaut.TabIndex = 26;
|
||||||
|
//
|
||||||
// cb_fertig
|
// cb_fertig
|
||||||
//
|
//
|
||||||
this.cb_fertig.AutoSize = true;
|
this.cb_fertig.AutoSize = true;
|
||||||
@@ -167,6 +183,7 @@
|
|||||||
this.btn_get_temp.TabIndex = 4;
|
this.btn_get_temp.TabIndex = 4;
|
||||||
this.btn_get_temp.Text = "Von Anlage holen";
|
this.btn_get_temp.Text = "Von Anlage holen";
|
||||||
this.btn_get_temp.UseVisualStyleBackColor = true;
|
this.btn_get_temp.UseVisualStyleBackColor = true;
|
||||||
|
this.btn_get_temp.Click += new System.EventHandler(this.btn_get_temp_Click);
|
||||||
//
|
//
|
||||||
// txt_temp_kanal
|
// txt_temp_kanal
|
||||||
//
|
//
|
||||||
@@ -494,22 +511,6 @@
|
|||||||
this.label9.TabIndex = 0;
|
this.label9.TabIndex = 0;
|
||||||
this.label9.Text = "Harz";
|
this.label9.Text = "Harz";
|
||||||
//
|
//
|
||||||
// dt_eingebaut
|
|
||||||
//
|
|
||||||
this.dt_eingebaut.Location = new System.Drawing.Point(205, 434);
|
|
||||||
this.dt_eingebaut.Name = "dt_eingebaut";
|
|
||||||
this.dt_eingebaut.Size = new System.Drawing.Size(291, 26);
|
|
||||||
this.dt_eingebaut.TabIndex = 26;
|
|
||||||
//
|
|
||||||
// label1
|
|
||||||
//
|
|
||||||
this.label1.AutoSize = true;
|
|
||||||
this.label1.Location = new System.Drawing.Point(47, 439);
|
|
||||||
this.label1.Name = "label1";
|
|
||||||
this.label1.Size = new System.Drawing.Size(108, 20);
|
|
||||||
this.label1.TabIndex = 27;
|
|
||||||
this.label1.Text = "Eingebaut am";
|
|
||||||
//
|
|
||||||
// UCInliner
|
// UCInliner
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ using System.Windows.Forms;
|
|||||||
using KlassenBIB;
|
using KlassenBIB;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using SanShared;
|
||||||
|
|
||||||
namespace SanSystem
|
namespace SanSystem
|
||||||
{
|
{
|
||||||
@@ -102,5 +103,16 @@ namespace SanSystem
|
|||||||
{
|
{
|
||||||
destinationPath = inliner.CheckVerzeichnisse(Global.Instance.projektpfad);
|
destinationPath = inliner.CheckVerzeichnisse(Global.Instance.projektpfad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btn_get_temp_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ITemperature temperature = TempCAN.TemperaturBuilder.Temperatur(TempCAN.TemperaturSchnittstellen.TINKERFORGE);
|
||||||
|
|
||||||
|
double temperatur = temperature.GetTemperatur();
|
||||||
|
inliner.TempAusen = temperatur;
|
||||||
|
|
||||||
|
|
||||||
|
txt_temp_aussen.Update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
155
SanSystem/UCSchachtanbindung.Designer.cs
generated
Normal file
155
SanSystem/UCSchachtanbindung.Designer.cs
generated
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
namespace SanSystem
|
||||||
|
{
|
||||||
|
partial class UCSchachtanbindung
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Designervariable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Verwendete Ressourcen bereinigen.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Vom Komponenten-Designer generierter Code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Erforderliche Methode für die Designerunterstützung.
|
||||||
|
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.txt_schachtnummer = new System.Windows.Forms.TextBox();
|
||||||
|
this.pt_box = new System.Windows.Forms.PictureBox();
|
||||||
|
this.btn_add_bild = new System.Windows.Forms.Button();
|
||||||
|
this.lb_pictures = new System.Windows.Forms.ListBox();
|
||||||
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.bearbeitenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.löschenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.cb_erledigt = new System.Windows.Forms.CheckBox();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pt_box)).BeginInit();
|
||||||
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
|
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(9, 18);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(126, 20);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
this.label1.Text = "Schachtnummer";
|
||||||
|
//
|
||||||
|
// 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(252, 15);
|
||||||
|
this.txt_schachtnummer.Name = "txt_schachtnummer";
|
||||||
|
this.txt_schachtnummer.Size = new System.Drawing.Size(232, 26);
|
||||||
|
this.txt_schachtnummer.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// pt_box
|
||||||
|
//
|
||||||
|
this.pt_box.Location = new System.Drawing.Point(13, 47);
|
||||||
|
this.pt_box.Name = "pt_box";
|
||||||
|
this.pt_box.Size = new System.Drawing.Size(600, 326);
|
||||||
|
this.pt_box.TabIndex = 2;
|
||||||
|
this.pt_box.TabStop = false;
|
||||||
|
//
|
||||||
|
// 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(628, 197);
|
||||||
|
this.btn_add_bild.Name = "btn_add_bild";
|
||||||
|
this.btn_add_bild.Size = new System.Drawing.Size(73, 176);
|
||||||
|
this.btn_add_bild.TabIndex = 3;
|
||||||
|
this.btn_add_bild.Text = "Bild Laden";
|
||||||
|
this.btn_add_bild.UseVisualStyleBackColor = true;
|
||||||
|
this.btn_add_bild.Click += new System.EventHandler(this.btn_add_bild_Click);
|
||||||
|
//
|
||||||
|
// lb_pictures
|
||||||
|
//
|
||||||
|
this.lb_pictures.FormattingEnabled = true;
|
||||||
|
this.lb_pictures.Location = new System.Drawing.Point(620, 47);
|
||||||
|
this.lb_pictures.Name = "lb_pictures";
|
||||||
|
this.lb_pictures.Size = new System.Drawing.Size(81, 147);
|
||||||
|
this.lb_pictures.TabIndex = 4;
|
||||||
|
this.lb_pictures.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lb_pictures_MouseDown);
|
||||||
|
//
|
||||||
|
// contextMenuStrip1
|
||||||
|
//
|
||||||
|
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.bearbeitenToolStripMenuItem,
|
||||||
|
this.löschenToolStripMenuItem});
|
||||||
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
|
this.contextMenuStrip1.Size = new System.Drawing.Size(131, 48);
|
||||||
|
//
|
||||||
|
// bearbeitenToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.bearbeitenToolStripMenuItem.Name = "bearbeitenToolStripMenuItem";
|
||||||
|
this.bearbeitenToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
|
||||||
|
this.bearbeitenToolStripMenuItem.Text = "Bearbeiten";
|
||||||
|
//
|
||||||
|
// löschenToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.löschenToolStripMenuItem.Name = "löschenToolStripMenuItem";
|
||||||
|
this.löschenToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
|
||||||
|
this.löschenToolStripMenuItem.Text = "Löschen";
|
||||||
|
this.löschenToolStripMenuItem.Click += new System.EventHandler(this.löschenToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// cb_erledigt
|
||||||
|
//
|
||||||
|
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(512, 10);
|
||||||
|
this.cb_erledigt.Name = "cb_erledigt";
|
||||||
|
this.cb_erledigt.Size = new System.Drawing.Size(93, 28);
|
||||||
|
this.cb_erledigt.TabIndex = 6;
|
||||||
|
this.cb_erledigt.Text = "Erledigt";
|
||||||
|
this.cb_erledigt.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// UCSchachtanbindung
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.Controls.Add(this.cb_erledigt);
|
||||||
|
this.Controls.Add(this.lb_pictures);
|
||||||
|
this.Controls.Add(this.btn_add_bild);
|
||||||
|
this.Controls.Add(this.pt_box);
|
||||||
|
this.Controls.Add(this.txt_schachtnummer);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Name = "UCSchachtanbindung";
|
||||||
|
this.Size = new System.Drawing.Size(712, 389);
|
||||||
|
this.Load += new System.EventHandler(this.UCSchachtanbindung_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pt_box)).EndInit();
|
||||||
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
private System.Windows.Forms.TextBox txt_schachtnummer;
|
||||||
|
private System.Windows.Forms.PictureBox pt_box;
|
||||||
|
private System.Windows.Forms.Button btn_add_bild;
|
||||||
|
private System.Windows.Forms.ListBox lb_pictures;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem bearbeitenToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem löschenToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.CheckBox cb_erledigt;
|
||||||
|
}
|
||||||
|
}
|
||||||
100
SanSystem/UCSchachtanbindung.cs
Normal file
100
SanSystem/UCSchachtanbindung.cs
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using KlassenBIB;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace SanSystem
|
||||||
|
{
|
||||||
|
public partial class UCSchachtanbindung : UserControl
|
||||||
|
{
|
||||||
|
SchachtAnbindung schacht = null;
|
||||||
|
string mydestination = string.Empty;
|
||||||
|
public UCSchachtanbindung(SchachtAnbindung schacht)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.schacht = schacht;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UCSchachtanbindung_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
txt_schachtnummer.DataBindings.Add(new Binding("Text", schacht, "Schachtnummer"));
|
||||||
|
cb_erledigt.DataBindings.Add(new Binding("Checked", schacht, "Fertig"));
|
||||||
|
lb_pictures.DataSource = schacht.SavedBilders;
|
||||||
|
|
||||||
|
mydestination = schacht.CheckVerzeichnisse("");
|
||||||
|
|
||||||
|
if(schacht.SavedBilders.Count > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
//pt_box.Image = Image.FromFile(Path.Combine("temp",schacht.SavedBilders[0].Speicherpfad));
|
||||||
|
pt_box.Load(Path.Combine("temp", schacht.SavedBilders[0].Speicherpfad));
|
||||||
|
pt_box.SizeMode = PictureBoxSizeMode.StretchImage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btn_add_bild_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||||
|
{
|
||||||
|
if(openFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
string source = openFileDialog.FileName;
|
||||||
|
SavedBilder bilder = new SavedBilder();
|
||||||
|
|
||||||
|
string targetname = string.Format("{0}.jpg",Guid.NewGuid());
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (pt_box == null) throw new Exception();
|
||||||
|
string speicherpfad = Path.Combine(mydestination, targetname);
|
||||||
|
File.Copy(source, Path.Combine("temp",speicherpfad));
|
||||||
|
bilder.Bildname = "Anbindung";
|
||||||
|
bilder.Speicherpfad = speicherpfad;
|
||||||
|
schacht.SavedBilders.Add(bilder);
|
||||||
|
pt_box.Load(Path.Combine("temp", schacht.SavedBilders[0].Speicherpfad));
|
||||||
|
pt_box.SizeMode = PictureBoxSizeMode.StretchImage;
|
||||||
|
lb_pictures.DataSource = null;
|
||||||
|
lb_pictures.DataSource = schacht.SavedBilders;
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void lb_pictures_MouseDown(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Button == MouseButtons.Right)
|
||||||
|
contextMenuStrip1.Show(Cursor.Position);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void löschenToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (lb_pictures.SelectedItems.Count < 1) return;
|
||||||
|
if(MessageBox.Show("Sicher dass du diesen Eintrag löschen möchtest?","Sicher", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
|
||||||
|
SavedBilder bild = (lb_pictures.SelectedItem as SavedBilder);
|
||||||
|
schacht.SavedBilders.Remove(bild);
|
||||||
|
pt_box.Image = null;
|
||||||
|
pt_box.Dispose();
|
||||||
|
File.Delete(Path.Combine(Global.Instance.projektpfad, bild.Speicherpfad));
|
||||||
|
lb_pictures.DataSource = null;
|
||||||
|
lb_pictures.DataSource = schacht.SavedBilders;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
123
SanSystem/UCSchachtanbindung.resx
Normal file
123
SanSystem/UCSchachtanbindung.resx
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<?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>
|
||||||
|
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
@@ -40,7 +40,9 @@ namespace SanSystem
|
|||||||
else if(san is SchachtAnbindung)
|
else if(san is SchachtAnbindung)
|
||||||
{
|
{
|
||||||
tab.Text = "Schachtanbindung";
|
tab.Text = "Schachtanbindung";
|
||||||
|
UCSchachtanbindung uCSchachtanbindung = new UCSchachtanbindung(san as SchachtAnbindung);
|
||||||
|
uCSchachtanbindung.Dock = DockStyle.Fill;
|
||||||
|
tab.Controls.Add(uCSchachtanbindung);
|
||||||
tabControl1.TabPages.Add(tab);
|
tabControl1.TabPages.Add(tab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,7 +106,9 @@ namespace SanSystem
|
|||||||
inspektionsobjekt.Sanierung.Add(schachtAnbindung);
|
inspektionsobjekt.Sanierung.Add(schachtAnbindung);
|
||||||
TabPage tab = new TabPage();
|
TabPage tab = new TabPage();
|
||||||
tab.Text = "Schachtanbindung";
|
tab.Text = "Schachtanbindung";
|
||||||
|
UCSchachtanbindung uCSchachtanbindung = new UCSchachtanbindung(schachtAnbindung);
|
||||||
|
uCSchachtanbindung.Dock = DockStyle.Fill;
|
||||||
|
tab.Controls.Add(uCSchachtanbindung);
|
||||||
tabControl1.TabPages.Add(tab);
|
tabControl1.TabPages.Add(tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user