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

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

            if (hg != null)
            {
                return(hg.AddHandbook(hb));
            }
            return(false);
        }
Exemple #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);
 }
Exemple #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);
             }
         }
     }
 }
Exemple #6
0
        public IEnumerable <string> GetHandbookItems(string handbookId)
        {
            Handbook hb = GetHandbook(handbookId);

            return(hb == null ? null : hb.Items);
        }
 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);
        }