Advertisement
Guest User

Untitled

a guest
Apr 20th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. ("Which Room Would you like to Trigger? nRoom 1001 or Room 1002")
  2.  
  3. bool loopChk = true;
  4.  
  5. do
  6. {
  7. Console.WriteLine("Which Room Would you like to Trigger? nRoom 1001 or Room 1002");
  8. string line = Console.ReadLine();
  9. if (line == "1001")
  10. {
  11. await objClient.WritePropertyAsync(fqrs[0], "Present Value", a_bOn ? "on" : "off", CancellationToken.None);
  12. Console.WriteLine("You have Triggered Room 1001");
  13. }
  14. else if (line == "1002")
  15. {
  16. await objClient.WritePropertyAsync(fqrs[1], "Present Value", a_bOn ? "on" : "off", CancellationToken.None);
  17. Console.WriteLine("You have Triggered Room 1002");
  18. }
  19. else if (line == "exit")
  20. {
  21. break;
  22. }
  23. } while (loopChk);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement