| 321 | } |
| 322 | |
| 323 | fire_and_forget MainPage::ConfigImportMenuItem_Click(IInspectable const& sender, RoutedEventArgs const& e) |
| 324 | { |
| 325 | try { |
| 326 | const auto lifetime = get_strong(); |
| 327 | bool unsnapped = ((ApplicationView::Value() != ApplicationViewState::Snapped) || ApplicationView::TryUnsnap()); |
| 328 | if (!unsnapped) |
| 329 | { |
| 330 | co_await NotifyUser(L"Cannot unsnap the app."); |
| 331 | co_return; |
| 332 | } |
| 333 | ImportFilePicker().FileTypeFilter().ReplaceAll({ L".conf", L".json", L".mmdb", L".dat", L".cer", L".crt" }); |
| 334 | const auto& files = co_await ImportFilePicker().PickMultipleFilesAsync(); |
| 335 | co_await ImportFiles(files); |
| 336 | } |
| 337 | catch (...) |
| 338 | { |
| 339 | UI::NotifyException(L"Importing files"); |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | fire_and_forget MainPage::ConfigDuplicateMenuItem_Click(IInspectable const& sender, RoutedEventArgs const&) |
| 344 | { |
nothing calls this directly
no outgoing calls
no test coverage detected