Advertisement
Guest User

Ma Codes 2

a guest
Mar 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. //Only tell us if the CPU is above 80% usage, If it is at 100% say Something else
  2. if (CurrentCpuPercentage > 95)
  3. {
  4. if (CurrentCpuPercentage == 100)
  5. {
  6. String CpuLoadVocalMessage = String.Format("WARNING, Holy Crap your CPU is about to catch Fire");
  7. synth.Speak(CpuLoadVocalMessage);
  8. }
  9. else
  10. {
  11. String CpuLoadVocalMessage = String.Format("CPU Load is {0} percent", CurrentCpuPercentage);
  12. synth.Speak(CpuLoadVocalMessage);
  13. }
  14.  
  15. }
  16. //Only tell us if the Availble Memory is below 1024 megabytes, if it is greater than 7168, say something else
  17. if (CurrentAvailableMemory < 512)
  18. {
  19. if (CurrentAvailableMemory > 7168)
  20. {
  21. String MemAvailableVocalMessage = String.Format("You need to open more Chrome Web Browsers", CurrentAvailableMemory);
  22. synth.Speak(MemAvailableVocalMessage);
  23. }
  24. else
  25. {
  26. String MemAvailableVocalMessage = String.Format("Available Memory is {0} Megabytes", CurrentAvailableMemory);
  27. synth.Speak(MemAvailableVocalMessage);
  28. }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement