Esempio n. 1
0
        /// <summary>
        /// 删除当前选中的报表控件
        /// </summary>
        public void DeleteSelectedControls()
        {
            DesignSection section = _SectionList.GetActiveSection();

            if (section != null)
            {
                section.DesignControls.RemoveSelectedControl();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 删除当前选中的报表控件
        /// </summary>
        public void DeleteSelectedControls(bool delByKey)
        {
            object        obj     = DesignEnviroment.CurrentRptObj;
            DesignSection section = _SectionList.GetActiveSection();

            if (obj == null || section == null)
            {
                return;
            }
            if (string.Compare(obj.GetType().Name, "RptSection", true) == 0)
            {
                if (delByKey)
                {
                    if (section.DataObj.BackgroundImage != null)
                    {
                        section.DataObj.BackgroundImage = null;
                    }
                }
                else
                {
                    if (section.DesignControls.Count > 0)
                    {
                        DialogResult re = MessageBox.Show("删除Section ,Section  上包含的控件也一起被删除。是否继续?", "操作提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                        if (re == DialogResult.No)
                        {
                            return;
                        }
                    }
                    this.SectionList.DataObj.RemoveSection(section.DataObj);
                }
            }
            else
            {
                section.DesignControls.RemoveSelectedControl();
            }
        }
Esempio n. 3
0
 private void butLeft_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     _SectionList.GetActiveSection().DesignControls.ProcessArrowKeyDown(37, chkIsSize.Checked);
 }