示例#1
0
        public void CreateEditorPropertyWindow()
        {
            XMLEditorPropertyControl editorPropertyWindow = null;
            if (_propertyWindowPlace != null)
            {
                editorPropertyWindow = new XMLEditorPropertyControl();
                editorPropertyWindow.textBoxLeft.Text = DocumentLayout.Size.Left.ToString();
                editorPropertyWindow.textBoxTop.Text = DocumentLayout.Size.Top.ToString();
                editorPropertyWindow.textBoxRight.Text = DocumentLayout.Size.Right.ToString();
                editorPropertyWindow.textBoxBottom.Text = DocumentLayout.Size.Bottom.ToString();
                editorPropertyWindow.textBoxBackgroundImage.Text = DocumentLayout.BackgroundImage;

                editorPropertyWindow.Parent = _propertyWindowPlace;
                editorPropertyWindow.Dock = DockStyle.Top;
                editorPropertyWindow.OnDataSourceChanged += delegate { ApplyEditorSettings(editorPropertyWindow); };

                editorPropertyWindow.Show();
            }

            if (_currentPropertyWindow != null)
            {
                _currentPropertyWindow.Hide();
                _currentPropertyWindow.Dispose();
            }
            _currentPropertyWindow = editorPropertyWindow;
        }
示例#2
0
        public void DestroyPropertyWindow()
        {
            if (_currentPropertyWindow != null)
                _currentPropertyWindow.Dispose();

            _currentPropertyWindow = null;
        }
示例#3
0
        public void CreateControlPropertyWindow(IEditorControl xmlControl)
        {
            XMLPropertyControlBase newPropertyWindow = null;
            if (_propertyWindowPlace != null)
            {
                newPropertyWindow = xmlControl.GetPropertyWindow();
                newPropertyWindow.OnDataSourceChanged += delegate { ApplyDataSource(_currentPropertyWindow); };

                newPropertyWindow.Parent = _propertyWindowPlace;
                newPropertyWindow.Dock = DockStyle.Top;
                newPropertyWindow.Show();
            }

            if (_currentPropertyWindow != null)
            {
                _currentPropertyWindow.Hide();
                _currentPropertyWindow.Dispose();
            }

            _currentPropertyWindow = newPropertyWindow;
        }