public void StartMonitoring(string port, string baudRate, IntPtr handle = default(IntPtr)) { if (ActivePort == null) { return; } _activePort.PortDataReceived += ActivePort_PortDataReceived; ActivePort.StartListenning(port, baudRate); LogMessageValue?.Invoke("Monitoring Started Successfully!"); }
public void StartMonitoring(string port, string baudRate, IntPtr handle = default(IntPtr)) { if (NativeHelper.SetInit() == 1) { Thread tr = new Thread(RunFunc); tr.Start(); NativeHelper.GetListDevice(); } SetHookOffTimerInterval(10000); LogMessageValue?.Invoke("Monitoring Started Successfully!"); }
public void StartMonitoring(string port, string baudRate, IntPtr handle = default(IntPtr)) { if (ActivePort == null) { return; } _activePort.HIDConnect += _activePort_HIDConnect; _activePort.HIDDisConnect += _activePort_HIDDisConnect; _activePort.HIDDataReceived += _activePort_HIDDataReceived; _activePort.Rawdata = false; _activePort.tryFindDevice(handle); LogMessageValue?.Invoke("Monitoring Started Successfully!"); }
public void StartMonitoring(string port, string baudRate, IntPtr handle = default(IntPtr)) { if (ActivePort == null) { return; } _activePort.PortDataReceived += ActivePort_PortDataReceived; LogObjectValue?.Invoke("ActivePort", ActivePort); LogStringValue?.Invoke("Port", port); LogStringValue?.Invoke("BaudRate", baudRate); _activePort.LogObjectValue += delegate(string title, object value) { LogObjectValue?.Invoke(title, value); }; ActivePort.StartListenning(port, baudRate); LogMessageValue?.Invoke("Monitoring Started Successfully!"); }
public void StartMonitoring(string port, string baudRate, IntPtr handle = default(IntPtr)) { if (ActivePort == null) { return; } _activePort.AllRecDataReceive += _activePort_AllRecDataReceive; _activePort.AllRecConnect += _activePort_AllRecConnect; _activePort.AllRecDisConnect += _activePort_AllRecDisConnect; _activePort.AllRecStandby += _activePort_AllRecStandby; _activePort.AllRecData += _activePort_AllRecData; //_activePort.PortConnect(port, 0); _activePort.AutoConnect(); LogMessageValue?.Invoke("Monitoring Started Successfully!"); }
public void StartMonitoring(string sip, string extention, IntPtr handle = default(IntPtr)) { var key = "UDoyMDMzLTEyLTI1LFVQOjIwMzMtMDEtMDEsTUNDOjUwMCxNUEw6NTAwLE1TTEM6NTAwLE1GQzo1MDAsRzcyOTp0cnVlLE1XUEM6NTAwLE1JUEM6NTAwfE" + "xGSTZEMDd6R3NNZlZUU3pHM1Uwb2dXNXlLNkV3SncxcitpZU90Zm9xN2dFV2d5R0tSMlc3dXZFODA2Q0NvaGR1b3V4N1VjY2VaamZMdnRPemtuTk1nPT0="; // For user name you can put any user name it wll work. var userName = "******"; LicenseManager.Instance.SetLicense(userName, key); _softphone = new Softphone(); _softphone.IncomigCall += softphone_IncomigCall; _softphone.Register(true, extention, extention, extention, extention, sip.Substring(0, sip.IndexOf(':')), Convert.ToInt32(sip.Substring(sip.IndexOf(':')))); SetHookOffTimerInterval(10000); LogMessageValue?.Invoke("Monitoring Started Successfully!"); }
private void _activePort_AllRecConnect(object mysender) { LogMessageValue?.Invoke("CallerId Connected!"); }
private void _activePort_AllRecStandby(int trynumber, object mysender) { LogMessageValue?.Invoke("CallerId Connecting!"); }
private void _activePort_AllRecData(string data, object mysender) { LogMessageValue?.Invoke("From CallerID:" + data); }
private void _activePort_HIDConnect() { LogMessageValue?.Invoke("CallerId Connected!"); }