예제 #1
0
 public frmBleConfig(AppConfig ac, BleConfig bc, SerialBle sb)
 {
     InitializeComponent();
     appConfig = ac;
     bleConfig = bc;
     serialBle = sb;
 }
예제 #2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="sb">串口蓝牙类</param>
 /// <param name="l">测试次数显示Label</param>
 public SerialBleLinkTest(SerialBle sb, Label l)
 {
     serialBle             = sb;
     LabelBleLinkTestCount = l;
     BleLinkTimer          = new System.Windows.Forms.Timer();
     BleLinkTimer.Tick    += BleLinkTimer_Tick;
     BleLinkTimer.Enabled  = false;
 }
예제 #3
0
        /// <summary>
        /// 加载界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmMain_Load(object sender, EventArgs e)
        {
            //初始化界面
            GroupEnable(gbSerialWrite, false);
            serialBle              = new SerialBle(toolComboBle, new SerialBle.DelegateBleSerialWrite(AddSerialWrite));
            serialBle.EventBleLog += OutputBleLog;

            //初始化配置
            appConfig = new AppConfig();

            //初始化蓝牙配置
            initBleConfig(strBleConfigName);

            //初始化串口配置控件
            initSerialConfig();
            GetSerialLogConfig(gbSerialLog);

            //初始化串口助手
            initSerialPortHelper();

            //初始化蓝牙连接测试
            initBleLinkTest();
        }