| 16 | namespace winrt::FastCopy::implementation |
| 17 | { |
| 18 | MainPage::MainPage() |
| 19 | { |
| 20 | InitializeComponent(); |
| 21 | SettingsChangeListener::GetInstance().OnThemeChange( |
| 22 | [this](SettingsChangeListener::ThemeChangeEventArg e) |
| 23 | { |
| 24 | if (e.effect == 2) |
| 25 | { |
| 26 | switch (e.theme) |
| 27 | { |
| 28 | case 0: Background(nullptr); break; |
| 29 | case 1: Background(winrt::Microsoft::UI::Xaml::Media::SolidColorBrush{winrt::Windows::UI::Colors::White()}); break; |
| 30 | case 2: Background(winrt::Microsoft::UI::Xaml::Media::SolidColorBrush{winrt::Windows::UI::Colors::Black()}); break; |
| 31 | } |
| 32 | } |
| 33 | else |
| 34 | Background(nullptr); |
| 35 | } |
| 36 | ); |
| 37 | } |
| 38 | |
| 39 | winrt::FastCopy::SettingsViewModel MainPage::ViewModel() |
| 40 | { |
nothing calls this directly
no test coverage detected