AppGlobal.cs 727 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Fietsclient
  7. {
  8. public class AppGlobal
  9. {
  10. private static AppGlobal _instance;
  11. public static AppGlobal Instance
  12. {
  13. get { return _instance ?? (_instance = new AppGlobal()); }
  14. }
  15. private KettlerBikeComm _bikeComm;
  16. private AppGlobal()
  17. {
  18. }
  19. public void startComPort()
  20. {
  21. startComPort("COM5");
  22. }
  23. public void startComPort(string portname)
  24. {
  25. _bikeComm = new KettlerBikeComm(portname);
  26. _bikeComm.initComm();
  27. }
  28. }
  29. }