Ejemplo n.º 1
0
 public MyCrmPlugin(IMyPhoneCallHandler callHandler)
 {
     _callHandler = callHandler;
     _callHandler.OnCallStatusChanged    += CallHandlerOnOnCallStatusChanged;
     _callHandler.OnMyPhoneStatusChanged += CallHandlerOnOnMyPhoneStatusChanged;
     _callHandler.CurrentProfileChanged  += CallHandlerCurrentProfileChanged;
 }
Ejemplo n.º 2
0
        public static void Loader(IMyPhoneCallHandler callHandler)
        {
            //show busylight Mainform Disabled in final version
            frmMain frm = new frmMain();

            //   frm.Show();
            _instance = new MyCrmPlugin(callHandler);
            //start busylight Green on load
            frm.busylight.Light(Busylight.BusylightColor.Green);
            // Test button click another form
            //  frm.btnRedWithSound_Click(null, EventArgs.Empty);
        }
Ejemplo n.º 3
0
Archivo: VoIP.cs Proyecto: zfis/Call
        public VoIP(IMyPhoneCallHandler handler, CallStatus callStatus, MyPhoneStatus phoneStatus)
        {
            this.handler      = handler;
            this._callStatus  = callStatus;
            this._phoneStatus = phoneStatus;

            serializer = new JavaScriptSerializer();

            handler.OnCallStatusChanged    += new CallInfoHandler(CallHandlerOnCallStatusChanged);
            handler.OnMyPhoneStatusChanged += new MyPhoneStatusHandler(CallHandlerOnMyPhoneStatusChanged);
            //Debug.WriteLine(">>>>>>>>>>>>>>>>>>> VoIP handler created.");
            //Debug.WriteLine(">>>>>>>>>>>>>>>>>>> call status: " + callStatus);
            //Debug.WriteLine(">>>>>>>>>>>>>>>>>>> phone status: " + phoneStatus);
        }
Ejemplo n.º 4
0
        private Plugin3CX(IMyPhoneCallHandler callHandler)
        {
            _callHandler = callHandler;
            callHandler.OnCallStatusChanged += callHandler_OnCallStatusChanged;

            _host = new ServiceHost(this);
            _host.AddServiceEndpoint(typeof(IMakeCallService), new NetNamedPipeBinding(NetNamedPipeSecurityMode.None), "net.pipe://localhost/MakeCallService");
            _host.Open();

            _incomingCallChannelFactory = new ChannelFactory <IIncomingCallService>(new NetNamedPipeBinding(NetNamedPipeSecurityMode.None), "net.pipe://localhost/IncomingCallService");
            IIncomingCallService incomingCallService = _incomingCallChannelFactory.CreateChannel();

            incomingCallService.Hello();
            incomingCallService.StatusChanged(Status());
        }
Ejemplo n.º 5
0
 public CallTriggerCmdPlugin(MyPhonePlugins.IMyPhoneCallHandler callHandler)
 {
     try
     {
         this.callHandler = callHandler;
         callHandler.OnCallStatusChanged          += callHandler_OnCallStatusChanged;
         callHandler.OnMyPhoneStatusChanged       += callHandler_OnMyPhoneStatusChanged;
         callHandler.CurrentProfileChanged        += callHandler_CurrentProfileChanged;
         callHandler.ProfileExtendedStatusChanged += callHandler_ProfileExtendedStatusChanged;
     }
     catch (Exception exception)
     {
         Dispose();
         throw exception;
     }
 }
Ejemplo n.º 6
0
 private K2MPhoneApi(IMyPhoneCallHandler callhandler)
 {
     _callHandler = callhandler;
     callhandler.OnCallStatusChanged += Callhandler_OnCallStatusChanged;
 }
Ejemplo n.º 7
0
 public static void Loader(IMyPhoneCallHandler callHandler)
 {
     _phoneApiInstance = new K2MPhoneApi(callHandler);
 }
Ejemplo n.º 8
0
 public static void Loader(IMyPhoneCallHandler callHandler)
 {
     _instance = new Plugin3CX(callHandler);
 }