SendMessage.FormatText C# (CSharp) Method

FormatText() private method

private FormatText ( string text, bool chat ) : string
text string
chat bool
return string
    private string FormatText(string text, bool chat)
    {
        string result = string.Empty;

        if (chat)
        {
            // Replace {name} with current chat room name.
            result = Global.ReplaceString(text, "{name}", Global.Steam.Chat.GetChatName());
        }
        else
        {
            // Replace {name} with selected friend's name.
            result = Global.ReplaceString(text, "{name}", p_FriendsList.SelectedItem.Text);
        }

        return result;
    }