Пример #1
0
 public OpenGame(VBulletinForum forum, String lobbyURL, IEnumerable <String> gameIcons)
     : this()
 {
     _url       = lobbyURL;
     _lobby     = forum.Lobby();
     _gameIcons = gameIcons.ToList();
 }
Пример #2
0
 public OpenGame(POG.Forum.TwoPlusTwoForum forum)
 {
     _lobby = forum.Lobby();
     this.Build();
     Gtk.TreeViewColumn c = new Gtk.TreeViewColumn();
     c.Title = "POG Games";
     treeThreads.AppendColumn(c);
     treeThreads.Model = _threads;
     Gtk.CellRendererText crt = new Gtk.CellRendererText();
     c.PackStart(crt, true);
     c.AddAttribute(crt, "text", 0);
     //treeThreads.ModifyFont (Pango.FontDescription.FromString ("normal 8"));
 }
Пример #3
0
        void _forum_LoginEvent(object sender, LoginEventArgs e)
        {
            switch (e.LoginEventType)
            {
            case LoginEventType.LoginFailure:
            {
                MessageBox.Show(this, "Login failed! Check the username and password.");
                btnLogin.Enabled = true;
            }
            break;

            case LoginEventType.LoginSuccess:
            {
                button1.Enabled          = true;
                btnLogin.Enabled         = false;
                btnLogout.Enabled        = true;
                txtUsername.ReadOnly     = true;
                txtPassword.ReadOnly     = true;
                txtPassword.PasswordChar = '*';
                _lobby = _forum.Lobby();
                _lobby.LobbyPageCompleteEvent += new EventHandler <LobbyPageCompleteEventArgs>(_lobby_LobbyPageCompleteEvent);
                _cms = new CheckMyStats();
                _cms.LobbyReadEvent  += new EventHandler <LobbyReadEventArgs>(_cms_LobbyReadEvent);
                _cms.ThreadReadEvent += new EventHandler <ThreadReadEventArgs>(_cms_ThreadReadEvent);
                //_cms.MessageReceived += new EventHandler<MessageEventArgs>(_cms_MessageReceived);
                _cms.Login(_username);
            }
            break;

            case LoginEventType.LogoutSuccess:
            {
                _cms.Logout(_username);
                button1.Enabled          = false;
                btnLogin.Enabled         = true;
                btnLogout.Enabled        = false;
                txtUsername.Text         = "";
                txtPassword.Text         = "";
                txtUsername.ReadOnly     = false;
                txtPassword.ReadOnly     = false;
                txtPassword.PasswordChar = '\0';
            }
            break;
            }
        }