示例#1
0
 /// <summary>
 /// Removes all the receipes from the planning at the given time.
 /// </summary>
 /// <param name="time">The time.</param>
 public void RemoveReceipeDate(Time time)
 {
     if (this.ReceipeList.ContainsKey(time.Date))
     {
         ReceipeDate receipeDate = this.ReceipeList[time.Date];
         this.ReceipeList.Remove(time.Date);
         this.RefreshViews(new RemovedReceipeDateEvent(this));
     }
 }
示例#2
0
        /// <summary>
        /// Adds a receipe to the planning.
        /// </summary>
        /// <param name="receipe">The receipe.</param>
        /// <param name="timeOfDay">The time of day.</param>
        /// <param name="date">The date.</param>
        public void AddReceipeList(Receipe receipe, string timeOfDay, string date)
        {
            ReceipeDate receipeDate = null;

            if (ReceipeList.ContainsKey(date))
            {
                receipeDate = ReceipeList[date];
            }
            else
            {
                receipeDate = new ReceipeDate(date);
                ReceipeList.Add(date, receipeDate);
            }

            receipeDate.ReceipeTimeOfDay[timeOfDay].AddReceipe(receipe);
        }