CSReportEditor.cEditor.showToolbox C# (CSharp) Метод

showToolbox() публичный Метод

public showToolbox ( ) : void
Результат void
        public void showToolbox() {

            fToolbox f = cMainEditor.getToolbox(this);

            f.clear();

            pAddColumnsToToolbox(m_report.getConnect().getDataSource(), m_report.getConnect().getColumns(), f);

            for (int _i = 0; _i < m_report.getConnectsAux().count(); _i++) {
                cReportConnect connect = m_report.getConnectsAux().item(_i);
                pAddColumnsToToolbox(connect.getDataSource(), connect.getColumns(), f);
            }

            for (int _i = 0; _i < m_report.getControls().count(); _i++) {
                cReportControl ctrl = m_report.getControls().item(_i);
                if (cDatabaseGlobals.isNumberField(ctrl.getField().getFieldType()))
                {
                    f.addLbFormula(ctrl.getField().getName());

                    // TODO: refactor this to a better way to suggest the
                    //       list of formulas applicable to the type of
                    //       the database field
                    //
                    f.addFormula("Sum", ctrl.getName(), "_Sum");
                    f.addFormula("Maximum", ctrl.getName(), "_Max");
                    f.addFormula("Minimum", ctrl.getName(), "_Min");
                    f.addFormula("Averagge", ctrl.getName(), "_Average");
                }
            }
            if (!f.Visible)
            {
                f.Show(m_fmain);
            }
        }

Usage Example

Пример #1
0
	    public static void setDocActive(cEditor editor) {
	        m_editor = editor;
	        setMenu();
            if (editor != null)
            {
                TabPage editorTab = editor.getEditorTab();
                (editorTab.Parent as TabControl).SelectedTab = editorTab;

                if (m_fToolbox != null && !m_fToolbox.IsDisposed && m_fToolbox.Visible)
                {
                    if (getToolbox(editor) != null) { editor.showToolbox(); }
                }
                if (m_fControls != null && !m_fControls.IsDisposed && m_fControls.Visible)
                {
                    if (getCtrlBox(editor) != null) { editor.showControls(); }
                }
                if (m_fTreeViewCtrls != null && !m_fTreeViewCtrls.IsDisposed && m_fTreeViewCtrls.Visible)
                {
                    if (getCtrlTreeBox(editor) != null) { editor.showControlsTree(); }
                }
            }
            else
            {
                if (m_fToolbox != null && !m_fToolbox.IsDisposed && m_fToolbox.Visible)
                {
                    m_fToolbox.clear();
                }
                if (m_fControls != null && !m_fControls.IsDisposed && m_fControls.Visible)
                {
                    m_fControls.clear();
                }
                if (m_fTreeViewCtrls != null && !m_fTreeViewCtrls.IsDisposed && m_fTreeViewCtrls.Visible)
                {
                    m_fTreeViewCtrls.clear();
                }
            }
            fmain.showControls(editor);
            fmain.showControlsTree(editor);
            fmain.showFields(editor);
        }
cEditor