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

Method Page_Loaded

Maple.App/MainPage.cpp:77–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 }
76
77 fire_and_forget MainPage::Page_Loaded(IInspectable const&, RoutedEventArgs const&)
78 {
79 try {
80 const auto loadConfigsTask = LoadConfigs();
81 NavigationManager = SystemNavigationManager::GetForCurrentView();
82 NavigationManager.AppViewBackButtonVisibility(MainSplitView().IsPaneOpen()
83 ? AppViewBackButtonVisibility::Collapsed
84 : AppViewBackButtonVisibility::Visible);
85
86 const auto weakThis = get_weak();
87 NavigationManager.BackRequested([weakThis](const auto&, const auto&) {
88 if (const auto self{ weakThis.get() }) {
89 self->MainSplitView().IsPaneOpen(true);
90 const auto currentVisibility = NavigationManager.AppViewBackButtonVisibility();
91 if (currentVisibility == AppViewBackButtonVisibility::Visible) {
92 NavigationManager.AppViewBackButtonVisibility(AppViewBackButtonVisibility::Disabled);
93 }
94 }
95 });
96
97 StartConnectionCheck();
98 co_await loadConfigsTask;
99 }
100 catch (...)
101 {
102 UI::NotifyException(L"Loading MainPage");
103 }
104 }
105
106 IAsyncAction MainPage::NotifyUser(const hstring& message) {
107 ContentDialog dialog;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected