public PointOfSaleService Build() { var service = new PointOfSaleService(query, generator); service.BarcodeEvent += display.BarcodeHandler; service.CompleteSaleEvent += display.CompleteSaleHandler; return(service); }
public decimal ShoppingCartTotalTest(string cartItems) { PointOfSaleService pointOfSaleService = new PointOfSaleService(); foreach (char c in cartItems) { pointOfSaleService.Scan(c.ToString()); } return(pointOfSaleService.Total()); }
public MainWindow(PointOfSaleService service, ReceiptFactory factory) : base(Gtk.WindowType.Toplevel) { Build(); this.service = service; this.factory = factory; this.items = new ListStore(typeof(string), typeof(string), typeof(string)); this.service.BarcodeEvent += BarcodeHandler; this.service.CompleteSaleEvent += CompleteSaleHandler; SetupWidgets(); }
public StartViewModel(OrderModel orderModel) { service = new PointOfSaleService(); Model = orderModel; DoneCommand = new DelegateCommand(Done, () => !String.IsNullOrWhiteSpace(Name)); var provider = new LatLongLocationProvider(10000); try { var report = (LatLongLocationReport)provider.GetReport(); service.ReportLocation(report.Latitude, report.Longitude); } catch { service.LocationMalfunction(); } }
public CheckoutViewModel(OrderModel orderModel) { Model = orderModel; service = new PointOfSaleService(); SubmitCommand = new DelegateCommand(Submit); }