Exemple #1
0
		public void RemoveGoal(Goal goal)
		{
			foreach(Goal tmpGoal in this.goals)
			{
				if(tmpGoal.ID > goals.ID)
				{
					tmpGoal.ID -= 1;
				}
			}
			this.goals.Remove(goal);
		}
Exemple #2
0
		public Int32 AddGoal()
		{
			Goal goal = new Goal();
			Int32 index = this.goals.Count;
			Int32 ret;

			if(index == 0)
			{
				goal.ID = 1;
			}
			else
			{
				goal.ID = ((Goal)this.goals[index - 1]).ID + 1;
			}

			ret = this.goals.Add(goal);

			return ret;
		}