qdrow

Untitled

Sep 19th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. /// <summary>
  2. /// Логика взаимодействия для MainWindow.xaml
  3. /// </summary>
  4. public partial class MainWindow : Window
  5. {
  6. public bool comma = false;
  7. public MainWindow()
  8. {
  9. InitializeComponent();
  10.  
  11. }
  12. private void Num_0_Click (object sender, RoutedEventArgs e)
  13. {
  14. if (Tablo.Text != "0")
  15. {
  16. Tablo.Text += "0";
  17. }
  18. }
  19. private void Num_1_Click(object sender, RoutedEventArgs e)
  20. {
  21. if (Tablo.Text == "0")
  22. {
  23. Tablo.Text = "1";
  24. }
  25. else
  26. {
  27. Tablo.Text += "1";
  28. }
  29. }
  30. private void Comma_Click(object sender, RoutedEventArgs e)
  31. {
  32. if (!comma)
  33. {
  34. comma = true;
  35. Tablo.Text += ",";
  36. }
  37. }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment