Example #1
0
        /// <summary>link control to the editor</summary>
        /// <param name="staticControl"></param>
        /// <param name="editor"></param>
        /// <param name="create"></param>
        internal void linkControlToEditor(LogicalControl lg, StaticControlEditor editor, bool create)
        {
            Control control;

            if (create)
            {
                if (editor.Control != null)
                {
                    GuiUtilsBase.ControlToDispose = editor.Control;
                }

                control      = toControl(lg.GuiMgControl);
                control.Size = new Size();
            }
            else
            {
                control = editor.Control;
            }

            ControlsMap.getInstance().setMapData(lg.GuiMgControl, lg._mgRow, control);
            editor.Control = control;

            lg.setProperties(control);

            editor.BoundsComputer = (BoundsComputer)lg.Coordinator;
            editor.Layout();

            lg.setPasswordToControl(control);
        }
Example #2
0
        /// <summary>
        /// recalculate control's position and refresh it
        /// </summary>
        /// <param name="obj"></param>
        protected override void ReCalculateAndRefresh(Object obj)
        {
            base.ReCalculateAndRefresh(obj);
            EditorSupportingCoordinator staticControl = (EditorSupportingCoordinator)((LogicalControl)obj).Coordinator;

            if (staticControl.getEditorControl() != null)
            {
                StaticControlEditor staticControlEditor = staticControl.getEditor();

                if (staticControlEditor != null)
                {
                    staticControlEditor.Layout();
                }
            }
        }