本文整理汇总了C#中System.Windows.Forms.DataGridViewCell.StateIncludes方法的典型用法代码示例。如果您正苦于以下问题:C# DataGridViewCell.StateIncludes方法的具体用法?C# DataGridViewCell.StateIncludes怎么用?C# DataGridViewCell.StateIncludes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.DataGridViewCell
的用法示例。
在下文中一共展示了DataGridViewCell.StateIncludes方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsSharedCellSelected
internal bool IsSharedCellSelected(DataGridViewCell dataGridViewCell, int rowIndex)
{
Debug.Assert(dataGridViewCell != null);
Debug.Assert(rowIndex >= 0);
DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex);
return (rowState & DataGridViewElementStates.Selected) != 0 ||
(dataGridViewCell.OwningColumn != null && dataGridViewCell.OwningColumn.Selected) ||
dataGridViewCell.StateIncludes(DataGridViewElementStates.Selected);
}
示例2: IsSharedCellReadOnly
private bool IsSharedCellReadOnly(DataGridViewCell dataGridViewCell, int rowIndex)
{
Debug.Assert(dataGridViewCell != null);
Debug.Assert(rowIndex >= 0);
DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex);
return this.ReadOnly ||
(rowState & DataGridViewElementStates.ReadOnly) != 0 ||
(dataGridViewCell.OwningColumn != null && dataGridViewCell.OwningColumn.ReadOnly) ||
dataGridViewCell.StateIncludes(DataGridViewElementStates.ReadOnly);
}
示例3: GetCellCount_CellIncluded
private bool GetCellCount_CellIncluded(DataGridViewCell dataGridViewCell,
int rowIndex,
bool displayedRequired,
bool frozenRequired,
bool resizableRequired,
bool readOnlyRequired,
bool visibleRequired)
{
Debug.Assert(dataGridViewCell != null);
Debug.Assert(rowIndex >= 0);
DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex);
if (displayedRequired)
{
bool cellDisplayed = (rowState & DataGridViewElementStates.Displayed) != 0 &&
dataGridViewCell.OwningColumn.Displayed;
if (!cellDisplayed)
{
return false;
}
}
if (frozenRequired)
{
bool cellFrozen = (rowState & DataGridViewElementStates.Frozen) != 0 ||
dataGridViewCell.OwningColumn.Frozen ||
dataGridViewCell.StateIncludes(DataGridViewElementStates.Frozen);
if (!cellFrozen)
{
return false;
}
}
if (resizableRequired)
{
if (!RowIsResizable(rowIndex) && dataGridViewCell.OwningColumn.Resizable != DataGridViewTriState.True)
{
return false;
}
}
if (readOnlyRequired)
{
bool cellReadOnly = this.ReadOnly ||
(rowState & DataGridViewElementStates.ReadOnly) != 0 ||
dataGridViewCell.OwningColumn.ReadOnly ||
dataGridViewCell.StateIncludes(DataGridViewElementStates.ReadOnly);
if (!cellReadOnly)
{
return false;
}
}
if (visibleRequired)
{
bool cellVisible = (rowState & DataGridViewElementStates.Visible) != 0 &&
dataGridViewCell.OwningColumn.Visible;
if (!cellVisible)
{
return false;
}
}
return true;
}
示例4: IsSharedCellSelected
internal bool IsSharedCellSelected(DataGridViewCell dataGridViewCell, int rowIndex)
{
return ((((this.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Selected) != DataGridViewElementStates.None) || ((dataGridViewCell.OwningColumn != null) && dataGridViewCell.OwningColumn.Selected)) || dataGridViewCell.StateIncludes(DataGridViewElementStates.Selected));
}
示例5: IsSharedCellReadOnly
private bool IsSharedCellReadOnly(DataGridViewCell dataGridViewCell, int rowIndex)
{
DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex);
return (((this.ReadOnly || ((rowState & DataGridViewElementStates.ReadOnly) != DataGridViewElementStates.None)) || ((dataGridViewCell.OwningColumn != null) && dataGridViewCell.OwningColumn.ReadOnly)) || dataGridViewCell.StateIncludes(DataGridViewElementStates.ReadOnly));
}
示例6: GetCellCount_CellIncluded
private bool GetCellCount_CellIncluded(DataGridViewCell dataGridViewCell, int rowIndex, bool displayedRequired, bool frozenRequired, bool resizableRequired, bool readOnlyRequired, bool visibleRequired)
{
DataGridViewElementStates rowState = this.Rows.GetRowState(rowIndex);
if (displayedRequired && !(((rowState & DataGridViewElementStates.Displayed) != DataGridViewElementStates.None) && dataGridViewCell.OwningColumn.Displayed))
{
return false;
}
if (frozenRequired && !((((rowState & DataGridViewElementStates.Frozen) != DataGridViewElementStates.None) || dataGridViewCell.OwningColumn.Frozen) || dataGridViewCell.StateIncludes(DataGridViewElementStates.Frozen)))
{
return false;
}
if ((resizableRequired && !this.RowIsResizable(rowIndex)) && (dataGridViewCell.OwningColumn.Resizable != DataGridViewTriState.True))
{
return false;
}
if (readOnlyRequired && !(((this.ReadOnly || ((rowState & DataGridViewElementStates.ReadOnly) != DataGridViewElementStates.None)) || dataGridViewCell.OwningColumn.ReadOnly) || dataGridViewCell.StateIncludes(DataGridViewElementStates.ReadOnly)))
{
return false;
}
if (visibleRequired && !(((rowState & DataGridViewElementStates.Visible) != DataGridViewElementStates.None) && dataGridViewCell.OwningColumn.Visible))
{
return false;
}
return true;
}