コード例 #1
0
        /// <summary>
        /// Remove the passed Family Tie
        /// </summary>
        /// <param name="fti"></param>
        /// <returns>true, if the Tie was removed</returns>
        public bool RemoveTie(FamilyTieItem fti)
        {
            int len = ties.Length;

            ties = (FamilyTieItem[])Helper.Delete(ties, fti);
            return(ties.Length < len);
        }
コード例 #2
0
        /// <summary>
        /// Returns the available <see cref="FamilyTieItem"/> for the Sim, or creates a new One
        /// </summary>
        /// <param name="sdsc"></param>
        /// <returns>the <see cref="FamilyTieItem"/> for the passed Sim</returns>
        public FamilyTieItem CreateTie(SDesc sdsc, Data.MetaData.FamilyTieTypes type)
        {
            FamilyTieItem s = FindTie(sdsc);

            if (s == null)
            {
                s    = new FamilyTieItem(type, sdsc.Instance, this.famt);
                ties = (FamilyTieItem[])Helper.Add(ties, s);
            }
            s.Type = type;
            return(s);
        }