private void hotkeymanager_KeyPressed(object sender, KeyPressedEventArgs e) { var numbers = _phonenumbergrabber.TryGrabPhonenumbersFromSelection(6); //TODO: Make this minlength a setting? if (numbers.Length == 0) { return; //Nothing to do... } string dialnumber = null; if (numbers.Length == 1) { dialnumber = numbers[0]; } else { using (var s = new SelectNumber(numbers)) { if (s.ShowDialog(this) == DialogResult.OK) { dialnumber = s.SelectedNumber; } } } if (dialnumber != null) { _client.Dial(dialnumber); } }
public void Dial(string numberToDial) { logger.LogDebug("Dialing: {0}", numberToDial); _client.Dial(numberToDial); }