public static async Task <WindowsMediaSpeechRecognizer> CreateAsync(Windows.UI.Xaml.Window window) { SpeechRecognizer sr = null; foreach (var item in Windows.System.UserProfile.GlobalizationPreferences.Languages) { var language = new Language(item); try { sr = new SpeechRecognizer(language); break; } catch (Exception ex) { Debug.WriteLine(ex); } } if (sr is null) { sr = new SpeechRecognizer(); } var d = new WindowsMediaSpeechRecognizer(sr); Debug.WriteLine($"SpeechRecognizer Language: { sr.CurrentLanguage.DisplayName}"); sr.ContinuousRecognitionSession.AutoStopSilenceTimeout = TimeSpan.MaxValue; await sr.CompileConstraintsAsync(); sr.ContinuousRecognitionSession.ResultGenerated += d.ContinuousRecognitionSession_ResultGenerated; await sr.ContinuousRecognitionSession.StartAsync(); window.Activated += d.Window_Activated; return(d); }
public static void Navigate(Type typeOfPage) { Windows.UI.Xaml.Window window = Windows.UI.Xaml.Window.Current; if (window != null) { Windows.UI.Xaml.Controls.Frame frame = window.Content as Windows.UI.Xaml.Controls.Frame; if (frame != null) { frame.Navigate(typeOfPage); } } }
public void goToPage(Type page) { Windows.UI.Xaml.Window window = Windows.UI.Xaml.Window.Current; if (window != null) { Windows.UI.Xaml.Controls.Frame frame = window.Content as Windows.UI.Xaml.Controls.Frame; if (frame != null) { frame.Navigate(page); } } }
public Game(Windows.UI.Xaml.Window current) { _colliderSystem = new ColliderSystem(_eventSystem); _moveSystem = new MoveSystem(); _physicsSystem = new PhysicsSystem(_eventSystem); _inputSystem = new InputSystem(_eventSystem); _graphicsSystem = new GraphicsSystem(_eventSystem); _particleSystem = new ParticleSystem(); _playerSystem = new PlayerSystem(_eventSystem); _dustParticleEmitterSystem = new DustParticleEmitterSystem(_eventSystem, _dustEntityFactory); _particleEmitterSystem = new ParticleEmitterSystem(_dustEntityFactory); _inputSystem.Current = current; }
private void loginButtonAction() { var content = new FormUrlEncodedContent(new[] { new KeyValuePair <string, string>("login", UserLogin), new KeyValuePair <string, string>("password", UserPassword) }); if (WebRequest.Instance.GetAccessToken(content, UserLogin) == true) { Windows.UI.Xaml.Window window = Windows.UI.Xaml.Window.Current; if (window != null) { Windows.UI.Xaml.Controls.Frame frame = window.Content as Windows.UI.Xaml.Controls.Frame; if (frame != null) { frame.Navigate(typeof(UserPage)); } } } }
internal bool SetTarget(Windows.UI.Xaml.Window xamlWindow) { // Uno specific: Actual Mica is not yet supported on any target. return(false); }
public static void Use(Windows.UI.Xaml.Window mainWindow) { DemoUtilities.Init(); DemoUtilitiesImplementation.Init(mainWindow); }