Пример #1
0
        public fMain()
        {
            InitializeComponent();

            // it is the first thing we need to do
            //
            CSKernelClient.cUtil.setSepDecimal();

            cEditor editor = new cEditor(this, pnEditor, pnRule, pnReport, tbpEditor);
        }
Пример #2
0
		public static bool showDbFields(ref string field, ref int fieldType, ref int index, cEditor editor)
		{
            fColumns fc = null;

            try {
                fc = new fColumns();

                fc.clearColumns();

                cReport report = editor.getReport();
                
                cReportConnect connect = report.getConnect();
                fc.fillColumns(connect.getDataSource(), connect.getColumns(), false);

                for (int _i = 0; _i < report.getConnectsAux().count(); _i++)
                {
                    connect = report.getConnectsAux().item(_i);
                    fc.fillColumns(connect.getDataSource(), connect.getColumns(), true);
                }

                fc.setField(field);
                fc.ShowDialog();

                if (fc.getOk())
                {
                    field = fc.getField();
                    fieldType = fc.getFieldType();
                    index = fc.getIndex();

                    return true;
                }
                else
                {
                    return false;
                }

            } catch (Exception ex) {
                cError.mngError(ex, "showDbFields", C_MODULE, "");
                return false;
            }
            finally {
                if (fc != null)
                {
                    fc.Close();
                }
            }      
		}
Пример #3
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);
        }
Пример #4
0
 public static fToolbox getToolbox(cEditor editor)
 {
     if (m_fToolbox == null || m_fToolbox.IsDisposed)
     {
         m_fToolbox = new fToolbox();
     }
     m_fToolbox.setHandler(editor);
     return m_fToolbox;
 }
Пример #5
0
 internal void setReportCopySource(cEditor cEditor)
 {
     throw new NotImplementedException();
 }
Пример #6
0
 public static void moveGroup(cReportGroup group, cEditor editor)
 {
     throw new NotImplementedException();
 }
Пример #7
0
	    public static void setDocActive(cEditor f) {
	        m_editor = f;
	        setMenu();
	    }
Пример #8
0
 public void init()
 {
     cEditor editor = new cEditor(this, pnEditor, pnRule, pnReport, tbpEditor);
     editor.init();
     editor.newReport(null);        
 }
Пример #9
0
 public void showProperties(cEditor editor, string key)
 {
     lv_properties.Items.Clear();
     if (editor != null)
     {
         setObjectDescription(getControlOrSection(editor, key));
     }
 }
Пример #10
0
		public static void setDocActive (cEditor editor)
		{
			throw new NotImplementedException ();
		}
Пример #11
0
		public static void showGroupProperties(object o, cEditor editor)
		{
			throw new NotImplementedException ();
		}
Пример #12
0
		public static fToolbox getToolBox(cEditor cEditor)
		{
			throw new NotImplementedException ();
		}
Пример #13
0
 public static void clearToolbox(cEditor editor)
 {
     if (m_editor == editor)
     {
         if (m_fToolbox != null && !m_fToolbox.IsDisposed && m_fToolbox.Visible)
         {
             m_fToolbox.clear();
         }
     }
 }
Пример #14
0
 public static fTreeViewCtrls getCtrlTreeBox(cEditor editor)
 {
     if (m_fTreeViewCtrls == null || m_fTreeViewCtrls.IsDisposed)
     {
         m_fTreeViewCtrls = new fTreeViewCtrls();
     }
     m_fTreeViewCtrls.setHandler(editor);
     return m_fTreeViewCtrls;
 }
Пример #15
0
 public static fControls getCtrlBox(cEditor editor)
 {
     if (m_fControls == null || m_fControls.IsDisposed)
     {
         m_fControls = new fControls();
     }
     m_fControls.setHandler(editor);
     return m_fControls;
 }
Пример #16
0
        public void showControls(cEditor editor)
        {
            lv_controls.Items.Clear();

            if (editor != null)
            {
                cGlobals.addCtrls(editor.getReport(), lv_controls, C_CTRL_IMAGE, C_DB_IMAGE);
            }
        }
Пример #17
0
        public void showControlsTree(cEditor editor)
        {
            m_wasDoubleClick = false;
            tv_controls.Nodes.Clear();

            if (editor != null)
            {
                cGlobals.addCtrls(editor.getReport(), tv_controls, C_IMG_FOLDER, C_IMG_FORMULA, C_IMG_CONTROL, C_IMG_DATBASE_FIELD);
            }            
        }
Пример #18
0
 internal static fControls getCtrlBox(cEditor editor)
 {
     throw new NotImplementedException();
 }
Пример #19
0
 private object getControlOrSection(cEditor editor, string key)
 {
     if (key.Length > 1)
     {
         if (key.Substring(0, 1) == "S")
         {
             return editor.getSectionOrSectionLineFromKey(key.Substring(1));
         }
         else 
         {
             return editor.getReport().getControls().item(key);
         }
     }
     else 
     {
         return null;
     }
 }
Пример #20
0
 internal static void setDocInacActive(cEditor editor)
 {
     throw new NotImplementedException();
 }
Пример #21
0
        public void showFields(cEditor editor)
        {
            lv_fields.Items.Clear();

            if (editor != null)
            {
                var connect = editor.getReport().getConnect();
                cGlobals.fillColumns(
                    connect.getDataSource(),
                    connect.getColumns(), lv_fields, C_INDEX, C_FIELDTYPE, false);
            }            
        }
Пример #22
0
 internal static fTreeViewCtrls getCtrlTreeBox(cEditor editor)
 {
     throw new NotImplementedException();
 }
Пример #23
0
	    public static void setDocInacActive(cEditor f) {
	        if (m_editor != f) { return; }
	        m_editor = null;
	        setMenu();
	        setEditAlignTextState(false);
	    }
Пример #24
0
		public static bool showDbFields (string sField, int nFieldType, int nIndex, cEditor editor)
		{
			throw new NotImplementedException ();
		}
Пример #25
0
 internal static void clearCtrlBox(cEditor editor)
 {
     throw new NotImplementedException();
 }
Пример #26
0
 internal void setReportCopySource(cEditor editor)
 {
     m_sourceEditor = editor;
 }
Пример #27
0
        public void showPopMenuSection(cEditor editor, bool noDelete, bool showGroups, Point p)
        {
            cmSectionDeleteSection.Enabled = !noDelete;
            cmSectionGroupProperties.Visible = showGroups;
            cmSectionMoveGroup.Visible = showGroups;
            cmSectionGroupSeparator.Visible = showGroups;

            m_contextMenuEditor = editor;

            cmnSection.Show(p);
        }
Пример #28
0
        public void showPopMenuControl(cEditor editor, bool clickInCtrl, bool pasteEnabled, Point p)
        {
            cmCtrlCopy.Enabled = clickInCtrl;
            cmCtrlDelete.Enabled = clickInCtrl;
            cmCtrlEditText.Enabled = clickInCtrl;
            cmCtrlSendBack.Enabled = clickInCtrl;
            cmCtrlBringFront.Enabled = clickInCtrl;
            cmCtrlProperties.Enabled = clickInCtrl;

            cmCtrlPaste.Enabled = pasteEnabled;
            cmCtrlPasteEx.Enabled = pasteEnabled;

            m_contextMenuEditor = editor;

            cmnControl.Show(p);
        }
Пример #29
0
 public void setHandler(cEditor editor)
 {
     m_editor = editor;
 }
Пример #30
0
 public static fSearch getSearch(cEditor editor)
 {
     if (m_fSearch == null || m_fSearch.IsDisposed)
     {
         m_fSearch = new fSearch();
     }
     m_fSearch.setHandler(editor);
     return m_fSearch;
 }