基本信息
源码名称:远程视频监控项目源码下载
源码大小:0.14M
文件格式:.rar
开发语言:C#
更新时间:2013-08-30
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍
远程视频监控代码,其中有 代理类/监控端/受控端/远程监控等项目

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SmartKernel.Net
{
    public partial class MonitorClient : Form
    {
        #region 字段
        private bool Initialized = false;
        private bool InProgress = false;
        private System.Threading.Thread MonitorThread = null;
        #endregion

        #region 构造函数
        public MonitorClient()
        {
            InitializeComponent();
            Application.Idle  = new EventHandler(Application_Idle);
        }
        #endregion

        #region 应用程序空闲状态的处理过程
        void Application_Idle(object sender, EventArgs e)
        {
            this.checkBox1.Enabled = this.textBox1.Text.Trim().Length > 0;
            this.checkBox2.Enabled = this.checkBox1.Enabled;
        }
        #endregion

        #region 监控开始
        private void Monitor()
        {
            while (true)
            {
                this.monitorUserControl1.UpdateDisplay();
                System.Threading.Thread.Sleep(200);
            }
        }
        #endregion

        #region 监视
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (((CheckBox)sender).Checked)
            {
                if (!Initialized)
                {
                    Cursor = Cursors.WaitCursor;

                    this.monitorUserControl1.Initialize(this.textBox1.Text.Trim());
                    Initialized = true;

                    Cursor = Cursors.Arrow;
                }

                InProgress = true;

                MonitorThread = new System.Threading.Thread(new System.Threading.ThreadStart(Monitor));
                MonitorThread.Start();
            }
            else
            {
                InProgress = false;
                MonitorThread.Abort();
            }
        }
        #endregion

        #region 控制
        private void checkBox2_CheckedChanged(object sender, EventArgs e)
        {
            this.monitorUserControl1.SetControl(((CheckBox)sender).Checked);
        }
        #endregion
    }
}