Exemple #1
0
        void EngineRoomVariableUpdate(object sender, RoomVariableUpdateArgs e)
        {
            switch (e.Event.Action)
            {
            case RoomVariableUpdateAction.Add:
                RoomManager.AddRoomVariable(e.Event.RoomId, e.Event.Name, e.Event.Value);
                break;

            case RoomVariableUpdateAction.Delete:
                RoomManager.DeleteRoomVariable(e.Event.RoomId, e.Event.Name);
                break;

            case RoomVariableUpdateAction.Update:
                RoomManager.UpdateRoomVariable(e.Event.RoomId, e.Event.Name, e.Event.Value);
                break;
            }
        }
 protected virtual void OnRoomVariableUpdate(RoomVariableUpdateArgs args)
 {
     var func = RoomVariableUpdate;
     if (func != null)
     {
         func(this, args);
     }
 }
        void EngineRoomVariableUpdate(object sender, RoomVariableUpdateArgs e)
        {
            switch (e.Event.Action)
            {
                case RoomVariableUpdateAction.Add:
                    RoomManager.AddRoomVariable(e.Event.RoomId, e.Event.Name, e.Event.Value);
                    break;

                case RoomVariableUpdateAction.Delete:
                    RoomManager.DeleteRoomVariable(e.Event.RoomId, e.Event.Name);
                    break;

                case RoomVariableUpdateAction.Update:
                    RoomManager.UpdateRoomVariable(e.Event.RoomId, e.Event.Name, e.Event.Value);
                    break;
            }
        }