• 大小: 2.04M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-04-29
  • 语言: C#
  • 标签:

资源简介

    

资源截图

代码片段和文件信息

using System;
using System.Windows.Forms;
using VideoMonitor.CommonClass;

namespace VideoMonitor
{
    public partial class frmAutoVideo : Form
    {
        public frmAutoVideo()
        {
            InitializeComponent();
        }

        #region 实例化公共类对象,并定义公共变量

        private readonly DataOperate dataoperate = new DataOperate();
        private readonly string strName = Application.StartupPath + “\\VideoSet.ini“; //定义要读取的INI文件

        #endregion

        //窗体加载时读取INI设置文件中的内容,并显示在相应的下拉列表中
        private void frmAutoVideo_Load(object sender EventArgs e)
        {
            timer1.Start();
            for (int i = 1; i < 31; i++)
            {
                cboxDate.Items.Add(i); //给日期下拉列表赋值
            }
            cboxVideo.Text = dataoperate.ReadString(“VideoSet“ “Frequency“ ““ strName);
            NUDownHour.Value = Convert.ToDecimal(dataoperate.ReadString(“VideoSet“ “Hour“ ““ strName));
            NUDownMin.Value = Convert.ToDecimal(dataoperate.ReadString(“VideoSet“ “Min“ ““ strName));
            cboxWeek.Text = dataoperate.ReadString(“VideoSet“ “Week“ ““ strName);
            cboxDate.Text = dataoperate.ReadString(“VideoSet“ “Date“ ““ strName);
        }

        //单击“确定”按钮,修改INI设置文件的内容
        private void btnSure_Click(object sender EventArgs e)
        {
            DataOperate.WritePrivateProfileString(“VideoSet“ “Frequency“ cboxVideo.Text strName);
            DataOperate.WritePrivateProfileString(“VideoSet“ “Hour“ NUDownHour.Value.ToString() strName);
            DataOperate.WritePrivateProfileString(“VideoSet“ “Min“ NUDownMin.Value.ToString() strName);
            DataOperate.WritePrivateProfileString(“VideoSet“ “Week“ cboxWeek.Text strName);
            DataOperate.WritePrivateProfileString(“VideoSet“ “Date“ cboxDate.Text strName);
            MessageBox.Show(“定时录像设置成功“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
        }

        //在计时器中调用自定义方法监控各控件可用状态
        private void timer1_Tick(object sender EventArgs e)
        {
            ControlState();
        }

        //关闭当前窗体
        private void btnClose_Click(object sender EventArgs e)
        {
            Close();
        }

        #region 根据录像频率下拉列表框中的选择项控制其他控件的可用状态

        /// 
        ///   根据录像频率下拉列表框中的选择项控制其他控件的可用状态
        /// 

        private void ControlState()
        {
            int index = cboxVideo.SelectedIndex;
            switch (index)
            {
                case 0:
                    NUDownHour.Enabled = NUDownMin.Enabled = true;
                    cboxWeek.Enabled = cboxDate.Enabled = false;
                    break;
                case 1:
                    NUDownHour.Enabled = NUDownMin.Enabled = cboxWeek.Enabled = true;
                    cboxDate.Enabled = false;
                    break;
                case 2:
                    NUDownHour.Enabled = NUDownMin.Enabled = cboxDa

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      53248  2007-12-01 16:30  srcfans.com\VideoMonitor\VideoMonitor\bin\Debug\AxInterop.MediaPlayer.dll

     文件      53248  2008-02-27 13:05  srcfans.com\VideoMonitor\VideoMonitor\bin\Debug\AxInterop.WMPLib.dll

     文件      11608  2012-08-02 21:45  srcfans.com\VideoMonitor\VideoMonitor\bin\Debug\VideoMonitor.vshost.exe

     文件        490  2010-03-17 22:39  srcfans.com\VideoMonitor\VideoMonitor\bin\Debug\VideoMonitor.vshost.exe.manifest

     文件         66  2008-07-24 10:31  srcfans.com\VideoMonitor\VideoMonitor\bin\Debug\VideoSet.ini

     文件      20480  2007-12-02 16:06  srcfans.com\VideoMonitor\VideoMonitor\bin\Debug\系统注册机.exe

     文件       1399  2012-08-02 21:46  srcfans.com\VideoMonitor\VideoMonitor\CommonClass\DataCon.cs

     文件       3873  2012-08-02 21:46  srcfans.com\VideoMonitor\VideoMonitor\CommonClass\DataOperate.cs

     文件       6176  2012-08-02 21:46  srcfans.com\VideoMonitor\VideoMonitor\CommonClass\PelcoD.cs

     文件       3515  2012-08-02 21:46  srcfans.com\VideoMonitor\VideoMonitor\CommonClass\SoftReg.cs

     文件       8746  2012-08-02 21:46  srcfans.com\VideoMonitor\VideoMonitor\CommonClass\VideoOperate.cs

     文件     196608  2008-07-22 09:29  srcfans.com\VideoMonitor\VideoMonitor\Database\db_VideoMonitor.mdb

     文件       3321  2012-08-02 21:46  srcfans.com\VideoMonitor\VideoMonitor\frmAutoVideo.cs

     文件      11971  2008-07-24 10:04  srcfans.com\VideoMonitor\VideoMonitor\frmAutoVideo.Designer.cs

     文件       6008  2008-07-24 10:04  srcfans.com\VideoMonitor\VideoMonitor\frmAutoVideo.resx

     文件       1914  2017-06-19 16:39  srcfans.com\VideoMonitor\VideoMonitor\frmLogin.cs

     文件       4904  2010-01-28 09:33  srcfans.com\VideoMonitor\VideoMonitor\frmLogin.designer.cs

     文件     279236  2010-01-28 09:33  srcfans.com\VideoMonitor\VideoMonitor\frmLogin.resx

     文件      36220  2012-08-02 21:46  srcfans.com\VideoMonitor\VideoMonitor\frmMain.cs

     文件      38134  2008-07-29 08:43  srcfans.com\VideoMonitor\VideoMonitor\frmMain.designer.cs

     文件    2129224  2008-07-29 08:43  srcfans.com\VideoMonitor\VideoMonitor\frmMain.resx

     文件       2415  2012-08-02 21:46  srcfans.com\VideoMonitor\VideoMonitor\frmPlay.cs

     文件       4314  2008-07-24 14:18  srcfans.com\VideoMonitor\VideoMonitor\frmPlay.designer.cs

     文件       6706  2008-07-24 14:18  srcfans.com\VideoMonitor\VideoMonitor\frmPlay.resx

     文件       1808  2017-06-19 16:39  srcfans.com\VideoMonitor\VideoMonitor\frmRegister.cs

     文件       4130  2008-07-24 14:14  srcfans.com\VideoMonitor\VideoMonitor\frmRegister.designer.cs

     文件     175675  2008-07-24 14:14  srcfans.com\VideoMonitor\VideoMonitor\frmRegister.resx

     文件       3169  2012-08-02 21:46  srcfans.com\VideoMonitor\VideoMonitor\frmSetMonitor.cs

     文件       6179  2008-07-24 14:19  srcfans.com\VideoMonitor\VideoMonitor\frmSetMonitor.designer.cs

     文件     381605  2008-07-24 14:19  srcfans.com\VideoMonitor\VideoMonitor\frmSetMonitor.resx

............此处省略56个文件信息

评论

共有 条评论

相关资源