Inheritance: XG.Plugin.ANotificationSender
コード例 #1
0
        protected override void StopRun()
        {
            ConnectionStopped = DateTime.Now;
            _log.Info("StopRun(" + Server + ")");

            Stopwatch();

            _client.OnConnected         -= ClientOnConnected;
            _client.OnDisconnected      -= ClientOnDisconnected;
            _client.OnMessage           -= ClientOnMessage;
            _client.OnReadLine          -= ClientOnReadLine;
            _client.OnChannelJoined     -= ClientOnChannelJoined;
            _client.OnBotJoined         -= ClientOnBotJoined;
            _client.OnUserJoined        -= ClientOnUserJoined;
            _client.OnQueueChannel      -= ClientOnQueueChannel;
            _client.OnNotificationAdded -= FireNotificationAdded;

            _client.Disconnect();
            _client = null;

            if (OnDisconnected != null)
            {
                OnDisconnected(this, new EventArgs <Server>(Server));
            }
        }
コード例 #2
0
        protected override void StartRun()
        {
            _log.Info("StartRun(" + Server + ")");

            _client = new XdccClient
            {
                Server = Server
            };

            _client.OnConnected         += ClientOnConnected;
            _client.OnDisconnected      += ClientOnDisconnected;
            _client.OnMessage           += ClientOnMessage;
            _client.OnReadLine          += ClientOnReadLine;
            _client.OnChannelJoined     += ClientOnChannelJoined;
            _client.OnBotJoined         += ClientOnBotJoined;
            _client.OnUserJoined        += ClientOnUserJoined;
            _client.OnQueueChannel      += ClientOnQueueChannel;
            _client.OnNotificationAdded += FireNotificationAdded;

            ConnectionStarted = DateTime.Now;
            _client.Connect();
        }
コード例 #3
0
        protected override void StopRun()
        {
            ConnectionStopped = DateTime.Now;
            _log.Info("StopRun(" + Server + ")");

            Stopwatch();

            _client.OnConnected -= ClientOnConnected;
            _client.OnDisconnected -= ClientOnDisconnected;
            _client.OnMessage -= ClientOnMessage;
            _client.OnReadLine -= ClientOnReadLine;
            _client.OnChannelJoined -= ClientOnChannelJoined;
            _client.OnBotJoined -= ClientOnBotJoined;
            _client.OnUserJoined -= ClientOnUserJoined;
            _client.OnQueueChannel -= ClientOnQueueChannel;
            _client.OnNotificationAdded -= FireNotificationAdded;

            _client.Disconnect();
            _client = null;

            if (OnDisconnected != null)
            {
                OnDisconnected(this, new EventArgs<Server>(Server));
            }
        }
コード例 #4
0
        protected override void StartRun()
        {
            _log.Info("StartRun(" + Server + ")");

            _client = new XdccClient
            {
                Server = Server
            };

            _client.OnConnected += ClientOnConnected;
            _client.OnDisconnected += ClientOnDisconnected;
            _client.OnMessage += ClientOnMessage;
            _client.OnReadLine += ClientOnReadLine;
            _client.OnChannelJoined += ClientOnChannelJoined;
            _client.OnBotJoined += ClientOnBotJoined;
            _client.OnUserJoined += ClientOnUserJoined;
            _client.OnQueueChannel += ClientOnQueueChannel;
            _client.OnNotificationAdded += FireNotificationAdded;

            ConnectionStarted = DateTime.Now;
            _client.Connect();
        }