Esempio n. 1
0
 private void 配置1ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ret = basicconfig();
     采集方式ToolStripMenuItem.Enabled = true;
     数据侦听ToolStripMenuItem.Enabled = true;
     if (ret < 0)
     {
         MessageBox.Show("配置失败!");
         LogClass.WriteErrorLog("配置失败!");
         采集方式ToolStripMenuItem.Enabled = false;
         数据侦听ToolStripMenuItem.Enabled = false;
     }
 }
Esempio n. 2
0
 private void ServerForm_Load(object sender, EventArgs e)
 {
     //创建运行日志
     LogClass.WriteErrorLog("服务器启动...");
     if (testaddr())
     {
         DataList.Text += "buffer地址已对齐!\r\n";
     }
     else
     {
         DataList.Text += "buffer地址未对齐,请检查程序!\r\n";
     }
 }//窗口加载事件
Esempio n. 3
0
        private void ServerForm_Load(object sender, EventArgs e)
        {
            //创建运行日志
            LogClass.WriteErrorLog("系统启动中...");
            //申请帧池载荷和user内存
            for (int i = 0; i < frame_pool.Length; i++)
            {
                frame_pool[i].buffer = new double[buffernum];
                frame_pool[i].user   = new importdll.user_manage[Max_Thread_User];
            }
            showpoint.pointLength    = uipointnum;//5s的数据
            showpoint.currentLoction = 0;
            showpoint.buffer         = new double[showpoint.pointLength];
            //设置报警项
            dt = new DataTable();
            dt.Columns.Add("报警位置/m");
            dt.Columns.Add("报警最大值");
            dt.Columns.Add("报警异常比%");
            dt.Columns.Add("报警确认比%");
            //  dt.Columns.Add("丢帧率%");
            dt.Columns.Add("报警区间");
            dataGridView1.DataSource = dt;

            显示实时曲线ToolStripMenuItem.Enabled = false;
            采样点数量ToolStripMenuItem.Enabled  = false;
            //设置开关
            toolStripMenuItem4.Checked = true;
            toolStripMenuItem6.Checked = true;
            toolStripMenuItem3.Enabled = false;

            button1.Text    = "OFF";
            button2.Text    = "OFF";
            button1.Enabled = false;
            button2.Enabled = false;

            toolStripMenuItem8.Checked  = true;
            toolStripMenuItem10.Checked = true;
            toolStripMenuItem12.Checked = true;

            HideLabel();

            TimeSetEnd0 = new MyInvoke(SetOrder0);
            TimeSetEnd1 = new MyInvoke(SetOrder1);
        }
Esempio n. 4
0
        private void toolStripMenuItem2_Click(object sender, EventArgs e)//启动板卡
        {
            m_dev = 0;
            uint sdramsize = 0;

            m_dev = WD_DASK.WD_Register_Card(WD_DASK.PCI_9842, 0);
            if (m_dev < 0)
            {
                MessageBox.Show("注册失败!");
                LogClass.WriteErrorLog("注册失败!");
            }
            else
            {
                //           MessageBox.Show("WD_Register_Card Success!");
                WD_DASK.WD_Get_SDRAMSize((ushort)m_dev, out sdramsize);
                DataList.Text += "注册成功!板载SDRAM大小是:" + sdramsize + "MB\r\n";
                LogClass.WriteErrorLog("注册成功!板载SDRAM大小是:" + sdramsize + "MB\r\n");
                toolStripMenuItem2.Enabled    = false;
                基本配置ToolStripMenuItem.Enabled = true;
                参数设置ToolStripMenuItem.Enabled = true;
            }
        }
Esempio n. 5
0
 private void logtext(string s)//保存测试信息
 {
     LogClass.WriteErrorLog(s + " ");
 }