public AttributePointSetting(FixtureAttribute attribute)
 {
     this.Attribute = attribute;
     this._value    = 0;
     this.Snap      = true; // TODO: Should snap be on by default?
     this._active   = false;
 }
Example #2
0
 // TODO: Change name to ActivatePreset ?
 public void ActivateCurrentPreset(AttributePreset preset)
 {
     if (_active)
     {
         foreach (FixtureWrapperFAOverride fixtureWrapper in _fixtureWrappers)
         {
             if (fixtureWrapper.IsAffected)
             {
                 foreach (AttributePresetSetting setting in preset.AttributePointSettings)
                 {
                     if (setting.Active)
                     {
                         FixtureAttribute containsSameType = null;
                         foreach (FixtureAttribute attr in fixtureWrapper.Fixture.Attributes)
                         {
                             if (attr.Type == setting.Type)
                             {
                                 containsSameType = attr;
                                 break;
                             }
                         }
                         if (containsSameType != null)
                         {
                             containsSameType.SetOverride(true);
                             containsSameType.SetLevel(setting.Value, "_FA_OVERRIDE_nohtp_");
                         }
                     }
                 }
             }
         }
     }
 }
 public AttributePointSetting(FixtureAttribute attribute)
 {
     this.Attribute = attribute;
     this._value = 0;
     this.Snap = true;  // TODO: Should snap be on by default?
     this._active = false;
 }
Example #4
0
 public void AddAttribute(FixtureAttribute attr)
 {
     if (attr.Type == ATTRIBUTE_TYPE.PAN_COARSE || attr.Type == ATTRIBUTE_TYPE.PAN_FINE || attr.Type == ATTRIBUTE_TYPE.TILT_COARSE || attr.Type == ATTRIBUTE_TYPE.TILT_FINE)
     {
         MovingAttributes.Add(attr);
     }
     else
     {
         Attributes.Add(attr);
     }
 }
Example #5
0
        public void SaveFocusPoint(string Name)
        {
            // Save a focus point as a new attribute
            // (and also add it to _focusPoints)

            List <Photon> thePhotons = new List <Photon>();
            int           panCoarse  = (int)currentPan / 256;
            int           panFine    = (int)currentPan % 256;
            int           tiltCoarse = (int)currentTilt / 256;
            int           tiltFine   = (int)currentTilt % 256;

            thePhotons.Add(new Photon(startChannel + 4, panCoarse));
            thePhotons.Add(new Photon(startChannel + 5, panFine));
            thePhotons.Add(new Photon(startChannel + 6, tiltCoarse));
            thePhotons.Add(new Photon(startChannel + 7, tiltFine));
            thePhotons.Add(new Photon(startChannel + 2, currentColor));
            thePhotons.Add(new Photon(startChannel + 3, currentGobo));

            FixtureAttribute newFocusPoint = new FixtureAttribute(ATTRIBUTE_TYPE.OTHER, Name, thePhotons, this);

            attributes.Add(newFocusPoint);
            _focusPoints.Add(newFocusPoint);
        }
Example #6
0
 // To restore one from a file
 public BigPhoton(SerializationInfo info, StreamingContext ctxt)
 {
     _attribute = (FixtureAttribute)info.GetValue("FixtureAttribute", typeof(FixtureAttribute));
     _level = info.GetInt32("Level");
 }
Example #7
0
 // CONSTRUCTORS
 public BigPhoton(FixtureAttribute fixtureAttribute, int level)
 {
     _attribute = fixtureAttribute;
     _level = level;
 }
        public void SaveFocusPoint(string Name)
        {
            // Save a focus point as a new attribute
            // (and also add it to _focusPoints)

            List<Photon> thePhotons = new List<Photon>();
            int panCoarse = (int)currentPan / 256;
            int panFine = (int)currentPan % 256;
            int tiltCoarse = (int)currentTilt / 256;
            int tiltFine = (int)currentTilt % 256;

            thePhotons.Add(new Photon(startChannel + 4, panCoarse));
            thePhotons.Add(new Photon(startChannel + 5, panFine));
            thePhotons.Add(new Photon(startChannel + 6, tiltCoarse));
            thePhotons.Add(new Photon(startChannel + 7, tiltFine));
            thePhotons.Add(new Photon(startChannel + 2, currentColor));
            thePhotons.Add(new Photon(startChannel + 3, currentGobo));

            FixtureAttribute newFocusPoint = new FixtureAttribute(ATTRIBUTE_TYPE.OTHER, Name, thePhotons, this);
            attributes.Add(newFocusPoint);
            _focusPoints.Add(newFocusPoint);
        }
Example #9
0
 public void AddAttribute(FixtureAttribute attr)
 {
     if (attr.Type == ATTRIBUTE_TYPE.PAN_COARSE || attr.Type == ATTRIBUTE_TYPE.PAN_FINE || attr.Type == ATTRIBUTE_TYPE.TILT_COARSE || attr.Type == ATTRIBUTE_TYPE.TILT_FINE)
     {
         MovingAttributes.Add(attr);
     }
     else
     {
         Attributes.Add(attr);
     }
 }
Example #10
0
 // To restore one from a file
 public BigPhoton(SerializationInfo info, StreamingContext ctxt)
 {
     _attribute = (FixtureAttribute)info.GetValue("FixtureAttribute", typeof(FixtureAttribute));
     _level     = info.GetInt32("Level");
 }
Example #11
0
 // CONSTRUCTORS
 public BigPhoton(FixtureAttribute fixtureAttribute, int level)
 {
     _attribute = fixtureAttribute;
     _level     = level;
 }