diff --git a/Matomat/Automat.cs b/Matomat/Automat.cs index efa0aa8..8c241eb 100644 --- a/Matomat/Automat.cs +++ b/Matomat/Automat.cs @@ -51,7 +51,13 @@ namespace Matomat private void sell(Prod prod, User user) { - throw new NotImplementedException(); + if (user.GetUserKonto() > 19) + { + this.lcd.print("²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²" + + "² Du hast zu viel Geld auf dem Konto ²" + + "² BITTE bezahlen! | Grenze 20€ ²" + + "²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²", LCDDisplay.Status.Error, 5); + } } private void showProdInfo(Prod prod) @@ -64,7 +70,7 @@ namespace Matomat this.lcd.print("²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²" + "² Produkt: " + name.PadRight(27, ' ') + " ²" + "² Preis: " + price.ToString(2).PadLeft(6, ' ') + "€ EAN13: " + id.ToString().PadRight(14, ' ') + " ²" + - "²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²", 5); + "²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²", 2); } if (prod.GetProdType() == Prod.ProdType.instruction) { @@ -72,7 +78,7 @@ namespace Matomat this.lcd.print("²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²" + "² Instruktion: " + name.PadRight(23, ' ') + " ²" + "² AdminCard + Instruction + TargetCard ²" + - "²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²", 5); + "²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²", 2); } } diff --git a/Matomat/LCDDisplay.cs b/Matomat/LCDDisplay.cs index f0b3508..9530d5e 100644 --- a/Matomat/LCDDisplay.cs +++ b/Matomat/LCDDisplay.cs @@ -97,12 +97,15 @@ namespace Matomat { if (status == Status.Warn) { - Console.Beep(); + Console.Beep(750, 750); } if (status == Status.Error) { - Console.Beep(); - Console.Beep(); + Console.Beep(750, 500); + Console.Beep(37, 100); + Console.Beep(750, 500); + Console.Beep(37, 100); + Console.Beep(750, 500); } Console.WriteLine(text); this.displayClear(); diff --git a/Matomat/Prod.cs b/Matomat/Prod.cs index 311d5fb..a3b3a6d 100644 --- a/Matomat/Prod.cs +++ b/Matomat/Prod.cs @@ -26,7 +26,7 @@ namespace Matomat { if (true) this.found = true; - this.type = ProdType.instruction; + this.type = ProdType.product; } internal bool vaild() diff --git a/Matomat/RfidClass.dll b/Matomat/RfidClass.dll new file mode 100644 index 0000000..7796e22 Binary files /dev/null and b/Matomat/RfidClass.dll differ diff --git a/Matomat/User.cs b/Matomat/User.cs index 32f7e2b..e74affa 100644 --- a/Matomat/User.cs +++ b/Matomat/User.cs @@ -42,7 +42,7 @@ namespace Matomat internal int GetUserKonto() { - return 15; + return 20; } internal long GetUserId() diff --git a/Matomat/librfid-tool.exe b/Matomat/librfid-tool.exe new file mode 100644 index 0000000..9becc5c Binary files /dev/null and b/Matomat/librfid-tool.exe differ