private async void InitRemotePlay() { ProgressRing.IsActive = true; var ip = localSettings.Values["ip"].ToString(); var priorityMode = Int32.Parse(localSettings.Values["priorityMode"].ToString()); var priorityFactor = Int32.Parse(localSettings.Values["priorityFactor"].ToString()); var quality = Int32.Parse(localSettings.Values["quality"].ToString()); var qosValue = Int32.Parse(localSettings.Values["qosValue"].ToString()); try { await ntr.InitRemoteplay(ip, priorityMode, priorityFactor, quality, qosValue); } catch (Exception e) { var messageDialog = new Windows.UI.Popups.MessageDialog("Unable to connect to NTR Debugger on: \n" + ip, "Connection Error"); ProgressRing.IsActive = false; await messageDialog.ShowAsync(); return; } try { ntr.NTRRemoteplayConnect(); } catch (Exception e) { var messageDialog = new Windows.UI.Popups.MessageDialog("Error while streaming to remote 3DS on: \n" + ip, "Stream Interuppted"); await messageDialog.ShowAsync(); } finally { startNTRinputRedirection(); } ProgressRing.IsActive = false; }
private async void InitRemotePlay() { ProgressBar.Visibility = Visibility.Visible; var ip = Properties.Settings.Default["ip"].ToString(); var priorityMode = Int32.Parse(Properties.Settings.Default["priorityMode"].ToString()); var priorityFactor = Int32.Parse(Properties.Settings.Default["priorityFactor"].ToString()); var quality = Int32.Parse(Properties.Settings.Default["quality"].ToString()); var qosValue = Int32.Parse(Properties.Settings.Default["qosValue"].ToString()); try { await ntr.InitRemoteplay(ip, priorityMode, priorityFactor, quality, qosValue); } catch (Exception e) { MessageBox.Show("Unable to connect to NTR Debugger on: \n" + ip, "Connection Error"); ProgressBar.Visibility = Visibility.Collapsed; return; } try { ntr.NTRRemoteplayConnect(ip); } catch (Exception e) { MessageBox.Show("Error while streaming to remote 3DS on: \n" + ip, "Stream Interrupted"); } finally { startNTRinputRedirection(ip); } ProgressBar.Visibility = Visibility.Collapsed; }