SerialAccess.cs 659 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace crusherScanner
  7. {
  8. internal class SerialAccess
  9. {
  10. //Serial stuff
  11. //https://www.c-sharpcorner.com/UploadFile/eclipsed4utoo/communicating-with-serial-port-in-C-Sharp/
  12. public static void SendToPrepmaster(string barcode)
  13. {
  14. if(barcode != "" || !Properties.Settings.Default.PrepmasterConnection)
  15. {
  16. MessageBox.Show($"The crusher flap would\nhave just opened to\naccept sample {barcode}","Crusher Input");
  17. }
  18. return;
  19. }
  20. }
  21. }