Example #1
0
        public ShutDownForm()
        {
            InitializeComponent();
            checkBox_AllDay.Checked = true;
            dateTimePicker1.Enabled = dateTimePicker2.Enabled = false;

            //如果开放上传至服务器功能,就屏蔽文件预览功能
            INIFile iniobj = new INIFile();
            if (iniobj.IniReadValue("config", "UploadFlag", "0") == "1")
                button4.Visible = false;
        }
Example #2
0
        public ShutDownForm()
        {
            InitializeComponent();
            checkBox_AllDay.Checked = true;
            dateTimePicker1.Enabled = dateTimePicker2.Enabled = false;

            //如果开放上传至服务器功能,就屏蔽文件预览功能
            INIFile iniobj = new INIFile();

            if (iniobj.IniReadValue("config", "UploadFlag", "0") == "1")
            {
                button4.Visible = false;
            }
        }
Example #3
0
        private void readConfig()
        {
            //1.读取当前程序配置
            writeMsg("读取配置...");
            INIFile iniObject = new INIFile();

            m_topMost = iniObject.IniReadValue("config", "TopMost", "0") == "0" ? false : true;
            m_hasDriver = iniObject.IniReadValue("config", "Driver", "0") == "0" ? false : true;
            m_DVPwd = iniObject.IniReadValue("config", "LoginPwd", "\\Data");//DV的登录密码
            m_DataPathStr = iniObject.IniReadValue("config", "SavePath", "\\Data");//目录不允许设置保存路径

            m_FilePrefixString = iniObject.IniReadValue("config", "FilePrefixString", "A2");
            m_FileExtString = iniObject.IniReadValue("config", "FileExtString", "AVI MP4 WAV JPG");
            m_FileRenameString = iniObject.IniReadValue("config", "SavePath", "DH00000_");

            m_UploadFlag = iniObject.IniReadValue("config", "UploadFlag", "0") == "0" ? false : true;
            m_interfaceStr = iniObject.IniReadValue("config", "UploadInterface", "http://127.0.0.1//interfaceAction.do");
            m_ftpSever = iniObject.IniReadValue("config", "FtpSever", "127.0.0.1");
            m_ftpPort = iniObject.IniReadValue("config", "FtpPort", "21");
            m_ftpUser = iniObject.IniReadValue("config", "FtpUser", "test1");
            m_ftpPwd = iniObject.IniReadValue("config", "FtpPwd", "test1");
            m_ftpBuffer = int.Parse(iniObject.IniReadValue("config", "FtpBuffer", "512"));
            m_WorkStationID = iniObject.IniReadValue("config", "MachineID", "778899");

            //FtpClient ftpClient = new FtpClient(m_ftpSever, m_ftpUser, m_ftpPwd, 120, int.Parse(m_ftpPort));
            //ftpClient.Login();
            //ftpClient.ChangeDir("/test");
            //ftpClient.ChangeDir("/test1");
            //ftpClient.ChangeDir("/test");
            //ftpClient.ChangeDir("/test");
            //ftpClient.MakeDir("test1");
            //ftpClient.MakeDir("test");

            if (m_topMost)
                this.TopMost = true;

            if (m_hasDriver)
                timer_IntoUSBMode.Enabled = true;



        }
Example #4
0
        private void readConfig()
        {
            //1.读取当前程序配置
            writeMsg("读取配置...");
            INIFile iniObject = new INIFile();

            m_topMost     = iniObject.IniReadValue("config", "TopMost", "0") == "0" ? false : true;
            m_hasDriver   = iniObject.IniReadValue("config", "Driver", "0") == "0" ? false : true;
            m_DVPwd       = iniObject.IniReadValue("config", "LoginPwd", "\\Data"); //DV的登录密码
            m_DataPathStr = iniObject.IniReadValue("config", "SavePath", "\\Data"); //目录不允许设置保存路径

            m_FilePrefixString = iniObject.IniReadValue("config", "FilePrefixString", "A2");
            m_FileExtString    = iniObject.IniReadValue("config", "FileExtString", "AVI MP4 WAV JPG");
            m_FileRenameString = iniObject.IniReadValue("config", "SavePath", "DH00000_");

            m_UploadFlag    = iniObject.IniReadValue("config", "UploadFlag", "0") == "0" ? false : true;
            m_interfaceStr  = iniObject.IniReadValue("config", "UploadInterface", "http://127.0.0.1//interfaceAction.do");
            m_ftpSever      = iniObject.IniReadValue("config", "FtpSever", "127.0.0.1");
            m_ftpPort       = iniObject.IniReadValue("config", "FtpPort", "21");
            m_ftpUser       = iniObject.IniReadValue("config", "FtpUser", "test1");
            m_ftpPwd        = iniObject.IniReadValue("config", "FtpPwd", "test1");
            m_ftpBuffer     = int.Parse(iniObject.IniReadValue("config", "FtpBuffer", "512"));
            m_WorkStationID = iniObject.IniReadValue("config", "MachineID", "778899");

            //FtpClient ftpClient = new FtpClient(m_ftpSever, m_ftpUser, m_ftpPwd, 120, int.Parse(m_ftpPort));
            //ftpClient.Login();
            //ftpClient.ChangeDir("/test");
            //ftpClient.ChangeDir("/test1");
            //ftpClient.ChangeDir("/test");
            //ftpClient.ChangeDir("/test");
            //ftpClient.MakeDir("test1");
            //ftpClient.MakeDir("test");

            if (m_topMost)
            {
                this.TopMost = true;
            }

            if (m_hasDriver)
            {
                timer_IntoUSBMode.Enabled = true;
            }
        }