示例#1
0
        private void pShowSecProperties(cIReportSection sec, String secLnName) { 
            try {

                m_showingProperties = true;

                if (m_fSecProperties == null) { 
                    m_fSecProperties = new fSecProperties();
                    // TODO: set event handler for ShowEditFormula, UnloadForm
                }

                m_fSecProperties.chkFormulaHide.Checked = sec.getHasFormulaHide();
                m_fSecProperties.setFormulaHide(sec.getFormulaHide().getText());
                
                if (sec is cReportSection) { 
                    m_fSecProperties.txName.Text = sec.getName(); 
                }

                if (sec is cReportSectionLine) {
                    m_fSecProperties.lbControl.Text = secLnName;
                    m_fSecProperties.lbSecLn.Text = "Line properties:";
                } 
                else {
                    m_fSecProperties.lbControl.Text = sec.getName();
                }

                m_fSecProperties.ShowDialog();

                if (m_fSecProperties.getOk()) {
                    if (m_fSecProperties.getSetFormulaHideChanged()) { sec.setHasFormulaHide(m_fSecProperties.chkFormulaHide.Checked); }
                    if (m_fSecProperties.getFormulaHideChanged()) { sec.getFormulaHide().setText(m_fSecProperties.getFormulaHide()); }
                    if (sec is cReportSection) { sec.setName(m_fSecProperties.txName.Text); }
                }

            } catch (Exception ex) {
                cError.mngError(ex, "pShowSecProperties", C_MODULE, "");
            }
            finally {
                m_fSecProperties.Close();
                m_showingProperties = false;
                m_fSecProperties = null;
            }
        }
示例#2
0
        private void pShowSecProperties(cIReportSection sec, String secLnName) {
            try {

                m_showingProperties = true;

                if (m_fSecProperties == null) {
                    m_fSecProperties = new fSecProperties();
                }

                m_fSecProperties.setHandler(this);

                m_fSecProperties.chkFormulaHide.Checked = sec.getHasFormulaHide();
                m_fSecProperties.setFormulaHide(sec.getFormulaHide().getText());

                if (sec is cReportSectionLine) {
                    m_fSecProperties.txName.Enabled = false;
                }

                m_fSecProperties.txName.Text = sec is cReportSectionLine ? secLnName : sec.getName();

                m_fSecProperties.lbSectionName.Text = "Section: " + (sec is cReportSectionLine ? secLnName : sec.getName());

                m_fSecProperties.ShowDialog();

                if (m_fSecProperties.getOk()) {
                    if (m_fSecProperties.getSetFormulaHideChanged()) { sec.setHasFormulaHide(m_fSecProperties.chkFormulaHide.Checked); }
                    if (m_fSecProperties.getFormulaHideChanged()) { sec.getFormulaHide().setText(m_fSecProperties.getFormulaHide()); }
                    if (sec is cReportSection) { sec.setName(m_fSecProperties.txName.Text); }
                }

            } catch (Exception ex) {
                cError.mngError(ex, "pShowSecProperties", C_MODULE, "");
            }
            finally {
                m_fSecProperties.Close();
                m_showingProperties = false;
                m_fSecProperties = null;
            }
        }