SmartFoxServer Silverlight API
SFSEvent Class
NamespacesSmartFoxClientAPISFSEvent
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 BasicVisual C++
public class SFSEvent
Public Class SFSEvent
public ref class SFSEvent
Members
All MembersConstructorsMethodsFields



IconMemberDescription
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
onBuddyList
onBuddyListError
onBuddyListUpdate
onBuddyPermissionRequest
onBuddyRoom
onConfigLoadFailure
onConfigLoadSuccess
onConnection
onConnectionLost
onCreateRoomError
onDebugMessage
onExtensionResponse
onJoinRoom
onJoinRoomError
onLogin
onLogout
onModeratorMessage
onObjectReceived
onPlayerSwitched
onPrivateMessage
onPublicMessage
onRandomKey
onRoomAdded
onRoomDeleted
onRoomLeft
onRoomListUpdate
onRoomVariablesUpdate
onRoundTripResponse
onSpectatorSwitched
onUserCountChange
onUserEnterRoom
onUserLeaveRoom
onUserVariablesUpdate
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)