public EventCommandChatboxText(AddChatboxTextCommand refCommand, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;
            InitLocalization();
            txtAddText.Text = mMyCommand.Text;
            cmbColor.Items.Clear();
            foreach (Color.ChatColor color in Enum.GetValues(typeof(Color.ChatColor)))
            {
                cmbColor.Items.Add(Globals.GetColorName(color));
            }

            cmbColor.SelectedIndex = cmbColor.Items.IndexOf(mMyCommand.Color);
            if (cmbColor.SelectedIndex == -1)
            {
                cmbColor.SelectedIndex = 0;
            }

            cmbChannel.SelectedIndex = (int)mMyCommand.Channel;
        }
        private static string GetCommandText(AddChatboxTextCommand command, MapInstance map)
        {
            var channel = "";

            switch (command.Channel)
            {
            case ChatboxChannel.Player:
                channel += Strings.EventCommandList.chatplayer;

                break;

            case ChatboxChannel.Local:
                channel += Strings.EventCommandList.chatlocal;

                break;

            case ChatboxChannel.Global:
                channel += Strings.EventCommandList.chatglobal;

                break;
            }

            return(Strings.EventCommandList.chatboxtext.ToString(channel, command.Color, Truncate(command.Text, 20)));
        }