Exemple #1
0
 private void loginBtn_Click(object sender, EventArgs e)
 {
     SdkClass.NET_DVR_DEVICEINFO_V30 deviceinfo = new SdkClass.NET_DVR_DEVICEINFO_V30();
     //登录相机
     if ((iUid = SdkClass.NET_DVR_Login_V30(this.ipAddress.Text, 8000, this.txtUsername.Text, this.txtPsd.Text, deviceinfo)) < 0)
     {
         MessageBox.Show("登录失败!");
     }
     else
     {
         this.loginBtn.Enabled       = false;
         this.initBtn.Enabled        = false;
         this.alarmBtn.Enabled       = true;
         this.closealarmBtn.Enabled  = false;
         this.quitBtn.Enabled        = true;
         this.btnStartListen.Enabled = true;
         this.btnStopListen.Enabled  = false;
         this.btnLoginOut.Enabled    = true;
         this.btnSetParam.Enabled    = true;
         MessageBox.Show("登录成功!");
     }
 }
Exemple #2
0
 private void loginBtn_Click(object sender, EventArgs e)
 {
     SdkClass.NET_DVR_DEVICEINFO_V30 deviceinfo = new SdkClass.NET_DVR_DEVICEINFO_V30();
     //登录相机
     if ((iUid = SdkClass.NET_DVR_Login_V30(this.ipAddress.Text, 8000, this.txtUsername.Text, this.txtPsd.Text, deviceinfo)) < 0)
     {
         MessageBox.Show("登录失败!");
     }
     else
     {
         this.loginBtn.Enabled = false;
         this.initBtn.Enabled = false;
         this.alarmBtn.Enabled = true;
         this.closealarmBtn.Enabled = false;
         this.quitBtn.Enabled = true;
         this.btnStartListen.Enabled = true;
         this.btnStopListen.Enabled = false;
         this.btnLoginOut.Enabled = true;
         this.btnSetParam.Enabled = true;
         MessageBox.Show("登录成功!");
     }
 }