public void Initialize() { String host = "forumserver.twoplustwo.com"; _synchronousInvoker = a => Gtk.Application.Invoke(delegate { a.Invoke(); }); _forum = new TwoPlusTwoForum(_synchronousInvoker, host); _forum.LoginEvent += HandleLoginEvent; _db = new PogSqlite(); String dbPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "/pog"; System.IO.Directory.CreateDirectory(dbPath); String dbName = dbPath + "/pogposts.sqlite"; _db.Connect(dbName); Gtk.Dialog dlg = null; try { dlg = new LoginDialog(_forum); dlg.Run(); } finally { if (dlg != null) { dlg.Destroy(); } } }
public VoteCountWidget(TwoPlusTwoForum forum, Action <Action> synchronousInvoker, IPogDb db, String url, Boolean turbo, Int32 day) { _forum = forum; _synchronousInvoker = synchronousInvoker; _db = db; _url = url; _turbo = turbo; _day = day; _forumURL = _forum.ForumURL; this.Build(); _autoComplete = new AutoComplete(_forum, _synchronousInvoker, _db); BindToNewGame(_url); SetupVoteGrid(); FillVoteGrid(); }
public LoginDialog(TwoPlusTwoForum forum) { _forum = forum; this.Build(); }