private void OverEncrypt() { try { byte[] by = PortAgreement.IcDeviceEncryption(Pwd); SerialPortManager.WriteSerialPortData(SerialPortManager.Device1, by); ReceivedManager.SetReceivedFunction <IcDeviceEncrypt>(); } catch (Exception ex) { Log4Helper.ErrorInfo(ex.Message, ex); ViewCallFunction.ViewAlert(ex.Message); } }
private static void Host_PostIcDeviceEncrypt(object sender, Chromium.Remote.Event.CfrV8HandlerExecuteEventArgs e) { try { string pwd = e.Arguments[0].StringValue; byte[] bys = PortAgreement.IcDeviceEncryption(pwd); SerialPortManager.WriteSerialPortData(SerialPortManager.Device1, bys); ReceivedManager.SetReceivedFunction <IcDeviceEncrypt>(); } catch (Exception ex) { Log4Helper.ErrorInfo(ex.Message, ex); ViewCallFunction.ViewAlert(ex.Message); } }