App.xaml.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using System;
 6  using System.Collections.Generic;
 7  using System.IO;
 8  using System.Linq;
 9  using System.Runtime.InteropServices.WindowsRuntime;
10  using ManagedCommon;
11  using Microsoft.UI.Xaml;
12  using Microsoft.UI.Xaml.Controls;
13  using Microsoft.UI.Xaml.Controls.Primitives;
14  using Microsoft.UI.Xaml.Data;
15  using Microsoft.UI.Xaml.Input;
16  using Microsoft.UI.Xaml.Media;
17  using Microsoft.UI.Xaml.Navigation;
18  using Microsoft.UI.Xaml.Shapes;
19  using Windows.ApplicationModel;
20  using Windows.ApplicationModel.Activation;
21  using Windows.Foundation;
22  using Windows.Foundation.Collections;
23  
24  namespace KeyboardManagerEditorUI
25  {
26      /// <summary>
27      /// Provides application-specific behavior to supplement the default Application class.
28      /// </summary>
29      public partial class App : Application
30      {
31          /// <summary>
32          /// Initializes the singleton application object.  This is the first line of authored code
33          /// executed, and as such is the logical equivalent of main() or WinMain().
34          /// </summary>
35          public App()
36          {
37              this.InitializeComponent();
38              Logger.InitializeLogger("\\Keyboard Manager\\WinUI3Editor\\Logs");
39              Logger.LogInfo("keyboard-manager WinUI3 editor logger is initialized");
40          }
41  
42          /// <summary>
43          /// Invoked when the application is launched.
44          /// </summary>
45          /// <param name="args">Details about the launch request and process.</param>
46          protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
47          {
48              window = new MainWindow();
49              window.Activate();
50              Logger.LogInfo("keyboard-manager WinUI3 editor window is launched");
51          }
52  
53          private Window? window;
54      }
55  }