コード例 #1
0
ファイル: ApplicationMain.cs プロジェクト: hyzhappy/samsoarii
 /// <summary>
 ///
 /// </summary>
 /// <param name="args">
 /// First argument is device specification
 /// Second argument is ladder file
 /// Third argument is function block file
 /// </param>
 public static int Main(string[] args)
 {
     if (args.Count() != 4)
     {
         Console.WriteLine("Error!Too few or too much arguments!");
         return(-1);
     }
     Init();
     try
     {
         BaseCompiler compiler = _compilerPrototype[args[0]];
         if (compiler.Execute(args[1], args[2], args[3]))
         {
             return(0);
         }
         else
         {
             return(-1);
         }
     }
     catch (Exception exception)
     {
         Console.WriteLine("Error!Unknown PLC Device");
         return(-1);
     }
 }
コード例 #2
0
 public BaseCompileBehavior(BaseCompiler compiler)
 {
     _compiler = compiler;
 }
コード例 #3
0
ファイル: CortexMBehavior.cs プロジェクト: hyzhappy/samsoarii
 public CortexMBehavior(BaseCompiler compiler) : base(compiler)
 {
 }
コード例 #4
0
 public PCBehavior(BaseCompiler compiler) : base(compiler)
 {
 }