Ejemplo n.º 1
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public int calculate(final Amend amend, final com.kx.sglm.core.model.IntNumberPropertyObject intNumberPropertyObject, final int amendValue)
		public override int calculate(Amend amend, IntNumberPropertyObject intNumberPropertyObject, int amendValue)
		{
			if (!this.isAccept(amend, intNumberPropertyObject))
			{
				throw new System.ArgumentException("property type is diffrent");
			}
			return amendValue;
		}
Ejemplo n.º 2
0
		static AmendTypes()
		{
			for (int j = 1; j < RoleAProperty._SIZE; j++)
			{
				int genKey = PropertyTypeConstants.genPropertyKey(j, RoleAProperty.TYPE);
				propertyAmends[genKey] = new Amend(RoleAProperty.TYPE, j, "P" + j);
			}
		}
Ejemplo n.º 3
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public float calculate(final Amend amend, com.kx.sglm.core.model.FloatNumberPropertyObject floatNumberPropertyObject, float amendValue)
		public override float calculate(Amend amend, FloatNumberPropertyObject floatNumberPropertyObject, float amendValue)
		{
			if (!this.isAccept(amend, floatNumberPropertyObject))
			{
				throw new System.ArgumentException("property type is diffrent");
			}
			return floatNumberPropertyObject.get(amend.propertyIndex) * amendValue;
		}
Ejemplo n.º 4
0
		/// <summary>
		/// 计算该修正规则作用于
		/// </summary>
		/// <param name="intNumberPropertyObject"> </param>
		/// <param name="amendValue">
		/// @return </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: @Override public int calculate(final Amend amend, final com.kx.sglm.core.model.IntNumberPropertyObject intNumberPropertyObject, final int amendValue)
		public override int calculate(Amend amend, IntNumberPropertyObject intNumberPropertyObject, int amendValue)
		{
			if (!this.isAccept(amend, intNumberPropertyObject))
			{
				throw new System.ArgumentException("property type is diffrent");
			}
			float _percent = amendValue / 100.0f;
			return (int)(intNumberPropertyObject.get(amend.propertyIndex) * _percent);
		}
Ejemplo n.º 5
0
		/// <summary>
		/// 检查该规则是否可以接受
		/// </summary>
		/// <param name="amend"> </param>
		/// <param name="floatNumberPropertyObject">
		/// @return </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: protected boolean isAccept(final Amend amend, final com.kx.sglm.core.model.FloatNumberPropertyObject floatNumberPropertyObject)
		protected internal virtual bool isAccept(Amend amend, FloatNumberPropertyObject floatNumberPropertyObject)
		{
			if (amend.propertyType != floatNumberPropertyObject.PropertyType)
			{
				return false;
			}

			return true;
		}
Ejemplo n.º 6
0
		public AmendTriple(Amend amend, AbstractAmendCalcRule rule, float value)
		{
			this.amend_Renamed = amend;
			this.rule = rule;
			this.value = value;
		}
Ejemplo n.º 7
0
		/// 
		/// <param name="floatNumberPropertyObject"> </param>
		/// <param name="amendValue">
		/// @return </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: public abstract float calculate(final Amend amend, final com.kx.sglm.core.model.FloatNumberPropertyObject floatNumberPropertyObject, final float amendValue);
		public abstract float calculate(Amend amend, FloatNumberPropertyObject floatNumberPropertyObject, float amendValue);
Ejemplo n.º 8
0
		/// <summary>
		/// 计算该修正规则作用于numberPropertyObject后的结果
		/// </summary>
		/// <param name="intNumberPropertyObject"> </param>
		/// <param name="amendValue"> 修正�? </param>
		/// <returns> 返回该规则应用于numberPropertyObject后所产生的改变�? </returns>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
//ORIGINAL LINE: public abstract int calculate(final Amend amend, final com.kx.sglm.core.model.IntNumberPropertyObject intNumberPropertyObject, final int amendValue);
		public abstract int calculate(Amend amend, IntNumberPropertyObject intNumberPropertyObject, int amendValue);