SendMessage.SendMessage C# (CSharp) Method

SendMessage() public method

public SendMessage ( ) : System
return System
    public SendMessage()
    {
        // Base window properties
        this.Sizable = false;
        this.Size = new Size(272, 200);
        this.Text = "SendMessage plug-in (SDK Sample 03)";

        // Create a Steamp3.UI.List control
        p_FriendsList = new Steamp3.UI.List(this, null);
        p_FriendsList.SelectedItemChanged += new EventHandler(p_FriendsList_SelectedItemChanged);
        p_FriendsList.SetBounds(12, 30, 248, 100);

        // Create a Steamp3.UI.TextBox control
        p_TextBox = new Steamp3.UI.TextBox(this, null, "Hello {name}!");
        p_TextBox.SetBounds(12, 136, 248, 20);

        // Create a Steamp3.UI.Button control
        p_ButtonChat = new Steamp3.UI.Button(this, null, "Send text to chat");
        p_ButtonChat.Enabled = true;
        p_ButtonChat.MouseClick += new MouseEventHandler(p_ButtonChat_MouseClick);
        p_ButtonChat.SetBounds(12, 168, 120, 20);

        // Create another Button control
        p_ButtonFriend = new Steamp3.UI.Button(this, null, "Send text to friend");
        p_ButtonFriend.Enabled = false;
        p_ButtonFriend.MouseClick += new MouseEventHandler(p_ButtonFriend_MouseClick);
        p_ButtonFriend.SetBounds(140, 168, 120, 20);

        // Add friends to p_FriendsList using the Global SteamClient.GetFriends method.
        foreach (SteamID id in Global.Steam.Client.GetFriends())
        {
            // Create a Steamp3.UI.ListItem and add it to the list.
            Steamp3.UI.ListItem item = new Steamp3.UI.ListItem(Global.Steam.Client.GetFriendPersonaName(id));
            item.Tag = id;

            p_FriendsList.Add(item);
        }
    }