Beispiel #1
0
 public static void Redial()
 {
     if (lastDialedContact == null)
     {
         MessagesHandler.Display("No calls since program start");
     }
     else
     {
         Dialer.Dial(lastDialedContact);
     }
 }
Beispiel #2
0
        public void ExecuteCommand(Extension.IEnsoService service, Command command)
        {
            //Exception ee = new Exception("inner one");
            //Exception ee2 = new Exception("inner two",ee);
            //Exception ee3 = new Exception("test ex",ee2);
            //throw ee3;

            Logging.AddActionLog(string.Format("Caller: Executing command '{0}' ...", command.Name));

            if (command.Name == "call" || command.Name == "dial")
            {
                Dialer.service = service;
                if (command.parametersOnExecute[0] is StringWorkItem)
                {
                    Dialer.contactToDial = new ContactUnknown(command.parametersOnExecute[0].GetValueAsText());
                }
                else if (command.parametersOnExecute[0] is Contact)
                {
                    Dialer.contactToDial = (command.parametersOnExecute[0] as Contact);
                }

                WorkItemsProviders.CallerHistory.CallerHistory.Add(Dialer.contactToDial);
                Dialer.Dial();
            }
            else
            if (command.Name == "recall" || command.Name == "redial")
            {
                Dialer.service = service;
                Dialer.Redial();
            }
            else
            if (command.Name == "later")
            {
                Dialer.service = service;
                Dialer.Cancel();
            }
            else
            {
                throw new ApplicationException(string.Format("Caller: Command not found. Command: {0} {1}", command.Name, command.Postfix));
            }
        }
Beispiel #3
0
 public static void Dial()
 {
     Dialer.Dial(contactToDial);
 }