예제 #1
0
        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);
            }
        }
예제 #2
0
 public void Dial(string numberToDial)
 {
     logger.LogDebug("Dialing: {0}", numberToDial);
     _client.Dial(numberToDial);
 }