Exemplo n.º 1
0
        private async void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            // Update current dispatcher
            Util.CurrentDispatcher = this.Dispatcher;

            if (startup)
            {
                startup = false;

                // Setup system tray
                SystemTray.SetProgressIndicator(this, ProgressIndicatorHelper.Instance.PI);
                SystemTray.Opacity         = 0;
                SystemTray.IsVisible       = true;
                SystemTray.ForegroundColor = Colors.Black;

                // Get Permissions
                if (LocationTracker.GetPermission())
                {
                    // Find location
                    ProgressIndicatorHelper.Instance.Push(LoadingEnum.Location);
                    LocationTracker.RetrieveLocation();
                }

                // Setup speech recognition
                await VoiceHelper.InitializeSpeech();
            }
        }