Exemple #1
0
        //protected WebconfigsConfig _config;
        protected BaseAutomater(WebconfigsConfig config)
        {
            _config = new Config() { County = config.type, Username = config.username, Password = config.password};
            if (config.checksperday.IsInteger())
                _config.Checkperday = Convert.ToInt16(config.checksperday);
            if (config.daysback.IsInteger())
                _config.Daysback = Convert.ToInt16(config.daysback);
            if (config.interval.IsInteger())
                _config.Interval = Convert.ToInt16(config.interval);
            if (config.priority.IsInteger())
                _config.Priority = Convert.ToInt16(config.priority);

            try
            {
                _config.Starttime = DateTime.Parse(config.starttime);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }

            if (config.Position != null)
            {
                foreach (var positional in config.Position)
                {
                    _config.Positionals.Add(positional.name, new Coordinate() { X = positional.xCoord, Y = positional.yCoord });

                }
            }

            if (config.PerformanceTweak != null)
            {
                foreach (var tweak in config.PerformanceTweak)
                {
                    _config.Performancetweaks.Add( tweak.name, tweak.seconds );
                }
            }

            _pdfstore = Properties.Settings.Default.pdfstore;

            if (FileTools.SDirectoryExists(Properties.Settings.Default.javacachedirectory))
            {
                _listener = new FileSystemWatcher(Properties.Settings.Default.javacachedirectory);
                _listener.NotifyFilter = NotifyFilters.FileName;
                _listener.IncludeSubdirectories = true;
                _listener.Filter = "";
            }
            else
                Console.WriteLine("!!!!!!!!!ERROR, Please check config location of java cache directory, it appears incorrect");

            _leads = new List<Lead>();
            _waitingforimage = false;
        }
        public BaseWebAiiAutomater(WebconfigsConfig config)
            : base(config)
        {
            if (_manager != null)
            {
                foreach (var broswer in _manager.Browsers)
                {
                    broswer.Close();

                }
                return;
            }

            var settings = new Settings(BrowserType.InternetExplorer, @"c:\log\") { ClientReadyTimeout = 60 * 1000 };

            _manager = new Manager(settings);
            _manager.Start();
        }
 public ColoradoSecretaryOfState(WebconfigsConfig config)
     : base(config)
 {
 }
Exemple #4
0
 public MonroeCounty(WebconfigsConfig config)
     : base(config)
 {
 }
Exemple #5
0
 public BexarCounty(WebconfigsConfig config)
     : base(config)
 {
 }