TextEditor2.MainUI.AddDrawTags C# (CSharp) Method

AddDrawTags() private method

This handles the tag inserts at TextBoxMenu/Control Tags/Draw. They are the draw instantly and draw by character tags.
private AddDrawTags ( string text ) : void
text string
return void
        private void AddDrawTags(string text)
        {
            int selectionStart = MessageText.SelectionStart;

            string tempTag = "";

            switch (text)
            {
                case "Instant":
                    tempTag = "<Draw:Instant>";
                    break;
                case "By Char":
                    tempTag = "<Draw:ByChar>";
                    break;
            }

            MessageText.Text = MessageText.Text.Insert(MessageText.SelectionStart, tempTag);

            MessageText.SelectionStart = selectionStart + tempTag.Length;
        }