context: #if XNATOUCH
  using XnaTouch.Framework;
  using XnaTouch.Framework.Audio;
  using XnaTouch.Framework.Content;
  using XnaTouch.Framework.GamerServices;
  using XnaTouch.Framework.Graphics;
  using XnaTouch.Framework.Input;
  using XnaTouch.Framework.Media;
  using XnaTouch.Framework.Net;
  using XnaTouch.Framework.Storage;
  #else
  using Microsoft.Xna.Framework;
  using Microsoft.Xna.Framework.Audio;
  using Microsoft.Xna.Framework.Content;
  
  using Microsoft.Xna.Framework.Graphics;
  using Microsoft.Xna.Framework.Input;
  using Microsoft.Xna.Framework.Media;
  
  
  #endif
  
  using System;
  using System.ComponentModel;
  using System.Collections.Generic;
  using System.Text;
  using System.Xml.Serialization;
  using IceCream.Drawing;
  using IceCream.Attributes;
  
  namespace IceCream.SceneItems.ParticlesClasses
  {
      [Serializable]
      public class ParticleType
      {
          #region Fields
  
          private Material _material;
          private Vector2 _texturePivot;
          private Emitter _parent;               
          private List<Particle> _particles = new List<Particle>();
          private String _name;
          // the queue of free particles for recycling
          private Queue<Particle> _freeParticles;
          private float _emissionTimerAccumulator;
  
          // settings
          #if WINDOWS
          [CategoryAttribute("Test"), DescriptionAttribute("Name of the Particle Type")]
          #endif
          public String Name
          {
              get { return _name; }
              set { _name = value; }
          }
  
          private DrawingBlendingType _blendingType;
          public DrawingBlendingType BlendingType
          {
              get { return _blendingType; }
              set { _blendingType = value; }
          }
          private bool _useEmitterAngle;
          public bool UseEmitterAngle
          {
              get { return _useEmitterAngle; }
              set { _useEmitterAngle = value; }
          }
          private bool _keepAspectRatio;
          public bool KeepAspectRatio
          {
              get { return _keepAspectRatio; }
              set { _keepAspectRatio = value; }
          }
          private bool _attachParticlesToEmitter;
          public bool AttachParticlesToEmitter
          {
              get { return _attachParticlesToEmitter; }
              set { _attachParticlesToEmitter = value; }
          }
          private ParticleOrientationType _particleOrientationType;
          public ParticleOrientationType ParticleOrientationType
          {
              get { return _particleOrientationType; }
              set { _particleOrientationType = value; }
          }
          private float _fixedParticleOrientationAngle;
          public float FixedParticleOrientationAngle
          {
              get { return _fixedParticleOrientationAngle; }
              set { _fixedParticleOrientationAngle = value; }
          }
          private bool _useSingleParticle;
          public bool UseSingleParticle
          {
              get { return _useSingleParticle; }
              set 
              {                 
                  if (value != _useSingleParticle)
                  {
                      _singleParticleEmitted = false;
                      _useSingleParticle = value;
                  }
              }
          }
          private bool _singleParticleEmitted;
  
          // animation and/or tile props
          private int _animationFrameDelay = -1;
          public int AnimationFrameDelay
          {
              get { return _animationFrameDelay; }
              set { _animationFrameDelay = value; }
          }
          private bool _animationLoop = true;
          public bool AnimationLoop
          {
              get { return _animationLoop; }
              set { _animationLoop = value; }
          }
          private int _tileDefault = 0;
          public int TileDefault
          {
              get { return _tileDefault; }
              set { _tileDefault = value; }
          }
          private bool _tileUseRandom = false;
          public bool TileUseRandom
          {
              get { return _tileUseRandom; }
              set { _tileUseRandom = value; }
          }
          private int _tileWidth = 0;
          public int TileWidth
          {
              get { return _tileWidth; }
              set { _tileWidth = value; }
          }
          private int _tileHeight = 0;
          public int TileHeight
          {
              get { return _tileHeight; }
              set { _tileHeight = value; }
          }
          private int _tileCols = 0;
          public int TileCols
          {
              get { return _tileCols; }
              set { _tileCols = value; }
          }
          private int _tileRows = 0;
          public int TileRows
          {
              get { return _tileRows; }
              set { _tileRows = value; }
          }
          private int _tileTotalOffset = 0;
          public int TileTotalOffset
          {
              get { return _tileTotalOffset; }
              set { _tileTotalOffset = value; }
          }
          
          // emitter set properties
          public float _emitterEmissionAngle;
          public float _emitterEmissionRange;
  
          #region Particles Settings
  
          // particles properties
          private LinearProperty _life;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty Life
          {
              get { return _life; }
              set { _life = value; }
          }
          private LinearProperty _quantity;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty Quantity
          {
              get { return _quantity; }
              set { _quantity = value; }
          }
          private LinearProperty _width;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty Width
          {
              get { return _width; }
              set { _width = value; }
          }
          private LinearProperty _height;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty Height
          {
              get { return _height; }
              set { _height = value; }
          }
          private LinearProperty _velocity;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty Velocity
          {
              get { return _velocity; }
              set { _velocity = value; }
          }
          private LinearProperty _weight;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty Weight
          {
              get { return _weight; }
              set { _weight = value; }
          }
          private LinearProperty _spin;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty Spin
          {
              get { return _spin; }
              set { _spin = value; }
          }
          private LinearProperty _motionRandom;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty MotionRandom
          {
              get { return _motionRandom; }
              set { _motionRandom = value; }
          }
          private LinearProperty _opacity;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty Opacity
          {
              get { return _opacity; }
              set { _opacity = value; }
          }
          private LinearProperty _emissionAngle;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty EmissionAngle
          {
              get { return _emissionAngle; }
              set { _emissionAngle = value; }
          }
          private LinearProperty _emissionRange;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty EmissionRange
          {
              get { return _emissionRange; }
              set { _emissionRange = value; }
          }
          private LinearProperty _redTint;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty RedTint
          {
              get { return _redTint; }
              set { _redTint = value; }
          }
          private LinearProperty _greenTint;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty GreenTint
          {
              get { return _greenTint; }
              set { _greenTint = value; }
          }
          private LinearProperty _blueTint;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty BlueTint
          {
              get { return _blueTint; }
              set { _blueTint = value; }
          }        
  
          #endregion
  
          #region Particles Variation Settings
  
          // random value variation
          private LinearProperty _lifeVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty LifeVariation
          {
              get { return _lifeVariation; }
              set { _lifeVariation = value; }
          }
          private LinearProperty _quantityVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty QuantityVariation
          {
              get { return _quantityVariation; }
              set { _quantityVariation = value; }
          }
          private LinearProperty _widthVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty WidthVariation
          {
              get { return _widthVariation; }
              set { _widthVariation = value; }
          }
          private LinearProperty _heightVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty HeightVariation
          {
              get { return _heightVariation; }
              set { _heightVariation = value; }
          }
          private LinearProperty _velocityVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty VelocityVariation
          {
              get { return _velocityVariation; }
              set { _velocityVariation = value; }
          }
          private LinearProperty _weightVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty WeightVariation
          {
              get { return _weightVariation; }
              set { _weightVariation = value; }
          }
          private LinearProperty _spinVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty SpinVariation
          {
              get { return _spinVariation; }
              set { _spinVariation = value; }
          }
          private LinearProperty _motionRandomVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty MotionRandomVariation
          {
              get { return _motionRandomVariation; }
              set { _motionRandomVariation = value; }
          }
          private LinearProperty _opacityVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty OpacityVariation
          {
              get { return _opacityVariation; }
              set { _opacityVariation = value; }
          }
          private LinearProperty _redTintVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty RedTintVariation
          {
              get { return _redTintVariation; }
              set { _redTintVariation = value; }
          }
          private LinearProperty _greenTintVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty GreenTintVariation
          {
              get { return _greenTintVariation; }
              set { _greenTintVariation = value; }
          }
          private LinearProperty _blueTintVariation;
  #if WINDOWS 
          [BrowsableAttribute(false)] 
  #endif
          public LinearProperty BlueTintVariation
          {
              get { return _blueTintVariation; }
              set { _blueTintVariation = value; }
          }
  
          #endregion
  
          // overlife value variation
          public OverLifeSettings overLifeSettings;
  
          #endregion
  
          #region Properties
  
          #if WINDOWS
          [BrowsableAttribute(false),XmlIgnore()]
          #endif
          public Emitter Parent
          {
              get { return _parent; }
  
gt:             set { _parent = value; }