Пример #1
0
 public YML(string LineTo) : this()
 {
     LineCHN                = LineTo;
     LineENG                = "";
     variablename           = YMLTools.RegexGetName(LineTo);
     variablenamewithoutnum = YMLTools.RegexGetNameOnly(variablename);
     vchn = YMLTools.RegexGetValue(LineTo);
     if (HasError())
     {
         FixError();
     }
     oldeng = "";
 }
Пример #2
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 (VariableNameWithoutNum != "" && DictForTo.TryGetValue(VariableNameWithoutNum, out string outvalue) && outvalue != "")
            {
                LineCHN = outvalue;
                //vchn = YMLTools.RegexGetValue(outvalue);
            }
            else
            {
                LineCHN = LineFrom;
                //vchn = YMLTools.RegexGetValue(LineFrom);
            }

            if (HasError())
            {
                FixError();
            }
            oldeng = "";
        }