SmartFoxServer Silverlight API
SFSEvent Class
Namespaces ► SmartFoxClientAPI ► SFSEvent
SFSEvent is the class representing all events dispatched by the SmartFoxClient instance.
The SFSEvent class uses delegates to callback on specific event types.
Declaration Syntax

C# | Visual Basic | Visual C++

    public class SFSEvent

    Public Class SFSEvent

    public ref class SFSEvent

Members

All Members | Constructors | Methods | Fields
Public Protected | Instance Static | Declared Inherited

Icon | Member | Description
--- | --- | ---
| SFSEvent(String, Dictionary<(Of <(String, Object>)>)) | SFSEvent contructor.
| Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| Finalize()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
| GetHashCode()()() | Serves as a hash function for a particular type. (Inherited from Object.)
| GetParameter(String) | Get a specific parameter for the event
| GetType()()() | Get type of event
| MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
| onAdminMessage | SFSEvent..::.OnAdminMessageDelegate
| onBuddyList | SFSEvent..::.OnBuddyListDelegate
| onBuddyListError | SFSEvent..::.OnBuddyListErrorDelegate
| onBuddyListUpdate | SFSEvent..::.OnBuddyListUpdateDelegate
| onBuddyPermissionRequest | SFSEvent..::.OnBuddyPermissionRequestDelegate
| onBuddyRoom | SFSEvent..::.OnBuddyRoomDelegate
| onConfigLoadFailure | SFSEvent..::.OnConfigLoadFailureDelegate
| onConfigLoadSuccess | SFSEvent..::.OnConfigLoadSuccessDelegate
| onConnection | SFSEvent..::.OnConnectionDelegate
| onConnectionLost | SFSEvent..::.OnConnectionLostDelegate
| onCreateRoomError | SFSEvent..::.OnCreateRoomErrorDelegate
| onDebugMessage | SFSEvent..::.OnDebugMessageDelegate
| onExtensionResponse | SFSEvent..::.OnExtensionResponseDelegate
| onJoinRoom | SFSEvent..::.OnJoinRoomDelegate
| onJoinRoomError | SFSEvent..::.OnJoinRoomErrorDelegate
| onLogin | SFSEvent..::.OnLoginDelegate
| onLogout | SFSEvent..::.OnLogoutDelegate
| onModeratorMessage | SFSEvent..::.OnModeratorMessageDelegate
| onObjectReceived | SFSEvent..::.OnObjectReceivedDelegate
| onPlayerSwitched | SFSEvent..::.OnPlayerSwitchedDelegate
| onPrivateMessage | SFSEvent..::.OnPrivateMessageDelegate
| onPublicMessage | SFSEvent..::.OnPublicMessageDelegate
| onRandomKey | SFSEvent..::.OnRandomKeyDelegate
| onRoomAdded | SFSEvent..::.OnRoomAddedDelegate
| onRoomDeleted | SFSEvent..::.OnRoomDeletedDelegate
| onRoomLeft | SFSEvent..::.OnRoomLeftDelegate
| onRoomListUpdate | SFSEvent..::.OnRoomListUpdateDelegate
| onRoomVariablesUpdate | SFSEvent..::.OnRoomVariablesUpdateDelegate
| onRoundTripResponse | SFSEvent..::.OnRoundTripResponseDelegate
| onSpectatorSwitched | SFSEvent..::.OnSpectatorSwitchedDelegate
| onUserCountChange | SFSEvent..::.OnUserCountChangeDelegate
| onUserEnterRoom | SFSEvent..::.OnUserEnterRoomDelegate
| onUserLeaveRoom | SFSEvent..::.OnUserLeaveRoomDelegate
| onUserVariablesUpdate | SFSEvent..::.OnUserVariablesUpdateDelegate
| ToString()()() | Returns a String that represents the current Object. (Inherited from Object.)

Remarks

Version:
1.0.0

Author:
Thomas Hentschel Lund
http://www.fullcontrol.dk
sfs-api@fullcontrol.dk

(c) 2008-2009 gotoAndPlay()
http://www.smartfoxserver.com
http://www.gotoandplay.it
Examples
The following example show a generic usage of a SFSEvent. Please refer to the specific events for the return signature/parameters.
CopyC#

       using SmartFoxClientAPI;
    using SmartFoxClientAPI.Data;
    ...(+ all the System.* references)

    public partial class Page : UserControl
       {
          SmartFoxClient smartFox;

          public function MyTest()
          {
              // Create instance
              smartFox = new SmartFoxClient();

              // Add event handler for connection
              SFSEvent.onConnection += OnConnection;

              // Connect to server
              smartFox.Connect("127.0.0.1", 4502)
          }

          // Handle connection event
          public void OnConnection(bool success, string error)
          {
              if (success)
                  Debug.WriteLine("Great, successfully connected!");
              else
                  Debug.WriteLine("Ouch, connection failed!");
          }
       }

NOTE: in the following examples, smartFox always indicates a SmartFoxClient instance.
Inheritance Hierarchy

Object
| SFSEvent

Assembly: SmartFoxClientAPI_Silverlight (Module: SmartFoxClientAPI_Silverlight) Version: 1.0.0.0 (1.0.0.0)