Exemplo n.º 1
0
        public ElectionInfo(Action <Action> synchronousInvoker, ThreadReader t, IPogDb db, String forum, String url, Int32 postsPerPage,
                            Boolean noLynchAllowed, Language language, String vbVersion)
        {
            _synchronousInvoker = synchronousInvoker;
            _forumURL           = forum;
            _url            = url;
            _postsPerPage   = postsPerPage;
            _noLynchAllowed = noLynchAllowed;
            _language       = language;
            _vbVersion      = vbVersion;
            _threadId       = VBulletinForum.ThreadIdFromUrl(url);
            _day            = 1;
            DateTime now = DateTime.Now;

            _endTime = new DateTime(now.Year, now.Month, now.Day, 18, 0, 0, now.Kind);
            _thread  = t;
            _thread.PageCompleteEvent += new EventHandler <PageCompleteEventArgs>(_thread_PageCompleteEvent);
            _thread.ReadCompleteEvent += new EventHandler <ReadCompleteEventArgs>(_thread_ReadCompleteEvent);
            _db = db;
            _db.WriteThreadDefinition(_threadId, url, false);
            if (forum.Contains("mindromp.org"))
            {
                _final = true;
            }
        }
Exemplo n.º 2
0
        public void Setup()
        {
            String url       = "forumserver.twoplustwo.com";
            String vbVersion = "3.8.7";
            String lobby     = "59/puzzles-other-games/";

            POG.Forum.Language _language = Language.English;
            Action <Action>    invoker   = (x) => x();
            String             dbPath    = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\pog\";

            System.IO.Directory.CreateDirectory(dbPath);
            String    dbName = String.Format("{0}posts.{1}.sqlite", dbPath, url);
            PogSqlite _db    = new PogSqlite();

            _db.Connect(dbName);

            var _forum = new VBulletinForum(invoker, url, vbVersion, Language.English, lobby, "", "");
            var reader = _forum.Reader();

            _count = new ElectionInfo(invoker, reader, _db, _forum.ForumURL, url, _forum.PostsPerPage, true, _language, "3.8.7");
        }