Beispiel #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);
        }
		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();
                }
            }      
		}
	    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);
        }
 public static fToolbox getToolbox(cEditor editor)
 {
     if (m_fToolbox == null || m_fToolbox.IsDisposed)
     {
         m_fToolbox = new fToolbox();
     }
     m_fToolbox.setHandler(editor);
     return m_fToolbox;
 }
Beispiel #5
0
 internal void setReportCopySource(cEditor cEditor)
 {
     throw new NotImplementedException();
 }
 public static void moveGroup(cReportGroup group, cEditor editor)
 {
     throw new NotImplementedException();
 }
	    public static void setDocActive(cEditor f) {
	        m_editor = f;
	        setMenu();
	    }
Beispiel #8
0
 public void init()
 {
     cEditor editor = new cEditor(this, pnEditor, pnRule, pnReport, tbpEditor);
     editor.init();
     editor.newReport(null);        
 }
Beispiel #9
0
 public void showProperties(cEditor editor, string key)
 {
     lv_properties.Items.Clear();
     if (editor != null)
     {
         setObjectDescription(getControlOrSection(editor, key));
     }
 }
		public static void setDocActive (cEditor editor)
		{
			throw new NotImplementedException ();
		}
		public static void showGroupProperties(object o, cEditor editor)
		{
			throw new NotImplementedException ();
		}
		public static fToolbox getToolBox(cEditor cEditor)
		{
			throw new NotImplementedException ();
		}
 public static void clearToolbox(cEditor editor)
 {
     if (m_editor == editor)
     {
         if (m_fToolbox != null && !m_fToolbox.IsDisposed && m_fToolbox.Visible)
         {
             m_fToolbox.clear();
         }
     }
 }
 public static fTreeViewCtrls getCtrlTreeBox(cEditor editor)
 {
     if (m_fTreeViewCtrls == null || m_fTreeViewCtrls.IsDisposed)
     {
         m_fTreeViewCtrls = new fTreeViewCtrls();
     }
     m_fTreeViewCtrls.setHandler(editor);
     return m_fTreeViewCtrls;
 }
 public static fControls getCtrlBox(cEditor editor)
 {
     if (m_fControls == null || m_fControls.IsDisposed)
     {
         m_fControls = new fControls();
     }
     m_fControls.setHandler(editor);
     return m_fControls;
 }
Beispiel #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);
            }
        }
Beispiel #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);
            }            
        }
 internal static fControls getCtrlBox(cEditor editor)
 {
     throw new NotImplementedException();
 }
Beispiel #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;
     }
 }
 internal static void setDocInacActive(cEditor editor)
 {
     throw new NotImplementedException();
 }
Beispiel #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);
            }            
        }
 internal static fTreeViewCtrls getCtrlTreeBox(cEditor editor)
 {
     throw new NotImplementedException();
 }
	    public static void setDocInacActive(cEditor f) {
	        if (m_editor != f) { return; }
	        m_editor = null;
	        setMenu();
	        setEditAlignTextState(false);
	    }
		public static bool showDbFields (string sField, int nFieldType, int nIndex, cEditor editor)
		{
			throw new NotImplementedException ();
		}
 internal static void clearCtrlBox(cEditor editor)
 {
     throw new NotImplementedException();
 }
Beispiel #26
0
 internal void setReportCopySource(cEditor editor)
 {
     m_sourceEditor = editor;
 }
Beispiel #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);
        }
Beispiel #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);
        }
 public void setHandler(cEditor editor)
 {
     m_editor = editor;
 }
 public static fSearch getSearch(cEditor editor)
 {
     if (m_fSearch == null || m_fSearch.IsDisposed)
     {
         m_fSearch = new fSearch();
     }
     m_fSearch.setHandler(editor);
     return m_fSearch;
 }