Esempio n. 1
0
        /// <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>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            var task = ThreadPool.RunAsync(async(x) =>
            {
                var storageFile = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/CortanaCommands.xml"));
                await Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinitionManager.InstallCommandDefinitionsFromStorageFileAsync(storageFile);
            });

            if (Window.Current.Content == null)
            {
                if (e.PreviousExecutionState != ApplicationExecutionState.Running)
                {
                    if (e.Arguments == "Com.Aurora.AuWeather.Calculator")
                    {
                        Calculator.MainPage m = new Calculator.MainPage();
                        Window.Current.Content = m;
                        Window.Current.Activate();
                    }
                    else
                    {
                        SplashScreenEx extendedSplash = new SplashScreenEx(e.SplashScreen, e.Arguments);
                        Window.Current.Content = extendedSplash;
                    }
                }
            }

#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                //this.DebugSettings.IsTextPerformanceVisualizationEnabled = true;
                //this.DebugSettings.EnableFrameRateCounter = true;
                //this.DebugSettings.IsOverdrawHeatMapEnabled = true;
                //this.DebugSettings.EnableRedrawRegions = true;
            }
#endif
            if (e.Arguments != "Com.Aurora.AuWeather.Calculator")
            {
                SetStatusBar();
            }
        }
Esempio n. 2
0
        public App()
        {
            InitializeComponent();

            MainPage = new Calculator.MainPage();
        }
Esempio n. 3
0
        /// <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>
        protected override void OnLaunched(LaunchActivatedEventArgs e)
        {
            var task = ThreadPool.RunAsync(async (x) =>
            {
                var storageFile = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/CortanaCommands.xml"));
                await Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinitionManager.InstallCommandDefinitionsFromStorageFileAsync(storageFile);

            });

            if (Window.Current.Content == null)
            {
                if (e.PreviousExecutionState != ApplicationExecutionState.Running)
                {
                    if (e.Arguments == "Com.Aurora.AuWeather.Calculator")
                    {
                        Calculator.MainPage m = new Calculator.MainPage();
                        Window.Current.Content = m;
                        Window.Current.Activate();
                    }
                    else
                    {
                        SplashScreenEx extendedSplash = new SplashScreenEx(e.SplashScreen, e.Arguments);
                        Window.Current.Content = extendedSplash;
                    }
                }
            }

#if DEBUG
            if (System.Diagnostics.Debugger.IsAttached)
            {
                //this.DebugSettings.IsTextPerformanceVisualizationEnabled = true;
                //this.DebugSettings.EnableFrameRateCounter = true;
                //this.DebugSettings.IsOverdrawHeatMapEnabled = true;
                //this.DebugSettings.EnableRedrawRegions = true;
            }
#endif
            if (e.Arguments != "Com.Aurora.AuWeather.Calculator")
            {
                SetStatusBar();
            }

        }