示例#1
0
 void AddBattleControl()
 {
     if (battleChatControl == null || battleChatControl.IsDisposed)
     {
         battleChatControl = new BattleChatControl {
             Dock = DockStyle.Fill
         }
     }
     ;
     if (toolTabs.GetChannelTab("Battle") == null)
     {
         toolTabs.AddTab("Battle", "Battle", battleChatControl, ZklResources.battle, "Current battle room", 3);
     }
 }
示例#2
0
        void AddBattleControl()
        {
            if (battleChatControl == null || battleChatControl.IsDisposed)
            {
                battleChatControl = new BattleChatControl {
                    Dock = DockStyle.Fill
                }
            }
            ;
            if (toolTabs.GetChannelTab("Battle") == null)
            {
                toolTabs.AddTab("Battle", "Battle", battleChatControl, ZklResources.battle, "Current battle room", 3);
            }
        }

        ChatControl CreateChannelControl(string channelName)
        {
            if (IsIgnoredChannel(channelName))
            {
                return(null);
            }
            var existing = GetChannelControl(channelName);

            if (existing != null)
            {
                return(existing);
            }
            var chatControl = new ChatControl(channelName)
            {
                Dock = DockStyle.Fill
            };
            var gameInfo = KnownGames.List.FirstOrDefault(x => x.Channel == channelName);

            if (gameInfo != null)
            {
                toolTabs.AddTab(channelName, gameInfo.FullName, chatControl, ZklResources.game, null, 2);
            }
            else
            {
                toolTabs.AddTab(channelName, channelName, chatControl, ZklResources.chat, null, 1);
            }
            chatControl.ChatLine += (s, e) => Program.TasClient.Say(SayPlace.Channel, channelName, e.Data, false);
            return(chatControl);
        }
 void AddBattleControl()
 {
     if (battleChatControl == null || battleChatControl.IsDisposed) battleChatControl = new BattleChatControl { Dock = DockStyle.Fill };
     if (toolTabs.GetChannelTab("Battle") == null) toolTabs.AddTab("Battle", "Battle", battleChatControl, ZklResources.battle, "Current battle room", 3);
 }