Ejemplo n.º 1
0
        public static IEnumerable <UsersInfo> PositionsLists(Positions pos)
        {
            var roles = from role in UsersDatabase.Base
                        where role.Position == pos.ToString()
                        select role;

            return(roles);
        }
        public void IntegrationTest_Position_Invalid_TwoPositionsSameId()
        {
            Form      form       = new Form();
            Workflow  flow       = new Workflow();
            Positions positions  = new Positions();
            Positions positions1 = new Positions();

            var pos1 = positions.ToString();
            var pos2 = positions1.ToString();

            bool stat = pos1.Equals(pos2);

            Assert.IsTrue(stat);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns a human readable representation of the <c>JointStates</c> values.
 /// </summary>
 public override string ToString() =>
 $"Positions: {Positions?.ToString() ?? "null"}; Velocities: {Velocities?.ToString() ?? "null"}; Efforts: {Efforts?.ToString() ?? "null"};";
Ejemplo n.º 4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="team"></param>
        /// <param name="stPosition"></param>
        /// <param name="pos"></param>
        /// <param name="depth">Depth 1-based (CB1 ==> first CB)</param>
        public void SetSpecialTeamPosition(string team, SpecialTeamer stPosition, Positions pos, int depth)
        {
            int index = -1;
            int teamIndex = GetTeamIndex(team);
            int teamPlayerPointersStart = teamIndex * cTeamDiff + m49ersPlayerPointersStart;
            List<int> playerIndexes = GetPlayerIndexesForTeam(team);
            int testDepth = 0;
            string position = pos.ToString();
            for (int i = 0; i < playerIndexes.Count; i++)
            {
                if (GetPlayerPosition(playerIndexes[i]) == position)
                {
                    testDepth++;
                    if (testDepth == depth)
                    {
                        index = i;
                        break;
                    }
                }
            }

            if (index > -1)
            {
                SetByte(teamPlayerPointersStart + (int)stPosition, (byte)index);
            }
            else
            {
                throw new InvalidOperationException(string.Format("Depth {0} at position {1} does not exist", depth, pos.ToString()));
            }
        }
Ejemplo n.º 5
0
 public override string ToString()
 {
     return(position.ToString());
 }
Ejemplo n.º 6
0
 public override int GetHashCode()
 {
     return(Positions.ToString().GetHashCode());
 }
Ejemplo n.º 7
0
 protected bool Equals(Position other)
 {
     return(Positions.ToString().Equals(other.Positions.ToString()));
 }
Ejemplo n.º 8
0
		public static int GetImpressionsPerCampaignCredit(Positions position)
		{
			switch (position)
			{
				case Positions.Hotbox: return Settings.HotboxCredits;
				case Positions.Leaderboard: return Settings.LeaderboardCredits;
				case Positions.Skyscraper: return Settings.SkyscaperCredits;
				case Positions.PhotoBanner: return Settings.PhotoBannerCredits;
				case Banner.Positions.EmailBanner: return Settings.EmailBannerCredits;
				default: throw new Exception("Unexpected banner position: " + position.ToString());
			}
		}
Ejemplo n.º 9
0
    public void ChangePosition(string character, Positions newPosition = Positions.Offscreen, Facings facing = Facings.auto, float fadeSpeed = 0, float easeSpeed = 0)
    {
        if(fadeSpeed == 0)
        {
            fadeSpeed = defaultDeltaAlpha;
        }
        if (easeSpeed == 0)
        {
            easeSpeed = defaultEasingDuration;
        }
        changingPortraits.Add(character);

        if(newPosition == Positions.Offscreen)
            fadeSpeed *= -1;

        Debug.Log( "<color=green>[Char Man]</color> Char trying to change pose:" + character + "To Position -" + newPosition.ToString());
        Debug.Assert( IsCharacter( character ), "CHRACTER IS NOT A CHARACTER" );

        characterList[character.ToLower()].SetForMovement(newPosition, facing, fadeSpeed, easeSpeed);
    }