You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
618 B

  1. using System.Reflection;
  2. using CDPShared;
  3. namespace CircleViewerMaui;
  4. public partial class MainPage : ContentPage
  5. {
  6. int count = 0;
  7. private CDPWorker _cdp;
  8. public MainPage()
  9. {
  10. using (LogMethod.Log(MethodBase.GetCurrentMethod().ReflectedType.Name))
  11. {
  12. _cdp = new CDPWorker();
  13. InitializeComponent();
  14. }
  15. }
  16. private void OnCounterClicked(object sender, EventArgs e)
  17. {
  18. count++;
  19. if (count == 1)
  20. CounterBtn.Text = $"Clicked {count} time";
  21. else
  22. CounterBtn.Text = $"Clicked {count} times";
  23. SemanticScreenReader.Announce(CounterBtn.Text);
  24. }
  25. }