Exemplo n.º 1
0
        /// <summary>
        /// Opens the property editor.
        /// </summary>
        /// <param name="_text">The description text that will be shown on the screen.</param>
        /// <param name="_selected">The object on which the properties should be shown or modified.</param>
        /// <returns>The dialog result of the property editor.</returns>
        public static DialogResult ShowModal(string _text, object _selected)
        {
            PropertyEditor frmPropertyEditor = new PropertyEditor();

            frmPropertyEditor.Text = _text;
            frmPropertyEditor.SelectedObject = _selected;

            return frmPropertyEditor.ShowDialog();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Opens the property editor in a MDI container.
        /// </summary>
        /// <param name="_parent">The MDI parent window.</param>
        /// <param name="_text">The description text that will be shown on the screen.</param>
        /// <param name="_selected">The object on which the properties should be shown or modified.</param>
        public static void ShowInMDI(Form _parent, string _text, object _selected)
        {
            PropertyEditor frmPropertyEditor = new PropertyEditor();

            frmPropertyEditor.MdiParent = _parent;
            frmPropertyEditor.Text = _text;

            frmPropertyEditor.SelectedObject = _selected;

            frmPropertyEditor.Show();
        }