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();
                }
            }
        }
 /// <summary>
 ///   default implementation of get editor control
 /// </summary>
 /// <returns></returns>
 public Control getEditorControl()
 {
     if (_supportEditor)
     {
         StaticControlEditor staticControlEditor = getEditor();
         Control             control             = staticControlEditor.Control;
         if (control != null)
         {
             MapData mapData = ControlsMap.getInstance().getMapData(control);
             if (mapData != null && ((LogicalControl)_lg).GuiMgControl == mapData.getControl())
             {
                 // this child has temporary editor
                 return(control);
             }
         }
     }
     return(null);
 }
Example #4
0
 internal BasicControlsManager(Control control)
     : base(control)
 {
     logicalControlsContainer = new LogicalControlsContainer(control);
     tmpEditor = new StaticControlEditor(mainControl);
 }