C# Class Examples.ExamplesChat.WPF.ChatAppWPF

All NetworkComms.Net implementation can be found here and in ChatAppBase
Inheritance: ChatAppBase
Mostra file Open project: MarcFletcher/NetworkComms.Net Class Usage Examples

Public Methods

Method Description
AppendLineToChatHistory ( System style, string text, bool addNewLine ) : void

Append the provided message to the chatBox text box including the provided formatting.

AppendLineToChatHistory ( string message ) : void

Append the provided message to the chatBox text box.

ChatAppWPF ( System.Windows.Controls.TextBlock chatHistory, ScrollViewer scroller, TextBox messagesFrom, TextBox messagesText ) : System

Constructor for the WPF chat app.

ClearChatHistory ( ) : void

Clear the chat history window

ClearInputLine ( ) : void

Clear the text message input box

RefreshMessagesFromBox ( ) : void

Refresh the messagesFrom text box using the recent message history.

ShowMessage ( string message ) : void

Show a message as an alternative to adding text to chat history

Protected Methods

Method Description
HandleIncomingChatMessage ( PacketHeader header, Connection connection, ChatMessage incomingMessage ) : void

Performs whatever functions we might so desire when we receive an incoming ChatMessage

Method Details

AppendLineToChatHistory() public method

Append the provided message to the chatBox text box including the provided formatting.
public AppendLineToChatHistory ( System style, string text, bool addNewLine ) : void
style System
text string
addNewLine bool
return void

AppendLineToChatHistory() public method

Append the provided message to the chatBox text box.
public AppendLineToChatHistory ( string message ) : void
message string
return void

ChatAppWPF() public method

Constructor for the WPF chat app.
public ChatAppWPF ( System.Windows.Controls.TextBlock chatHistory, ScrollViewer scroller, TextBox messagesFrom, TextBox messagesText ) : System
chatHistory System.Windows.Controls.TextBlock
scroller System.Windows.Controls.ScrollViewer
messagesFrom System.Windows.Controls.TextBox
messagesText System.Windows.Controls.TextBox
return System

ClearChatHistory() public method

Clear the chat history window
public ClearChatHistory ( ) : void
return void

ClearInputLine() public method

Clear the text message input box
public ClearInputLine ( ) : void
return void

HandleIncomingChatMessage() protected method

Performs whatever functions we might so desire when we receive an incoming ChatMessage
protected HandleIncomingChatMessage ( PacketHeader header, Connection connection, ChatMessage incomingMessage ) : void
header NetworkCommsDotNet.PacketHeader The PacketHeader corresponding with the received object
connection NetworkCommsDotNet.Connections.Connection The Connection from which this object was received
incomingMessage ChatMessage The incoming ChatMessage we are after
return void

RefreshMessagesFromBox() public method

Refresh the messagesFrom text box using the recent message history.
public RefreshMessagesFromBox ( ) : void
return void

ShowMessage() public method

Show a message as an alternative to adding text to chat history
public ShowMessage ( string message ) : void
message string
return void