ICQ-клиент

Программа обмена сообщениями через Интернет в реальном времени через службы мгновенных сообщений (Instant Messaging Service, IMS). Приемы и навыки объектно-ориентированного программирования с использованием языка программирования высокого уровня C#.

Рубрика Программирование, компьютеры и кибернетика
Вид курсовая работа
Язык русский
Дата добавления 07.07.2013
Размер файла 1,4 M

Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже

Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.

/// <summary>

/// The port to connect to on the proxy server

/// </summary>

public int ProxyPort { get; set; }

/// <summary>

/// The <see cref="ProxyType"/> to use for this connection

/// </summary>

public ProxyType ProxySetting

{

get { return proxySetting; }

set { proxySetting = value; }

}

#endregion Connection properties

private Encoding encoding;

/// <summary>

/// Gets or sets the screen name associated with this session

/// </summary>

/// <remarks>

/// The screen name cannot be set by this property while the client is offline.

/// When the client is online, setting the screen name by this property changes the

/// screen name's formatting on the server.

/// </remarks>

/// <exception cref="ArgumentException">Thrown when <paramref name="screenname"/> is not

/// a valid AIM or ICQ screenname.</exception>

public string ScreenName

{

get { return _screenname; }

set

{

if (LoggedIn)

{

if (!(ScreennameVerifier.IsValidAIM(value) || ScreennameVerifier.IsValidICQ(value)))

{

throw new ArgumentException(value + " is not a valid AIM or ICQ screenname");

}

_screenname = value;

// TODO: Actually reset the formatting...

}

}

}

/// <summary>

/// Gets or sets the port number used for OSCAR logins

/// </summary>

/// <remarks>

/// Traditionally, this is port 5190; however, AIM 6 has been caught using port 443 to negotiate

/// connections with login.oscar.aol.com and ars.oscar.aol.com. Future versions of OscarLib may use

/// this property to support login via port 443.

/// </remarks>

public ushort LoginPort

{

get { return _loginport; }

internal set { _loginport = value; }

}

/// <summary>

/// Gets or sets this session's OSCAR identification information

/// </summary>

/// <exception cref="LoggedInException">Thrown when the <see cref="Session"/> is already logged in</exception>

public OSCARIdentification ClientIdentification

{

get { return _clientid; }

}

/// <summary>

/// Gets or sets the OSCAR capabilities associated with the session

/// </summary>

/// <remarks>

/// The client capabilities must be set before the session is logged in because the

/// client's capabilities are communicated during the login process and are kept through

/// the session.

/// </remarks>

/// <exception cref="LoggedInException">Thrown when the <see cref="Session"/> is already logged in</exception>

public Capabilities ClientCapabilities

{

get { return _caps; }

set

{

if (LoggedIn)

{

throw new LoggedInException("Client capabilities cannot be set after the session is logged in");

}

_caps = value;

if ((value & Capabilities.UTF8) == Capabilities.UTF8)

{

encoding = Encoding.UTF8;

}

else

{

encoding = Encoding.ASCII;

}

}

}

/// <summary>

/// Gets the recommended enocding format depending on the client capability settings

/// </summary>

public Encoding Encoding

{

get { return encoding; }

}

/// <summary>

/// Gets a value indicating whether this client has completed the login process

/// </summary>

public bool LoggedIn

{

get { return _loggedin; }

protected set { _loggedin = value; }

}

/// <summary>

/// Gets the <see cref="SSIManager"/> associated with this session

/// </summary>

public SSIManager SSI

{

get { return ssiManager; }

}

/// <summary>

/// Gets the <see cref="LimitManager"/> associated with this session

/// </summary>

public LimitManager Limits

{

get { return limitManager; }

}

/// <summary>

/// Gets the <see cref="IcqManager"/> associated with this session

/// </summary>

public IcqManager ICQ

{

get { return icqManager; }

}

/// <summary>

/// Gets the <see cref="MessageManager"/> associated with this session

/// </summary>

public MessageManager Messages

{

get { return messageManager; }

}

/// <summary>

/// Gets the <see cref="ChatRoomManager"/> associated with this session

/// </summary>

public ChatRoomManager ChatRooms

{

get { return chatRoomManager; }

}

/// <summary>

/// Gets the <see cref="GraphicsManager"/> associated with this session

/// </summary>

public GraphicsManager Graphics

{

get { return graphicsManager; }

}

/// <summary>

/// Gets the <see cref="StatusManager"/> associated with this session

/// </summary>

public StatusManager Statuses

{

get { return statusManager; }

}

/// <summary>

/// Gets the <see cref="SearchManager"/> associated with this session

/// </summary>

public SearchManager Searches

{

get { return searchManager; }

}

/// <summary>

/// Gets or sets a filesystem path where OscarLib can place received data

/// </summary>

/// <remarks>During an OSCAR Direct Connect session, "transient" files may come over the wire.

/// If ScratchPath is set to a valid path, OscarLib will save the files locally and return

/// <see cref="System.IO.FileStream"/> references to the objects. Otherwise, the files will

/// be returned as <see cref="System.IO.MemoryStream"/> objects, which will take more active memory.</remarks>

public string ScratchPath { get; set; }

/// <summary>

/// Gets the <see cref="ConnectionManager"/> associated with this session

/// </summary>

internal ConnectionManager Connections

{

get { return connectionManager; }

}

/// <summary>

/// Gets the <see cref="ServiceManager"/> associated with this session

/// </summary>

internal ServiceManager Services

{

get { return serviceManager; }

}

/// <summary>

/// Gets the <see cref="PacketDispatcher"/> associated with this session

/// </summary>

internal PacketDispatcher Dispatcher

{

get { return dispatcher; }

}

/// <summary>

/// Gets the <see cref="FamilyManager"/> associated with this session

/// </summary>

internal FamilyManager Families

{

get { return familyManager; }

}

/// <summary>

/// Gets the <see cref="RateClassManager"/> associated with this session

/// </summary>

internal RateClassManager RateClasses

{

get { return rateManager; }

}

/// <summary>

/// Gets the <see cref="AuthorizationManager"/> associated with this session

/// </summary>

internal AuthorizationManager Authorization

{

get { return authManager; }

}

#endregion

/// <summary>

/// Gets or Sets the last modification date and time of the buddylist

/// </summary>

public DateTime LastModificationDate { get; set; }

#region Public events and protected event firing functions

#region OscarLib-generated events

/// <summary>

/// Occurs when an unhandled exception is raised in the course of dispatching and processing a packet

/// </summary>

public event PacketDispatchExceptionHandler PacketDispatchException;

/// <summary>

/// Raises the <see cref="PacketDispatchException"/> event

/// </summary>

protected internal void OnPacketDispatchException(Exception ex, DataPacket packet)

{

if (PacketDispatchException != null)

{

PacketDispatchException(this, new PacketDispatchExceptionArgs(ex, packet));

}

}

/// <summary>

/// Occurs when the library generates a status update message

/// </summary>

public event InformationMessageHandler StatusUpdate;

/// <summary>

/// Raises the <see cref="StatusUpdate"/> event

/// </summary>

/// <param name="message">A status message</param>

protected internal void OnStatusUpdate(string message)

{

if (StatusUpdate != null)

StatusUpdate(this, message);

}

/// <summary>

/// Occurs when the library generates a status update message during login

/// </summary>

public event LoginStatusUpdateHandler LoginStatusUpdate;

/// <summary>

/// Raises the <see cref="LoginStatusUpdate"/> event

/// </summary>

/// <param name="message">A status message</param>

/// <param name="percentdone">The percentage of the login progress that has been completed</param>

protected internal void OnLoginStatusUpdate(string message, double percentdone)

{

if (LoginStatusUpdate != null)

{

LoginStatusUpdate(this, message, percentdone);

}

}

/// <summary>

/// Occurs when the library generates a warning message

/// </summary>

public event WarningMessageHandler WarningMessage;

/// <summary>

/// Raises the <see cref="WarningMessage"/> event

/// </summary>

/// <param name="errorcode">A <see cref="ServerErrorCode"/> describing the warning</param>

protected internal void OnWarning(ServerErrorCode errorcode)

{

// csammis: Losing a secondary connection (chat room, icon downloader)

// isn't cause for logging off the session...and setting LoggedIn to false

// doesn't log off the session anyway. Call .Logoff() for that.

//if (errorcode == ServerErrorCode.LostSecondaryConnection)

// this.LoggedIn = false;

if (WarningMessage != null)

{

WarningMessage(this, errorcode);

}

}

/// <summary>

/// Occurs when the library generates an error message

/// </summary>

public event ErrorMessageHandler ErrorMessage;

/// <summary>

/// Raises the <see cref="ErrorMessage"/> event or the <see cref="LoginFailed"/> event

/// </summary>

/// <param name="errorcode">A <see cref="ServerErrorCode"/> describing the error</param>

/// <remarks>If the login process has not completed, <see cref="LoginFailed"/> is raised.

/// Otherwise, <see cref="ErrorMessage"/> is raised.</remarks>

protected internal void OnError(ServerErrorCode errorcode)

{

if (!_loggedin)

{

if (LoginFailed != null)

{

if (errorcode == ServerErrorCode.LostBOSConnection)

{

LoggedIn = false;

LoginFailed(this, LoginErrorCode.CantReachBOSServer);

}

else

LoginFailed(this, LoginErrorCode.UnknownError);

}

}

else

{

if (ErrorMessage != null)

ErrorMessage(this, errorcode);

}

}

#endregion

#region SNAC01 events

/// <summary>

/// Occurs when the login process is complete.

/// </summary>

public event LoginCompletedHandler LoginCompleted;

/// <summary>

/// Raises the <see cref="LoginCompleted"/> event

/// </summary>

protected internal void OnLoginComplete()

{

LoggedIn = true;

if (LoginCompleted != null)

{

LoginCompleted(this);

}

}

/// <summary>

/// Occurs when a remote client has warned this client

/// </summary>

public event WarningReceivedHandler WarningReceived;

/// <summary>

/// Raises the <see cref="WarningReceived"/> event.

/// </summary>

/// <param name="newlevel">The client's new warning level</param>

/// <param name="anonymous"><c>true</c> if this warning was sent anonymously, <c>false</c> otherwise</param>

/// <param name="ui">A <see cref="UserInfo"/> structure describing the warning user. If <paramref name="anonymous"/> is

/// <c>true</c>, this structure is unpopulated</param>

protected internal void OnWarningReceived(ushort newlevel, bool anonymous, UserInfo ui)

{

if (WarningReceived != null)

WarningReceived(this, newlevel, anonymous, ui);

}

#endregion

#region SNAC02 events

/// <summary>

/// Occurs when the server sends acknowledgement of a directory update request

/// </summary>

public event DirectoryUpdateAcknowledgedHandler DirectoryUpdateAcknowledged;

/// <summary>

/// Raises the <see cref="DirectoryUpdateAcknowledged"/> event

/// </summary>

/// <param name="success"><c>true</c> if the directory update succeded, and <c>false</c> otherwise</param>

protected internal void OnDirectoryUpdateAcknowledged(bool success)

{

if (DirectoryUpdateAcknowledged != null)

DirectoryUpdateAcknowledged(this, success);

}

#endregion

#region SNAC04 events

/// <summary>

/// Occurs when a file transfer request is received

/// </summary>

public event FileTransferRequestReceivedHandler FileTransferRequestReceived;

/// <summary>

/// Occurs when a Direct IM transfer request is received

/// </summary>

public event DirectIMRequestReceivedHandler DirectIMRequestReceived;

/// <summary>

/// Raises the <see cref="FileTransferRequestReceived"/> event

/// </summary>

/// <param name="key">The unique key needed to respond to this request</param>

protected internal void OnDirectConnectionRequestReceived(Cookie key)

{

DirectConnection conn = Connections.GetDirectConnectionByCookie(key);

if (conn is FileTransferConnection && FileTransferRequestReceived != null)

{

var ftc = conn as FileTransferConnection;

FileTransferRequestReceived(this, ftc.Other, ftc.VerifiedIP, ftc.FileHeader.Name,

ftc.TotalFileSize, ftc.Message, key);

}

else if (conn is DirectIMConnection && DirectIMRequestReceived != null)

{

DirectIMRequestReceived(this, conn.Other, conn.Message, key);

}

//else if (rd.DirectConnection.ConnectionType == DirectConnectType.DirectIM &&

// this.OscarLib_DirectIMRequestReceived != null)

//{

// this.OscarLib_DirectIMRequestReceived(this, rd.UserInfo);

//}

}

/// <summary>

/// Occurs when a chat room invitation is received

/// </summary>

public event ChatInvitationReceivedHandler ChatInvitationReceived;

/// <summary>

/// Raises the <see cref="ChatInvitationReceived"/> event

/// </summary>

/// <param name="sender">A <see cref="UserInfo"/> object represnting the inviter</param>

/// <param name="roomname">The name of the chatroom</param>

/// <param name="message">An invitation chatroom</param>

/// <param name="encoding">The text encoding used in the chatroom</param>

/// <param name="language">The language used in the chatroom</param>

/// <param name="key">The unique key needed to respond to this request</param>

protected internal void OnChatInvitationReceived(UserInfo sender,

string roomname,

string message,

Encoding encoding,

string language,

Cookie key)

{

if (ChatInvitationReceived != null)

ChatInvitationReceived(this, sender, roomname, message, encoding, language, key);

}

#endregion

#region SNAC0F events

/// <summary>

/// Occurs when the server sends the results of a directory search

/// </summary>

public event SearchResultsHandler SearchResults;

/// <summary>

/// Raises the <see cref="SearchResults"/> event

/// </summary>

/// <param name="results">The results of the directory search</param>

protected internal void OnSearchResults(DirectoryEntry[] results)

{

if (SearchResults != null)

SearchResults(this, results);

}

/// <summary>

/// Occurs when the server sends a list of interests

/// </summary>

public event InterestsReceivedHandler InterestsReceived;

/// <summary>

/// Raises the <see cref="InterestsReceived"/> event

/// </summary>

/// <param name="results">The results of the interests request</param>

protected internal void OnInterestsReceived(InterestItem[] results)

{

if (InterestsReceived != null)

InterestsReceived(this, results);

}

#endregion

#region SNAC13 events

/// <summary>

/// Occurs when the buddy list has been completely sent by the server

/// </summary>

public event ContactListFinishedHandler ContactListFinished;

/// <summary>

/// Notifies the server to activate the SSI data for the client, and to begin

/// alerting its contacts that it is now online and ready to receive messages

///

/// Implementing clients should call <see cref="ActivateBuddyList"/> in response to this event

/// </summary>

protected internal void OnContactListFinished(DateTime lastModificationDate)

{

if (ContactListFinished != null)

{

LastModificationDate = lastModificationDate;

ContactListFinished(this, lastModificationDate);

}

}

/// <summary>

/// Occurs when the server sends a new buddy item to the client

/// </summary>

public event BuddyItemReceivedHandler BuddyItemReceived;

/// <summary>

/// Raises the <see cref="BuddyItemReceived"/> event

/// </summary>

/// <param name="buddy">An <see cref="SSIBuddy"/> object</param>

protected internal void OnBuddyItemReceived(SSIBuddy buddy)

{

if (BuddyItemReceived != null)

BuddyItemReceived(this, buddy);

}

/// <summary>

/// Occurs when a buddy item has been removed from the server-side list

/// </summary>

public event BuddyItemRemovedHandler BuddyItemRemoved;

/// <summary>

/// Raises the <see cref="BuddyItemRemoved"/> event

/// </summary>

/// <param name="buddy">An <see cref="SSIBuddy"/> object</param>

protected internal void OnBuddyItemRemoved(SSIBuddy buddy)

{

if (BuddyItemRemoved != null)

{

BuddyItemRemoved(this, buddy);

}

}

/// <summary>

/// Occurs when the server sends a new group item to the client

/// </summary>

public event GroupItemReceivedHandler GroupItemReceived;

/// <summary>

/// Raises the <see cref="GroupItemReceived"/> event

/// </summary>

/// <param name="group">An <see cref="SSIGroup"/>"/> object</param>

protected internal void OnGroupItemReceived(SSIGroup group)

{

if (GroupItemReceived != null)

GroupItemReceived(this, group);

}

/// <summary>

/// Occurs when a buddy item has been removed from the server-side list

/// </summary>

public event GroupItemRemovedHandler GroupItemRemoved;

/// <summary>

/// Raises the <see cref="GroupItemRemoved"/> event

/// </summary>

/// <param name="group">An <see cref="SSIGroup"/> object</param>

protected internal void OnGroupItemRemoved(SSIGroup group)

{

if (GroupItemRemoved != null)

{

GroupItemRemoved(this, group);

}

}

/// <summary>

/// Occurs when the server sends the master group item to the client

/// </summary>

public event MasterGroupItemReceivedHandler MasterGroupItemReceived;

/// <summary>

/// Raises the <see cref="MasterGroupItemReceived"/> event

/// </summary>

/// <param name="numgroups">The number of groups we are going to receive</param>

protected internal void OnMasterGroupItemReceived(int numgroups)

{

if (MasterGroupItemReceived != null)

MasterGroupItemReceived(this, numgroups);

}

/// <summary>

/// Occurs when the an SSI edit is completed

/// </summary>

public event SSIEditCompleteHandler SSIEditComplete;

/// <summary>

/// Raises the <see cref="SSIEditComplete"/> event

/// </summary>

protected internal void OnSSIEditComplete()

{

if (SSIEditComplete != null)

{

SSIEditComplete(this);

}

}

/// <summary>

/// Occurs when a client ask for authorization (ICQ)

/// </summary>

public event AuthorizationRequestReceivedHandler AuthorizationRequestReceived;

/// <summary>

/// Raises the <see cref="AuthorizationRequestReceived"/> event

/// </summary>

/// <param name="screenname">the screenname that ask for authorization</param>

/// <param name="reason">the reason message</param>

protected internal void OnAuthorizationRequestReceived(string screenname, string reason)

{

if (AuthorizationRequestReceived != null)

AuthorizationRequestReceived(this, screenname, reason);

}

/// <summary>

/// Occurs when a client granted or declined the authorization (ICQ)

/// </summary>

public event AuthorizationResponseReceivedHandler AuthorizationResponseReceived;

/// <summary>

/// Raises the <see cref="AuthorizationResponseReceived"/> event

/// </summary>

/// <param name="screenname">the screenname that should get the response</param>

/// <param name="authorizationGranted">Determines, if the authorization will be granted or not.</param>

/// <param name="reason">The reason message</param>

protected internal void OnAuthorizationResponseReceived(string screenname, bool authorizationGranted,

string reason)

{

if (AuthorizationResponseReceived != null)

AuthorizationResponseReceived(this, screenname, authorizationGranted, reason);

}

/// <summary>

/// Occurs when a client granted the authorization for the future (ICQ)

/// </summary>

public event FutureAuthorizationReceivedHandler FutureAuthorizationReceived;

/// <summary>

/// Raises the <see cref="FutureAuthorizationReceived"/> event

/// </summary>

/// <param name="screenname">the screenname that should get the future authorization</param>

/// <param name="reason">The reason message</param>

protected internal void OnAuthorizationResponseReceived(string screenname, string reason)

{

if (FutureAuthorizationReceived != null)

FutureAuthorizationReceived(this, screenname, reason);

}

#endregion

#region Authorization manager events

/// <summary>

/// Occurs when the login sequence fails

/// </summary>

public event LoginFailedHandler LoginFailed;

/// <summary>

/// Raises the <see cref="LoginFailed"/> event

/// </summary>

/// <param name="errorcode">A <see cref="LoginErrorCode"/> describing the failure</param>

protected internal void OnLoginFailed(LoginErrorCode errorcode)

{

if (LoginFailed != null)

{

LoggedIn = false;

LoginFailed(this, errorcode);

}

}

#endregion

#region Direct Connection events

/// <summary>

/// Occurs during a file transfer to indicate transfer progression

/// </summary>

public event FileTransferProgressHandler FileTransferProgress;

/// <summary>

/// Raises the <see cref="FileTransferProgress"/> event

/// </summary>

/// <param name="cookie">The rendezvous cookie belonging to the file being transfered</param>

/// <param name="bytestransfered">The number of bytes transfered so far</param>

/// <param name="bytestotal">The total number of bytes to be transfered</param>

protected internal void OnFileTransferProgress(Cookie cookie,

uint bytestransfered, uint bytestotal)

{

if (FileTransferProgress != null)

{

FileTransferProgress(this, cookie, bytestransfered, bytestotal);

}

}

/// <summary>

/// Occurs during a DirectIM session to indicate the progress of an incoming message

/// </summary>

/// <remarks>This event will only fire if the incoming message contains attachments</remarks>

public event DirectIMIncomingMessageProgressHandler DirectIMIncomingMessageProgress;

/// <summary>

/// Occurs during a DirectIM session to indicate the progress of an outgoing message

/// </summary>

/// <remarks>This event will only fire if the outgoing message contains attachments</remarks>

public event DirectIMOutgoingMessageProgressHandler DirectIMOutgoingMessageProgress;

/// <summary>

/// Raises the DirectIM message progress events

/// </summary>

/// <param name="incoming">A value indicating whether the message is incoming or outgoing</param>

/// <param name="cookie">The rendezvous cookie belonging to the DirectIM session</param>

/// <param name="bytestransfered">The number of bytes transfered so far</param>

/// <param name="bytestotal">The total number of bytes to be transfered</param>

protected internal void OnDirectIMMessageProgress(bool incoming, Cookie cookie, uint bytestransfered,

uint bytestotal)

{

if (incoming)

{

if (DirectIMIncomingMessageProgress != null)

{

DirectIMIncomingMessageProgress(this, cookie, bytestransfered, bytestotal);

}

}

else

{

if (DirectIMOutgoingMessageProgress != null)

{

DirectIMOutgoingMessageProgress(this, cookie, bytestransfered, bytestotal);

}

}

}

/// <summary>

/// Occurs when a file transfer has been cancelled

/// </summary>

public event FileTransferCancelledHandler FileTransferCancelled;

/// <summary>

/// Raises the <see cref="FileTransferCancelled"/> event

/// </summary>

/// <param name="other">The <see cref="UserInfo"/> of the user on the other side of the connection</param>

/// <param name="cookie">The rendezvous cookie belonging to the cancelled file</param>

/// <param name="reason">The reason for the cancellation</param>

protected internal void OnFileTransferCancelled(UserInfo other, Cookie cookie, string reason)

{

if (FileTransferCancelled != null)

{

FileTransferCancelled(this, other, cookie, reason);

}

}

/// <summary>

/// Raised when a DirectIM session has been cancelled

/// </summary>

public event FileTransferCancelledHandler DirectIMSessionCancelled;

/// <summary>

/// Raises the <see cref="DirectIMSessionCancelled"/> event

/// </summary>

/// <param name="cookie">The rendezvous cookie belonging to the cancelled session</param>

/// <param name="reason">The reason for the cancellation</param>

protected internal void OnDirectIMSessionCancelled(DirectConnection conn, string reason)

{

Connections.RemoveDirectConnection(conn.Cookie);

Messages.SendDirectConnectionCancellation(conn, reason);

if (DirectIMSessionCancelled != null)

{

DirectIMSessionCancelled(this, conn.Other, conn.Cookie, reason);

}

}

/// <summary>

/// Raised when a DirectIM session has been closed

/// </summary>

public event DirectIMSessionChangedHandler DirectIMSessionClosed;

/// <summary>

/// Raises the <see cref="DirectIMSessionClosed"/>

/// </summary>

/// <param name="other">A <see cref="UserInfo"/> object describing the other session participant</param>

/// <param name="cookie">The rendezvous cookie belonging to the cancelled session</param>

protected internal void OnDirectIMSessionClosed(UserInfo other, Cookie cookie)

{

Connections.RemoveDirectConnection(cookie);

if (DirectIMSessionClosed != null)

{

DirectIMSessionClosed(this, other, cookie);

}

}

/// <summary>

/// Raised when a DirectIM session is ready for data

/// </summary>

public event DirectIMSessionChangedHandler DirectIMSessionReady;

/// <summary>

/// Raises the <see cref="DirectIMSessionReady"/> event

/// </summary>

/// <param name="other">A <see cref="UserInfo"/> object describing the other session participant</param>

/// <param name="cookie">The rendezvous cookie belonging to the session</param>

protected internal void OnDirectConnectionComplete(UserInfo other, Cookie cookie)

{

if (DirectIMSessionReady != null)

{

DirectIMSessionReady(this, other, cookie);

}

}

/// <summary>

/// Occurs when a file transfer has completed

/// </summary>

public event FileTransferCompletedHandler FileTransferCompleted;

/// <summary>

/// Raises the <see cref="FileTransferCompleted"/> event

/// </summary>

/// <param name="cookie">The rendezvous cookie belonging to the completed file</param>

protected internal void OnFileTransferCompleted(Cookie cookie)

{

if (FileTransferCompleted != null)

{

FileTransferCompleted(this, cookie);

}

}

/// <summary>

/// Occurs when a Direct IM has been received

/// </summary>

public event DirectIMReceivedHandler DirectIMReceived;

/// <summary>

/// Raises the <see cref="OscarLib_DirectIMReceived"/> event

/// </summary>

/// <param name="message">The <see cref="DirectIM"/> received</param>

protected internal void OnDirectIMReceived(DirectIM message)

{

if (DirectIMReceived != null)

{

DirectIMReceived(this, message);

}

}

#endregion

#endregion

}

}

Размещено на Allbest.ru


Подобные документы

  • Основные сведения о языках программирования и их состав. Программа для компьютера. Использование компилятора и операторы. Языки программирования высокого уровня. Концепции объектно-ориентированного программирования. Языки искусственного интеллекта.

    презентация [6,3 M], добавлен 14.08.2013

  • Основные операции с АВЛ-деревьями, добавление и удаление элемента из сбалансированного дерева. Эффективность сортировки вставкой в АВЛ–дерево и итераторы. Алгоритм реализации АВЛ–деревьев через классы объектно–ориентированного программирования.

    курсовая работа [281,1 K], добавлен 29.11.2010

  • Исследование принципов объектно-ориентированного программирования на базе языка программирования С++. Разработка программного комплекса для ведения учёта памятников города. Описание процессов сортировки, поиска, формирования статистики по памятникам.

    курсовая работа [782,4 K], добавлен 26.05.2014

  • Использование объектно-ориентированного программирования - хорошее решение при разработке крупных программных проектов. Объект и класс как основа объектно-ориентированного языка. Понятие объектно-ориентированных языков. Языки и программное окружение.

    контрольная работа [60,1 K], добавлен 17.01.2011

  • Анализ объектно-ориентированного программирования, имитирующего способы выполнения предметов. Основные принципы объектно-ориентированного программирования: инкапсуляция, наследование, полиморфизм. Понятие классов, полей, методов, сообщений, событий.

    контрольная работа [51,7 K], добавлен 22.01.2013

  • Приемы и правила объектно-ориентированного программирования с использованием языка С++. Общие принципы разработки объектно-ориентированных программ. Основные конструкции языка С++. Разработка различных программ для Windows с использованием WIN32 API.

    учебное пособие [1,6 M], добавлен 28.12.2013

  • Понятие объектно-ориентированного программирования, характеристика используемых языков. Практическая разработка средств объектно-ориентированного программирования в задачах защиты информации: программная реализация на языке С++, а также Turbo Pascal.

    курсовая работа [275,9 K], добавлен 22.12.2011

  • Создание программы с использованием принципов объектно-ориентированного программирования на языке высокого уровня С# средствами Microsoft Visual Studio 2010. Построение алгоритма реализации. Определение математического аппарата, применение его в задаче.

    курсовая работа [500,4 K], добавлен 13.01.2015

  • Возникновение, эволюция и особенности языка программирования С++. Разработка программы, которая содержит текущую информацию о книгах в библиотеке с использованием средства объектно-ориентированного программирования среды C++. Спецификация и тестирование.

    курсовая работа [159,1 K], добавлен 20.01.2013

  • Международный стандарт на язык программирования Паскаль. Приемы объектно-ориентированного программирования в Турбо Паскале. Символы языка, его алфавит. Этапы разработки программы. Понятие алгоритмов и алгоритмизации. Структура программ на Паскале.

    курсовая работа [29,8 K], добавлен 28.02.2010

Работы в архивах красиво оформлены согласно требованиям ВУЗов и содержат рисунки, диаграммы, формулы и т.д.
PPT, PPTX и PDF-файлы представлены только в архивах.
Рекомендуем скачать работу.