/// <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> public App() { // Initialize AI telemetry in the app. WindowsAppInitializer.InitializeAsync(); // Timer uploading hearbeat telemetry event HeartbeatTimer = new DispatcherTimer(); HeartbeatTimer.Tick += HeartbeatTimer_Tick; HeartbeatTimer.Interval = new TimeSpan(0, heartbeatInterval, 0); // tick every heartbeatInterval HeartbeatTimer.Start(); // Retrieve and set environment settings OSVersion = EnvironmentSettings.GetOSVersion(); appVersion = EnvironmentSettings.GetAppVersion(); deviceName = EnvironmentSettings.GetDeviceName(); ipAddress = EnvironmentSettings.GetIPAddress(); this.InitializeComponent(); this.Suspending += OnSuspending; this.Resuming += OnResuming; Controller = new AppController(); }