Cardreader

This commit is contained in:
BlubbFish 2011-10-25 16:45:42 +00:00
parent 9f628c93bc
commit d63c29e9b3
6 changed files with 17 additions and 8 deletions

View File

@ -51,7 +51,13 @@ namespace Matomat
private void sell(Prod prod, User user) 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) private void showProdInfo(Prod prod)
@ -64,7 +70,7 @@ namespace Matomat
this.lcd.print("²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²" + this.lcd.print("²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²" +
"² Produkt: " + name.PadRight(27, ' ') + " ²" + "² Produkt: " + name.PadRight(27, ' ') + " ²" +
"² Preis: " + price.ToString(2).PadLeft(6, ' ') + "€ EAN13: " + id.ToString().PadRight(14, ' ') + " ²" + "² Preis: " + price.ToString(2).PadLeft(6, ' ') + "€ EAN13: " + id.ToString().PadRight(14, ' ') + " ²" +
"²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²", 5); "²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²", 2);
} }
if (prod.GetProdType() == Prod.ProdType.instruction) if (prod.GetProdType() == Prod.ProdType.instruction)
{ {
@ -72,7 +78,7 @@ namespace Matomat
this.lcd.print("²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²" + this.lcd.print("²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²" +
"² Instruktion: " + name.PadRight(23, ' ') + " ²" + "² Instruktion: " + name.PadRight(23, ' ') + " ²" +
"² AdminCard + Instruction + TargetCard ²" + "² AdminCard + Instruction + TargetCard ²" +
"²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²", 5); "²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²", 2);
} }
} }

View File

@ -97,12 +97,15 @@ namespace Matomat
{ {
if (status == Status.Warn) if (status == Status.Warn)
{ {
Console.Beep(); Console.Beep(750, 750);
} }
if (status == Status.Error) if (status == Status.Error)
{ {
Console.Beep(); Console.Beep(750, 500);
Console.Beep(); Console.Beep(37, 100);
Console.Beep(750, 500);
Console.Beep(37, 100);
Console.Beep(750, 500);
} }
Console.WriteLine(text); Console.WriteLine(text);
this.displayClear(); this.displayClear();

View File

@ -26,7 +26,7 @@ namespace Matomat
{ {
if (true) if (true)
this.found = true; this.found = true;
this.type = ProdType.instruction; this.type = ProdType.product;
} }
internal bool vaild() internal bool vaild()

BIN
Matomat/RfidClass.dll Normal file

Binary file not shown.

View File

@ -42,7 +42,7 @@ namespace Matomat
internal int GetUserKonto() internal int GetUserKonto()
{ {
return 15; return 20;
} }
internal long GetUserId() internal long GetUserId()

BIN
Matomat/librfid-tool.exe Normal file

Binary file not shown.