/// <summary> /// Gets the tax colour. /// </summary> /// <returns></returns> private string GetTaxColour() { if (!m_State.IsValueDirty <double>("Tax")) { return("gray"); //Normal } else if (m_State.GetValue <double>("Tax") > m_State.GetOriginalValue <double>("Tax")) { return("green"); //Higher - green } else { return("red"); //Lower - red } }
/// <summary> /// Validate outstanding changes /// </summary> /// <returns></returns> bool ICommitGumpEntity.Validate() { //Assert that the values havent changed if (((int)m_State.GetOriginalValue <KinGuardPost.HireSpeeds>("Speed")) != (int)GuardPost.HireSpeed) { return(false); } if (((int)m_State.GetOriginalValue <int>("Slots")) != GetSlotsAvailable()) { return(false); } if (((int)m_State.GetOriginalValue <FightMode>("Target")) != (int)GuardPost.FightMode) { return(false); } if (((int)m_State.GetOriginalValue <KinFactionGuardTypes>("Type")) != (int)GuardPost.GuardType) { return(false); } return(true); }