예제 #1
0
        static void Main(string[] args)
        {
            //Process[] processlist = Process.GetProcesses();

            //foreach (Process process in processlist)
            //{

            //    if (!String.IsNullOrEmpty(process.MainWindowTitle))
            //    {
            //        Console.WriteLine("Process: {0} ID: {1} Window title: {2}", process.ProcessName, process.Id, process.MainWindowTitle);

            //        RECT rct = new RECT();
            //        GetWindowRect(hWnd, ref rct);
            //    }
            //}
            //FileProcessor ppfileProcessor = new FileProcessor(new WinamaxParser(), new DataRepository(), _winamaxDefaultPath);
            //ppfileProcessor.WatchAndProcessLive();

            //while (Console.Read() != 'q') ;
            //return;

            _path = _winamaxDefaultPath;
            DateTime from = DateTime.MinValue;

            if (args.Count() > 0 && args[0] != null)
                _path = args[0];

            if (args.Count() > 1 && args[1] != null)
                from = DateTime.Parse(args[1]);

            FileProcessor fileProcessor = new FileProcessor(new WinamaxParser(), new DataRepository(), _path);
            fileProcessor.ProcessImportOnModifiedFilesSinceLastImport(true);

            //var vpip = new DataRepository().GetStatisticsRepository().GetVPIPByPlayer("saadliig");
            //var pfr = new DataRepository().GetStatisticsRepository().GetPFRByPlayer("saadliig");

            //Console.WriteLine(vpip + "  " + pfr);

            Console.Read();
        }
예제 #2
0
 private void Refresh(bool clearAll)
 {
     FileProcessor fileProcessor = new FileProcessor(_parser, new DataRepository(), _path);
     fileProcessor.NewFileProcessed += fileProcessor_NewFileProcessed;
     fileProcessor.ProcessImportOnModifiedFilesSinceLastImport(clearAll);
 }