private void OnAfterRefreshLayout(DesignSectionEventArgs arg) { if (_AfterRefreshLayout != null) { _AfterRefreshLayout(this, arg); } }
private void OnAfterInsertSection(DesignSectionEventArgs arg) { if (_AfterInsertSection != null) { _AfterInsertSection(this, arg); } }
private void OnBeforeRemoveSection(DesignSectionEventArgs arg) { if (_BeforeRemoveSection != null) { _BeforeRemoveSection(this, arg); } }
private void _SectionList_AfterRefreshLayout(object sender, DesignSectionEventArgs e) { //重新调整 panDesign 的显示高度 int height = _SectionList.GetDesignHeight(); int paperWidth = _DataObj.IsLandscape?_DataObj.PaperSize.Height:_DataObj.PaperSize.Width; int width = paperWidth - _DataObj.Margins.Left - _DataObj.Margins.Right; panDesign.Size = new Size(width, height); //panDesign.ResumeLayout(false); }
private void _SectionList_AfterInsertSection(object sender, DesignSectionEventArgs e) { //当插入一个新的Design Section 后重新布局用户的报 panDesign.Controls.Add(e.Section.CaptionCtl); panDesign.Controls.Add(e.Section); }
private void _SectionList_BeforeRemoveSection(object sender, DesignSectionEventArgs e) { panDesign.Controls.Remove(e.Section.CaptionCtl); panDesign.Controls.Remove(e.Section); }