private async void StartSearching() { var dlg = new ServersFound(); if (dlg.ShowDialog().GetValueOrDefault()) { try { monoExtension.BuildSolution(); if (dlg.ViewModel.SelectedServer != null) { await monoExtension.AttachDebugger(dlg.ViewModel.SelectedServer.IpAddress.ToString()); } else if (!string.IsNullOrWhiteSpace(dlg.ViewModel.ManualIp)) { await monoExtension.AttachDebugger(dlg.ViewModel.ManualIp); } } catch (Exception ex) { logger.Error(ex); MessageBox.Show(ex.Message, "MonoDebugger", MessageBoxButton.OK, MessageBoxImage.Error); } } }
private async void DebugRemoteClicked(object sender, EventArgs e) { var dlg = new ServersFound(); if (dlg.ShowDialog().GetValueOrDefault()) { try { int timeout = dlg.ViewModel.AwaitTimeout; monoExtension.BuildSolution(); if (dlg.ViewModel.SelectedServer != null) { await monoExtension.AttachDebuggerAsync(dlg.ViewModel.SelectedServer.IpAddress.ToString(), timeout); } else if (!string.IsNullOrWhiteSpace(dlg.ViewModel.ManualIp)) { await monoExtension.AttachDebuggerAsync(dlg.ViewModel.ManualIp, timeout); } } catch (Exception ex) { logger.Error(ex); MessageBox.Show(ex.Message, "MonoRemoteDebugger", MessageBoxButton.OK, MessageBoxImage.Error); } } }
private async void OpenRemoteConfigDlg() { var dlg = new ServersFound(); if (dlg.ShowDialog().GetValueOrDefault()) { try { await _monoExtension.BuildSolutionAsync(); var settings = UserSettingsManager.Instance.Load(); var debugOptions = this._monoExtension.CreateDebugOptions(settings); if (dlg.ViewModel.SelectedServer != null) { debugOptions.UserSettings.LastIp = dlg.ViewModel.SelectedServer.IpAddress.ToString(); await _monoExtension.AttachDebugger(debugOptions); } else if (!string.IsNullOrWhiteSpace(dlg.ViewModel.ManualIp)) { await _monoExtension.AttachDebugger(debugOptions); } } catch (Exception ex) { logger.Error(ex); MessageBox.Show(ex.Message, "MonoRemoteDebugger", MessageBoxButton.OK, MessageBoxImage.Error); } } }