public void InitLocalData() { string file; string localPath; string localCdlFile; string localSigFile; Interval interval; lock (provider) { file = ProviderHelper.GetDataFilePath(provider); localPath = ProviderHelper.GetLocalPath(provider); localCdlFile = ProviderHelper.GetLocalCdlFilePath(provider); localSigFile = ProviderHelper.GetLocalSigFilePath(provider); interval = provider.CurrentTInterval; } Console.WriteLine(" InitLocalData " + file + " local " + localPath); List <BarData> cdlList = new List <BarData>(); List <Signal> sigList = new List <Signal>(); // if (File.Exists(file)) { IFileWorker fw = FileUtil.GetFileWorker(); // if (fw.UnZipFiles(file, localPath, null, false)) { Console.WriteLine(localCdlFile); if (File.Exists(localCdlFile) && fw.LoadCdlFile(localCdlFile, 0, int.MaxValue, out cdlList, true, true)) { if (cdlList.Count > 0) { provider.LocalLastCdlTime = cdlList[cdlList.Count - 1].DateTime; provider.HasLocalLastCdlTime = true; } } if (cdlList.Count > 0 && File.Exists(localSigFile) && fw.LoadSigFile(localSigFile, 0, int.MaxValue, out sigList, true, true)) { sigList.ForEach(SupplementSignals); if (sigList.Count > 0) { provider.LocalLastSigTime = sigList[sigList.Count - 1].ActTime; provider.HasLocalLastSigTime = true; } } } fw = null; } dataUnits.Add(interval, cdlList); signalUnits.Add(interval, sigList); }