MCPcopy Create free account
hub / github.com/YtFlow/Maple / ConfigImportMenuItem_Click

Method ConfigImportMenuItem_Click

Maple.App/MainPage.cpp:323–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected