public DataGridViewRow ()
		{
			cells = new DataGridViewCellCollection(this);
			minimumHeight = 3;
			height = -1;
			explicit_height = -1;
			headerCell = new DataGridViewRowHeaderCell();
			headerCell.SetOwningRow (this);
			accessibilityObject = new AccessibleObject ();
			SetState (DataGridViewElementStates.Visible);
		}
            public override void Select(AccessibleSelection flags)
            {
                if (Owner == null)
                {
                    throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet);
                }

                DataGridViewRowHeaderCell dataGridViewCell = (DataGridViewRowHeaderCell)Owner;
                DataGridView dataGridView = dataGridViewCell.DataGridView;

                if (dataGridView == null)
                {
                    return;
                }
                if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus)
                {
                    dataGridView.Focus();
                }
                if (dataGridViewCell.OwningRow != null &&
                    (dataGridView.SelectionMode == DataGridViewSelectionMode.FullRowSelect ||
                     dataGridView.SelectionMode == DataGridViewSelectionMode.RowHeaderSelect))
                {
                    if ((flags & (AccessibleSelection.TakeSelection | AccessibleSelection.AddSelection)) != 0)
                    {
                        dataGridViewCell.OwningRow.Selected = true;
                    }
                    else if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection)
                    {
                        dataGridViewCell.OwningRow.Selected = false;
                    }
                }
            }
Esempio n. 3
0
            public override void Select(AccessibleSelection flags)
            {
                if (base.Owner == null)
                {
                    throw new InvalidOperationException(System.Windows.Forms.SR.GetString("DataGridViewCellAccessibleObject_OwnerNotSet"));
                }
                DataGridViewRowHeaderCell owner = (DataGridViewRowHeaderCell)base.Owner;
                DataGridView dataGridView       = owner.DataGridView;

                if (dataGridView != null)
                {
                    if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus)
                    {
                        dataGridView.FocusInternal();
                    }
                    if ((owner.OwningRow != null) && ((dataGridView.SelectionMode == DataGridViewSelectionMode.FullRowSelect) || (dataGridView.SelectionMode == DataGridViewSelectionMode.RowHeaderSelect)))
                    {
                        if ((flags & (AccessibleSelection.AddSelection | AccessibleSelection.TakeSelection)) != AccessibleSelection.None)
                        {
                            owner.OwningRow.Selected = true;
                        }
                        else if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection)
                        {
                            owner.OwningRow.Selected = false;
                        }
                    }
                }
            }
 public DataGridViewRow()
 {
     minimumHeight   = 3;
     height          = -1;
     explicit_height = -1;
     headerCell      = new DataGridViewRowHeaderCell();
     headerCell.SetOwningRow(this);
     accessibilityObject = new AccessibleObject();
     SetState(DataGridViewElementStates.Visible);
 }
Esempio n. 5
0
        public override object Clone()
        {
            DataGridViewRowHeaderCell cell;

            System.Type type = base.GetType();
            if (type == cellType)
            {
                cell = new DataGridViewRowHeaderCell();
            }
            else
            {
                cell = (DataGridViewRowHeaderCell)Activator.CreateInstance(type);
            }
            base.CloneInternal(cell);
            cell.Value = base.Value;
            return(cell);
        }
Esempio n. 6
0
        public override object Clone()
        {
            DataGridViewRowHeaderCell dataGridViewCell;
            Type thisType = GetType();

            if (thisType == s_cellType) //performance improvement
            {
                dataGridViewCell = new DataGridViewRowHeaderCell();
            }
            else
            {
                //

                dataGridViewCell = (DataGridViewRowHeaderCell)System.Activator.CreateInstance(thisType);
            }
            base.CloneInternal(dataGridViewCell);
            dataGridViewCell.Value = Value;
            return(dataGridViewCell);
        }
Esempio n. 7
0
		public override bool DataGridViewRowHeaderCellDrawSelectionBackground (DataGridViewRowHeaderCell cell)
		{
			return false;
		}
Esempio n. 8
0
		public override bool DataGridViewRowHeaderCellDrawBorder (DataGridViewRowHeaderCell cell, Graphics g, Rectangle bounds)
		{
			return false;
		}
 /// <include file='doc\DataGridViewRowHeaderCell.uex' path='docs/doc[@for="DataGridViewRowHeaderCellAccessibleObject.DataGridViewRowHeaderCellAccessibleObject"]/*' />
 public DataGridViewRowHeaderCellAccessibleObject(DataGridViewRowHeaderCell owner) : base(owner)
 {
 }
        /// <include file='doc\DataGridViewRowHeaderCell.uex' path='docs/doc[@for="DataGridViewRowHeaderCell.Clone"]/*' />
        public override object Clone()
        {
            DataGridViewRowHeaderCell dataGridViewCell;
            Type thisType = this.GetType();

            if (thisType == cellType) //performance improvement
            {
                dataGridViewCell = new DataGridViewRowHeaderCell();
            }
            else
            {
                // SECREVIEW : Late-binding does not represent a security thread, see bug#411899 for more info..
                //
                dataGridViewCell = (DataGridViewRowHeaderCell) System.Activator.CreateInstance(thisType);
            }
            base.CloneInternal(dataGridViewCell);
            dataGridViewCell.Value = this.Value;
            return dataGridViewCell;
        }
		public override bool DataGridViewRowHeaderCellDrawBorder (DataGridViewRowHeaderCell cell, Graphics g, Rectangle bounds)
		{
			if (!RenderClientAreas ||
				!cell.DataGridView.EnableHeadersVisualStyles || !VisualStyleRenderer.IsElementDefined (DataGridViewRowHeaderCellGetVisualStyleElement (cell)))
				return base.DataGridViewRowHeaderCellDrawBorder (cell, g, bounds);
			g.DrawLine (cell.GetBorderPen (), bounds.Right - 1, bounds.Top, bounds.Right - 1, bounds.Bottom - 1);
			return true;
		}
		static VisualStyleElement DataGridViewRowHeaderCellGetVisualStyleElement (DataGridViewRowHeaderCell cell)
		{
			if (cell.DataGridView.PressedHeaderCell == cell)
				return VisualStyleElement.Header.Item.Pressed;
			if (cell.DataGridView.EnteredHeaderCell == cell)
				return VisualStyleElement.Header.Item.Hot;
			if (cell.OwningRow.SelectedInternal)
				return VisualStyleElement.Header.Item.Pressed;
			return VisualStyleElement.Header.Item.Normal;
		}
		public override bool DataGridViewRowHeaderCellDrawBackground (DataGridViewRowHeaderCell cell, Graphics g, Rectangle bounds)
		{
			if (!RenderClientAreas ||
				!cell.DataGridView.EnableHeadersVisualStyles)
				return base.DataGridViewRowHeaderCellDrawBackground (cell, g, bounds);
			VisualStyleElement element = DataGridViewRowHeaderCellGetVisualStyleElement (cell);
			if (!VisualStyleRenderer.IsElementDefined (element))
				return base.DataGridViewRowHeaderCellDrawBackground (cell, g, bounds);
			bounds.Width--;
			Bitmap bitmap = new Bitmap (bounds.Height, bounds.Width);
			Graphics bitmap_g = Graphics.FromImage (bitmap);
			Rectangle bitmap_rectangle = new Rectangle (Point.Empty, bitmap.Size);
			VisualStyleRenderer renderer = new VisualStyleRenderer (element);
			if (!AreEqual (element, VisualStyleElement.Header.Item.Normal) && renderer.IsBackgroundPartiallyTransparent ())
				new VisualStyleRenderer (VisualStyleElement.Header.Item.Normal).DrawBackground (bitmap_g, bitmap_rectangle);
			renderer.DrawBackground (bitmap_g, bitmap_rectangle);
			bitmap_g.Dispose ();
			g.Transform = new Matrix(0, 1, 1, 0, 0, 0);
			g.DrawImage (bitmap, bounds.Y, bounds.X);
			bitmap.Dispose ();
			g.ResetTransform ();
			return true;
		}
		public override bool DataGridViewRowHeaderCellDrawSelectionBackground (DataGridViewRowHeaderCell cell)
		{
			if (!RenderClientAreas ||
				!cell.DataGridView.EnableHeadersVisualStyles || !VisualStyleRenderer.IsElementDefined (DataGridViewRowHeaderCellGetVisualStyleElement (cell)))
				return base.DataGridViewRowHeaderCellDrawSelectionBackground (cell);
			return true;
		}
Esempio n. 15
0
		public abstract bool DataGridViewRowHeaderCellDrawSelectionBackground (DataGridViewRowHeaderCell cell);
Esempio n. 16
0
File: Theme.cs Progetto: yonder/mono
 public abstract bool DataGridViewRowHeaderCellDrawSelectionBackground(DataGridViewRowHeaderCell cell);
Esempio n. 17
0
		public abstract bool DataGridViewRowHeaderCellDrawBorder (DataGridViewRowHeaderCell cell, Graphics g, Rectangle bounds);
Esempio n. 18
0
 public DataGridViewRowHeaderCellAccessibleObject(DataGridViewRowHeaderCell owner) : base(owner)
 {
 }
Esempio n. 19
0
 public DataGridViewRowHeaderCellAccessibleObject(DataGridViewRowHeaderCell owner)
 {
     throw null;
 }
Esempio n. 20
0
File: Theme.cs Progetto: yonder/mono
 public abstract bool DataGridViewRowHeaderCellDrawBorder(DataGridViewRowHeaderCell cell, Graphics g, Rectangle bounds);
Esempio n. 21
0
 public abstract bool DataGridViewRowHeaderCellDrawBackground(DataGridViewRowHeaderCell cell, Graphics g, Rectangle_ bounds);