private void Button_Click_1(object sender, RoutedEventArgs e) { Database db = new Database(); db.AddCall("test Name", "999-999-9999"); DataContext = new CallViewModel(); }
/* private void OnCallStateChanged(int callId, ESessionState callState, string info) { IStateMachine state = CallManager.CallList[callId]; number = state.CallingNumber; textBoxCallState.Text = number; string contact = contacts.lookup(number); if (contact != "") number = contact + " (" + number + ")"; notifyIcon1.BalloonTipTitle = "Eingehender Anruf"; notifyIcon1.BalloonTipText = "Von: " + number + "\r\n" + info; notifyIcon1.BalloonTipIcon = ToolTipIcon.Info; notifyIcon1.ShowBalloonTip(30); } */ private void OnIncomingCall(int sessionId, string number, string info) { incall = CallManager.getCall(sessionId); //string contact = contacts.lookup(number); //if (contact != "") // number = contact + " (" + number + ")"; CallStatus.Content = incall.StateId.ToString(); // TODO put the code here to put the call in the DB Database db = new Database(); string name = incall.CallingName; db.AddCall(name, number); DataContext = new CallViewModel(); //textBoxLastCallNumber.Text = number; //textBoxLastCallDate.Text = DateTime.Now.ToString(); notifyIcon1.BalloonTipTitle = "New Call"; notifyIcon1.BalloonTipText = "From: " + name + " " + number + "\r\n" + info; notifyIcon1.BalloonTipIcon = ToolTipIcon.Info; notifyIcon1.ShowBalloonTip(30); /* // Send Busy ICallProxyInterface proxy = CallManager.StackProxy.createCallProxy(); proxy.serviceRequest((int)EServiceCodes.SC_CFB, ""); proxy.endCall(); */ }