C# Class ExamplesChat.Android.ChatAppBase

In an attempt to keep things as clear as possible all shared implementation across chat examples has been provided in this base class.
Afficher le fichier Open project: MarcFletcher/NetworkComms.Net

Protected Properties

Свойство Type Description
lastPeerMessageDict ChatMessage>.Dictionary

Méthodes publiques

Méthode Description
AppendLineToChatHistory ( string message ) : void

Append the provided message to the chat history text box.

ChatAppBase ( string name, ConnectionType connectionType ) : System

Constructor for ChatAppBase

ClearChatHistory ( ) : void

Clears the chat history

ClearInputLine ( ) : void

Clears the input text box

PrintUsageInstructions ( ) : void

Outputs the usage instructions to the chat window

RefreshNetworkCommsConfiguration ( ) : void

Updates the configuration of this instance depending on set fields

SendMessage ( string stringToSend ) : void

Send a message.

ShowMessage ( string message ) : void

Show a message box as an alternative to writing to the chat history

Méthodes protégées

Méthode Description
HandleIncomingChatMessage ( PacketHeader header, Connection connection, ChatMessage incomingMessage ) : void

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

Private Methods

Méthode Description
HandleConnectionClosed ( Connection connection ) : void

Performs whatever functions we might so desire when an existing connection is closed.

Method Details

AppendLineToChatHistory() public abstract méthode

Append the provided message to the chat history text box.
public abstract AppendLineToChatHistory ( string message ) : void
message string Message to be appended
Résultat void

ChatAppBase() public méthode

Constructor for ChatAppBase
public ChatAppBase ( string name, ConnectionType connectionType ) : System
name string
connectionType ConnectionType
Résultat System

ClearChatHistory() public abstract méthode

Clears the chat history
public abstract ClearChatHistory ( ) : void
Résultat void

ClearInputLine() public abstract méthode

Clears the input text box
public abstract ClearInputLine ( ) : void
Résultat void

HandleIncomingChatMessage() protected méthode

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 Connection The Connection from which this object was received
incomingMessage ChatMessage The incoming ChatMessage we are after
Résultat void

PrintUsageInstructions() public méthode

Outputs the usage instructions to the chat window
public PrintUsageInstructions ( ) : void
Résultat void

RefreshNetworkCommsConfiguration() public méthode

Updates the configuration of this instance depending on set fields
public RefreshNetworkCommsConfiguration ( ) : void
Résultat void

SendMessage() public méthode

Send a message.
public SendMessage ( string stringToSend ) : void
stringToSend string
Résultat void

ShowMessage() public abstract méthode

Show a message box as an alternative to writing to the chat history
public abstract ShowMessage ( string message ) : void
message string Message to be output
Résultat void

Property Details

lastPeerMessageDict protected_oe property

Dictionary to keep track of which peer messages have already been written to the chat window
protected Dictionary lastPeerMessageDict
Résultat ChatMessage>.Dictionary