Ejemplo n.º 1
0
        private void OnLoginSucceeded(object sender, MessageEventArgs_201 message)
        {
            ConnectionManager.Messages.LoginSucceededEvent -= OnLoginSucceeded;

            OwnUserId = message.UserId;

            ConnectionManager.Commands.Who(1); //1 = Public Chat
            ConnectionManager.Commands.Ping(this);

            //Starts the heart beat pings to the server
            HeartBeat = new HeartBeatTimer(ConnectionManager);
            HeartBeat.StartTimer();

            PublicChat = new Chat(ConnectionManager.Messages, 1); // 1 = chat id for public chat
            News       = new News.News(ConnectionManager.Messages);

            FileRoot = new FileTree();
            FileRoot.Reload();

            Transfers = new Transfers.Transfers();

            if (Online != null)
            {
                Online();
            }
        }
Ejemplo n.º 2
0
        void OnLoginSucceeded(object sender, MessageEventArgs_201 messageEventArgs)
        {
            //TODO: We shouldn't set the user icon here but instead have
            //      some user object so we can change the icon.
            SharpWired.Gui.Resources.Icons.IconHandler iconHandler = new SharpWired.Gui.Resources.Icons.IconHandler();
            connectionManager.Commands.Icon(1, iconHandler.UserImage);

            //Starts the heart beat pings to the server
            heartBeatTimer = new HeartBeatTimer(connectionManager);
            heartBeatTimer.StartTimer();



            if (LoggedIn != null)
            {
                LoggedIn(server);
            }
        }