C# 클래스 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.
파일 보기 프로젝트 열기: MarcFletcher/NetworkComms.Net

보호된 프로퍼티들

프로퍼티 타입 설명
lastPeerMessageDict ChatMessage>.Dictionary

공개 메소드들

메소드 설명
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

보호된 메소드들

메소드 설명
HandleIncomingChatMessage ( PacketHeader header, Connection connection, ChatMessage incomingMessage ) : void

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

비공개 메소드들

메소드 설명
HandleConnectionClosed ( Connection connection ) : void

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

메소드 상세

AppendLineToChatHistory() 공개 추상적인 메소드

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

ChatAppBase() 공개 메소드

Constructor for ChatAppBase
public ChatAppBase ( string name, ConnectionType connectionType ) : System
name string
connectionType ConnectionType
리턴 System

ClearChatHistory() 공개 추상적인 메소드

Clears the chat history
public abstract ClearChatHistory ( ) : void
리턴 void

ClearInputLine() 공개 추상적인 메소드

Clears the input text box
public abstract 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 Connection The Connection from which this object was received
incomingMessage ChatMessage The incoming ChatMessage we are after
리턴 void

PrintUsageInstructions() 공개 메소드

Outputs the usage instructions to the chat window
public PrintUsageInstructions ( ) : void
리턴 void

RefreshNetworkCommsConfiguration() 공개 메소드

Updates the configuration of this instance depending on set fields
public RefreshNetworkCommsConfiguration ( ) : void
리턴 void

SendMessage() 공개 메소드

Send a message.
public SendMessage ( string stringToSend ) : void
stringToSend string
리턴 void

ShowMessage() 공개 추상적인 메소드

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
리턴 void

프로퍼티 상세

lastPeerMessageDict 보호되어 있는 프로퍼티

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