public IndexMaker(string filename) { try { Config parser = new Config(filename,true); sourceList = parser.GetSourceList(); indexList = parser.GetIndexList(); indexer = parser.GetIndexer(); dictSet = parser.GetDictionarySet(); fileSet = parser.FileIndexSet; } catch (Exception ex) { #if DEBUG Console.WriteLine(string.Format("IndexMaker,发生异常,文件名:\t{0},\t异常:\t{1}", filename, ex.ToString())); #endif throw; } Init(); }
private bool InitData(string filename) { try { Config parser = new Config(filename,true); searchSet = parser.GetSearchd(); sourceList = parser.GetSourceList(); indexList = parser.GetIndexList(); dictSet = parser.GetDictionarySet(); indexerSet = parser.GetIndexer(); fileSet = parser.FileIndexSet; return true; } catch (Exception ex) { #if DEBUG Console.WriteLine(string.Format("Exception for open file {0},{1}", filename, ex.ToString())); #endif ShowError(string.Format("Exception for open file {0},{1}", filename, ex.ToString())); return false; } }