Ejemplo n.º 1
0
        public override bool CheckScored()
        {
            switch (ScoredItemParser.GetOperatingSystem())
            {
            case ScoredItemParser.OS.Windows:
                return(checkedScoredWindows());

            case ScoredItemParser.OS.Unix:
                return(checkedScoredWindows());

            default:
                throw new PlatformNotSupportedException("This platform is not supported: " + Environment.OSVersion.Platform);
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            if (args.Length < 2)
            {
                Console.WriteLine($"Usage: {Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().Location)} in_file_path out_file_path");
                return;
            }

            if (!File.Exists(args[1]))
            {
                File.Create(args[1]).Close();
            }

            System.Diagnostics.Process.Start(args[1]);

            List <ScoredItem> items = ScoredItemParser.ParseFromFile(args[0]);

            while (true)
            {
                ScoredItemParser.ScoreToFile(args[1], items);
                System.Threading.Thread.Sleep(10000);
            }
        }