private void BindEvent() { onaccept = new onAccept(accept); rbt_win_set_accept_cb(onaccept); onerrorpacket = new onErrorPacket(errorPacket); rbt_win_set_errorpacket_cb(onerrorpacket); onorigindatanew = new onOriginDataNew(originDataNotifyNew); rbt_win_set_origindata_cb(onorigindatanew); onorigindatanewex = new onOriginDataNewEx(originDataNotifyEx); rbt_win_set_origindata_ex_cb(onorigindatanewex); ondevicemac = new onDeviceMac(deviceMacNotify); rbt_win_set_devicemac_cb(ondevicemac); ondevicename = new onDeviceName(deviceNameNotify); rbt_win_set_devicename_cb(ondevicename); ondevicenameresult = new onDeviceNameResult(deviceNameResultNotify); rbt_win_set_devicenameresult_cb(ondevicenameresult); ondevicedisconnect = new onDeviceDisconnect(deviceDisconnect); rbt_win_set_devivedisconnect_cb(ondevicedisconnect); ondevicekeyPress = new onDeviceKeyPress(deviceKeyPress); rbt_win_set_devicekeypress_cb(ondevicekeyPress); ondeviceanswerresult = new onDeviceAnswerResult(deviceAnswerResult); rbt_win_set_deviceanswerresult_cb(ondeviceanswerresult); ondeviceshowpagenew = new onDeviceShowPageNew(deviceShowPageNew); rbt_win_set_deviceshowpage_cb(ondeviceshowpagenew); onerror = new onError(deviceError); rbt_win_set_error_cb(onerror); oncanvasid = new onCanvasID(deviceClearCanvas); rbt_win_set_canvasid_cb(oncanvasid); onoptimizedata = new onOptimizeData(optimizeData); rbt_win_set_optimizedata_cb(onoptimizedata); onoptimizedataex = new onOptimizeDataEx(optimizeDataEx); rbt_win_set_optimizedata_ex_cb(onoptimizedataex); ondevicetype = new onDeviceType(deviceType); rbt_win_set_devicetype_cb(ondevicetype); onkeyanswer = new onKeyAnswer(keyAnswer); rbt_win_set_keyanswer_cb(onkeyanswer); ondeviceinfo = new onDeviceInfo(deviceInfo); rbt_win_set_deviceinfo_cb(ondeviceinfo); onhardinfo = new onHardInfo(hardInfo); rbt_win_set_hardinfo_cb(onhardinfo); ondevicebattery = new onDeviceBattery(deviceBattery); rbt_win_set_devicebattery_cb(ondevicebattery); ondeletenotes = new onDeleteNotes(deleteNotes); rbt_win_set_deletenotes_cb(ondeletenotes); ondeviceipold = new onDeviceIpOld(deviceip); rbt_win_set_deviceip_cb(ondeviceipold); onoidpageinfo = new onOidPageInfo(oidPageInfo); rbt_win_set_oidpageinfo_cb(onoidpageinfo); oncurrentwritingnum = new onCurrentWritingNum(currentWritingNum); rbt_wib_set_currentwritingnum_cb(oncurrentwritingnum); }
/// <summary> /// 初始化 /// </summary> /// <param name="arg"></param> public void init(ref Init_Param arg, bool open = true) { gchandld = GCHandle.Alloc(this); iPtrThis_ = GCHandle.ToIntPtr(gchandld); arg.ctx = iPtrThis_; arg.open = open; if (arg.port == 0) { arg.port = 6001; } if (arg.listenCount == 0) { arg.listenCount = 60; } bool sus = rbt_win_init(ref arg); /*int size = Marshal.SizeOf(typeof(Init_Param)); * System.Diagnostics.Debug.WriteLine(size);//*/ onorigindatanew = new onOriginDataNew(originDataNotifyNew); rbt_win_set_origindata_cb(onorigindatanew); ondevicemac = new onDeviceMac(deviceMacNotify); rbt_win_set_devicemac_cb(ondevicemac); ondevicekeyPress = new onDeviceKeyPress(deviceKeyPress); rbt_win_set_devicekeypress_cb(ondevicekeyPress); ondeviceshowpagenew = new onDeviceShowPageNew(deviceShowPageNew); rbt_win_set_deviceshowpage_cb(ondeviceshowpagenew); ondevicedisconnect = new onDeviceDisconnect(deviceDisconnect); rbt_win_set_devivedisconnect_cb(ondevicedisconnect); ondeviceanswerresult = new onDeviceAnswerResult(deviceAnswerResult); rbt_win_set_deviceanswerresult_cb(ondeviceanswerresult); ondevicename = new onDeviceName(deviceNameNotify); rbt_win_set_devicename_cb(ondevicename); ondevicenameresult = new onDeviceNameResult(deviceNameResultNotify); rbt_win_set_devicenameresult_cb(ondevicenameresult); onerror = new onError(deviceError); rbt_win_set_error_cb(onerror); oncanvasid = new onCanvasID(deviceClearCanvas); rbt_win_set_canvasid_cb(oncanvasid); onoptimizedata = new onOptimizeData(optimizeData); rbt_win_set_optimizedata_cb(onoptimizedata); }
private void BindEvent() { onorigindatanew = new onOriginDataNew(originDataNotifyNew); rbt_win_set_origindata_cb(onorigindatanew); ondevicemac = new onDeviceMac(deviceMacNotify); rbt_win_set_devicemac_cb(ondevicemac); ondevicekeyPress = new onDeviceKeyPress(deviceKeyPress); rbt_win_set_devicekeypress_cb(ondevicekeyPress); ondeviceshowpagenew = new onDeviceShowPageNew(deviceShowPageNew); rbt_win_set_deviceshowpage_cb(ondeviceshowpagenew); ondevicedisconnect = new onDeviceDisconnect(deviceDisconnect); rbt_win_set_devivedisconnect_cb(ondevicedisconnect); ondeviceanswerresult = new onDeviceAnswerResult(deviceAnswerResult); rbt_win_set_deviceanswerresult_cb(ondeviceanswerresult); ondevicename = new onDeviceName(deviceNameNotify); rbt_win_set_devicename_cb(ondevicename); ondevicenameresult = new onDeviceNameResult(deviceNameResultNotify); rbt_win_set_devicenameresult_cb(ondevicenameresult); onerror = new onError(deviceError); rbt_win_set_error_cb(onerror); oncanvasid = new onCanvasID(deviceClearCanvas); rbt_win_set_canvasid_cb(oncanvasid); onoptimizedata = new onOptimizeData(optimizeData); rbt_win_set_optimizedata_cb(onoptimizedata); ondeviceipold = new onDeviceIpOld(deviceip); rbt_win_set_deviceip_cb(ondeviceipold); ondevicetype = new onDeviceType(deviceType); rbt_win_set_devicetype_cb(ondevicetype); onkeyanswer = new onKeyAnswer(keyAnswer); rbt_win_set_keyanswer_cb(onkeyanswer); ondeviceinfo = new onDeviceInfo(deviceInfo); rbt_win_set_deviceinfo_cb(ondeviceinfo); onhardinfo = new onHardInfo(hardInfo); rbt_win_set_hardinfo_cb(onhardinfo); ondevicebattery = new onDeviceBattery(deviceBattery); rbt_win_set_devicebattery_cb(ondevicebattery); }
internal static extern void rbt_win_set_devivedisconnect_cb(onDeviceDisconnect arg);