Example #1
0
        public AutoDMS(FRegSetting reg, bool enableTextLog = false)
        {
            browser           = new ScrapingBrowser();
            browser.KeepAlive = true;
            Regsetting        = reg;
            result            = new List <string>();
            log      = new LogWriter(enableTextLog);
            loggedin = false;
            log.WriteLine("AutoDMS initialized.");

            result.Add("Start AutoDMS Process...");

            Login();
        }
Example #2
0
        /// <summary>
        /// 從Json導入資料,並且寫入registry
        /// </summary>
        /// <param name="regJSON"></param>
        public void SetSettingsToRegisry(string regJSON)
        {
            FRegSetting r = new FRegSetting();

            r = JsonConvert.DeserializeObject <FRegSetting>(regJSON);

            EMail        = r.EMail;
            Password     = r.Password;
            IMAPServerIP = r.IMAPServerIP;
            SMTPServerIP = r.SMTPServerIP;
            SMTPLogLevel = r.SMTPLogLevel;
            WebServiceIP = r.WebServiceIP;

            DMS_Enable     = r.DMS_Enable;
            DMS_TriggerAt  = r.DMS_TriggerAt;
            DMS_LastUpdate = r.DMS_LastUpdate;
            DMS_Setting    = r.DMS_Setting;

            LogLevel            = r.LogLevel;
            FeatureByte         = r.FeatureByte;
            SMTPLogWriterEnable = r.SMTPLogWriterEnable;

            SetSettingsToRegisry();
        }