コード例 #1
0
        private void MainWindow_Load(object sender, EventArgs e)
        {
            _store  = Data.SQLite.DataStore.Instance;
            _parser = new PartyPoker.PartyPokerParser(_store);
            _parser.HandImported += new EventHandler(parser_HandImported);

            string exe = Application.ExecutablePath;

            System.IO.FileInfo      exeInfo = new System.IO.FileInfo(exe);
            System.IO.DirectoryInfo dirInfo = exeInfo.Directory;
            string programDir = dirInfo.FullName;

            string appPath = System.IO.Path.Combine(programDir, "Http");
            int    port    = this.IISExpressPort;
            bool   sysTray = this.IISExpressSysTray;

            _iisExpress = new IISExpress(appPath, port, sysTray);

            string httpPath       = _iisExpress.Path;
            bool   httpPathExists = System.IO.Directory.Exists(httpPath);

            if (httpPathExists)
            {
                if (_iisExpress.IsRunning == false)
                {
                    this.StartIIS();
                }
            }
            else
            {
                Logger.Warn("Hand Analysis ASP.NET Applicaton not found at {0}", httpPath);
            }

            // Parse existing files
            this.DiscoverExistingFiles();

            this.UpdateStats();

            this.StartImport();

            _monitor              = new PartyPoker.HandHistoryMonitor(_parser.HandHistoryDir);
            _monitor.FileChanged += new FileSystemEventHandler(this._monitor_FileChanged);
            _monitor.Start();

            _statsRefreshTimer.Start();

            this.RefreshPlayers();
        }
コード例 #2
0
        private void MainWindow_Load(object sender, EventArgs e)
        {
            _store = Data.SQLite.DataStore.Instance;
            _parser = new PartyPoker.PartyPokerParser(_store);
            _parser.HandImported += new EventHandler(parser_HandImported);

            string exe = Application.ExecutablePath;
            System.IO.FileInfo exeInfo = new System.IO.FileInfo(exe);
            System.IO.DirectoryInfo dirInfo = exeInfo.Directory;
            string programDir = dirInfo.FullName;

            string appPath = System.IO.Path.Combine(programDir, "Http");
            int port = this.IISExpressPort;
            bool sysTray = this.IISExpressSysTray;
            _iisExpress = new IISExpress(appPath, port, sysTray);

            string httpPath = _iisExpress.Path;
            bool httpPathExists = System.IO.Directory.Exists(httpPath);

            if (httpPathExists)
            {
                if (_iisExpress.IsRunning == false)
                {
                    this.StartIIS();
                }
            }
            else
            {
                Logger.Warn("Hand Analysis ASP.NET Applicaton not found at {0}", httpPath);
            }

            // Parse existing files
            this.DiscoverExistingFiles();

            this.UpdateStats();

            this.StartImport();

            _monitor = new PartyPoker.HandHistoryMonitor(_parser.HandHistoryDir);
            _monitor.FileChanged += new FileSystemEventHandler(this._monitor_FileChanged);
            _monitor.Start();

            _statsRefreshTimer.Start();

            this.RefreshPlayers();
        }