/// <summary> /// 窗口加载过程函数 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Form1_Load(object sender, EventArgs e) { initListView(); rbtnet_ = new RbtNet(); // 初始化 Init_Param param = new Init_Param(); _optimize = Convert.ToBoolean(System.Configuration.ConfigurationSettings.AppSettings["optimize"]); oemkey = System.Configuration.ConfigurationSettings.AppSettings["OEMKEY"]; param.optimize = _optimize; rbtnet_.init(ref param); //rbtnet_.init(); rbtnet_.setPrintType(PrintType.TyMode); comboBox_Qtype.Items.Add("主观题"); comboBox_Qtype.Items.Add("客观题"); comboBox_Qtype.Items.Add("投票"); comboBox_Qtype.Items.Add("不定项"); comboBox_Qtype.Items.Add("测试"); comboBox_Qtype.Items.Add("书写"); comboBox_Qtype.SelectedIndex = 0; /* * 所有事件响应接口都是在内部SDK线程中上报出来 */ rbtnet_.deviceMacEvt_ += Rbtnet__deviceMacEvt_; rbtnet_.deviceNameEvt_ += Rbtnet__deviceNameEvt_; rbtnet_.deviceNameResult_ += Rbtnet__eviceNameResultEvt_; rbtnet_.deviceDisconnectEvt_ += Rbtnet__deviceDisconnectEvt_; rbtnet_.deviceOriginDataEvt_ += Rbtnet__deviceOriginDataEvt_; rbtnet_.deviceOptimizeDataEvt_ += Rbtnet__deviceOptimizeDataEvt_; rbtnet_.deviceShowPageNewEvt_ += Rbtnet__deviceShowPageEvt_; rbtnet_.deviceKeyPressEvt_ += Rbtnet__deviceKeyPressEvt_; rbtnet_.deviceAnswerResultEvt_ += Rbtnet__deviceAnswerResultEvt_; rbtnet_.deviceError_ += Rbtnet__deviceEvt; rbtnet_.DeviceIpEvt_ += Rbtnet_DeviceIpEvt; rbtnet_.deviceCanvasID_ += Rbtnet__deviceCanvasID; rbtnet_.DeviceInfoEvt_ += Rbtnet__deviceInfo; rbtnet_.HardInfoEvt_ += Rbtnet__hardInfo; rbtnet_.DeviceBatteryEvt_ += deviceBattery; rbtnet_.CurrentWritingNumEvt_ += Rbtnet__CurrentWritingNumEvt_; }
private void initRbt() { rbtNet = new RbtNet(); Init_Param param = new Init_Param(); optimize = Convert.ToBoolean(System.Configuration.ConfigurationSettings.AppSettings["optimize"]); param.optimize = optimize; rbtNet.init(ref param); rbtNet.deviceNameEvt_ += RbtNet_deviceNameEvt_; rbtNet.deviceOriginDataEvt_ += RbtNet_deviceOriginDataEvt_; rbtNet.deviceOptimizeDataEvt_ += RbtNet_deviceOptimizeDataEvt_; }
/// <summary> /// 窗口加载过程函数 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Form1_Load(object sender, EventArgs e) { initListView(); rbtnet_ = new RbtNet(); // 初始化 Init_Param param = new Init_Param(); _optimize = Convert.ToBoolean(System.Configuration.ConfigurationSettings.AppSettings["optimize"]); param.optimize = _optimize; rbtnet_.init(ref param); //rbtnet_.init(); rbtnet_.setPrintType(PrintType.Fault_tolerance2); comboBox1.Items.Add("判断题"); comboBox1.Items.Add("单选题"); comboBox1.Items.Add("多选题"); comboBox1.Items.Add("多道客观题"); comboBox1.SelectedIndex = 0; /* * 所有事件响应接口都是在内部SDK线程中上报出来 */ rbtnet_.deviceMacEvt_ += Rbtnet__deviceMacEvt_; rbtnet_.deviceNameEvt_ += Rbtnet__deviceNameEvt_; rbtnet_.deviceNameResult_ += Rbtnet__eviceNameResultEvt_; rbtnet_.deviceDisconnectEvt_ += Rbtnet__deviceDisconnectEvt_; rbtnet_.deviceOriginDataEvt_ += Rbtnet__deviceOriginDataEvt_; rbtnet_.deviceOptimizeDataEvt_ += Rbtnet__deviceOptimizeDataEvt_; rbtnet_.deviceShowPageNewEvt_ += Rbtnet__deviceShowPageEvt_; rbtnet_.deviceKeyPressEvt_ += Rbtnet__deviceKeyPressEvt_; rbtnet_.deviceAnswerResultEvt_ += Rbtnet__deviceAnswerResultEvt_; rbtnet_.deviceError_ += Rbtnet__deviceEvt; rbtnet_.DeviceIpEvt_ += Rbtnet_DeviceIpEvt; rbtnet_.DeviceInfoEvt_ += Rbtnet__deviceInfo; rbtnet_.HardInfoEvt_ += Rbtnet__hardInfo; rbtnet_.DeviceBatteryEvt_ += deviceBattery; //rbtnet_.deviceClearCanvas_ += Rbtnet__deviceClearCanvas; }