Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Text.RegularExpressions;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16.  
  17. namespace WpfApp1
  18. {
  19. public partial class MainWindow : Window
  20. {
  21. public MainWindow()
  22. {
  23. InitializeComponent();
  24. }
  25.  
  26. private void Transfer_OnClick(object sender, RoutedEventArgs e)
  27. {
  28.  
  29. }
  30.  
  31. private void Clear_OnClick(object sender, RoutedEventArgs e)
  32. {
  33. Cel.Clear();
  34. }
  35.  
  36. private void Quiet_OnClick(object sender, RoutedEventArgs e)
  37. {
  38. Application.Current.Shutdown();
  39. }
  40.  
  41. private void Cel_OnPreviewTextInput(object sender, TextCompositionEventArgs e)
  42. {
  43. Regex regex = new Regex("[^0-9,]+");
  44. e.Handled = regex.IsMatch(e.Text);
  45. }
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement