public static void GetParamValue() { if (AppValues.ConfigData != null && AppValues.ConfigData.ContainsKey(AppConfigIDArrParam)) { string AppConfigID = AppValues.ConfigData[AppConfigIDArrParam]; if (AppConfigID != null && AppConfigID != "") { if (AppConfigID.Contains(new string(new char[] { SplitChar }))) { AppConfigIDArr = AppConfigID.Split(new char[] { SplitChar }, StringSplitOptions.RemoveEmptyEntries); } else { AppConfigIDArr = new string[] { AppConfigID } }; } } if (AppValues.BatParamInfo.ContainsKey(MoreLanguageParam)) { Dictionary <string, BatChildParam> ChildParam = AppValues.BatParamInfo[MoreLanguageParam].ChildParam; IsExtractChinese = BatMethods.GetBoolValue(IsExtractChinese, ChildParam, IsExtractChineseParam); // IsMoreLanguage = BatMethods.GetBoolValue(IsMoreLanguage, ChildParam, IsMoreLanguageParam); // NeedLanguage = BatMethods.GetStringValue(NeedLanguage, ChildParam, NeedLanguageParam); // OtherLanguage = BatMethods.GetStringValue(OtherLanguage, ChildParam, OtherLanguageParam); // IsAddSaveType = BatMethods.GetBoolValue(IsAddSaveType, ChildParam, IsAddSaveTypeParam); // IsGetSourceTextFile = BatMethods.GetBoolValue(IsGetSourceTextFile, ChildParam, IsGetSourceTextFileParam); } //if (OtherLanguage != null) // OtherLanguageArr = OtherLanguage.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); }
private static void GetParamValue() { if (AppValues.BatParamInfo.ContainsKey(AppLogParam)) { Dictionary <string, BatChildParam> ChildParam = AppValues.BatParamInfo[AppLogParam].ChildParam; ConfigPath = BatMethods.GetStringValue(ConfigPath, ChildParam, ConfigPathParam); } }
private static void GetParamValue() { if (AppValues.BatParamInfo.ContainsKey(LangParam)) { Dictionary <string, BatChildParam> ChildParam = AppValues.BatParamInfo[LangParam].ChildParam; IsLang = BatMethods.GetBoolValue(IsLang, ChildParam, IsLangParam); LangPath = BatMethods.GetStringValue(LangPath, ChildParam, LangPathParam); IsLangNull = BatMethods.GetBoolValue(IsLangNull, ChildParam, IsLangNullParam); } }
public static void GetParamValue() { if (AppValues.BatParamInfo.ContainsKey(AppLogParam)) { Dictionary <string, BatChildParam> ChildParam = AppValues.BatParamInfo[AppLogParam].ChildParam; IsPrintLog = BatMethods.GetBoolValue(IsPrintLog, ChildParam, IsPrintLogParam); IsPrintLogWarning = BatMethods.GetBoolValue(IsPrintLogWarning, ChildParam, IsPrintLogWarningParam); IsPrintLogError = BatMethods.GetBoolValue(IsPrintLogError, ChildParam, IsPrintLogErrorParam); IsSaveLog = BatMethods.GetBoolValue(IsSaveLog, ChildParam, IsSaveLogParam); IsSaveLogWarning = BatMethods.GetBoolValue(IsSaveLogWarning, ChildParam, IsSaveLogWarningParam); IsSaveLogError = BatMethods.GetBoolValue(IsSaveLogError, ChildParam, IsSaveLogErrorParam); } }
private void StartMerge() { //须先ExportMergeTableParam,IsMergeTableParam赋值 if (AppValues.BatParamInfo.ContainsKey(ExportMergeParam)) { Dictionary <string, BatChildParam> ChildParam = AppValues.BatParamInfo[ExportMergeParam].ChildParam; IsMerge = BatMethods.GetBoolValue(IsMerge, ChildParam, IsMergeParam); MergeTabble = BatMethods.GetStringArrValue(ChildParam, ExportMergeParam); } if (IsMerge == true) { string errorString; Dictionary <string, List <TableInfo> > MergeTableListTemp = new Dictionary <string, List <TableInfo> >(); foreach (KeyValuePair <string, string[]> kvp in MergeTabble) { if (kvp.Key == IsMergeParam) { continue; } if (!MergeTableListTemp.ContainsKey(kvp.Key)) { MergeTableListTemp.Add(kvp.Key, new List <TableInfo>()); } foreach (string s in kvp.Value) { if (AppValues.TableInfo.ContainsKey(s)) { if (!MergeTableListTemp[kvp.Key].Contains(AppValues.TableInfo[s])) { MergeTableListTemp[kvp.Key].Add(AppValues.TableInfo[s]); } } } } MergeTableList = MergeTableListTemp; foreach (KeyValuePair <string, List <TableInfo> > kvp in MergeTableListTemp) { if (kvp.Value.Count > 0) { TableInfo tableInfo = TableInfo.Merge(kvp.Key, kvp.Value, out errorString); AppValues.TableInfo.Add(kvp.Key, tableInfo); } } } }
private static void GetParamValue() { if (AppValues.BatParamInfo.ContainsKey(ReadParam)) { Dictionary <string, BatChildParam> ChildParam = AppValues.BatParamInfo[ReadParam].ChildParam; ExcelPath = BatMethods.GetStringValue(ExcelPath, ChildParam, ExcelPathParam); IsIncludeSubfolder = BatMethods.GetBoolValue(IsIncludeSubfolder, ChildParam, IsIncludeSubfolderParam); TheLanguage = BatMethods.GetStringValue(TheLanguage, ChildParam, TheLanguageParam); IsNeedCheck = BatMethods.GetBoolValue(IsNeedCheck, ChildParam, IsNeedCheckParam); IsAllowedNullNumber = BatMethods.GetBoolValue(IsAllowedNullNumber, ChildParam, IsAllowedNullNumberParam); } if (AppLanguage.AppConfigIDArr == null && TheLanguage != "") { AppLog.LogErrorAndExit(string.Format("多语言配置错误:在Bat只设置了{0}({1}={2}),则必须在config.txt中设置{3}:{4},格式如:MoreLanguage:_ft,_English", ReadParam, TheLanguageParam, TheLanguage, AppLanguage.AppConfigIDArrParam, TheLanguage)); } }
public void GetParamValue() { //须先赋值 if (AppValues.BatParamInfo.ContainsKey(ExportTypeParam)) { Dictionary <string, BatChildParam> ChildParam = AppValues.BatParamInfo[ExportTypeParam].ChildParam; IsExport = BatMethods.GetBoolValue(IsExport, ChildParam, IsExportParam); ExportPath = BatMethods.GetStringValue(ExportPath, ChildParam, ExportPathParam); ExportName = BatMethods.GetStringValue(ExportName, ChildParam, ExportNameParam); IsExportKeepDirectoryStructure = BatMethods.GetBoolValue(IsExportKeepDirectoryStructure, ChildParam, IsExportKeepDirectoryStructureParam); ExcelNameSplitString = BatMethods.GetStringValue(ExcelNameSplitString, ChildParam, ExcelNameSplitStringParam); ExportExtension = BatMethods.GetStringValue(ExportExtension, ChildParam, ExportExtensionParam); ExportNameBeforeAdd = BatMethods.GetStringValue(ExportNameBeforeAdd, ChildParam, ExportNameBeforeAddParam); ExportNameAfterLanguageMark = BatMethods.GetStringValue(ExportNameAfterLanguageMark, ChildParam, ExportNameAfterLanguageMarkParam); IsExportNullNumber = BatMethods.GetBoolValue(IsExportNullNumber, ChildParam, IsExportNullNumberParam); IsExportNullString = BatMethods.GetBoolValue(IsExportNullString, ChildParam, IsExportNullStringParam); IsExportNullJson = BatMethods.GetBoolValue(IsExportNullJson, ChildParam, IsExportNullJsonParam); IsExportNullArray = BatMethods.GetBoolValue(IsExportNullArray, ChildParam, IsExportNullArrayParam); IsExportNullDict = BatMethods.GetBoolValue(IsExportNullDict, ChildParam, IsExportNullDictParam); IsExportNullBool = BatMethods.GetBoolValue(IsExportNullBool, ChildParam, IsExportNullBoolParam); IsExportNullDate = BatMethods.GetBoolValue(IsExportNullDate, ChildParam, IsExportNullDateParam); IsExportNullTime = BatMethods.GetBoolValue(IsExportNullTime, ChildParam, IsExportNullTimeParam); IsExportNullLang = BatMethods.GetBoolValue(IsExportNullLang, ChildParam, IsExportNullLangParam); IsExportFormat = BatMethods.GetBoolValue(IsExportFormat, ChildParam, IsExportFormatParam); IsExportFieldComment = BatMethods.GetBoolValue(IsExportFieldComment, ChildParam, IsExportFieldCommentParam); ExportTopWords = BatMethods.GetStringValue(ExportTopWords, ChildParam, ExportTopWordsParam); ExportIndentationString = BatMethods.GetStringValue(ExportIndentationString, ChildParam, ExportIndentationStringParam); ExportSpaceString = BatMethods.GetStringValue(ExportSpaceString, ChildParam, ExportSpaceStringParam); ExportLineString = BatMethods.GetStringValue(ExportLineString, ChildParam, ExportLineStringParam); IsExportJsonArrayFormat = BatMethods.GetBoolValue(IsExportJsonArrayFormat, ChildParam, IsExportJsonArrayFormatParam); IsExportJsonMapIncludeKeyColumnValue = BatMethods.GetBoolValue(IsExportJsonMapIncludeKeyColumnValue, ChildParam, IsExportJsonMapIncludeKeyColumnValueParam); IsArrayFieldName = BatMethods.GetBoolValue(IsArrayFieldName, ChildParam, IsArrayFieldNameParam); IsTableNameStart = BatMethods.GetBoolValue(IsTableNameStart, ChildParam, IsTableNameStartParam); IsAddKeyToLuaTable = BatMethods.GetBoolValue(IsAddKeyToLuaTable, ChildParam, IsAddKeyToLuaTableParam); DateToExportFormat = BatMethods.GetStringValue(DateToExportFormat, ChildParam, DateToExportFormatParam); TimeToExportFormat = BatMethods.GetStringValue(TimeToExportFormat, ChildParam, TimeToExportFormatParam); SpecialExport = BatMethods.GetStringValue(SpecialExport, ChildParam, SpecialExportParam); } }