Example #1
0
        /// <summary>
        /// �g�s�b�N�ύX
        /// </summary>
        void ircClient_TopicChange(object sender, TopicChangeEventArgs e)
        {
            /*
            // ���݂��Ȃ��`�����l���̂Ƃ��͒lj�
            if (!m_channel.ContainsKey(e.Channel))
            {
                AddChannel(e.Channel, false);
                m_channel[e.Channel].IsJoin = true;
            }
            */
            if (!m_channel.ContainsKey(e.Channel)) return;

            // �g�s�b�N�ύX
            m_channel[e.Channel].Topic = e.Topic;
            // ���݂̃`�����l����������A�t�H�[���̏�Ԃ�X�V����
            if (m_currentCh == m_channel[e.Channel])
                LoadChannel(m_currentCh);

            // ���O��o�͂���
            if (e.Sender != string.Empty)
            {
                AddLog(m_channel[e.Channel], string.Format(Resources.TopicChanged, IRCClient.GetUserName(e.Sender), e.Topic));
            }
            else
            {
                AddLog(m_channel[e.Channel], string.Format(Resources.TopicReceived, e.Topic));
            }
        }
Example #2
0
 /// <summary>
 /// TopicChange イベントを発生させます。
 /// </summary>
 protected void OnTopicChange(TopicChangeEventArgs e)
 {
     TopicChangeEventDelegate handler = (TopicChangeEventDelegate)Events[eventKeyOfTopicChange];
     if (handler != null)
     {
         Control owner = GetOwner();
         if ((owner != null) && owner.InvokeRequired)
         {
             owner.Invoke(handler, this, e);
         }
         else
         {
             handler(this, e);
         }
     }
 }