C# Класс Examples.ExamplesChat.WPF.ChatAppWPF

All NetworkComms.Net implementation can be found here and in ChatAppBase
Наследование: ChatAppBase
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
HandleIncomingChatMessage ( PacketHeader header, Connection connection, ChatMessage incomingMessage ) : void

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

Описание методов

AppendLineToChatHistory() публичный Метод

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
Результат void

AppendLineToChatHistory() публичный Метод

Append the provided message to the chatBox text box.
public AppendLineToChatHistory ( string message ) : void
message string
Результат void

ChatAppWPF() публичный Метод

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
Результат System

ClearChatHistory() публичный Метод

Clear the chat history window
public ClearChatHistory ( ) : void
Результат void

ClearInputLine() публичный Метод

Clear the text message input box
public ClearInputLine ( ) : void
Результат void

HandleIncomingChatMessage() защищенный Метод

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
Результат void

RefreshMessagesFromBox() публичный Метод

Refresh the messagesFrom text box using the recent message history.
public RefreshMessagesFromBox ( ) : void
Результат void

ShowMessage() публичный Метод

Show a message as an alternative to adding text to chat history
public ShowMessage ( string message ) : void
message string
Результат void