Esempio n. 1
0
        /// <summary>
        /// Raises the <see cref="E:System.Windows.Forms.Control.Paint"></see> event and performs custom actions</summary>
        /// <param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs"></see> that contains the event data</param>
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            // This code below is required for display property values while editing a row in the spreadsheet-style GridView.
            //  http://tracker.ship.scea.com/jira/browse/WWSATF-1485
            if (m_context != null)
            {
                Rectangle bounds = base.ClientRectangle;
                bounds.Width -= m_editButton.Width;

                Brush brush = m_descriptor.IsReadOnly ? SystemBrushes.GrayText : SystemBrushes.ControlText;

                try
                {
                    s_drawingEditableValue = true;

                    PropertyEditingControl.DrawProperty(
                        m_descriptor, this, bounds, Font, brush, e.Graphics);
                }
                finally
                {
                    s_drawingEditableValue = false;
                }
            }
        }
Esempio n. 2
0
            public DropDownForm(PropertyEditingControl parent)
            {
                m_parent = parent;

                base.StartPosition   = FormStartPosition.Manual;
                base.ShowInTaskbar   = false;
                base.ControlBox      = false;
                base.MinimizeBox     = false;
                base.MaximizeBox     = false;
                base.FormBorderStyle = FormBorderStyle.FixedToolWindow;
                base.Visible         = false;
            }
Esempio n. 3
0
        /// <summary>
        /// Gets a control for editing the given property</summary>
        /// <param name="property">Property to be edited</param>
        /// <returns>Control for editing the given property</returns>
        protected override Control GetEditingControl(Property property)
        {
            // if editing is disabled, return a null edit control for this property.
            if (property.DisableEditing)
            {
                return null;
            }

            Control control = base.GetEditingControl(property);
            if (control == null)
            {
                PropertyEditingControl editingControl = new PropertyEditingControl();
                editingControl.Bind(property.Context);
                editingControl.Height = RowHeight;
                control = editingControl;
            }

            return control;
        }
Esempio n. 4
0
            public DropDownForm(PropertyEditingControl parent)
            {
                m_parent = parent;

                base.StartPosition = FormStartPosition.Manual;
                base.ShowInTaskbar = false;
                base.ControlBox = false;
                base.MinimizeBox = false;
                base.MaximizeBox = false;
                base.FormBorderStyle = FormBorderStyle.None;
                base.Visible = false;
            }