void Client_JoinedChannel(object sender, ServerChatEventArgs e)
 {
     if (__joinedChannel != null)
         __joinedChannel.Call(_host.ClientHost, ConvObj(e));
 }
Beispiel #2
0
 void ServerBroadcast(object sender, ServerChatEventArgs e)
 {
     PostEvent(new ClientEvent { EventType = ClientEventType.ServerBroadcast, EventData = e });
 }
 void Client_ServerBroadcast(object sender, ServerChatEventArgs e)
 {
     if (__serverBroadcast != null)
         __serverBroadcast.Call(_host.ClientHost, ConvObj(e));
 }
Beispiel #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));
 }
Beispiel #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));
 }
 void Client_ChannelDidNotExist(object sender, ServerChatEventArgs e)
 {
     if (__channelDidNotExist != null)
     {
         __channelDidNotExist.Call(_host.ClientHost, ConvObj(e));
     }
 }
Beispiel #7
0
 void ServerBroadcast(object sender, ServerChatEventArgs e)
 {
     chat.AddChat(new ChatNode("[Server]: ", CssClasses.ServerInfo), new ChatNode(e.Text, CssClasses.Broadcast));
 }
Beispiel #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)
                            });
                    }
                }
            }
        }
Beispiel #9
0
 private void HandleChannelJoined(object sender, ServerChatEventArgs e)
 {
 }
Beispiel #10
0
 void ChannelWasFull(object sender, ServerChatEventArgs e)
 {
     PostEvent(new ClientEvent { EventType = ClientEventType.ChannelFull, EventData = e });
 }
Beispiel #11
0
 void ChannelDidNotExist(object sender, ServerChatEventArgs e)
 {
     PostEvent(new ClientEvent { EventType = ClientEventType.ChannelDidNotExist, EventData = e });
 }
Beispiel #12
0
 void ChannelWasRestricted(object sender, ServerChatEventArgs e)
 {
     PostEvent(new ClientEvent { EventData = e, EventType = ClientEventType.ChannelRestricted });
 }
Beispiel #13
0
 void InformationReceived(object sender, ServerChatEventArgs e)
 {
     if (!string.IsNullOrEmpty(e.Text))
         PostEvent(new ClientEvent { EventType = ClientEventType.InformationReceived, EventData = e });
 }
Beispiel #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 });
 }
 void Client_InformationReceived(object sender, ServerChatEventArgs e)
 {
     if (__informationReceived != null)
         __informationReceived.Call(_host.ClientHost, ConvObj(e));
 }
Beispiel #16
0
 void JoinedChannel(object sender, ServerChatEventArgs e)
 {
     if (InvokeRequired)
         Invoke(new Invokee(ClearChannelList));
     else
         ClearChannelList();
 }
 void Client_ChannelWasFull(object sender, ServerChatEventArgs e)
 {
     if (__channelWasFull != null)
     {
         __channelWasFull.Call(_host.ClientHost, ConvObj(e));
     }
 }
Beispiel #18
0
 static void client_ServerErrorReceived(object sender, ServerChatEventArgs e)
 {
     Console.WriteLine("SERVER ERROR: {0}", e.Text);
 }
Beispiel #19
0
 void m_client_ServerErrorReceived(object sender, ServerChatEventArgs e)
 {
     chat.AddChat(new ChatNode("[Error]: ", CssClasses.ServerInfo), new ChatNode(e.Text, CssClasses.Error));
 }
Beispiel #20
0
 static void client_ServerBroadcast(object sender, ServerChatEventArgs e)
 {
     Console.WriteLine("SERVER: {0}", e.Text);
 }
Beispiel #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();
        }
Beispiel #22
0
 static void client_JoinedChannel(object sender, ServerChatEventArgs e)
 {
     Console.WriteLine("CHANNEL: {0}", e.Text);
 }
Beispiel #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));
 }
 void Client_ServerErrorReceived(object sender, ServerChatEventArgs e)
 {
     if (__serverErrorReceived != null)
         __serverErrorReceived.Call(_host.ClientHost, ConvObj(e));
 }
Beispiel #25
0
 void ChannelDidNotExist(object sender, ServerChatEventArgs e)
 {
     chat.AddChat(new ChatNode(e.Text, CssClasses.ChannelDNE));
 }
Beispiel #26
0
 void m_client_ServerErrorReceived(object sender, ServerChatEventArgs e)
 {
     PostEvent(new ClientEvent { EventData = e, EventType = ClientEventType.ServerError });
 }