public void LoadWithOldDict(Dictionary <string, string> OldDict) { if (string.IsNullOrEmpty(VariableNameWithoutNum) == false && OldDict.TryGetValue(VariableNameWithoutNum, out string outvalue) && string.IsNullOrEmpty(outvalue) == false) { oldeng = YMLTools.RegexGetValue(outvalue); } else { oldeng = string.Empty; } }
public YML(string LineTo) : this() { LineCHN = LineTo; LineENG = string.Empty; variablename = YMLTools.RegexGetName(LineTo); variablenamewithoutnum = YMLTools.RegexGetNameOnly(variablename); vchn = YMLTools.RegexGetValue(LineTo); if (HasError()) { FixError(); } oldeng = string.Empty; }
public bool IsAllQoute(string text) { if (text != "") { text = YMLTools.RemoveSpace(text); if (text.Length > 0) { char fst = text[0]; char end = text[text.Length - 1]; if (fst == '$' && end == '$') { return(true); } if (fst == '[' && end == ']') { return(true); } } } return(false); }
public YML(string LineFrom, Dictionary <string, string> DictForTo) : this() { LineENG = LineFrom; variablename = YMLTools.RegexGetName(LineFrom); variablenamewithoutnum = YMLTools.RegexGetNameOnly(variablename); veng = YMLTools.RegexGetValue(LineFrom); if (string.IsNullOrEmpty(VariableNameWithoutNum) == false && DictForTo.TryGetValue(VariableNameWithoutNum, out string outvalue) && string.IsNullOrEmpty(outvalue) == false) { LineCHN = outvalue; } else { LineCHN = LineFrom; } if (HasError()) { FixError(); } oldeng = string.Empty; }
public bool OldNewisDifferent() { return(YMLTools.RemoveSpace(oldeng) != YMLTools.RemoveSpace(veng)); }
private string TestComment() { return(YMLTools.RegexGetName(LineCHN) + "\"" + YMLTools.RegexGetValue(LineCHN) + "\""); }
public bool IsEditable() { return((IsSpaceLine() || YMLTools.RemoveSpace(LineCHN) == "l_english:" || IsComment()) == false); }
private bool IsComment() { return(YMLTools.RemoveSpace(LineCHN).Length > 0 && YMLTools.RemoveSpace(LineCHN)[0] == '#'); }