Пример #1
0
 /// <summary>
 /// Called after Decide has made its choice, or, as usual for ExpressionMembers, after user edited the value through a Dialog.
 /// For checks, SetValue must change the attributes/etc of the statement according to the newly chosen value
 /// <example>If you chose "Use GM ...", SetValue will set "use_gm_..." attribute to "" if it was null</example>
 /// </summary>
 protected override void SetValueInternal(ExpressionMemberContainer container, string value)
 {
     if (value == Choices[0]) //name
     {
         container.SetAttribute("use_gm_selection", null);
         container.SetAttribute("player_slot", null);
         container.SetAttributeIfNull("name", "");
     }
     if (value == Choices[1]) //usegm
     {
         if (container.GetAttribute("use_gm_selection") == null)
         {
             container.SetAttribute("use_gm_selection", "");
         }
         container.SetAttribute("name", null);
         container.SetAttribute("player_slot", null);
     }
     if (value == Choices[2]) //useslot
     {
         container.SetAttribute("use_gm_selection", null);
         container.SetAttribute("name", null);
         container.SetAttributeIfNull("player_slot", "");
     }
     base.SetValueInternal(container, value);
 }
        /// <summary>
        /// Called after Decide has made its choice, or, as usual for ExpressionMembers, after user edited the value through a Dialog.
        /// For checks, SetValue must change the attributes/etc of the statement according to the newly chosen value
        /// <example>If you chose "Use GM ...", SetValue will set "use_gm_..." attribute to ""</example>
        /// </summary>
        protected override void SetValueInternal(ExpressionMemberContainer container, string value)
        {
            if (value == Choices[(int)Choice.RandomInt])
            {
                container.SetAttributeIfNull("randomIntLow", "0");
                container.SetAttributeIfNull("randomIntHigh", "0");
                container.SetAttribute("randomFloatLow", null);
                container.SetAttribute("randomFloatHigh", null);
                container.SetAttribute("value", null);
            }
            if (value == Choices[(int)Choice.RandomFloat])
            {
                container.SetAttribute("randomIntLow", null);
                container.SetAttribute("randomIntHigh", null);
                container.SetAttributeIfNull("randomFloatLow", "0.0");
                container.SetAttributeIfNull("randomFloatHigh", "0.0");
                container.SetAttribute("value", null);
            }
            if (value == Choices[(int)Choice.Exact])
            {
                container.SetAttribute("randomIntLow", null);
                container.SetAttribute("randomIntHigh", null);
                container.SetAttribute("randomFloatLow", null);
                container.SetAttribute("randomFloatHigh", null);
                container.SetAttributeIfNull("value", "0.0");
            }

            base.SetValueInternal(container, value);

            if (container.GetAttribute("integer") != null && container.GetAttribute("integer") != "yes")
            {
                container.SetAttribute("integer", null);
            }
        }
        /// <summary>
        /// Called after Decide has made its choice, or, as usual for ExpressionMembers, after user edited the value through a Dialog.
        /// For checks, SetValue must change the attributes/etc of the statement according to the newly chosen value
        /// <example>If you chose "Use GM ...", SetValue will set "use_gm_..." attribute to ""</example>
        /// </summary>
        protected override void SetValueInternal(ExpressionMemberContainer container, string value)
        {
            if (value == Choices[HullID]) //hullID
            {
                container.SetAttributeIfNull("hullID", "");
                container.SetAttribute("hullKeys", null);
                container.SetAttribute("raceKeys", null);
            }
            if (value == Choices[HullRaceKey]) //hullKeys / raceKeys
            {
                container.SetAttribute("hullID", null);
                container.SetAttributeIfNull("hullKeys", "");
                container.SetAttributeIfNull("raceKeys", "");
            }

            base.SetValueInternal(container, value);
        }
        /// <summary>
        /// Called after Decide has made its choice, or, as usual for ExpressionMembers, after user edited the value through a Dialog.
        /// For checks, SetValue must change the attributes/etc of the statement according to the newly chosen value
        /// <example>If you chose "Use GM ...", SetValue will set "use_gm_..." attribute to ""</example>
        /// </summary>
        protected override void SetValueInternal(ExpressionMemberContainer container, string value)
        {
            if (value == Choices[0])              // anywhere/anywhere
            {
                container.SetAttribute("value1", null);
                container.SetAttribute("value2", null);
            }
            if (value == Choices[1])              // anywhere/limited
            {
                container.SetAttribute("value1", null);
                container.SetAttributeIfNull("value2", "0");
            }
            if (value == Choices[2])              // limited/limited
            {
                container.SetAttributeIfNull("value1", "0");
                container.SetAttributeIfNull("value2", "0");
            }

            base.SetValueInternal(container, value);
        }
Пример #5
0
        /// <summary>
        /// Called after Decide has made its choice, or, as usual for ExpressionMembers, after user edited the value through a Dialog.
        /// For checks, SetValue must change the attributes/etc of the statement according to the newly chosen value
        /// <example>If you chose "Use GM ...", SetValue will set "use_gm_..." attribute to ""</example>
        /// </summary>
        protected override void SetValueInternal(ExpressionMemberContainer container, string value)
        {
            if (value == Choices[0])             //id
            {
                container.SetAttribute("value", null);
            }
            else                                                        //text
            {
                container.SetAttributeIfNull("value", "0");
            }

            base.SetValueInternal(container, value);
        }
        /// <summary>
        /// Called after Decide has made its choice, or, as usual for ExpressionMembers, after user edited the value through a Dialog.
        /// For checks, SetValue must change the attributes/etc of the statement according to the newly chosen value
        /// <example>If you chose "Use GM ...", SetValue will set "use_gm_..." attribute to ""</example>
        /// </summary>
        protected override void SetValueInternal(ExpressionMemberContainer container, string value)
        {
            if (value == Choices[0])             //point
            {
                container.SetAttribute("fleetnumber", null);
            }
            else
            {
                container.SetAttributeIfNull("fleetnumber", "0.0");
            }

            base.SetValueInternal(container, value);
        }
        /// <summary>
        /// Called after Decide has made its choice, or, as usual for ExpressionMembers, after user edited the value through a Dialog.
        /// For checks, SetValue must change the attributes/etc of the statement according to the newly chosen value
        /// <example>If you chose "Use GM ...", SetValue will set "use_gm_..." attribute to ""</example>
        /// </summary>
        protected override void SetValueInternal(ExpressionMemberContainer container, string value)
        {
            if (value == Choices[0])             //point
            {
                container.SetAttribute("targetName", null);
            }
            if (value == Choices[1])             // name
            {
                container.SetAttributeIfNull("targetName", " ");
            }

            base.SetValueInternal(container, value);
        }
Пример #8
0
 /// <summary>
 /// Called after Decide has made its choice, or, as usual for ExpressionMembers, after user edited the value through a Dialog.
 /// For checks, SetValue must change the attributes/etc of the statement according to the newly chosen value
 /// <example>If you chose "Use GM ...", SetValue will set "use_gm_..." attribute to ""</example>
 /// </summary>
 protected override void SetValueInternal(ExpressionMemberContainer container, string value)
 {
     if (value == Choices[0])             //no fake shields
     {
         container.SetAttribute("fakeShieldsFront", null);
         container.SetAttribute("fakeShieldsRear", null);
     }
     if (value == Choices[1])             //fake front shields
     {
         container.SetAttributeIfNull("fakeShieldsFront", "0");
         container.SetAttribute("fakeShieldsRear", null);
     }
     if (value == Choices[2])             //fake rear shields
     {
         container.SetAttribute("fakeShieldsFront", null);
         container.SetAttributeIfNull("fakeShieldsRear", "0");
     }
     if (value == Choices[3])             //fake front shields
     {
         container.SetAttributeIfNull("fakeShieldsFront", "0");
         container.SetAttributeIfNull("fakeShieldsRear", "0");
     }
     base.SetValueInternal(container, value);
 }
Пример #9
0
        /// <summary>
        /// Called after Decide has made its choice, or, as usual for ExpressionMembers, after user edited the value through a Dialog.
        /// For checks, SetValue must change the attributes/etc of the statement according to the newly chosen value
        /// <example>If you chose "Use GM ...", SetValue will set "use_gm_..." attribute to ""</example>
        /// </summary>
        protected override void SetValueInternal(ExpressionMemberContainer container, string value)
        {
            if (value == Choices[0])             //line
            {
                container.SetAttribute("radius", null);
            }
            else             //circle
            {
                container.SetAttributeIfNull("radius", "1");
            }

            if (value == Choices[2])
            {
                container.SetAttributeIfNull("startAngle", "0");
                container.SetAttributeIfNull("endAngle", "0");
            }
            if (value == Choices[1])
            {
                container.SetAttribute("startAngle", null);
                container.SetAttribute("endAngle", null);
            }

            base.SetValueInternal(container, value);
        }