MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / StartupStateChanged

Method StartupStateChanged

TranslucentTB/mainappwindow.cpp:241–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241winrt::fire_and_forget MainAppWindow::StartupStateChanged()
242{
243 auto &manager = m_App.GetStartupManager();
244 if (const auto state = manager.GetState())
245 {
246 switch (*state)
247 {
248 using enum winrt::Windows::ApplicationModel::StartupTaskState;
249
250 case Disabled:
251 co_await manager.Enable();
252 break;
253
254 case Enabled:
255 manager.Disable();
256 break;
257
258 case DisabledByUser:
259 StartupManager::OpenSettingsPage();
260 break;
261
262 default:
263 MessagePrint(spdlog::level::err, L"Cannot change startup state because it is locked by external factors (for example Group Policy).");
264 break;
265 }
266 }
267}
268
269void MainAppWindow::TipsAndTricksRequested()
270{

Callers 1

RegisterMenuHandlersMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected