private void LaunchSoftAP() { UI.WindowsRuntimeResourceManager.InjectIntoResxGeneratedApplicationResourcesClass(typeof(Particle.Setup.SetupResources)); SoftAPSettings softAPSettings = new SoftAPSettings(); softAPSettings.AppFrame = Frame; softAPSettings.CompletionPageType = GetType(); softAPSettings.Username = TinkerData.Username; softAPSettings.CurrentDeviceNames = TinkerData.GetDeviceNames(); softAPSettings.OnSoftAPExit += SoftAPSettings_OnSoftAPExit; #if WINDOWS_PHONE_APP hardwareButtonsBackPressed = new EventHandler <Windows.Phone.UI.Input.BackPressedEventArgs>(delegate(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { e.Handled = SoftAP.BackButtonPressed(); }); Windows.Phone.UI.Input.HardwareButtons.BackPressed += hardwareButtonsBackPressed; #endif SoftAP.Start(softAPSettings); }
private void LaunchSoftAP() { UI.WindowsRuntimeResourceManager.InjectIntoResxGeneratedApplicationResourcesClass(typeof(Particle.Setup.SetupResources)); SoftAPSettings softAPSettings = new SoftAPSettings(); softAPSettings.AppFrame = Frame; softAPSettings.CompletionPageType = GetType(); softAPSettings.Username = TinkerData.Username; softAPSettings.CurrentDeviceNames = TinkerData.GetDeviceNames(); #if WINDOWS_PHONE_APP hardwareButtonsBackPressed = new EventHandler<Windows.Phone.UI.Input.BackPressedEventArgs>(delegate (object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) { if (SoftAP.SoftAPResult.Result != SoftAPSetupResult.Started) { Windows.Phone.UI.Input.HardwareButtons.BackPressed -= hardwareButtonsBackPressed; if (SoftAP.SoftAPResult.Result != SoftAPSetupResult.NotStarted) return; } if (Frame.CanGoBack) { e.Handled = true; Frame.GoBack(); } }); Windows.Phone.UI.Input.HardwareButtons.BackPressed += hardwareButtonsBackPressed; #endif SoftAP.Start(softAPSettings); }