当前位置: 首页>>代码示例>>C#>>正文


C# DataGridViewCell.StateIncludes方法代码示例

本文整理汇总了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);
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:9,代码来源:DataGridView.cs

示例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);
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:10,代码来源:DataGridView.cs

示例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;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:59,代码来源:DataGridViewMethods.cs

示例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));
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:4,代码来源:DataGridView.cs

示例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));
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:5,代码来源:DataGridView.cs

示例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;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:25,代码来源:DataGridView.cs


注:本文中的System.Windows.Forms.DataGridViewCell.StateIncludes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。