BallPage.xaml.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using Xamarin.Forms;
  4. namespace MagicBall
  5. {
  6. public partial class BallPage : ContentPage
  7. {
  8. string[] options = {" It is certain"
  9. , " It is decidedly so"
  10. , " Without a doubt"
  11. , " Yes definitely"
  12. , " You may rely on it"
  13. , " As I see it, yes"
  14. , " Most likely"
  15. , " Outlook good"
  16. , " Yes"
  17. , " Signs point to yes"
  18. , " Reply hazy try again"
  19. , " Ask again later"
  20. , " Better not tell you now"
  21. , " Cannot predict now"
  22. , " Concentrate and ask again"
  23. , " Don't count on it"
  24. , " My reply is no"
  25. , " My sources say no"
  26. , " Outlook not so good"
  27. , " Very doubtful "
  28. };
  29. public BallPage ()
  30. {
  31. InitializeComponent ();
  32. }
  33. void ButtonClicked (object sender, EventArgs args)
  34. {
  35. label.Text = options [new Random ().Next (options.Length - 1)];
  36. }
  37. }
  38. }