public static void Cancel() { if (hangUpTimer != null) { hangUpTimer.Stop(); } if (TargetDotRas.Cancel()) { Logging.AddActionLog("Caller : Call cancelled"); } else { MessagesHandler.Display("Line is not open"); } }
public static void Dial(Contact contact) { if (string.IsNullOrEmpty(contact.number)) { MessagesHandler.Display("No number found"); } else { lastDialedContact = contact; TargetDotRas.Dial(contact); if (hangUpAfterDialing) { hangUpTimer = new System.Timers.Timer(); hangUpTimer.AutoReset = true; hangUpTimer.Elapsed += new System.Timers.ElapsedEventHandler(hangUpTimer_Elapsed); hangUpTimer.Interval = 1000; leftToThick = hangUpAfterSeconds; hangUpTimer.Start(); } } }