C# Class Yaircc.UI.IRCMarshal

Represents a marshal that sits between an IRC connection and the application's UI.
Inheritance: IDisposable
显示文件 Open project: rastating/yaircc Class Usage Examples

Private Properties

Property Type Description
BeganConnecting void
ChannelDisposed void
ConnectionEstablished void
ConnectionFailed void
ConnectionTerminated void
DataReceived void
PerformServerTabAction void
ProcessMessage void
ProcessNumericReply void
ProcessQueue void
Reconnect void
ReconnectTimer_Elapsed void
SetupConnectionEventHandlers void

Public Methods

Method Description
CreateChannel ( string displayName, bool switchTo ) : IRCChannel

Creates a new channel and tab.

Dispose ( ) : void

Releases all resources used by the IRCMarshal.

GetChannelByTab ( IRCTabPage tab ) : IRCChannel

Gets a channel using the tab it is linked to.

GetReplyAttributes ( Reply reply ) : MessageTypeAttribute

Get the MessageTypeAttribute associated with reply

IRCMarshal ( Connection connection, System.Windows.Forms.TabControl tabHost, List autoCommands, MainForm parent ) : System

Initialises a new instance of the IRCMarshal class.

Send ( IRCTabPage sender, Message message ) : void

Sends the message to the associated server.

Private Methods

Method Description
BeganConnecting ( object sender, EventArgs e ) : void

Handles the BeganConnecting event of Yaircc.Net.IRC.Connection.

ChannelDisposed ( object sender ) : void

Handles the Disposed event of Yaircc.UI.IRCChannel.

ConnectionEstablished ( object sender, EventArgs e ) : void

Handles the ConnectionEstablished event of Yaircc.Net.IRC.Connection.

ConnectionFailed ( object sender, ConnectionFailedEventArgs e ) : void

Handles the ConnectionFailed event of Yaircc.Net.IRC.Connection.

ConnectionTerminated ( object sender, EventArgs e ) : void

Handles the ConnectionTerminated event of Yaircc.Net.IRC.Connection.

DataReceived ( object sender, DataReceivedEventArgs e ) : void

Handles the DataReceived event of Yaircc.Net.IRC.Connection.

PerformServerTabAction ( System.Action action ) : void

Invoke an action if the server tab has been instantiated.

ProcessMessage ( Message message ) : void

Process a message that contains a text based command.

ProcessNumericReply ( Message message ) : void

Process a message that is categorised as being a numeric reply in the RFC documents.

ProcessQueue ( ) : void

Processes all the current items in the message queue.

Reconnect ( ) : void

Reconnects to the server.

ReconnectTimer_Elapsed ( object sender, System e ) : void

Handles the Elapsed event of System.Timers.Timer.

SetupConnectionEventHandlers ( ) : void

Setup the event handlers required by the connection.

Method Details

CreateChannel() public method

Creates a new channel and tab.
public CreateChannel ( string displayName, bool switchTo ) : IRCChannel
displayName string The name of the channel.
switchTo bool A value indicating whether or not to switch to the new channel.
return IRCChannel

Dispose() public method

Releases all resources used by the IRCMarshal.
public Dispose ( ) : void
return void

GetChannelByTab() public method

Gets a channel using the tab it is linked to.
public GetChannelByTab ( IRCTabPage tab ) : IRCChannel
tab IRCTabPage The tab to find the channel by.
return IRCChannel

GetReplyAttributes() public static method

Get the MessageTypeAttribute associated with reply
public static GetReplyAttributes ( Reply reply ) : MessageTypeAttribute
reply Reply The whose attributes are returned
return Yaircc.Net.IRC.MessageTypeAttribute

IRCMarshal() public method

Initialises a new instance of the IRCMarshal class.
public IRCMarshal ( Connection connection, System.Windows.Forms.TabControl tabHost, List autoCommands, MainForm parent ) : System
connection Yaircc.Net.IRC.Connection The connection to marshal data to and from.
tabHost System.Windows.Forms.TabControl The TabControl that hosts the server and channel tabs.
autoCommands List A queue of commands to automatically execute once a connection is fully established.
parent MainForm The owning form.
return System

Send() public method

Sends the message to the associated server.
public Send ( IRCTabPage sender, Message message ) : void
sender IRCTabPage The source tab page.
message Yaircc.Net.IRC.Message The message to send.
return void