1 Commits

Author SHA1 Message Date
Damian Wessels
eb0f38caa0 bluelight Testversion fertiggestellt 2023-01-20 19:13:32 +01:00
9 changed files with 78 additions and 64 deletions

View File

@@ -24,7 +24,7 @@ namespace SanSystem
MessageBox.Show("Bitte nur 1 Instanz starten der Software!", "", MessageBoxButtons.OK, MessageBoxIcon.Hand); MessageBox.Show("Bitte nur 1 Instanz starten der Software!", "", MessageBoxButtons.OK, MessageBoxIcon.Hand);
Environment.Exit(1); Environment.Exit(1);
} }
#if !DEBUG //#if !DEBUG
try try
{ {
using (Dongle dongle = new Dongle(60)) using (Dongle dongle = new Dongle(60))
@@ -48,11 +48,11 @@ namespace SanSystem
MessageBox.Show("Sorry es wurde kein Dongle gefunden!\n" + ex.Message); MessageBox.Show("Sorry es wurde kein Dongle gefunden!\n" + ex.Message);
Application.Exit(); Application.Exit();
} }
#else /*#else
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain()); Application.Run(new frmMain());
#endif #endif*/
} }
} }

View File

@@ -14,6 +14,8 @@ namespace SanSystem
HUTPROFIL = 8, HUTPROFIL = 8,
QUICKLOCK = 16, QUICKLOCK = 16,
DICHTHEITSPRÜFUNG = 32, DICHTHEITSPRÜFUNG = 32,
STAMMDATEN = 64,
BUEROEXPORTER = 128,
} }
class ProgrammModules class ProgrammModules

View File

@@ -24,15 +24,15 @@ namespace SanShared
public Dongle(uint ProductCode) public Dongle(uint ProductCode)
{ {
#if !DEBUG //if !DEBUG
this.FirmCode = 103086; this.FirmCode = 103086;
this.ProductCode = ProductCode; this.ProductCode = ProductCode;
#else /*#else
return; return;
this.FirmCode = 10; this.FirmCode = 10;
this.ProductCode = 1; this.ProductCode = 1;
#endif #endif
*/
cmApi = new Api(); cmApi = new Api();
cmCred = new CmCredential(); cmCred = new CmCredential();
@@ -102,22 +102,15 @@ namespace SanShared
public void CleanDongle() public void CleanDongle()
{ {
#if DEBUG
return;
#endif
cmApi.CmRelease(hcmse); cmApi.CmRelease(hcmse);
} }
public bool CheckDongleVorhanden() public bool CheckDongleVorhanden()
{ {
#if LAPTOP
return true;
#else
if (hcmse == null) if (hcmse == null)
return false; return false;
else else
return true; return true;
#endif
} }
public string GetDongleSerial() public string GetDongleSerial()
@@ -146,9 +139,6 @@ namespace SanShared
public bool IsLicensed(byte neededMask) public bool IsLicensed(byte neededMask)
{ {
#if DEBUG
return true;
#else
uint DongleFeature = GetFeatureMap(); uint DongleFeature = GetFeatureMap();
//Trace.WriteLine("DongleFeature: " + DongleFeature); //Trace.WriteLine("DongleFeature: " + DongleFeature);
@@ -158,7 +148,6 @@ namespace SanShared
if ((DongleFeatureB & neededMask) == neededMask) if ((DongleFeatureB & neededMask) == neededMask)
return true; return true;
return false; return false;
#endif
} }
public void Dispose() public void Dispose()

View File

@@ -71,7 +71,7 @@ namespace SanSystem
{ {
using(Dongle dongle = new Dongle(60)) using(Dongle dongle = new Dongle(60))
{ {
btn_gen_dp.Enabled = dongle.IsLicensed((byte)AktivierteModule.SCHLAUCHLINER) ? true : false; btn_gen_dp.Enabled = dongle.IsLicensed((byte)AktivierteModule.DICHTHEITSPRÜFUNG) ? true : false;
dongle.CleanDongle(); dongle.CleanDongle();
} }
CheckDirectories(); CheckDirectories();

View File

@@ -39,20 +39,20 @@
this.auftraggeberToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.auftraggeberToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.prefixSuffixToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.prefixSuffixToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportFürBüroErstellenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.exportFürBüroErstellenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.speichernToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.einstellungenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.projektordnerÖffnenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.projektordnerÖffnenToolStripMenuItem = 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.verbrauchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.imprägnierberichteToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.massenstatistikToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.infoToolStripMenuItem = 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.toolstrip_gesamtLiner = new System.Windows.Forms.ToolStripStatusLabel(); this.toolstrip_gesamtLiner = new System.Windows.Forms.ToolStripStatusLabel();
this.toolstrip_messages = new System.Windows.Forms.ToolStripStatusLabel(); this.toolstrip_messages = new System.Windows.Forms.ToolStripStatusLabel();
this.update = new UpdateLib.Updater(); this.update = new UpdateLib.Updater();
this.speichernToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.imprägnierberichteToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.massenstatistikToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.einstellungenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.infoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mainmenu.SuspendLayout(); this.mainmenu.SuspendLayout();
this.statusStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@@ -129,11 +129,26 @@
this.exportFürBüroErstellenToolStripMenuItem.Text = "Export für Büro erstellen"; this.exportFürBüroErstellenToolStripMenuItem.Text = "Export für Büro erstellen";
this.exportFürBüroErstellenToolStripMenuItem.Click += new System.EventHandler(this.exportFürBüroErstellenToolStripMenuItem_Click); this.exportFürBüroErstellenToolStripMenuItem.Click += new System.EventHandler(this.exportFürBüroErstellenToolStripMenuItem_Click);
// //
// speichernToolStripMenuItem1
//
this.speichernToolStripMenuItem1.Name = "speichernToolStripMenuItem1";
this.speichernToolStripMenuItem1.Size = new System.Drawing.Size(254, 26);
this.speichernToolStripMenuItem1.Text = "Speichern";
this.speichernToolStripMenuItem1.Click += new System.EventHandler(this.speichernToolStripMenuItem1_Click);
//
// einstellungenToolStripMenuItem
//
this.einstellungenToolStripMenuItem.Name = "einstellungenToolStripMenuItem";
this.einstellungenToolStripMenuItem.Size = new System.Drawing.Size(254, 26);
this.einstellungenToolStripMenuItem.Text = "Einstellungen";
this.einstellungenToolStripMenuItem.Click += new System.EventHandler(this.einstellungenToolStripMenuItem_Click);
//
// projektordnerÖffnenToolStripMenuItem // projektordnerÖffnenToolStripMenuItem
// //
this.projektordnerÖffnenToolStripMenuItem.Name = "projektordnerÖffnenToolStripMenuItem"; this.projektordnerÖffnenToolStripMenuItem.Name = "projektordnerÖffnenToolStripMenuItem";
this.projektordnerÖffnenToolStripMenuItem.Size = new System.Drawing.Size(170, 25); this.projektordnerÖffnenToolStripMenuItem.Size = new System.Drawing.Size(170, 25);
this.projektordnerÖffnenToolStripMenuItem.Text = "Projektordner Öffnen"; this.projektordnerÖffnenToolStripMenuItem.Text = "Projektordner Öffnen";
this.projektordnerÖffnenToolStripMenuItem.ToolTipText = "Öffnet die interne Ordner Struktur wo alle Daten vorhanden sind";
this.projektordnerÖffnenToolStripMenuItem.Click += new System.EventHandler(this.ProjektordnerÖffnenToolStripMenuItem_Click); this.projektordnerÖffnenToolStripMenuItem.Click += new System.EventHandler(this.ProjektordnerÖffnenToolStripMenuItem_Click);
// //
// berichteToolStripMenuItem // berichteToolStripMenuItem
@@ -161,6 +176,27 @@
this.verbrauchToolStripMenuItem.Text = "Verbrauch"; this.verbrauchToolStripMenuItem.Text = "Verbrauch";
this.verbrauchToolStripMenuItem.Click += new System.EventHandler(this.VerbrauchToolStripMenuItem_Click); this.verbrauchToolStripMenuItem.Click += new System.EventHandler(this.VerbrauchToolStripMenuItem_Click);
// //
// imprägnierberichteToolStripMenuItem1
//
this.imprägnierberichteToolStripMenuItem1.Name = "imprägnierberichteToolStripMenuItem1";
this.imprägnierberichteToolStripMenuItem1.Size = new System.Drawing.Size(213, 26);
this.imprägnierberichteToolStripMenuItem1.Text = "Imprägnierberichte";
this.imprägnierberichteToolStripMenuItem1.Click += new System.EventHandler(this.imprägnierberichteToolStripMenuItem1_Click);
//
// massenstatistikToolStripMenuItem1
//
this.massenstatistikToolStripMenuItem1.Name = "massenstatistikToolStripMenuItem1";
this.massenstatistikToolStripMenuItem1.Size = new System.Drawing.Size(213, 26);
this.massenstatistikToolStripMenuItem1.Text = "Massenstatistik";
this.massenstatistikToolStripMenuItem1.Click += new System.EventHandler(this.massenstatistikToolStripMenuItem1_Click);
//
// infoToolStripMenuItem
//
this.infoToolStripMenuItem.Name = "infoToolStripMenuItem";
this.infoToolStripMenuItem.Size = new System.Drawing.Size(49, 25);
this.infoToolStripMenuItem.Text = "Info";
this.infoToolStripMenuItem.Click += new System.EventHandler(this.infoToolStripMenuItem_Click);
//
// statusStrip1 // statusStrip1
// //
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
@@ -197,41 +233,6 @@
// //
this.update.UpdateUrl = "http://home.cosysda.de/sanverwaltung/UpdateInfo.dat"; this.update.UpdateUrl = "http://home.cosysda.de/sanverwaltung/UpdateInfo.dat";
// //
// speichernToolStripMenuItem1
//
this.speichernToolStripMenuItem1.Name = "speichernToolStripMenuItem1";
this.speichernToolStripMenuItem1.Size = new System.Drawing.Size(254, 26);
this.speichernToolStripMenuItem1.Text = "Speichern";
this.speichernToolStripMenuItem1.Click += new System.EventHandler(this.speichernToolStripMenuItem1_Click);
//
// imprägnierberichteToolStripMenuItem1
//
this.imprägnierberichteToolStripMenuItem1.Name = "imprägnierberichteToolStripMenuItem1";
this.imprägnierberichteToolStripMenuItem1.Size = new System.Drawing.Size(213, 26);
this.imprägnierberichteToolStripMenuItem1.Text = "Imprägnierberichte";
this.imprägnierberichteToolStripMenuItem1.Click += new System.EventHandler(this.imprägnierberichteToolStripMenuItem1_Click);
//
// massenstatistikToolStripMenuItem1
//
this.massenstatistikToolStripMenuItem1.Name = "massenstatistikToolStripMenuItem1";
this.massenstatistikToolStripMenuItem1.Size = new System.Drawing.Size(213, 26);
this.massenstatistikToolStripMenuItem1.Text = "Massenstatistik";
this.massenstatistikToolStripMenuItem1.Click += new System.EventHandler(this.massenstatistikToolStripMenuItem1_Click);
//
// einstellungenToolStripMenuItem
//
this.einstellungenToolStripMenuItem.Name = "einstellungenToolStripMenuItem";
this.einstellungenToolStripMenuItem.Size = new System.Drawing.Size(254, 26);
this.einstellungenToolStripMenuItem.Text = "Einstellungen";
this.einstellungenToolStripMenuItem.Click += new System.EventHandler(this.einstellungenToolStripMenuItem_Click);
//
// infoToolStripMenuItem
//
this.infoToolStripMenuItem.Name = "infoToolStripMenuItem";
this.infoToolStripMenuItem.Size = new System.Drawing.Size(49, 25);
this.infoToolStripMenuItem.Text = "Info";
this.infoToolStripMenuItem.Click += new System.EventHandler(this.infoToolStripMenuItem_Click);
//
// frmMain // frmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View File

@@ -77,12 +77,12 @@ namespace SanSystem
frmLinerReste.Show(); frmLinerReste.Show();
frmInfo frmInfo = new frmInfo(); /*frmInfo frmInfo = new frmInfo();
frmInfo.MdiParent = this; frmInfo.MdiParent = this;
frmInfo.Location = new Point(this.Width - frmInfo.Width - 05, this.Height - frmInfo.Height-80); frmInfo.Location = new Point(this.Width - frmInfo.Width - 05, this.Height - frmInfo.Height-80);
frmInfo.Show(); frmInfo.Show();
*/
FrmAktuelleBesatzung frmAktuelleBesatzung = new FrmAktuelleBesatzung(); FrmAktuelleBesatzung frmAktuelleBesatzung = new FrmAktuelleBesatzung();
frmAktuelleBesatzung.ShowDialog(); frmAktuelleBesatzung.ShowDialog();
@@ -105,6 +105,14 @@ namespace SanSystem
Global.Instance.OnStatusMessageChanged += Instance_OnStatusMessageChanged; Global.Instance.OnStatusMessageChanged += Instance_OnStatusMessageChanged;
using (Dongle dongle = new Dongle(60))
{
stammdatenImportierenToolStripMenuItem.Enabled = dongle.IsLicensed((byte)AktivierteModule.STAMMDATEN) ? true : false;
exportFürBüroErstellenToolStripMenuItem.Enabled = dongle.IsLicensed((byte)AktivierteModule.BUEROEXPORTER) ? true : false;
dongle.CleanDongle();
}
} }
@@ -154,6 +162,7 @@ namespace SanSystem
private void FrmProjektList_FormClosed(object sender, FormClosedEventArgs e) private void FrmProjektList_FormClosed(object sender, FormClosedEventArgs e)
{ {
if (Datenbank.Instance.loadedProjekt == null) return;
if(Datenbank.Instance.loadedProjekt.Auftraggeber.Name == null) if(Datenbank.Instance.loadedProjekt.Auftraggeber.Name == null)
showauftraggeberform(); showauftraggeberform();
@@ -180,11 +189,13 @@ namespace SanSystem
//frmLinerReste.IsMdiChild = true; //frmLinerReste.IsMdiChild = true;
frmLinerReste.Show(); frmLinerReste.Show();
frmInfo frmInfo = new frmInfo(); /*frmInfo frmInfo = new frmInfo();
frmInfo.MdiParent = this; frmInfo.MdiParent = this;
frmInfo.Location = new Point(this.Width - frmInfo.Width - 05, this.Height - frmInfo.Height - 80); frmInfo.Location = new Point(this.Width - frmInfo.Width - 05, this.Height - frmInfo.Height - 80);
frmInfo.Show(); frmInfo.Show();
*/
} }
@@ -197,7 +208,10 @@ namespace SanSystem
private void stammdatenImportierenToolStripMenuItem_Click(object sender, EventArgs e) private void stammdatenImportierenToolStripMenuItem_Click(object sender, EventArgs e)
{ {
#if !DEBUG
MessageBox.Show("Funktion steht nicht zur Verfügung");
return;
#else
OpenFileDialog openFileDialog = new OpenFileDialog(); OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "XML Daten | *.xml"; openFileDialog.Filter = "XML Daten | *.xml";
if(Datenbank.Instance.loadedProjekt == null) if(Datenbank.Instance.loadedProjekt == null)
@@ -228,7 +242,7 @@ namespace SanSystem
strassenList.StartPosition = FormStartPosition.Manual; strassenList.StartPosition = FormStartPosition.Manual;
strassenList.Show(); strassenList.Show();
} }
#endif
} }
private void auftraggeberToolStripMenuItem_Click(object sender, EventArgs e) private void auftraggeberToolStripMenuItem_Click(object sender, EventArgs e)

View File

@@ -17,6 +17,9 @@ namespace SanSystem
public frmSettings() public frmSettings()
{ {
InitializeComponent(); InitializeComponent();
#if !DEBUG
MessageBox.Show("Funktion noch nicht vollständig implementiert. Nutzung auf eigene Gefahr");
#endif
softwareConfiguration = new SoftwareConfiguration(); softwareConfiguration = new SoftwareConfiguration();
txt_anlageIP.Text = softwareConfiguration.GetAnlageIP(); txt_anlageIP.Text = softwareConfiguration.GetAnlageIP();

View File

@@ -152,6 +152,11 @@ namespace SanSystem
MessageBox.Show("Es wurde kein Projekt geladen"); MessageBox.Show("Es wurde kein Projekt geladen");
return; return;
} }
if(Datenbank.Instance.TeufelDB.Imprägnierungen.Count < 1)
{
MessageBox.Show("Bitte zunächst die Imprägnierung hinzufügen");
return;
}
KlassenBIB.Inspektionsobjekt inspektionsobjekt = new KlassenBIB.Inspektionsobjekt(); KlassenBIB.Inspektionsobjekt inspektionsobjekt = new KlassenBIB.Inspektionsobjekt();
inspektionsobjekt.Projektnummer = Global.Instance.ProjektNummer; inspektionsobjekt.Projektnummer = Global.Instance.ProjektNummer;
Datenbank.Instance.loadedProjekt.Objekte.Add(inspektionsobjekt); Datenbank.Instance.loadedProjekt.Objekte.Add(inspektionsobjekt);

Binary file not shown.