示例#1
0
        public void SetText(ParamTypes type, bool down)
        {
            if (!Object.op_Inequality((Object)this.Text, (Object)null))
            {
                return;
            }
            string str1 = type.ToString();

            if (string.IsNullOrEmpty(str1))
            {
                return;
            }
            StringBuilder stringBuilder1 = GameUtility.GetStringBuilder();

            stringBuilder1.Append("quest.BUFF_");
            stringBuilder1.Append(str1);
            string        str2           = LocalizedText.Get(stringBuilder1.ToString());
            StringBuilder stringBuilder2 = GameUtility.GetStringBuilder();

            stringBuilder2.Append(str2);
            stringBuilder2.Append(' ');
            if (down)
            {
                stringBuilder2.Append(LocalizedText.Get("quest.EFF_DOWN"));
                this.Text.BottomColor = GameSettings.Instance.Debuff_TextBottomColor;
                this.Text.TopColor    = GameSettings.Instance.Debuff_TextTopColor;
            }
            else
            {
                stringBuilder2.Append(LocalizedText.Get("quest.EFF_UP"));
                this.Text.BottomColor = GameSettings.Instance.Buff_TextBottomColor;
                this.Text.TopColor    = GameSettings.Instance.Buff_TextTopColor;
            }
            this.Text.text = stringBuilder2.ToString();
        }
示例#2
0
        protected override string Execute(CodeActivityContext context)
        {
            try
            {
                int      userId      = UserId.Get <int>(context);
                int      workspaceId = WorkspaceId.Get <int>(context);
                int      fpid        = FPId.Get <int>(context);
                int      subsystemId = SubsystemId.Get <int>(context);
                string   reportName  = ReportName.Get <string>(context);
                string[] paramTypes  = new[] { ParamTypes.Get <string>(context) };
                string[] paramValues = new[] { ParamValues.Get <string>(context) };

                string outputFileName = PrintReport(userId, workspaceId, fpid, subsystemId, reportName, paramTypes, paramValues, out string exceptionStr);

                if (outputFileName == null)
                {
                    return(exceptionStr);
                }

                return(Convert.ToBase64String(File.ReadAllBytes(outputFileName)));
            }
            catch (Exception ex)
            {
                EventLog.WriteEntry("BasePrint.TadbirPrint", ex.Message);
                return("-4");  //ex.Message;
                //throw ex;
            }
        }
示例#3
0
        private void AddInternal <T>(T value, ParamTypes typeMarker, UInt32 elementSize, Boolean specifySize = false, Boolean skipParamCount = false)
        {
            if (_Disposed)
            {
                throw new ObjectDisposedException(ToString());
            }
            _ReturnByteArray = null;
            while (_DataPos + elementSize + (specifySize ? 5 : 1) >= _Data.Length)
            {
                ExpandDataArray();
            }
            _Data[_DataPos++] = (Byte)(typeMarker);
            if (specifySize)
            {
                BitConverter.GetBytes(elementSize).CopyTo(_Data, (Int32)_DataPos);
                _DataPos += 4;
            }
            GetBytes(typeMarker, value, _Data, (Int32)_DataPos);

            _DataPos += elementSize;
            if (!skipParamCount)
            {
                _ParamCount++;
            }
        }
示例#4
0
        private string getInternalLangNameForParamType(ParamTypes type)
        {
            switch (type)
            {
            case ParamTypes.NullParam: return("GenericTileParams");

            case ParamTypes.CoinParam: return("CoinParams");

            case ParamTypes.QuestionParam: return("QuestionParams");

            case ParamTypes.BrickParam: return("BrickParams");

            case ParamTypes.ExplodableParam: return("ExplodableParams");

            case ParamTypes.HarmfulParam: return("HarmfulTileParams");

            case ParamTypes.ConveyorParam: return("ConveyorParams");

            case ParamTypes.DonutParam: return("DonutParams");

            case ParamTypes.ClimbParam: return("FenceParams");

            case ParamTypes.SlopeParam: return("SlopeParams");

            case ParamTypes.PipeParam: return("PipeDoorParams");

            case ParamTypes.PartialBlockParam: return("PartialBlockParams");
            }

            return(null);
        }
示例#5
0
            public Param(SkillData groupSkill, ConceptCardData currentCardData, int levelCap, int awakeCountCap, int prevLevel, int prevAwakeCount, bool includeMaxPowerUp)
            {
                this.skilName             = groupSkill.Name;
                this.prevParam            = new BaseStatus();
                this.prevParamMul         = new BaseStatus();
                this.currentParam         = new BaseStatus();
                this.currentParamMul      = new BaseStatus();
                this.prevParamBonus       = new BaseStatus();
                this.prevParamBonusMul    = new BaseStatus();
                this.currentParamBonus    = new BaseStatus();
                this.currentParamBonusMul = new BaseStatus();
                ConceptCardParam.GetSkillAllStatus(groupSkill.SkillID, levelCap, (int)currentCardData.Lv, ref this.currentParam, ref this.currentParamMul);
                ConceptCardParam.GetSkillAllStatus(groupSkill.SkillID, levelCap, prevLevel, ref this.prevParam, ref this.currentParamMul);
                SkillPowerUpResultContent.Param.GetBonusStatus(groupSkill, currentCardData, levelCap, awakeCountCap, (int)currentCardData.Lv, (int)currentCardData.AwakeCount, ref this.currentParamBonus, ref this.currentParamBonusMul, includeMaxPowerUp);
                SkillPowerUpResultContent.Param.GetBonusStatus(groupSkill, currentCardData, levelCap, awakeCountCap, prevLevel, prevAwakeCount, ref this.prevParamBonus, ref this.currentParamBonusMul, false);
                int length = Enum.GetValues(typeof(ParamTypes)).Length;

                for (int index1 = 0; index1 < length; ++index1)
                {
                    if (index1 != 2)
                    {
                        ParamTypes index2 = (ParamTypes)index1;
                        if ((int)this.prevParamBonus[index2] != (int)this.currentParamBonus[index2])
                        {
                            this.typeList.Add(index2);
                        }
                        if ((int)this.prevParamBonusMul[index2] != (int)this.currentParamBonusMul[index2])
                        {
                            this.typeListMul.Add(index2);
                        }
                    }
                }
            }
示例#6
0
        private void AddToListInternal <T>(IReadOnlyCollection <T> list, ParamTypes typeMarker, UInt32 elementSize)
        {
            if (_Disposed)
            {
                throw new ObjectDisposedException(ToString());
            }
            if (list == null || list.Count == 0 || list.Count > UInt16.MaxValue)
            {
                throw new ArgumentOutOfRangeException("list", "Null, empty and > UInt16.MaxValue element lists cannot be added");
            }
            _ReturnByteArray = null;
            UInt32 byteLength = 3 + (elementSize * (UInt32)list.Count);

            while (_DataPos + byteLength >= _Data.Length)
            {
                ExpandDataArray();
            }
            _Data[_DataPos++] = (Byte)(((Byte)typeMarker) | 128);
            BitConverter.GetBytes((UInt16)list.Count).CopyTo(_Data, (Int32)_DataPos);
            _DataPos += 2;
            foreach (T f in list)
            {
                _GetBytesMethods[typeof(T)](f, _Data, (Int32)_DataPos);
                _DataPos += elementSize;
            }
            _ParamCount++;
        }
示例#7
0
        private void useParamType(ParamTypes type)
        {
            if (type != currentParamType)
            {
                DataUpdateFlag++;

                currentParamType = type;

                // Show the appropriate panel, and populate it appropriately
                paramsListBox.Visible          = false;
                pipeDoorParamPanel.Visible     = false;
                partialBlockParamPanel.Visible = false;

                if (type == ParamTypes.PipeParam)
                {
                    pipeDoorParamPanel.Visible = true;
                }
                else if (type == ParamTypes.PartialBlockParam)
                {
                    partialBlockParamPanel.Visible = true;
                }
                else
                {
                    paramsListBox.Visible = true;

                    populateListBox(paramsListBox, 0x100, getInternalLangNameForParamType(type));
                }

                DataUpdateFlag--;
            }
        }
示例#8
0
 public int GetSortParam(ParamTypes types)
 {
     if (this.mFixStatus == null)
     {
         return(0);
     }
     return((int)this.mFixStatus[types]);
 }
示例#9
0
 public int CalcBuffEffectValue(ESkillTiming timing, ParamTypes type, int src, SkillEffectTargets target = SkillEffectTargets.Target)
 {
     if (timing != this.Timing)
     {
         return(src);
     }
     return(this.CalcBuffEffectValue(type, src, target));
 }
示例#10
0
 public void SetParameters(DataNode child, CSharpClassWriter classWriter)
 {
     foreach (var node in child.Children)
     {
         classWriter.AddDependentType(node[Consts.ParamType]);
         ParamNames.Add(node.Name);
         ParamTypes.Add(node[Consts.ParamType]);
         ByRef.Add(node.Is(Consts.IsRef));
     }
 }
示例#11
0
 public void SetValues_Restrict(BaseStatus paramBaseAdd, BaseStatus paramBaseMul, BaseStatus paramBonusAdd, BaseStatus paramBonusMul, bool new_param_only)
 {
     if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ListItem, (UnityEngine.Object)null))
     {
         DebugUtility.LogWarning(((Component)this).get_gameObject().GetPath((GameObject)null) + ": ListItem not set");
     }
     else
     {
         int      index1 = 0;
         string[] names  = Enum.GetNames(typeof(ParamTypes));
         Array    values = Enum.GetValues(typeof(ParamTypes));
         for (int index2 = 0; index2 < values.Length; ++index2)
         {
             ParamTypes index3 = (ParamTypes)values.GetValue(index2);
             if (index3 != ParamTypes.HpMax)
             {
                 int num1   = (int)paramBaseAdd[index3];
                 int bonus1 = (int)paramBonusAdd[index3];
                 if (bonus1 != 0)
                 {
                     if (num1 == 0 && new_param_only)
                     {
                         this.AddValue(index1, names[index2], bonus1, bonus1, false, false, false);
                         ++index1;
                     }
                     if (num1 != 0 && !new_param_only)
                     {
                         this.AddValue(index1, names[index2], bonus1, bonus1, false, false, false);
                         ++index1;
                     }
                 }
                 int num2   = (int)paramBaseMul[index3];
                 int bonus2 = (int)paramBonusMul[index3];
                 if (bonus2 != 0)
                 {
                     if (num2 == 0 && new_param_only)
                     {
                         this.AddValue(index1, names[index2], bonus2, bonus2, true, false, false);
                         ++index1;
                     }
                     if (num2 != 0 && !new_param_only)
                     {
                         this.AddValue(index1, names[index2], bonus2, bonus2, true, false, false);
                         ++index1;
                     }
                 }
             }
         }
         for (; index1 < this.mItems.Count; ++index1)
         {
             ((Component)this.mItems[index1]).get_gameObject().SetActive(false);
         }
     }
 }
示例#12
0
 public BuffEffectParam.Buff this[ParamTypes type]
 {
     get
     {
         if (this.buffs != null)
         {
             return(Array.Find <BuffEffectParam.Buff>(this.buffs, (Predicate <BuffEffectParam.Buff>)(p => p.type == type)));
         }
         return((BuffEffectParam.Buff)null);
     }
 }
示例#13
0
        public void AddParam(string name, Identifier.IdentTypes identType, ParamTypes paramType)
        {
            ParamList curr = this;

            while (curr.Next != null)
            {
                curr = curr.Next;
            }

            curr.Next = new ParamList(name, identType, paramType);
        }
示例#14
0
 public BuffEffect.BuffTarget this[ParamTypes type]
 {
     get
     {
         if (this.targets != null)
         {
             return(this.targets.Find((Predicate <BuffEffect.BuffTarget>)(p => p.paramType == type)));
         }
         return((BuffEffect.BuffTarget)null);
     }
 }
示例#15
0
        private ParameterTypes Convert(ParamTypes type)
        {
            switch (type)
            {
            case ParamTypes.Int32:
                return(ParameterTypes.Int32);

            default:
                throw new ArgumentException("Unknown parameter type");
            }
        }
 public virtual void Validate()
 {
     try
     {
         _provider.GetInstance(
             _injectContext, ValidationUtil.CreateDefaultArgs(ParamTypes.ToArray()));
     }
     catch (Exception e)
     {
         throw new ZenjectException(
                   "Validation for factory '{0}' failed".Fmt(this.GetType()), e);
     }
 }
示例#17
0
 private void InternalBuffSkill(BuffEffect effect, BuffTypes buffType, SkillParamCalcTypes calcType, BaseStatus status)
 {
     for (int index = 0; index < effect.targets.Count; ++index)
     {
         BuffEffect.BuffTarget target = effect.targets[index];
         if (target != null && target.buffType == buffType && target.calcType == calcType)
         {
             BuffMethodTypes buffMethodType = this.GetBuffMethodType(target.buffType, calcType);
             ParamTypes      paramType      = target.paramType;
             int             num            = (int)target.value;
             effect.SetBuffValues(paramType, buffMethodType, ref status, num);
         }
     }
 }
示例#18
0
 public void CalcBuffStatus(ref BaseStatus status, BuffTypes buffType, SkillParamCalcTypes calcType)
 {
     for (int index = 0; index < this.targets.Count; ++index)
     {
         BuffEffect.BuffTarget target = this.targets[index];
         if (target.buffType == buffType && target.calcType == calcType)
         {
             BuffMethodTypes buffMethodType = this.GetBuffMethodType(target.buffType, calcType);
             ParamTypes      paramType      = target.paramType;
             int             num            = (int)target.value;
             this.SetBuffValues(paramType, buffMethodType, ref status, num);
         }
     }
 }
示例#19
0
        private static void GetBytes(ParamTypes t, Object obj, Byte[] data, Int32 datPos)
        {
            t = (ParamTypes)((UInt32)t & ~128);
            switch (t)
            {
            case ParamTypes.FLOAT: BitConverter.GetBytes((Single)obj).CopyTo(data, datPos); break;

            case ParamTypes.DOUBLE: BitConverter.GetBytes((Double)obj).CopyTo(data, datPos); break;

            case ParamTypes.INT16: BitConverter.GetBytes((Int16)obj).CopyTo(data, datPos); break;

            case ParamTypes.UINT16: BitConverter.GetBytes((UInt16)obj).CopyTo(data, datPos); break;

            case ParamTypes.INT32: BitConverter.GetBytes((Int32)obj).CopyTo(data, datPos); break;

            case ParamTypes.UINT32: BitConverter.GetBytes((UInt32)obj).CopyTo(data, datPos); break;

            case ParamTypes.INT64: BitConverter.GetBytes((Int64)obj).CopyTo(data, datPos); break;

            case ParamTypes.UINT64: BitConverter.GetBytes((UInt64)obj).CopyTo(data, datPos); break;

            case ParamTypes.BOOL: BitConverter.GetBytes((Boolean)obj).CopyTo(data, datPos); break;

            case ParamTypes.BYTE_PACKET: ((Byte[])obj).CopyTo(data, datPos); break;

            case ParamTypes.UTF8_STRING: Encoding.UTF8.GetBytes((String)obj).CopyTo(data, datPos); break;

            case ParamTypes.DECIMAL:
            {
                Int32[] sections = Decimal.GetBits((Decimal)obj);
                for (Int32 i = 0; i < 4; i++)
                {
                    BitConverter.GetBytes(sections[i]).CopyTo(data, datPos + (i * 4));
                }
            }
            break;

            case ParamTypes.TIMESPAN: BitConverter.GetBytes(((TimeSpan)obj).Ticks).CopyTo(data, datPos); break;

            case ParamTypes.DATETIME: BitConverter.GetBytes(((DateTime)obj).Ticks).CopyTo(data, datPos); break;

            case ParamTypes.GUID: ((Guid)obj).ToByteArray().CopyTo(data, datPos); break;

            case ParamTypes.PACKET: ((Packet)obj).ToByteArray().CopyTo(data, datPos); break;

            default:
                throw new ArgumentOutOfRangeException(nameof(t), t, null);
            }
        }
示例#20
0
        public void UpdateCurrentValues(int rank, int rankcap)
        {
            if (this.param == null || this.param.buffs == null || this.param.buffs.Length == 0)
            {
                this.Clear();
            }
            else
            {
                int length = this.param.buffs.Length;
                if (this.targets == null)
                {
                    this.targets = new List <BuffEffect.BuffTarget>(length);
                }
                if (this.targets.Count > length)
                {
                    this.targets.RemoveRange(length, this.targets.Count - length);
                }
                while (this.targets.Count < length)
                {
                    this.targets.Add(new BuffEffect.BuffTarget());
                }
                for (int index = 0; index < length; ++index)
                {
                    int valueIni  = (int)this.param.buffs[index].value_ini;
                    int valueMax  = (int)this.param.buffs[index].value_max;
                    int rankValue = this.GetRankValue(rank, rankcap, valueIni, valueMax);
                    this.targets[index].value     = (OInt)rankValue;
                    this.targets[index].calcType  = this.param.buffs[index].calc;
                    this.targets[index].paramType = this.param.buffs[index].type;
                    ParamTypes type = this.param.buffs[index].type;
                    switch (type)
                    {
                    case ParamTypes.ChargeTimeRate:
                    case ParamTypes.CastTimeRate:
                    case ParamTypes.HpCostRate:
                        this.targets[index].buffType = rankValue <= 0 ? BuffTypes.Buff : BuffTypes.Debuff;
                        break;

                    default:
                        if (type != ParamTypes.UsedJewelRate && type != ParamTypes.UsedJewel)
                        {
                            this.targets[index].buffType = rankValue >= 0 ? BuffTypes.Buff : BuffTypes.Debuff;
                            break;
                        }
                        goto case ParamTypes.ChargeTimeRate;
                    }
                }
            }
        }
示例#21
0
 /// <summary>
 /// Initializes a new instance of the CustomVariable struct.
 /// </summary>
 /// <param name="paramType">The type of calculation method to be used.</param>
 /// <param name="name">The name of the column in which the value should be written.</param>
 /// <param name="aoiName">The name of the AOI or AOI Group to detect the fixations for.</param>
 /// <param name="isAOIGroup">True if the string in the property aoiName
 /// specifies an AOI group, otherwise false (specifying an single AOI)</param>
 /// <param name="number">Optional when using <see cref="ParamTypes.TimeUntil"/>.
 /// The number of fixation (first, second, third) which one is interested in.</param>
 /// <param name="button">Optional when using <see cref="ParamTypes.Clicks"/>.
 /// The <see cref="MouseButtons"/> that should be checked for
 /// clicks at the given AOI or AOI group.
 /// </param>
 public CustomVariable(
     ParamTypes paramType,
     string name,
     string aoiName,
     bool isAOIGroup,
     int number,
     MouseButtons button)
 {
     this.ParamType   = paramType;
     this.ColumnName  = name;
     this.AOIName     = aoiName;
     this.IsAOIGroup  = isAOIGroup;
     this.Number      = number;
     this.MouseButton = button;
 }
		public bool CanCallWith(IEnumerable<Variable> vars)
		{
			using(var var_enum = vars.GetEnumerator())
			using(var sig_enum = ParamTypes.GetEnumerator())
			{
				bool more_vars = false;
				bool more_sig =false;
				while(   (more_sig = sig_enum.MoveNext()) 
				      && (more_vars = var_enum.MoveNext())
				      && sig_enum.Current.IsAssignableFrom(var_enum.Current.Type));
				if(more_sig || more_vars)
					return false;
			}
			return true;
		}
示例#23
0
        public int GetBuffEffectValue(ParamTypes type, SkillEffectTargets target = SkillEffectTargets.Target)
        {
            BuffEffect buffEffect = this.GetBuffEffect(target);

            if (buffEffect == null)
            {
                return(0);
            }
            BuffEffect.BuffTarget buffTarget = buffEffect[type];
            if (buffTarget == null)
            {
                return(0);
            }
            return((int)buffTarget.value);
        }
示例#24
0
        public int CalcBuffEffectValue(ParamTypes type, int src, SkillEffectTargets target = SkillEffectTargets.Target)
        {
            BuffEffect buffEffect = this.GetBuffEffect(target);

            if (buffEffect == null)
            {
                return(src);
            }
            BuffEffect.BuffTarget buffTarget = buffEffect[type];
            if (buffTarget == null)
            {
                return(src);
            }
            return(SkillParam.CalcSkillEffectValue(buffTarget.calcType, (int)buffTarget.value, src));
        }
示例#25
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Type != null ? Type.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Regex != null ? Regex.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Method != null ? Method.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ParamTypes != null ? ParamTypes.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Scope != null ? Scope.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Expression != null ? Expression.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Error != null ? Error.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SourceLocation != null ? SourceLocation.GetHashCode() : 0);
         return(hashCode);
     }
 }
示例#26
0
        public static bool IsNegativeValueIsBuff(ParamTypes param_type)
        {
            ParamTypes paramTypes = param_type;

            switch (paramTypes)
            {
            case ParamTypes.ChargeTimeRate:
            case ParamTypes.CastTimeRate:
            case ParamTypes.HpCostRate:
                return(true);

            default:
                if (paramTypes != ParamTypes.UsedJewelRate && paramTypes != ParamTypes.UsedJewel)
                {
                    return(false);
                }
                goto case ParamTypes.ChargeTimeRate;
            }
        }
示例#27
0
        public void Refresh(BaseStatus old_status, BaseStatus new_status)
        {
            if (old_status == null || new_status == null)
            {
                return;
            }
            this.mStatusValues.Clear();
            string[] names  = Enum.GetNames(typeof(ParamTypes));
            Array    values = Enum.GetValues(typeof(ParamTypes));

            for (int index1 = 0; index1 < values.Length; ++index1)
            {
                ParamTypes index2 = (ParamTypes)values.GetValue(index1);
                switch (index2)
                {
                case ParamTypes.None:
                case ParamTypes.HpMax:
                    continue;

                default:
                    int oldStatu = (int)old_status[index2];
                    int newStatu = (int)new_status[index2];
                    if (oldStatu != newStatu)
                    {
                        this.mStatusValues.Add(new JobMasterValue()
                        {
                            type      = names[index1],
                            old_value = oldStatu,
                            new_value = newStatu
                        });
                        continue;
                    }
                    continue;
                }
            }
            this.SetData((object[])this.mStatusValues.ToArray(), typeof(JobMasterValue));
        }
示例#28
0
        public void SetData(SkillPowerUpResultContent.Param param, ParamTypes type, bool isScale)
        {
            string str  = !isScale ? string.Empty : "%";
            int    num1 = (int)(!isScale ? param.currentParam[type] : param.currentParamMul[type]);
            int    num2 = (int)(!isScale ? param.prevParam[type] : param.prevParamMul[type]);
            int    num3 = (int)(!isScale ? param.currentParamBonus[type] : param.currentParamBonusMul[type]);
            int    num4 = (int)(!isScale ? param.prevParamBonus[type] : param.prevParamBonusMul[type]);
            int    num5 = num2 + num4;
            int    num6 = num1 + num3;

            this.paramNameText.set_text(LocalizedText.Get("sys." + (object)type));
            this.prevParamText.set_text(num5.ToString() + str);
            this.resultParamText.set_text(num6.ToString() + str);
            int num7 = num3;

            if (num7 >= 0)
            {
                this.resultAddedParamText.set_text("(+" + (object)num7 + str + ")");
            }
            else
            {
                this.resultAddedParamText.set_text("(" + (object)num7 + str + ")");
            }
        }
示例#29
0
		private void useParamType(ParamTypes type) {
			if (type != currentParamType) {
				DataUpdateFlag++;

				currentParamType = type;

				// Show the appropriate panel, and populate it appropriately
				paramsListBox.Visible = false;
				pipeDoorParamPanel.Visible = false;
				partialBlockParamPanel.Visible = false;

				if (type == ParamTypes.PipeParam) {
					pipeDoorParamPanel.Visible = true;

				} else if (type == ParamTypes.PartialBlockParam) {
					partialBlockParamPanel.Visible = true;

				} else {
					paramsListBox.Visible = true;

					populateListBox(paramsListBox, 0x100, getInternalLangNameForParamType(type));
				}

				DataUpdateFlag--;
			}
		}
示例#30
0
 /// <summary>
 /// Initializes a new instance of the CustomVariable struct.
 /// </summary>
 /// <param name="paramType">The type of calculation method to be used.</param>
 /// <param name="name">The name of the column in which the value should be written.</param>
 /// <param name="aoiName">The name of the AOI or AOI Group to detect the fixations for.</param>
 /// <param name="isAOIGroup">True if the string in the property aoiName
 /// specifies an AOI group, otherwise false (specifying an single AOI)</param>
 /// <param name="number">Optional when using <see cref="ParamTypes.TimeUntil"/>.
 /// The number of fixation (first, second, third) which one is interested in.</param>
 /// <param name="button">Optional when using <see cref="ParamTypes.Clicks"/>.
 /// The <see cref="MouseButtons"/> that should be checked for
 /// clicks at the given AOI or AOI group.
 /// </param>
 public CustomVariable(
   ParamTypes paramType,
   string name,
   string aoiName,
   bool isAOIGroup,
   int number,
   MouseButtons button)
 {
   this.ParamType = paramType;
   this.ColumnName = name;
   this.AOIName = aoiName;
   this.IsAOIGroup = isAOIGroup;
   this.Number = number;
   this.MouseButton = button;
 }
示例#31
0
        public OInt this[ParamTypes type]
        {
            get
            {
                switch (type)
                {
                case ParamTypes.Hp:
                    return(this[StatusTypes.Hp]);

                case ParamTypes.HpMax:
                    return(this[StatusTypes.Hp]);

                case ParamTypes.Mp:
                    return(this[StatusTypes.Mp]);

                case ParamTypes.MpIni:
                    return(this[StatusTypes.MpIni]);

                case ParamTypes.Atk:
                    return(this[StatusTypes.Atk]);

                case ParamTypes.Def:
                    return(this[StatusTypes.Def]);

                case ParamTypes.Mag:
                    return(this[StatusTypes.Mag]);

                case ParamTypes.Mnd:
                    return(this[StatusTypes.Mnd]);

                case ParamTypes.Rec:
                    return(this[StatusTypes.Rec]);

                case ParamTypes.Dex:
                    return(this[StatusTypes.Dex]);

                case ParamTypes.Spd:
                    return(this[StatusTypes.Spd]);

                case ParamTypes.Cri:
                    return(this[StatusTypes.Cri]);

                case ParamTypes.Luk:
                    return(this[StatusTypes.Luk]);

                case ParamTypes.Mov:
                    return(this[StatusTypes.Mov]);

                case ParamTypes.Jmp:
                    return(this[StatusTypes.Jmp]);

                case ParamTypes.EffectRange:
                    return(this[BattleBonus.EffectRange]);

                case ParamTypes.EffectScope:
                    return(this[BattleBonus.EffectScope]);

                case ParamTypes.EffectHeight:
                    return(this[BattleBonus.EffectHeight]);

                case ParamTypes.Assist_Fire:
                    return(this[EnchantCategory.Assist, EElement.Fire]);

                case ParamTypes.Assist_Water:
                    return(this[EnchantCategory.Assist, EElement.Water]);

                case ParamTypes.Assist_Wind:
                    return(this[EnchantCategory.Assist, EElement.Wind]);

                case ParamTypes.Assist_Thunder:
                    return(this[EnchantCategory.Assist, EElement.Thunder]);

                case ParamTypes.Assist_Shine:
                    return(this[EnchantCategory.Assist, EElement.Shine]);

                case ParamTypes.Assist_Dark:
                    return(this[EnchantCategory.Assist, EElement.Dark]);

                case ParamTypes.Assist_Poison:
                    return(this[EnchantCategory.Assist, EnchantTypes.Poison]);

                case ParamTypes.Assist_Paralysed:
                    return(this[EnchantCategory.Assist, EnchantTypes.Paralysed]);

                case ParamTypes.Assist_Stun:
                    return(this[EnchantCategory.Assist, EnchantTypes.Stun]);

                case ParamTypes.Assist_Sleep:
                    return(this[EnchantCategory.Assist, EnchantTypes.Sleep]);

                case ParamTypes.Assist_Charm:
                    return(this[EnchantCategory.Assist, EnchantTypes.Charm]);

                case ParamTypes.Assist_Stone:
                    return(this[EnchantCategory.Assist, EnchantTypes.Stone]);

                case ParamTypes.Assist_Blind:
                    return(this[EnchantCategory.Assist, EnchantTypes.Blind]);

                case ParamTypes.Assist_DisableSkill:
                    return(this[EnchantCategory.Assist, EnchantTypes.DisableSkill]);

                case ParamTypes.Assist_DisableMove:
                    return(this[EnchantCategory.Assist, EnchantTypes.DisableMove]);

                case ParamTypes.Assist_DisableAttack:
                    return(this[EnchantCategory.Assist, EnchantTypes.DisableAttack]);

                case ParamTypes.Assist_Zombie:
                    return(this[EnchantCategory.Assist, EnchantTypes.Zombie]);

                case ParamTypes.Assist_DeathSentence:
                    return(this[EnchantCategory.Assist, EnchantTypes.DeathSentence]);

                case ParamTypes.Assist_Berserk:
                    return(this[EnchantCategory.Assist, EnchantTypes.Berserk]);

                case ParamTypes.Assist_Knockback:
                    return(this[EnchantCategory.Assist, EnchantTypes.Knockback]);

                case ParamTypes.Assist_ResistBuff:
                    return(this[EnchantCategory.Assist, EnchantTypes.ResistBuff]);

                case ParamTypes.Assist_ResistDebuff:
                    return(this[EnchantCategory.Assist, EnchantTypes.ResistDebuff]);

                case ParamTypes.Assist_Stop:
                    return(this[EnchantCategory.Assist, EnchantTypes.Stop]);

                case ParamTypes.Assist_Fast:
                    return(this[EnchantCategory.Assist, EnchantTypes.Fast]);

                case ParamTypes.Assist_Slow:
                    return(this[EnchantCategory.Assist, EnchantTypes.Slow]);

                case ParamTypes.Assist_AutoHeal:
                    return(this[EnchantCategory.Assist, EnchantTypes.AutoHeal]);

                case ParamTypes.Assist_Donsoku:
                    return(this[EnchantCategory.Assist, EnchantTypes.Donsoku]);

                case ParamTypes.Assist_Rage:
                    return(this[EnchantCategory.Assist, EnchantTypes.Rage]);

                case ParamTypes.Assist_GoodSleep:
                    return(this[EnchantCategory.Assist, EnchantTypes.GoodSleep]);

                case ParamTypes.Resist_Fire:
                    return(this[EnchantCategory.Resist, EElement.Fire]);

                case ParamTypes.Resist_Water:
                    return(this[EnchantCategory.Resist, EElement.Water]);

                case ParamTypes.Resist_Wind:
                    return(this[EnchantCategory.Resist, EElement.Wind]);

                case ParamTypes.Resist_Thunder:
                    return(this[EnchantCategory.Resist, EElement.Thunder]);

                case ParamTypes.Resist_Shine:
                    return(this[EnchantCategory.Resist, EElement.Shine]);

                case ParamTypes.Resist_Dark:
                    return(this[EnchantCategory.Resist, EElement.Dark]);

                case ParamTypes.Resist_Poison:
                    return(this[EnchantCategory.Resist, EnchantTypes.Poison]);

                case ParamTypes.Resist_Paralysed:
                    return(this[EnchantCategory.Resist, EnchantTypes.Paralysed]);

                case ParamTypes.Resist_Stun:
                    return(this[EnchantCategory.Resist, EnchantTypes.Stun]);

                case ParamTypes.Resist_Sleep:
                    return(this[EnchantCategory.Resist, EnchantTypes.Sleep]);

                case ParamTypes.Resist_Charm:
                    return(this[EnchantCategory.Resist, EnchantTypes.Charm]);

                case ParamTypes.Resist_Stone:
                    return(this[EnchantCategory.Resist, EnchantTypes.Stone]);

                case ParamTypes.Resist_Blind:
                    return(this[EnchantCategory.Resist, EnchantTypes.Blind]);

                case ParamTypes.Resist_DisableSkill:
                    return(this[EnchantCategory.Resist, EnchantTypes.DisableSkill]);

                case ParamTypes.Resist_DisableMove:
                    return(this[EnchantCategory.Resist, EnchantTypes.DisableMove]);

                case ParamTypes.Resist_DisableAttack:
                    return(this[EnchantCategory.Resist, EnchantTypes.DisableAttack]);

                case ParamTypes.Resist_Zombie:
                    return(this[EnchantCategory.Resist, EnchantTypes.Zombie]);

                case ParamTypes.Resist_DeathSentence:
                    return(this[EnchantCategory.Resist, EnchantTypes.DeathSentence]);

                case ParamTypes.Resist_Berserk:
                    return(this[EnchantCategory.Resist, EnchantTypes.Berserk]);

                case ParamTypes.Resist_Knockback:
                    return(this[EnchantCategory.Resist, EnchantTypes.Knockback]);

                case ParamTypes.Resist_ResistBuff:
                    return(this[EnchantCategory.Resist, EnchantTypes.ResistBuff]);

                case ParamTypes.Resist_ResistDebuff:
                    return(this[EnchantCategory.Resist, EnchantTypes.ResistDebuff]);

                case ParamTypes.Resist_Stop:
                    return(this[EnchantCategory.Resist, EnchantTypes.Stop]);

                case ParamTypes.Resist_Fast:
                    return(this[EnchantCategory.Resist, EnchantTypes.Fast]);

                case ParamTypes.Resist_Slow:
                    return(this[EnchantCategory.Resist, EnchantTypes.Slow]);

                case ParamTypes.Resist_AutoHeal:
                    return(this[EnchantCategory.Resist, EnchantTypes.AutoHeal]);

                case ParamTypes.Resist_Donsoku:
                    return(this[EnchantCategory.Resist, EnchantTypes.Donsoku]);

                case ParamTypes.Resist_Rage:
                    return(this[EnchantCategory.Resist, EnchantTypes.Rage]);

                case ParamTypes.Resist_GoodSleep:
                    return(this[EnchantCategory.Resist, EnchantTypes.GoodSleep]);

                case ParamTypes.HitRate:
                    return(this[BattleBonus.HitRate]);

                case ParamTypes.AvoidRate:
                    return(this[BattleBonus.AvoidRate]);

                case ParamTypes.CriticalRate:
                    return(this[BattleBonus.CriticalRate]);

                case ParamTypes.GainJewel:
                    return(this[BattleBonus.GainJewel]);

                case ParamTypes.UsedJewelRate:
                    return(this[BattleBonus.UsedJewelRate]);

                case ParamTypes.ActionCount:
                    return(this[BattleBonus.ActionCount]);

                case ParamTypes.SlashAttack:
                    return(this[BattleBonus.SlashAttack]);

                case ParamTypes.PierceAttack:
                    return(this[BattleBonus.PierceAttack]);

                case ParamTypes.BlowAttack:
                    return(this[BattleBonus.BlowAttack]);

                case ParamTypes.ShotAttack:
                    return(this[BattleBonus.ShotAttack]);

                case ParamTypes.MagicAttack:
                    return(this[BattleBonus.MagicAttack]);

                case ParamTypes.ReactionAttack:
                    return(this[BattleBonus.ReactionAttack]);

                case ParamTypes.JumpAttack:
                    return(this[BattleBonus.JumpAttack]);

                case ParamTypes.GutsRate:
                    return(this[BattleBonus.GutsRate]);

                case ParamTypes.AutoJewel:
                    return(this[BattleBonus.AutoJewel]);

                case ParamTypes.ChargeTimeRate:
                    return(this[BattleBonus.ChargeTimeRate]);

                case ParamTypes.CastTimeRate:
                    return(this[BattleBonus.CastTimeRate]);

                case ParamTypes.BuffTurn:
                    return(this[BattleBonus.BuffTurn]);

                case ParamTypes.DebuffTurn:
                    return(this[BattleBonus.DebuffTurn]);

                case ParamTypes.CombinationRange:
                    return(this[BattleBonus.CombinationRange]);

                case ParamTypes.HpCostRate:
                    return(this[BattleBonus.HpCostRate]);

                case ParamTypes.SkillUseCount:
                    return(this[BattleBonus.SkillUseCount]);

                case ParamTypes.PoisonDamage:
                    return(this[BattleBonus.PoisonDamage]);

                case ParamTypes.PoisonTurn:
                    return(this[BattleBonus.PoisonTurn]);

                case ParamTypes.Assist_AutoJewel:
                    return(this[EnchantCategory.Assist, EnchantTypes.AutoJewel]);

                case ParamTypes.Resist_AutoJewel:
                    return(this[EnchantCategory.Resist, EnchantTypes.AutoJewel]);

                case ParamTypes.Assist_DisableHeal:
                    return(this[EnchantCategory.Assist, EnchantTypes.DisableHeal]);

                case ParamTypes.Resist_DisableHeal:
                    return(this[EnchantCategory.Resist, EnchantTypes.DisableHeal]);

                case ParamTypes.Resist_Slash:
                    return(this[BattleBonus.Resist_Slash]);

                case ParamTypes.Resist_Pierce:
                    return(this[BattleBonus.Resist_Pierce]);

                case ParamTypes.Resist_Blow:
                    return(this[BattleBonus.Resist_Blow]);

                case ParamTypes.Resist_Shot:
                    return(this[BattleBonus.Resist_Shot]);

                case ParamTypes.Resist_Magic:
                    return(this[BattleBonus.Resist_Magic]);

                case ParamTypes.Resist_Reaction:
                    return(this[BattleBonus.Resist_Reaction]);

                case ParamTypes.Resist_Jump:
                    return(this[BattleBonus.Resist_Jump]);

                case ParamTypes.Avoid_Slash:
                    return(this[BattleBonus.Avoid_Slash]);

                case ParamTypes.Avoid_Pierce:
                    return(this[BattleBonus.Avoid_Pierce]);

                case ParamTypes.Avoid_Blow:
                    return(this[BattleBonus.Avoid_Blow]);

                case ParamTypes.Avoid_Shot:
                    return(this[BattleBonus.Avoid_Shot]);

                case ParamTypes.Avoid_Magic:
                    return(this[BattleBonus.Avoid_Magic]);

                case ParamTypes.Avoid_Reaction:
                    return(this[BattleBonus.Avoid_Reaction]);

                case ParamTypes.Avoid_Jump:
                    return(this[BattleBonus.Avoid_Jump]);

                case ParamTypes.GainJewelRate:
                    return(this[BattleBonus.GainJewelRate]);

                case ParamTypes.UsedJewel:
                    return(this[BattleBonus.UsedJewel]);

                case ParamTypes.Assist_SingleAttack:
                    return(this[EnchantCategory.Assist, EnchantTypes.SingleAttack]);

                case ParamTypes.Assist_AreaAttack:
                    return(this[EnchantCategory.Assist, EnchantTypes.AreaAttack]);

                case ParamTypes.Resist_SingleAttack:
                    return(this[EnchantCategory.Resist, EnchantTypes.SingleAttack]);

                case ParamTypes.Resist_AreaAttack:
                    return(this[EnchantCategory.Resist, EnchantTypes.AreaAttack]);

                case ParamTypes.Assist_DecCT:
                    return(this[EnchantCategory.Assist, EnchantTypes.DecCT]);

                case ParamTypes.Assist_IncCT:
                    return(this[EnchantCategory.Assist, EnchantTypes.IncCT]);

                case ParamTypes.Resist_DecCT:
                    return(this[EnchantCategory.Resist, EnchantTypes.DecCT]);

                case ParamTypes.Resist_IncCT:
                    return(this[EnchantCategory.Resist, EnchantTypes.IncCT]);

                case ParamTypes.Assist_ESA_Fire:
                    return(this[EnchantCategory.Assist, EnchantTypes.ESA_Fire]);

                case ParamTypes.Assist_ESA_Water:
                    return(this[EnchantCategory.Assist, EnchantTypes.ESA_Water]);

                case ParamTypes.Assist_ESA_Wind:
                    return(this[EnchantCategory.Assist, EnchantTypes.ESA_Wind]);

                case ParamTypes.Assist_ESA_Thunder:
                    return(this[EnchantCategory.Assist, EnchantTypes.ESA_Thunder]);

                case ParamTypes.Assist_ESA_Shine:
                    return(this[EnchantCategory.Assist, EnchantTypes.ESA_Shine]);

                case ParamTypes.Assist_ESA_Dark:
                    return(this[EnchantCategory.Assist, EnchantTypes.ESA_Dark]);

                case ParamTypes.Resist_ESA_Fire:
                    return(this[EnchantCategory.Resist, EnchantTypes.ESA_Fire]);

                case ParamTypes.Resist_ESA_Water:
                    return(this[EnchantCategory.Resist, EnchantTypes.ESA_Water]);

                case ParamTypes.Resist_ESA_Wind:
                    return(this[EnchantCategory.Resist, EnchantTypes.ESA_Wind]);

                case ParamTypes.Resist_ESA_Thunder:
                    return(this[EnchantCategory.Resist, EnchantTypes.ESA_Thunder]);

                case ParamTypes.Resist_ESA_Shine:
                    return(this[EnchantCategory.Resist, EnchantTypes.ESA_Shine]);

                case ParamTypes.Resist_ESA_Dark:
                    return(this[EnchantCategory.Resist, EnchantTypes.ESA_Dark]);

                case ParamTypes.UnitDefenseFire:
                    return(this[BattleBonus.UnitDefenseFire]);

                case ParamTypes.UnitDefenseWater:
                    return(this[BattleBonus.UnitDefenseWater]);

                case ParamTypes.UnitDefenseWind:
                    return(this[BattleBonus.UnitDefenseWind]);

                case ParamTypes.UnitDefenseThunder:
                    return(this[BattleBonus.UnitDefenseThunder]);

                case ParamTypes.UnitDefenseShine:
                    return(this[BattleBonus.UnitDefenseShine]);

                case ParamTypes.UnitDefenseDark:
                    return(this[BattleBonus.UnitDefenseDark]);

                case ParamTypes.Assist_MaxDamageHp:
                    return(this[EnchantCategory.Assist, EnchantTypes.MaxDamageHp]);

                case ParamTypes.Assist_MaxDamageMp:
                    return(this[EnchantCategory.Assist, EnchantTypes.MaxDamageMp]);

                case ParamTypes.Resist_MaxDamageHp:
                    return(this[EnchantCategory.Resist, EnchantTypes.MaxDamageHp]);

                case ParamTypes.Resist_MaxDamageMp:
                    return(this[EnchantCategory.Resist, EnchantTypes.MaxDamageMp]);

                default:
                    return((OInt)0);
                }
            }
        }
示例#32
0
文件: SVM.cs 项目: shimat/opencvsharp
        /// <summary>
        /// Generates a grid for SVM parameters.
        /// </summary>
        /// <param name="paramId">SVM parameters IDs that must be one of the SVM::ParamTypes. 
        /// The grid is generated for the parameter with this ID.</param>
        /// <returns></returns>
	    public static ParamGrid GetDefaultGrid(ParamTypes paramId)
	    {
	        return NativeMethods.ml_SVM_getDefaultGrid((int)paramId);
	    }
示例#33
0
 public ParamList(string name, Identifier.IdentTypes identType, ParamTypes paramType)
 {
     Name           = name;
     ParamIdentType = identType;
     ParamType      = paramType;
 }
示例#34
0
		private string getInternalLangNameForParamType(ParamTypes type) {
			switch (type) {
				case ParamTypes.NullParam: return "GenericTileParams";
				case ParamTypes.CoinParam: return "CoinParams";
				case ParamTypes.QuestionParam: return "QuestionParams";
				case ParamTypes.BrickParam: return "BrickParams";
				case ParamTypes.ExplodableParam: return "ExplodableParams";
				case ParamTypes.HarmfulParam: return "HarmfulTileParams";
				case ParamTypes.ConveyorParam: return "ConveyorParams";
				case ParamTypes.DonutParam: return "DonutParams";
				case ParamTypes.ClimbParam: return "FenceParams";
				case ParamTypes.SlopeParam: return "SlopeParams";
				case ParamTypes.PipeParam: return "PipeDoorParams";
				case ParamTypes.PartialBlockParam: return "PartialBlockParams";
			}

			return null;
		}