Пример #1
0
        static void Main(string[] args)
        {
            Console.Title = $"{Settings.Name} • Core Version : {PlatypusSharp.Core.Settings.Version}";

            if (OSUtils.OperatingSystem == OS.WINDOWS && OSUtils.IsRunningWithMono)
                Logger.Error(Settings.Name + " " + LocaString.Get("NotCompatibleMono"));

            if (args.Length < 1)
                Logger.Error(LocaString.Get("NeedToGiveFilePath"));

            string path = args[0];

            bool debug = false;
            if (args.Length > 1)
                debug = args[1].ToLower() == "debug";

            PlatypusInterpreter interpreter = new PlatypusInterpreter();

            if (debug)
            {
                Stopwatch sw = new Stopwatch();
                sw.Start();
                interpreter.ExecuteFromFile(path);
                sw.Stop();
                Console.WriteLine($"===== {LocaString.Get("ExecutionTime")} : {sw.ElapsedMilliseconds} ms =====");
                Console.WriteLine(LocaString.Get("PressAKeyToContinue"));
                sw.Reset();
                Console.ReadKey();
            }
            else
            {
                interpreter.ExecuteFromFile(path);
            }
        }
Пример #2
0
 static void Main(string[] args)
 {
     PlatypusInterpreter interpreter = new PlatypusInterpreter();
     interpreter.ExecuteFromFile(@"F:\Projets\PlatypusSharp\Samples\sample1french.p");
 }