public void Init(HandbooksInfo handbooksInfo, HandbookGroup handbookGroup, bool rareControl) { using (WaitCursor wc = new WaitCursor()) { this.handbooksInfo = handbooksInfo; this.handbookGroup = handbookGroup; SuspendLayout(); tlp.SuspendLayout(); tlp.AutoSizeMode = AutoSizeMode.GrowAndShrink; chkShowRare.Visible = rareControl; chkShowRare.Checked = !rareControl; tlp.Top = rareControl ? chkShowRare.Bottom + 6 : chkShowRare.Top; LoadData(); ShowRare(); FormUtils.Init(this); AutoScroll = false; tlp.ResumeLayout(); foreach (Control ctl in binding.Values) { if (ctl is ComboBox) { (ctl as ComboBox).SelectionLength = 0; // selection bug fix } } ResumeLayout(); } }
protected void AddHandbooksInfo(HandbooksInfo handbooksInfo, HandbookGroup handbookGroup) { foreach (Handbook handbook in handbookGroup.GetAllHandbooks()) { if (handbook.handbookType != HandbookType.Header) { AddParameter(handbook.id, handbooksInfo[handbook.id]); } } }
public void AddParameter(string key, HandbooksInfo hi) { parameters.Add(key, hi[key]); }
public void Init(HandbooksInfo handbooksInfo, HandbookGroup handbookGroup) { Init(handbooksInfo, handbookGroup, false); }