예제 #1
0
 public FrmMeasureTemperConfig()
 {
     InitializeComponent();
     DMSDK.DM_Init();
     DMSDK.DM_PlayerInit(pbxScreen.Handle);
     this.Disposed += FrmMeasureTemperConfig_Disposed;
 }
        private void FrmSaveImageConfig_Load(object sender, EventArgs e)
        {
            string path;

            path = ConfigurationManager.AppSettings["ImageSavePath"];
            tbxSaveImage.Text = path;
            tempMonitor       = DMSDK.DM_OpenMonitor(pbxTemper.Handle, StaticClass.Temper_Ip, 5000, 0);
        }
 private void FrmSaveVideoConfig_Load(object sender, EventArgs e)
 {
     path = ConfigurationManager.AppSettings["ImageSavePath"];
     tbxSaveVideo.Text = path;
     tempMonitor       = DMSDK.DM_OpenMonitor(pbxTemper.Handle, StaticClass.Temper_Ip, 5000, 0);
     if (tempMonitor < 0)
     {
         MessageBox.Show("连接失败,请重试!");
     }
 }
예제 #4
0
 private void Set_Line(Button btnAdd_Line, TextBox tbxLine_X1, TextBox tbxLine_Y1, TextBox tbxLine_X2, TextBox tbxLine_Y2, TextBox tbxLine_X3, TextBox tbxLine_Y3, TextBox tbxLine_Emiss, Button btnClear_Line)
 {
     if (btnAdd_Line.Text == "编辑")
     {
         IsSet_Line            = true;
         tbxLine_X1.Enabled    = true;
         tbxLine_Y1.Enabled    = true;
         tbxLine_X2.Enabled    = true;
         tbxLine_Y2.Enabled    = true;
         tbxLine_X3.Enabled    = true;
         tbxLine_Y3.Enabled    = true;
         tbxLine_Emiss.Enabled = true;
         btnAdd_Line.Text      = "确认";
         btnClear_Line.Text    = "取消";
         Create_Pbx();
         foreach (Control control in pnlBtnLine.Controls)
         {
             control.Enabled = false;
         }
         btnAdd_Line.Enabled   = true;
         btnClear_Line.Enabled = true;
         tabSpot.Enabled       = false;
         tabAreas.Enabled      = false;
     }
     else if (btnAdd_Line.Text == "确认")
     {
         try
         {
             int x1    = Convert.ToInt32(tbxLine_X1.Text);
             int y1    = Convert.ToInt32(tbxLine_Y1.Text);
             int x2    = Convert.ToInt32(tbxLine_X2.Text);
             int y2    = Convert.ToInt32(tbxLine_Y2.Text);
             int x3    = Convert.ToInt32(tbxLine_X3.Text);
             int y3    = Convert.ToInt32(tbxLine_Y3.Text);
             int emiss = Convert.ToInt32(tbxLine_Emiss.Text);
             if (x1 <= 0 || x1 > 320 || y1 <= 0 || y1 > 240 || x2 <= 0 || x2 > 320 || y2 <= 0 || y2 > 240)
             {
                 MessageBox.Show("请输入合适的坐标");
                 return;
             }
             if (tbxLine_X1.Enabled)
             {
                 type = "L1";
                 DMSDK.DM_SetLine(StaticClass.tempConnect, 1, x1, y1, x2, y2, ((x1 + x2) / 2) - 2, ((y1 + y2) / 2) - 4, emiss);
                 sqlCreate.Update_Line(StaticClass.Temper_CameraId, "L1", x1, y1, x2, y2, (x1 + x2) / 2, (y1 + y2) / 2, emiss, StaticClass.DataBaseName);
             }
             Cancel_SetLine(type, btnAdd_Line, tbxLine_X1, tbxLine_Y1, tbxLine_X2, tbxLine_Y2, tbxLine_X3, tbxLine_Y3, tbxLine_Emiss, btnClear_Line);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message + "设置测温线失败!");
         }
     }
 }
예제 #5
0
 private void FrmMaintain_Load(object sender, EventArgs e)
 {
     if (StaticClass.tempConnect < 0)
     {
         MessageBox.Show("连接失败,请重新连接!");
         foreach (Control control in this.Controls)
         {
             control.Enabled = false;
         }
         return;
     }
     DMSDK.DM_GetSystemInfo(StaticClass.tempConnect, systemInfo);
     lblSystemInfo.Text = systemInfo.ToString();
 }
예제 #6
0
 private void FrmMeasureTemperConfig_Load(object sender, EventArgs e)
 {
     tempConnect = DMSDK.DM_Connect(pbxScreen.Handle, StaticClass.Temper_Ip, 80);
     if (tempConnect > 0)
     {
         tempMonitor = DMSDK.DM_OpenMonitor(pbxScreen.Handle, StaticClass.Temper_Ip, 5000, 0);
     }
     if (tempConnect < 0 || tempMonitor < 0)
     {
         MessageBox.Show("连接异常!请重试!");
         return;
     }
     Get_Area_Param();
 }