Statusnachrichten werden im Mainform dargestellt
This commit is contained in:
@@ -14,6 +14,7 @@ namespace SanSystem
|
|||||||
class Global
|
class Global
|
||||||
{
|
{
|
||||||
public event EventHandler RequestBuildNewLinerReste;
|
public event EventHandler RequestBuildNewLinerReste;
|
||||||
|
public event EventHandler OnStatusMessageChanged;
|
||||||
public static readonly Global instance = new Global();
|
public static readonly Global instance = new Global();
|
||||||
|
|
||||||
const string userroot = "HKEY_CURRENT_USER\\Software";
|
const string userroot = "HKEY_CURRENT_USER\\Software";
|
||||||
@@ -24,8 +25,31 @@ namespace SanSystem
|
|||||||
|
|
||||||
string projektpfad = "18-850";
|
string projektpfad = "18-850";
|
||||||
|
|
||||||
|
string statusMessage = "";
|
||||||
|
|
||||||
|
public string StatusMessage
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return statusMessage;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (statusMessage == value) return;
|
||||||
|
statusMessage = value;
|
||||||
|
StatusMessageChanged(EventArgs.Empty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public CSVParser.AcceptedCSVFormats AnlageType = CSVParser.AcceptedCSVFormats.BLUELIGHT;
|
public CSVParser.AcceptedCSVFormats AnlageType = CSVParser.AcceptedCSVFormats.BLUELIGHT;
|
||||||
|
|
||||||
|
public void StatusMessageChanged(EventArgs args)
|
||||||
|
{
|
||||||
|
EventHandler handler = OnStatusMessageChanged;
|
||||||
|
if (handler != null)
|
||||||
|
handler(this, args);
|
||||||
|
}
|
||||||
|
|
||||||
public void BuildNewLinerReste(EventArgs args)
|
public void BuildNewLinerReste(EventArgs args)
|
||||||
{
|
{
|
||||||
EventHandler handler = RequestBuildNewLinerReste;
|
EventHandler handler = RequestBuildNewLinerReste;
|
||||||
|
|||||||
@@ -346,6 +346,7 @@ namespace SanSystem
|
|||||||
|
|
||||||
private void GeneriereDP()
|
private void GeneriereDP()
|
||||||
{
|
{
|
||||||
|
Global.Instance.StatusMessage = "Generiere Daten";
|
||||||
string dichtheitsprüfungsPfad = Path.Combine(Global.Instance.Projektpfad, "Dichtheitsprüfung");
|
string dichtheitsprüfungsPfad = Path.Combine(Global.Instance.Projektpfad, "Dichtheitsprüfung");
|
||||||
if (!Directory.Exists(dichtheitsprüfungsPfad))
|
if (!Directory.Exists(dichtheitsprüfungsPfad))
|
||||||
Directory.CreateDirectory(dichtheitsprüfungsPfad);
|
Directory.CreateDirectory(dichtheitsprüfungsPfad);
|
||||||
@@ -367,6 +368,7 @@ namespace SanSystem
|
|||||||
protokollWriter.GenerateMessreiheÜberdruck(startprüfung, 100);
|
protokollWriter.GenerateMessreiheÜberdruck(startprüfung, 100);
|
||||||
protokollWriter.Ersetzen();
|
protokollWriter.Ersetzen();
|
||||||
protokollWriter.WriteFile();
|
protokollWriter.WriteFile();
|
||||||
|
Global.Instance.StatusMessage = "Datengenerierung abgeschlossen";
|
||||||
MessageBox.Show("Fertig");
|
MessageBox.Show("Fertig");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
14
SanSystem/frmMain.Designer.cs
generated
14
SanSystem/frmMain.Designer.cs
generated
@@ -50,6 +50,7 @@
|
|||||||
this.toolStripStatus_projekt_Label = new System.Windows.Forms.ToolStripStatusLabel();
|
this.toolStripStatus_projekt_Label = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.toolstrip_gesamtLiner = new System.Windows.Forms.ToolStripStatusLabel();
|
this.toolstrip_gesamtLiner = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.update = new UpdateLib.Updater();
|
this.update = new UpdateLib.Updater();
|
||||||
|
this.toolstrip_messages = new System.Windows.Forms.ToolStripStatusLabel();
|
||||||
this.mainmenu.SuspendLayout();
|
this.mainmenu.SuspendLayout();
|
||||||
this.statusStrip1.SuspendLayout();
|
this.statusStrip1.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@@ -180,7 +181,8 @@
|
|||||||
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.toolstrip_gesamtLiner,
|
||||||
|
this.toolstrip_messages});
|
||||||
this.statusStrip1.Location = new System.Drawing.Point(0, 431);
|
this.statusStrip1.Location = new System.Drawing.Point(0, 431);
|
||||||
this.statusStrip1.Name = "statusStrip1";
|
this.statusStrip1.Name = "statusStrip1";
|
||||||
this.statusStrip1.Size = new System.Drawing.Size(813, 22);
|
this.statusStrip1.Size = new System.Drawing.Size(813, 22);
|
||||||
@@ -203,6 +205,13 @@
|
|||||||
//
|
//
|
||||||
this.update.UpdateUrl = "http://home.cosysda.de/sanverwaltung/UpdateInfo.dat";
|
this.update.UpdateUrl = "http://home.cosysda.de/sanverwaltung/UpdateInfo.dat";
|
||||||
//
|
//
|
||||||
|
// toolstrip_messages
|
||||||
|
//
|
||||||
|
this.toolstrip_messages.Name = "toolstrip_messages";
|
||||||
|
this.toolstrip_messages.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||||
|
this.toolstrip_messages.Size = new System.Drawing.Size(16, 17);
|
||||||
|
this.toolstrip_messages.Text = "...";
|
||||||
|
//
|
||||||
// frmMain
|
// frmMain
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@@ -212,7 +221,7 @@
|
|||||||
this.Controls.Add(this.mainmenu);
|
this.Controls.Add(this.mainmenu);
|
||||||
this.IsMdiContainer = true;
|
this.IsMdiContainer = true;
|
||||||
this.MainMenuStrip = this.mainmenu;
|
this.MainMenuStrip = this.mainmenu;
|
||||||
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
this.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.Name = "frmMain";
|
this.Name = "frmMain";
|
||||||
this.Text = "Kanalsanierungsverwaltung";
|
this.Text = "Kanalsanierungsverwaltung";
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frm_main_FormClosing);
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frm_main_FormClosing);
|
||||||
@@ -247,6 +256,7 @@
|
|||||||
private System.Windows.Forms.ToolStripStatusLabel toolstrip_gesamtLiner;
|
private System.Windows.Forms.ToolStripStatusLabel toolstrip_gesamtLiner;
|
||||||
private System.Windows.Forms.ToolStripMenuItem prefixSuffixToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem prefixSuffixToolStripMenuItem;
|
||||||
private UpdateLib.Updater update;
|
private UpdateLib.Updater update;
|
||||||
|
private System.Windows.Forms.ToolStripStatusLabel toolstrip_messages;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,14 @@ namespace SanSystem
|
|||||||
|
|
||||||
toolstrip_gesamtLiner.Text = "Insgesamt wurde laut Erfassung " + gesamt.ToString() + "m an Liner eingebaut ("+anzahl.ToString()+")";
|
toolstrip_gesamtLiner.Text = "Insgesamt wurde laut Erfassung " + gesamt.ToString() + "m an Liner eingebaut ("+anzahl.ToString()+")";
|
||||||
|
|
||||||
|
Global.Instance.OnStatusMessageChanged += Instance_OnStatusMessageChanged;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Instance_OnStatusMessageChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
toolstrip_messages.Text = Global.Instance.StatusMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FrmException_FormClosed(object sender, FormClosedEventArgs e)
|
private void FrmException_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user