예제 #1
0
 public override void TryInit(object configFilePath)
 {
     myConfig = new UploadConfig((string[])configFilePath);
     if (myConfig != null)
     {
         State = Status.Idle;
     }
     else
     {
         throw new Exception("上传配置文件错误!");
     }
     logger = Cfet2LogManager.GetLogger("UploadLog");
 }
예제 #2
0
        public static UploadConfig SetThingsAndDirs(string filepath)
        {
            var result = CSVOperator.LoadCSVFile(filepath);

            var config = new UploadConfig();

            config.AIThings = new string[result.Count - 1];
            config.ServerDataDirectories = new string[result.Count - 1];
            for (int i = 1; i < result.Count; i++)
            {
                config.AIThings[i - 1] = result[i][0];
                config.ServerDataDirectories[i - 1] = result[i][1];
            }

            return(config);
        }