|
1 | 1 | using System; |
2 | 2 | using System.Collections.Generic; |
3 | | -using System.IO; |
4 | 3 | using System.Linq; |
5 | 4 | using System.Text; |
6 | 5 | using System.Threading.Tasks; |
|
13 | 12 | using System.Windows.Media.Imaging; |
14 | 13 | using System.Windows.Navigation; |
15 | 14 | using System.Windows.Shapes; |
16 | | -using System.Xml; |
17 | | -using CodeDisplayer; |
18 | 15 | using MaterialDesignColors.WpfExample.Domain; |
19 | | -using MaterialDesignDemo.Helper; |
20 | 16 |
|
21 | 17 | namespace MaterialDesignColors.WpfExample |
22 | 18 | { |
23 | | - /// <summary> |
24 | | - /// Interaction logic for Buttons.xaml |
25 | | - /// </summary> |
26 | | - public partial class Buttons : UserControl |
27 | | - { |
28 | | - public Buttons() |
29 | | - { |
30 | | - InitializeComponent(); |
31 | | - FloatingActionDemoCommand = new AnotherCommandImplementation(Execute); |
32 | | - |
33 | | - } |
| 19 | + /// <summary> |
| 20 | + /// Interaction logic for Buttons.xaml |
| 21 | + /// </summary> |
| 22 | + public partial class Buttons : UserControl |
| 23 | + { |
| 24 | + public Buttons() |
| 25 | + { |
| 26 | + InitializeComponent(); |
34 | 27 |
|
35 | | - public ICommand FloatingActionDemoCommand { get; } |
| 28 | + FloatingActionDemoCommand = new AnotherCommandImplementation(Execute); |
| 29 | + } |
36 | 30 |
|
37 | | - private void Execute(object o) |
38 | | - { |
39 | | - Console.WriteLine("Floating action button command. - " + (o ?? "NULL").ToString()); |
40 | | - } |
| 31 | + public ICommand FloatingActionDemoCommand { get; } |
41 | 32 |
|
42 | | - private void ButtonBase_OnClick(object sender, RoutedEventArgs e) |
43 | | - { |
44 | | - Console.WriteLine("Just checking we haven't suppressed the button."); |
45 | | - } |
| 33 | + private void Execute(object o) |
| 34 | + { |
| 35 | + Console.WriteLine("Floating action button command. - " + (o ?? "NULL").ToString()); |
| 36 | + } |
46 | 37 |
|
47 | | - private void PopupBox_OnOpened(object sender, RoutedEventArgs e) |
48 | | - { |
49 | | - Console.WriteLine("Just making sure the popup has opened."); |
| 38 | + private void ButtonBase_OnClick(object sender, RoutedEventArgs e) |
| 39 | + { |
| 40 | + Console.WriteLine("Just checking we haven't suppressed the button."); |
50 | 41 | } |
51 | 42 |
|
52 | | - private void PopupBox_OnClosed(object sender, RoutedEventArgs e) |
53 | | - { |
54 | | - Console.WriteLine("Just making sure the popup has closed."); |
55 | | - } |
| 43 | + private void PopupBox_OnOpened(object sender, RoutedEventArgs e) |
| 44 | + { |
| 45 | + Console.WriteLine("Just making sure the popup has opened."); |
| 46 | + } |
56 | 47 |
|
57 | | - private void CountingButton_OnClick(object sender, RoutedEventArgs e) |
58 | | - { |
59 | | - if (CountingBadge.Badge == null || Equals(CountingBadge.Badge, "")) |
60 | | - CountingBadge.Badge = 0; |
| 48 | + private void PopupBox_OnClosed(object sender, RoutedEventArgs e) |
| 49 | + { |
| 50 | + Console.WriteLine("Just making sure the popup has closed."); |
| 51 | + } |
61 | 52 |
|
62 | | - var next = int.Parse(CountingBadge.Badge.ToString()) + 1; |
| 53 | + private void CountingButton_OnClick(object sender, RoutedEventArgs e) |
| 54 | + { |
| 55 | + if (CountingBadge.Badge == null || Equals(CountingBadge.Badge, "")) |
| 56 | + CountingBadge.Badge = 0; |
63 | 57 |
|
64 | | - CountingBadge.Badge = next < 21 ? (object)next : null; |
| 58 | + var next = int.Parse(CountingBadge.Badge.ToString()) + 1; |
65 | 59 |
|
66 | | - } |
67 | | - } |
| 60 | + CountingBadge.Badge = next < 21 ? (object)next : null; |
| 61 | + |
| 62 | + } |
| 63 | + } |
68 | 64 | } |
0 commit comments