예제 #1
0
        public object Clone()
        {
            Handbook handbook = (Handbook)this.MemberwiseClone();

            handbook.items = CollectionUtils.Clone(items);
            return(handbook);
        }
예제 #2
0
        public bool AddHandbook(HandbookGroupId gid, Handbook hb)
        {
            HandbookGroup hg = GetHandbookGroup(gid);

            if (hg != null)
            {
                return(hg.AddHandbook(hb));
            }
            return(false);
        }
예제 #3
0
 public Handbook GetHandbook(string handbookId)
 {
     foreach (HandbookGroup hg in handbookGroups)
     {
         Handbook hb = hg[handbookId];
         if (hb != null)
         {
             return(hb);
         }
     }
     return(null);
 }
 public bool AddHandbook(Handbook hb)
 {
     foreach (Handbook handbook in handbooks)
     {
         if (handbook.id == hb.id)
         {
             return(false);
         }
     }
     handbooks.Add(hb);
     return(true);
 }
예제 #5
0
 public void Init()
 {
     foreach (HandbookGroup hg in handbookGroups)
     {
         hg.handbookRefs.Clear();
         foreach (string handbookId in hg.refs.Split("; ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
         {
             Handbook hb = GetHandbook(handbookId);
             if (hb != null)
             {
                 hg.handbookRefs.Add(hb);
             }
         }
     }
 }
예제 #6
0
        public IEnumerable <string> GetHandbookItems(string handbookId)
        {
            Handbook hb = GetHandbook(handbookId);

            return(hb == null ? null : hb.Items);
        }
예제 #7
0
 public static void Fill(ComboBox cb, Handbook handbook, string text)
 {
     cb.DataSource = handbook.Items;
     cb.Text       = text;
 }
        public IEnumerable <string> GetHandbookItems(string handbookName)
        {
            Handbook hb = this[handbookName];

            return(hb != null ? hb.Items : null);
        }