public object Clone() { Handbook handbook = (Handbook)this.MemberwiseClone(); handbook.items = CollectionUtils.Clone(items); return(handbook); }
public bool AddHandbook(HandbookGroupId gid, Handbook hb) { HandbookGroup hg = GetHandbookGroup(gid); if (hg != null) { return(hg.AddHandbook(hb)); } return(false); }
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); }
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); } } } }
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); }