Beispiel #1
0
 public void CopyFrom(DS_HazeContext other)
 {
     if (this.m_ContextItems.Count > 0)
     {
         this.m_ContextItems.Clear();
     }
     for (int index = 0; index < other.m_ContextItems.Count; ++index)
     {
         DS_HazeContextItem dsHazeContextItem = new DS_HazeContextItem();
         dsHazeContextItem.CopyFrom(other.m_ContextItems[index]);
         this.m_ContextItems.Add(dsHazeContextItem);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Copy settings and time-of-day variants from another DS_HazeContext.
        /// </summary>
        /// <param name="other"> DS_HazeContext to copy from. </param>
        public void CopyFrom(DS_HazeContext other)
        {
            // Clear any existing variants first.
            if (m_ContextItems.Count > 0)
            {
                m_ContextItems.Clear();
            }

            for (int cv = 0; cv < other.m_ContextItems.Count; cv++)
            {
                DS_HazeContextItem ctxV = new DS_HazeContextItem();
                ctxV.CopyFrom(other.m_ContextItems[cv]);

                m_ContextItems.Add(ctxV);
            }
        }