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

Method Application

TranslucentTB/application.cpp:73–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73Application::Application(HINSTANCE hInst, std::optional<std::filesystem::path> storageFolder, bool fileExists) :
74 m_Config(storageFolder, fileExists, ConfigurationChanged, this),
75 m_Worker(m_Config, hInst, m_Loader, storageFolder),
76 m_UwpCRTDep(
77 hInst,
78 L"Microsoft.VCLibs.140.00_8wekyb3d8bbwe",
79 PACKAGE_VERSION {
80 // 14.0.33519.0 but the order is reversed because that's how the struct is.
81 .Revision = 0,
82 .Build = 33519,
83 .Minor = 0,
84 .Major = 14
85 },
86 storageFolder.has_value()
87 ),
88 m_WinUIDep(
89 hInst,
90 L"Microsoft.UI.Xaml.2.8_8wekyb3d8bbwe",
91 PACKAGE_VERSION {
92 // 8.2310.30001.0 but the order is reversed because that's how the struct is.
93 .Revision = 0,
94 .Build = 30001,
95 .Minor = 2310,
96 .Major = 8
97 },
98 storageFolder.has_value()
99 ),
100 m_XamlApp(CreateXamlApp()),
101 m_XamlManager(UWP::CreateXamlManager()),
102 m_AppWindow(*this, !fileExists, storageFolder.has_value(), hInst, m_Loader),
103 m_Xaml(hInst),
104 m_ShuttingDown(false),
105 m_Dispatcher(winrt::Windows::System::DispatcherQueue::GetForCurrentThread())
106{
107 if (const auto spam = m_Loader.SetPreferredAppMode())
108 {
109 spam(PreferredAppMode::AllowDark);
110 }
111
112 if (storageFolder)
113 {
114 m_Startup.AcquireTask();
115 }
116
117 if (!fileExists)
118 {
119 CreateWelcomePage();
120 }
121}
122
123void Application::OpenDonationPage()
124{

Callers

nothing calls this directly

Calls 1

SetPreferredAppModeMethod · 0.80

Tested by

no test coverage detected