mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 11:09:28 +08:00
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
#include "pch.h"
|
|
|
|
#include "App.xaml.h"
|
|
#include "MainWindow.xaml.h"
|
|
|
|
using namespace winrt;
|
|
using namespace Windows::Foundation;
|
|
using namespace Microsoft::UI::Xaml;
|
|
using namespace Microsoft::UI::Xaml::Controls;
|
|
using namespace Microsoft::UI::Xaml::Navigation;
|
|
using namespace FileLocksmithGUI;
|
|
using namespace FileLocksmithGUI::implementation;
|
|
|
|
// To learn more about WinUI, the WinUI project structure,
|
|
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
|
|
|
/// <summary>
|
|
/// Initializes the singleton application object. This is the first line of authored code
|
|
/// executed, and as such is the logical equivalent of main() or WinMain().
|
|
/// </summary>
|
|
App::App()
|
|
{
|
|
InitializeComponent();
|
|
|
|
#if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
|
|
UnhandledException([this](IInspectable const&, UnhandledExceptionEventArgs const& e)
|
|
{
|
|
if (IsDebuggerPresent())
|
|
{
|
|
auto errorMessage = e.Message();
|
|
__debugbreak();
|
|
}
|
|
});
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// Invoked when the application is launched normally by the end user. Other entry points
|
|
/// will be used such as when the application is launched to open a specific file.
|
|
/// </summary>
|
|
/// <param name="e">Details about the launch request and process.</param>
|
|
void App::OnLaunched(LaunchActivatedEventArgs const&)
|
|
{
|
|
window = make<MainWindow>();
|
|
window.Activate();
|
|
} |