Пример #1
0
 /// <summary>
 /// Returns whether or not this note is equal to obj
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(UtauNote other)
 {
     Console.WriteLine("AAAAAAAAAAAAAAAAAaa");
     return(other != null &&
            this.Lyric == other.Lyric &&
            this.Length == other.Length &&
            this.Number == other.Number &&
            this.IsRest == other.IsRest);
     // This is nonstrict: it only test for the main properties
 }
Пример #2
0
        /// <summary>
        /// Copy constructor: the internal fields are also completely recreated (deep copy)
        /// </summary>
        /// <param name="u"></param>
        public UtauNote(UtauNote u)
        {
            Number = u.Number;

            MainValues = new OrderedDictionary();
            foreach (DictionaryEntry de in u.MainValues)
            {
                MainValues.Add(de.Key, de.Value);
            }

            AtValues = new OrderedDictionary();
            foreach (DictionaryEntry de in u.AtValues)
            {
                AtValues.Add(de.Key, de.Value);
            }
        }