예제 #1
0
 void Client_JoinedChannel(object sender, ServerChatEventArgs e)
 {
     if (__joinedChannel != null)
         __joinedChannel.Call(_host.ClientHost, ConvObj(e));
 }
예제 #2
0
 void ServerBroadcast(object sender, ServerChatEventArgs e)
 {
     PostEvent(new ClientEvent { EventType = ClientEventType.ServerBroadcast, EventData = e });
 }
예제 #3
0
 void Client_ServerBroadcast(object sender, ServerChatEventArgs e)
 {
     if (__serverBroadcast != null)
         __serverBroadcast.Call(_host.ClientHost, ConvObj(e));
 }
예제 #4
0
 void InformationReceived(object sender, ServerChatEventArgs e)
 {
     if (!string.IsNullOrEmpty(e.Text))
         chat.AddChat(new ChatNode("[Server]: ", CssClasses.ServerInfo), new ChatNode(e.Text, CssClasses.ServerInfo));
 }
예제 #5
0
 void ChannelWasFull(object sender, ServerChatEventArgs e)
 {
     chat.AddChat(new ChatNode("Could not join ", CssClasses.Error), new ChatNode(e.Text, CssClasses.ChannelFull), new ChatNode(" because it was full.", CssClasses.Error));
 }
예제 #6
0
 void Client_ChannelDidNotExist(object sender, ServerChatEventArgs e)
 {
     if (__channelDidNotExist != null)
     {
         __channelDidNotExist.Call(_host.ClientHost, ConvObj(e));
     }
 }
예제 #7
0
 void ServerBroadcast(object sender, ServerChatEventArgs e)
 {
     chat.AddChat(new ChatNode("[Server]: ", CssClasses.ServerInfo), new ChatNode(e.Text, CssClasses.Broadcast));
 }
예제 #8
0
        private void HandleChannelError(object sender, ServerChatEventArgs e)
        {
            if (m_nextClanID != 0)
            {
                using (var dc = ClansDataContext.Create(m_dbPath))
                {
                    var view = new ChannelView
                    {
                        ClanID = m_nextClanID,
                        AllowedView = false,
                        When = DateTime.Now,
                        UserCount = 0,
                        UserList = ""
                    };
                    dc.ChannelViews.InsertOnSubmit(view);

                    try
                    {
                        dc.SubmitChanges();
                    }
                    catch (Exception ex)
                    {
                        m_client.MainWindow.AddChat(new ChatNode[] {
                                new ChatNode("JinxBot Clan Gnome error ", Color.DarkRed),
                                new ChatNode("Error saving a new clan:", Color.Red),
                                ChatNode.NewLine,
                                new ChatNode(ex.ToString(), Color.OrangeRed)
                            });
                    }
                }
            }
        }
예제 #9
0
 private void HandleChannelJoined(object sender, ServerChatEventArgs e)
 {
 }
예제 #10
0
 void ChannelWasFull(object sender, ServerChatEventArgs e)
 {
     PostEvent(new ClientEvent { EventType = ClientEventType.ChannelFull, EventData = e });
 }
예제 #11
0
 void ChannelDidNotExist(object sender, ServerChatEventArgs e)
 {
     PostEvent(new ClientEvent { EventType = ClientEventType.ChannelDidNotExist, EventData = e });
 }
예제 #12
0
 void ChannelWasRestricted(object sender, ServerChatEventArgs e)
 {
     PostEvent(new ClientEvent { EventData = e, EventType = ClientEventType.ChannelRestricted });
 }
예제 #13
0
 void InformationReceived(object sender, ServerChatEventArgs e)
 {
     if (!string.IsNullOrEmpty(e.Text))
         PostEvent(new ClientEvent { EventType = ClientEventType.InformationReceived, EventData = e });
 }
예제 #14
0
 void JoinedChannel(object sender, ServerChatEventArgs e)
 {
     m_svc.SetChannelName(m_channelID, Hash("test"), e.Text);
     PostEvent(new ClientEvent { EventData = e, EventType = ClientEventType.JoinedChannel });
 }
예제 #15
0
 void Client_InformationReceived(object sender, ServerChatEventArgs e)
 {
     if (__informationReceived != null)
         __informationReceived.Call(_host.ClientHost, ConvObj(e));
 }
예제 #16
0
 void JoinedChannel(object sender, ServerChatEventArgs e)
 {
     if (InvokeRequired)
         Invoke(new Invokee(ClearChannelList));
     else
         ClearChannelList();
 }
예제 #17
0
 void Client_ChannelWasFull(object sender, ServerChatEventArgs e)
 {
     if (__channelWasFull != null)
     {
         __channelWasFull.Call(_host.ClientHost, ConvObj(e));
     }
 }
예제 #18
0
파일: Program.cs 프로젝트: Mofsy/jinxbot
 static void client_ServerErrorReceived(object sender, ServerChatEventArgs e)
 {
     Console.WriteLine("SERVER ERROR: {0}", e.Text);
 }
예제 #19
0
 void m_client_ServerErrorReceived(object sender, ServerChatEventArgs e)
 {
     chat.AddChat(new ChatNode("[Error]: ", CssClasses.ServerInfo), new ChatNode(e.Text, CssClasses.Error));
 }
예제 #20
0
파일: Program.cs 프로젝트: Mofsy/jinxbot
 static void client_ServerBroadcast(object sender, ServerChatEventArgs e)
 {
     Console.WriteLine("SERVER: {0}", e.Text);
 }
예제 #21
0
        void JoinedChannel(object sender, ServerChatEventArgs e)
        {
            chat.AddChat(new ChatNode("Joined Channel: ", CssClasses.JoiningChannel), new ChatNode(e.Text, CssClasses.ChannelName));
            ChannelFlags flags = (ChannelFlags)e.Flags;
            if ((flags & ChannelFlags.SilentChannel) == ChannelFlags.SilentChannel)
                chat.AddChat(new ChatNode("This is a silent channel.", CssClasses.SilentChannel));

            ThreadStart ts = delegate
            {
                this.Text = string.Format(CultureInfo.CurrentCulture, "Chat Channel: {0}", e.Text);
                this.TabText = this.Text;
            };

            if (InvokeRequired)
                BeginInvoke(ts);
            else
                ts();
        }
예제 #22
0
파일: Program.cs 프로젝트: Mofsy/jinxbot
 static void client_JoinedChannel(object sender, ServerChatEventArgs e)
 {
     Console.WriteLine("CHANNEL: {0}", e.Text);
 }
예제 #23
0
 void ChannelWasRestricted(object sender, ServerChatEventArgs e)
 {
     chat.AddChat(new ChatNode("Could not join ", CssClasses.Error), new ChatNode(e.Text, CssClasses.ChannelRestricted), new ChatNode(" because it was restricted.", CssClasses.Error));
 }
예제 #24
0
 void Client_ServerErrorReceived(object sender, ServerChatEventArgs e)
 {
     if (__serverErrorReceived != null)
         __serverErrorReceived.Call(_host.ClientHost, ConvObj(e));
 }
예제 #25
0
 void ChannelDidNotExist(object sender, ServerChatEventArgs e)
 {
     chat.AddChat(new ChatNode(e.Text, CssClasses.ChannelDNE));
 }
예제 #26
0
 void m_client_ServerErrorReceived(object sender, ServerChatEventArgs e)
 {
     PostEvent(new ClientEvent { EventData = e, EventType = ClientEventType.ServerError });
 }