|
1 |
| -using System; |
2 |
| -using System.Collections.Generic; |
3 |
| -using System.IO; |
4 |
| -using System.Linq; |
5 |
| -using System.Runtime.InteropServices.WindowsRuntime; |
6 |
| -using Signal_Windows.ViewModels; |
7 |
| -using Windows.Foundation; |
8 |
| -using Windows.Foundation.Collections; |
9 |
| -using Windows.UI.Core; |
10 |
| -using Windows.UI.Xaml; |
11 |
| -using Windows.UI.Xaml.Controls; |
12 |
| -using Windows.UI.Xaml.Controls.Primitives; |
13 |
| -using Windows.UI.Xaml.Data; |
14 |
| -using Windows.UI.Xaml.Input; |
15 |
| -using Windows.UI.Xaml.Media; |
16 |
| -using Windows.UI.Xaml.Navigation; |
17 |
| - |
18 |
| -// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 |
19 |
| - |
20 |
| -namespace Signal_Windows.Views |
21 |
| -{ |
22 |
| - /// <summary> |
23 |
| - /// An empty page that can be used on its own or navigated to within a Frame. |
24 |
| - /// </summary> |
25 |
| - public sealed partial class AdvancedSettingsPage : Page |
26 |
| - { |
27 |
| - public AdvancedSettingsPage() |
28 |
| - { |
29 |
| - this.InitializeComponent(); |
30 |
| - } |
31 |
| - |
32 |
| - public AdvancedSettingsPageViewModel Vm |
33 |
| - { |
34 |
| - get { return (AdvancedSettingsPageViewModel)DataContext; } |
35 |
| - } |
36 |
| - |
37 |
| - protected override void OnNavigatedTo(NavigationEventArgs e) |
38 |
| - { |
39 |
| - Utils.EnableBackButton(BackButton_Click); |
40 |
| - } |
41 |
| - |
42 |
| - protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) |
43 |
| - { |
44 |
| - Utils.DisableBackButton(BackButton_Click); |
45 |
| - } |
46 |
| - |
47 |
| - private void BackButton_Click(object sender, BackRequestedEventArgs e) |
48 |
| - { |
49 |
| - Frame.GoBack(); |
50 |
| - e.Handled = true; |
51 |
| - } |
52 |
| - |
53 |
| - private async void ExportDebugLogButton_Click(object sender, RoutedEventArgs e) |
54 |
| - { |
55 |
| - await Vm.ExportUIDebugLog(); |
56 |
| - } |
57 |
| - |
58 |
| - private void SyncButton_Click(object sender, RoutedEventArgs e) |
59 |
| - { |
60 |
| - App.Handle.RequestSync(); |
61 |
| - } |
62 |
| - } |
63 |
| -} |
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.IO; |
| 4 | +using System.Linq; |
| 5 | +using System.Runtime.InteropServices.WindowsRuntime; |
| 6 | +using Signal_Windows.ViewModels; |
| 7 | +using Windows.Foundation; |
| 8 | +using Windows.Foundation.Collections; |
| 9 | +using Windows.UI.Core; |
| 10 | +using Windows.UI.Xaml; |
| 11 | +using Windows.UI.Xaml.Controls; |
| 12 | +using Windows.UI.Xaml.Controls.Primitives; |
| 13 | +using Windows.UI.Xaml.Data; |
| 14 | +using Windows.UI.Xaml.Input; |
| 15 | +using Windows.UI.Xaml.Media; |
| 16 | +using Windows.UI.Xaml.Navigation; |
| 17 | + |
| 18 | +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 |
| 19 | + |
| 20 | +namespace Signal_Windows.Views |
| 21 | +{ |
| 22 | + /// <summary> |
| 23 | + /// An empty page that can be used on its own or navigated to within a Frame. |
| 24 | + /// </summary> |
| 25 | + public sealed partial class AdvancedSettingsPage : Page |
| 26 | + { |
| 27 | + public AdvancedSettingsPage() |
| 28 | + { |
| 29 | + this.InitializeComponent(); |
| 30 | + } |
| 31 | + |
| 32 | + public AdvancedSettingsPageViewModel Vm |
| 33 | + { |
| 34 | + get { return (AdvancedSettingsPageViewModel)DataContext; } |
| 35 | + } |
| 36 | + |
| 37 | + protected override void OnNavigatedTo(NavigationEventArgs e) |
| 38 | + { |
| 39 | + Utils.EnableBackButton(BackButton_Click); |
| 40 | + } |
| 41 | + |
| 42 | + protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) |
| 43 | + { |
| 44 | + Utils.DisableBackButton(BackButton_Click); |
| 45 | + } |
| 46 | + |
| 47 | + private void BackButton_Click(object sender, BackRequestedEventArgs e) |
| 48 | + { |
| 49 | + Frame.GoBack(); |
| 50 | + e.Handled = true; |
| 51 | + } |
| 52 | + |
| 53 | + private async void ExportDebugLogButton_Click(object sender, RoutedEventArgs e) |
| 54 | + { |
| 55 | + await Vm._ExportUIDebugLog(); |
| 56 | + } |
| 57 | + |
| 58 | + private void SyncButton_Click(object sender, RoutedEventArgs e) |
| 59 | + { |
| 60 | + App.Handle.RequestSync(); |
| 61 | + } |
| 62 | + |
| 63 | + private void TestCrashButton_Click(object sender, RoutedEventArgs e) |
| 64 | + { |
| 65 | + int i = 1; |
| 66 | + i--; |
| 67 | + i = 5 / i; |
| 68 | + } |
| 69 | + } |
| 70 | +} |
0 commit comments