Exemple #1
0
 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;
     }
 }
Exemple #2
0
 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;
 }
Exemple #3
0
        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;
        }
Exemple #4
0
 private string TestComment()
 {
     return(YMLTools.RegexGetName(LineCHN) + "\"" + YMLTools.RegexGetValue(LineCHN) + "\"");
 }