コード例 #1
0
 public static bool TryLoad(string line)
 {
     if (!(line.Substring(0, 12) == "boolequalize"))
     {
         return(false);
     }
     BoolOperatorInstruction.Load(line);
     return(true);
 }
コード例 #2
0
        public static IInstruction Load(string line)
        {
            BoolOperatorInstruction operatorInstruction = new BoolOperatorInstruction();
            List <string>           list = new List <string>();

            Program.ToWords(line, 'ﻃ', (ICollection <string>)list);
            operatorInstruction.oper        = (BoolOperator)Enum.Parse(typeof(BoolOperator), list[1]);
            operatorInstruction.a1          = (object)list[2];
            operatorInstruction.a2          = (object)list[3];
            operatorInstruction.variable    = list[4];
            operatorInstruction.variable1   = list[5];
            operatorInstruction.variable2   = list[6];
            operatorInstruction.ifvariable1 = bool.Parse(list[7]);
            operatorInstruction.ifvariable2 = bool.Parse(list[8]);
            return((IInstruction)operatorInstruction);
        }