コード例 #1
0
ファイル: TreeViewAdv.cs プロジェクト: Ejik/Acotwin
 public void HideEditor()
 {
     if (_currentEditorOwner != null)
     {
         _currentEditorOwner.HideEditor(_currentEditor);
         _currentEditor = null;
         _currentEditorOwner = null;
     }
 }
コード例 #2
0
ファイル: TreeViewAdv.cs プロジェクト: Ejik/Acotwin
        public void DisplayEditor(Control control, EditableControl owner)
        {
            if (control == null || owner == null)
                throw new ArgumentNullException();

            if (CurrentNode != null)
            {
                DisposeEditor();
                EditorContext context = new EditorContext();
                context.Owner = owner;
                context.CurrentNode = CurrentNode;
                context.Editor = control;

                SetEditorBounds(context);

                _currentEditor = control;
                _currentEditorOwner = owner;
                UpdateView();
                control.Parent = this;
                control.Focus();
                owner.UpdateEditor(control);
            }
        }
コード例 #3
0
ファイル: TreeViewAdv.cs プロジェクト: Ejik/Acotwin
        public void DisplayEditor(Control control, EditableControl owner)
        {
            if (control == null || owner == null)
                throw new ArgumentNullException();

            if (CurrentNode != null)
            {
                HideEditor();
                _currentEditor = control;
                _currentEditorOwner = owner;
                UpdateEditorBounds();

                UpdateView();
                control.Parent = this;
                control.Focus();
                owner.UpdateEditor(control);
            }
        }
コード例 #4
0
ファイル: TreeViewAdv.cs プロジェクト: Ejik/Acotwin
 private void DisposeEditor()
 {
     if (_currentEditor != null)
         _currentEditor.Parent = null;
     if (_currentEditor != null)
         _currentEditor.Dispose();
     _currentEditor = null;
     _currentEditorOwner = null;
 }