Advertisement
Guest User

Untitled

a guest
May 27th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. public bool GetThisThing()
  2. {
  3. string response;
  4. ExecuteCommand(commandGetThisThing, out response);
  5. bool value = false;
  6. string[] token = response.Trim().Split(' ');
  7. int tmpInt = 0;
  8. if (token.Length < 2 || !int.TryParse(token[1], Styles.Any, Culture.Invariant, out tmpInt))
  9. {
  10. throw new DeviceException("Unrecognized Response: " + response);
  11. }
  12. else
  13. {
  14. return tmpInt == 1;
  15. }
  16. }
  17.  
  18. public void SetThisThing(bool alertOption)
  19. {
  20. string response;
  21. ExecuteCommand(commandSetThisThing + " " + alertOption.ToString(), out response);
  22. bool value = false;
  23. if (response != null)
  24. {
  25.  
  26.  
  27. }
  28. else
  29. {
  30.  
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement