Exemple #1
0
 internal void CloneInternal(DataGridViewBand dataGridViewBand)
 {
     dataGridViewBand.propertyStore = new PropertyStore();
     dataGridViewBand.bandIndex     = -1;
     dataGridViewBand.bandIsRow     = this.bandIsRow;
     if (!this.bandIsRow || this.bandIndex >= 0 || this.DataGridView == null)
     {
         dataGridViewBand.StateInternal = this.State & ~(DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed);
     }
     dataGridViewBand.thickness        = this.Thickness;
     dataGridViewBand.MinimumThickness = this.MinimumThickness;
     dataGridViewBand.cachedThickness  = this.CachedThickness;
     dataGridViewBand.DividerThickness = this.DividerThickness;
     dataGridViewBand.Tag = this.Tag;
     if (this.HasDefaultCellStyle)
     {
         dataGridViewBand.DefaultCellStyle = new DataGridViewCellStyle(this.DefaultCellStyle);
     }
     if (this.HasDefaultHeaderCellType)
     {
         dataGridViewBand.DefaultHeaderCellType = this.DefaultHeaderCellType;
     }
     if (this.ContextMenuStripInternal != null)
     {
         dataGridViewBand.ContextMenuStrip = this.ContextMenuStripInternal.Clone();
     }
 }
Exemple #2
0
        public virtual object Clone()
        {
            DataGridViewBand result = new DataGridViewBand();

            //////////////////////////////
            return(result);
        }
 internal void CloneInternal(DataGridViewBand dataGridViewBand)
 {
     dataGridViewBand.propertyStore = new PropertyStore();
     dataGridViewBand.bandIndex = -1;
     dataGridViewBand.bandIsRow = this.bandIsRow;
     if ((!this.bandIsRow || (this.bandIndex >= 0)) || (base.DataGridView == null))
     {
         dataGridViewBand.StateInternal = this.State & ~(DataGridViewElementStates.Selected | DataGridViewElementStates.Displayed);
     }
     dataGridViewBand.thickness = this.Thickness;
     dataGridViewBand.MinimumThickness = this.MinimumThickness;
     dataGridViewBand.cachedThickness = this.CachedThickness;
     dataGridViewBand.DividerThickness = this.DividerThickness;
     dataGridViewBand.Tag = this.Tag;
     if (this.HasDefaultCellStyle)
     {
         dataGridViewBand.DefaultCellStyle = new DataGridViewCellStyle(this.DefaultCellStyle);
     }
     if (this.HasDefaultHeaderCellType)
     {
         dataGridViewBand.DefaultHeaderCellType = this.DefaultHeaderCellType;
     }
     if (this.ContextMenuStripInternal != null)
     {
         dataGridViewBand.ContextMenuStrip = this.ContextMenuStripInternal.Clone();
     }
 }
Exemple #4
0
        /// <include file='doc\DataGridViewBand.uex' path='docs/doc[@for="DataGridViewBand.Clone"]/*' />
        public virtual object Clone()
        {
            DataGridViewBand dataGridViewBand = (DataGridViewBand)System.Activator.CreateInstance(this.GetType());

            if (dataGridViewBand != null)
            {
                CloneInternal(dataGridViewBand);
            }
            return(dataGridViewBand);
        }
Exemple #5
0
        /// <include file='doc\DataGridViewBand.uex' path='docs/doc[@for="DataGridViewBand.Clone"]/*' />
        public virtual object Clone()
        {
            // SECREVIEW : Late-binding does not represent a security thread, see

            DataGridViewBand dataGridViewBand = (DataGridViewBand)System.Activator.CreateInstance(this.GetType());

            if (dataGridViewBand != null)
            {
                CloneInternal(dataGridViewBand);
            }
            return(dataGridViewBand);
        }
Exemple #6
0
		public virtual object Clone ()
		{
			DataGridViewBand result = new DataGridViewBand();
			//////////////////////////////
			return result;
		}
 internal void OnBandThicknessChanged(DataGridViewBand dataGridViewBand)
 {
     DataGridViewColumn dataGridViewColumn = dataGridViewBand as DataGridViewColumn;
     if (dataGridViewColumn != null)
     {
         DataGridViewColumnEventArgs dgvce = new DataGridViewColumnEventArgs(dataGridViewColumn);
         OnColumnWidthChanged(dgvce);
     }
     else
     {
         DataGridViewRowEventArgs dgvre = new DataGridViewRowEventArgs((DataGridViewRow) dataGridViewBand);
         OnRowHeightChanged(dgvre);
     }
 }
 internal void OnBandHeaderCellChanged(DataGridViewBand dataGridViewBand)
 {
     DataGridViewColumn dataGridViewColumn = dataGridViewBand as DataGridViewColumn;
     if (dataGridViewColumn != null)
     {
         DataGridViewColumnEventArgs dgvce = new DataGridViewColumnEventArgs(dataGridViewColumn);
         OnColumnHeaderCellChanged(dgvce);
     }
     else
     {
         DataGridViewRowEventArgs dgvre = new DataGridViewRowEventArgs((DataGridViewRow) dataGridViewBand);
         OnRowHeaderCellChanged(dgvre);
     }
 }
 internal void OnBandDefaultCellStyleChanged(DataGridViewBand dataGridViewBand)
 {
     DataGridViewColumn dataGridViewColumn = dataGridViewBand as DataGridViewColumn;
     if (dataGridViewColumn != null)
     {
         DataGridViewColumnEventArgs dgvce = new DataGridViewColumnEventArgs(dataGridViewColumn);
         OnColumnDefaultCellStyleChanged(dgvce);
     }
     else
     {
         DataGridViewRowEventArgs dgvre = new DataGridViewRowEventArgs((DataGridViewRow) dataGridViewBand);
         OnRowDefaultCellStyleChanged(dgvre);
     }
 }
 internal void OnBandContextMenuStripChanged(DataGridViewBand dataGridViewBand)
 {
     DataGridViewColumn dataGridViewColumn = dataGridViewBand as DataGridViewColumn;
     if (dataGridViewColumn != null)
     {
         DataGridViewColumnEventArgs dgvce = new DataGridViewColumnEventArgs(dataGridViewColumn);
         OnColumnContextMenuStripChanged(dgvce);
     }
     else
     {
         DataGridViewRowEventArgs dgvre = new DataGridViewRowEventArgs((DataGridViewRow) dataGridViewBand);
         OnRowContextMenuStripChanged(dgvre);
     }
 }
 internal void OnBandThicknessChanged(DataGridViewBand dataGridViewBand)
 {
     DataGridViewColumn dataGridViewColumn = dataGridViewBand as DataGridViewColumn;
     if (dataGridViewColumn != null)
     {
         DataGridViewColumnEventArgs e = new DataGridViewColumnEventArgs(dataGridViewColumn);
         this.OnColumnWidthChanged(e);
     }
     else
     {
         DataGridViewRowEventArgs args2 = new DataGridViewRowEventArgs((DataGridViewRow) dataGridViewBand);
         this.OnRowHeightChanged(args2);
     }
 }
 internal void OnBandHeaderCellChanged(DataGridViewBand dataGridViewBand)
 {
     DataGridViewColumn dataGridViewColumn = dataGridViewBand as DataGridViewColumn;
     if (dataGridViewColumn != null)
     {
         DataGridViewColumnEventArgs e = new DataGridViewColumnEventArgs(dataGridViewColumn);
         this.OnColumnHeaderCellChanged(e);
     }
     else
     {
         DataGridViewRowEventArgs args2 = new DataGridViewRowEventArgs((DataGridViewRow) dataGridViewBand);
         this.OnRowHeaderCellChanged(args2);
     }
 }
 internal void OnBandContextMenuStripChanged(DataGridViewBand dataGridViewBand)
 {
     DataGridViewColumn dataGridViewColumn = dataGridViewBand as DataGridViewColumn;
     if (dataGridViewColumn != null)
     {
         DataGridViewColumnEventArgs e = new DataGridViewColumnEventArgs(dataGridViewColumn);
         this.OnColumnContextMenuStripChanged(e);
     }
     else
     {
         DataGridViewRowEventArgs args2 = new DataGridViewRowEventArgs((DataGridViewRow) dataGridViewBand);
         this.OnRowContextMenuStripChanged(args2);
     }
 }