Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2138,6 +2138,9 @@ csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimenta
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_prefer_system_threading_lock = true:warning

# RS0016: Add public types and members to the declared API
dotnet_diagnostic.RS0016.severity = silent

# ------------------
# Visual Basic files
# ------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ namespace System.Windows.Forms;

internal static class ClientUtils
{
// Sequential version
// assumes sequential enum members 0,1,2,3,4 -etc.
//
public static bool IsEnumValid(Enum enumValue, int value, int minValue, int maxValue)
{
bool valid = (value >= minValue) && (value <= maxValue);
return valid;
}

private enum CharType
{
None,
Expand Down
274 changes: 274 additions & 0 deletions src/System.Windows.Forms/Resources/SR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -7045,4 +7045,278 @@ Stack trace where the illegal operation occurred was:
<data name="FormScreenCaptureModeRequiresTopLevel" xml:space="preserve">
<value>The FormScreenCaptureMode property can only be changed on top-level Forms with their TopLevel property set to true.</value>
</data>
</root>
<data name="DataGridAllowSortingDescr" xml:space="preserve">
<value>Indicates whether the grid can be re-sorted by clicking a column header.</value>
</data>
<data name="DataGridAlternatingBackColorDescr" xml:space="preserve">
<value>Indicates the background color of alternating rows for a ledger appearance.</value>
</data>
<data name="DataGridBackButtonClickDescr" xml:space="preserve">
<value>Occurs when the user clicks the Back button on a child table to return to the parent table.</value>
</data>
<data name="DataGridBackgroundColorDescr" xml:space="preserve">
<value>Indicates the color of the DataGrid background.</value>
</data>
<data name="DataGridBeginInit" xml:space="preserve">
<value>BeginInit() has already been called without an EndInit().</value>
</data>
<data name="DataGridBoolColumnAllowNullValue" xml:space="preserve">
<value>Specifies whether the DataGridBoolColumn allows null values.</value>
</data>
<data name="DataGridBorderStyleDescr" xml:space="preserve">
<value>Indicates the border style for the DataGrid.</value>
</data>
<data name="DataGridCaptionBackButtonToolTip" xml:space="preserve">
<value>Navigates back to the parent rows.</value>
</data>
<data name="DataGridCaptionBackColorDescr" xml:space="preserve">
<value>Indicates the background color of the top caption.</value>
</data>
<data name="DataGridCaptionDetailsButtonToolTip" xml:space="preserve">
<value>Shows/Hides the parent rows for the current set of child rows.</value>
</data>
<data name="DataGridCaptionFontDescr" xml:space="preserve">
<value>Indicates the font of the top caption.</value>
</data>
<data name="DataGridCaptionForeColorDescr" xml:space="preserve">
<value>Indicates the color of text that appears in the top caption.</value>
</data>
<data name="DataGridCaptionTextDescr" xml:space="preserve">
<value>Indicates the text displayed in the top caption.</value>
</data>
<data name="DataGridCaptionVisibleDescr" xml:space="preserve">
<value>Indicates whether the top caption is visible.</value>
</data>
<data name="DataGridColumnCollectionMissing" xml:space="preserve">
<value>DataGridColumn instance does not exist in the collection.</value>
</data>
<data name="DataGridColumnHeadersVisibleDescr" xml:space="preserve">
<value>Indicates whether the column headers are visible.</value>
</data>
<data name="DataGridColumnListManagerPosition" xml:space="preserve">
<value>Position of ListManager must be equal to 'rowNum'.</value>
</data>
<data name="DataGridColumnNoPropertyDescriptor" xml:space="preserve">
<value>PropertyDescriptor has not been set on this DataGridColumn.</value>
</data>
<data name="DataGridColumnStyleDuplicateMappingName" xml:space="preserve">
<value>Data grid column styles collection already contains a column style with the same mapping name.</value>
</data>
<data name="DataGridColumnUnbound" xml:space="preserve">
<value>DataGridColumnStyle of '{0}' cannot be used because it is not associated with a Property or Column in the DataSource.</value>
</data>
<data name="DataGridColumnWidth" xml:space="preserve">
<value>ColumnWidth must be greater than or equal to 0.</value>
</data>
<data name="DataGridCurrentCellDescr" xml:space="preserve">
<value>The currently selected cell in the DataGrid.</value>
</data>
<data name="DataGridDataMemberDescr" xml:space="preserve">
<value>Indicates a sub-list of the DataSource to show in the DataGrid.</value>
</data>
<data name="DataGridDataSourceDescr" xml:space="preserve">
<value>Indicates the source of data for the DataGrid.</value>
</data>
<data name="DataGridDefaultColumnCollectionChanged" xml:space="preserve">
<value>User cannot change the contents of the default GridColumnStylesCollection.</value>
</data>
<data name="DataGridDefaultTableSet" xml:space="preserve">
<value>Value of this property cannot be changed on the default DataGridTableStyle.</value>
</data>
<data name="DataGridDownButtonClickDescr" xml:space="preserve">
<value>Occurs when the user clicks the "show/hide parent rows" icon.</value>
</data>
<data name="DataGridEmptyColor" xml:space="preserve">
<value>Value '{0}' cannot be set to an empty value.</value>
</data>
<data name="DataGridErrorMessageBoxCaption" xml:space="preserve">
<value>Committing the row to the original data store has caused an error.</value>
</data>
<data name="DataGridExceptionInPaint" xml:space="preserve">
<value>DataGrid received an exception at design time. Reset the DataSource and DataMember property on the grid.</value>
</data>
<data name="DataGridFailedToGetRegionInfo" xml:space="preserve">
<value>Program cannot get information about the painting and scrolling region.</value>
</data>
<data name="DataGridFirstVisibleColumnDescr" xml:space="preserve">
<value>Indicates the index of the column that is first shown.</value>
</data>
<data name="DataGridFlatModeDescr" xml:space="preserve">
<value>Indicates whether the grid has a flat appearance.</value>
</data>
<data name="DataGridGridLineColorDescr" xml:space="preserve">
<value>Indicates the color of the grid lines.</value>
</data>
<data name="DataGridGridLineStyleDescr" xml:space="preserve">
<value>Indicates the style of the grid lines.</value>
</data>
<data name="DataGridGridTablesDescr" xml:space="preserve">
<value>The collection of DataGridTableStyle objects that the DataGrid can render its data with.</value>
</data>
<data name="DataGridHeaderBackColorDescr" xml:space="preserve">
<value>Indicates the background color of the column and row headers.</value>
</data>
<data name="DataGridHeaderFontDescr" xml:space="preserve">
<value>Indicates the font of the text in the column and row headers.</value>
</data>
<data name="DataGridHeaderForeColorDescr" xml:space="preserve">
<value>Indicates the color of the text in the column and row headers.</value>
</data>
<data name="DataGridHorizScrollBarDescr" xml:space="preserve">
<value>Returns the horizontal scroll bar used by the grid.</value>
</data>
<data name="DataGridLinkColorDescr" xml:space="preserve">
<value>Indicates the color of the text that appears inside the child links.</value>
</data>
<data name="DataGridLinkHoverColorDescr" xml:space="preserve">
<value>Indicates the color of the text that appears inside a child link when the mouse pointer moves over it.</value>
</data>
<data name="DataGridListManagerDescr" xml:space="preserve">
<value>The CurrencyManager that the DataGrid uses to get data from the data source.</value>
</data>
<data name="DataGridNavigateEventDescr" xml:space="preserve">
<value>Occurs when the user navigates to the child rows or when the user navigates back to the parent rows.</value>
</data>
<data name="DataGridNavigationModeDescr" xml:space="preserve">
<value>Indicates whether links to child tables are shown.</value>
</data>
<data name="DataGridNodeClickEventDescr" xml:space="preserve">
<value>Occurs when the user clicks on the expansion glyph on the row header.</value>
</data>
<data name="DataGridNullText" xml:space="preserve">
<value>Event raised when the value of the BackgroundColor property is changed on DataGrid.</value>
</data>
<data name="DataGridOnBackgroundColorChangedDescr" xml:space="preserve">
<value>Event raised when the value of the BorderStyle property is changed on DataGrid.</value>
</data>
<data name="DataGridOnCaptionVisibleChangedDescr" xml:space="preserve">
<value>Event raised when the value of the CaptionVisible property is changed on DataGrid.</value>
</data>
<data name="DataGridOnCurrentCellChangedDescr" xml:space="preserve">
<value>Event raised when the value of the CurrentCell property is changed on DataGrid.</value>
</data>
<data name="DataGridOnDataSourceChangedDescr" xml:space="preserve">
<value>Event raised when the value of the DataSource property is changed on DataGrid.</value>
</data>
<data name="DataGridOnFlatModeChangedDescr" xml:space="preserve">
<value>Event raised when the value of the FlatMode property is changed on DataGrid.</value>
</data>
<data name="DataGridOnNavigationModeChangedDescr" xml:space="preserve">
<value>Event raised when the value of the NavigationMode property is changed on DataGrid.</value>
</data>
<data name="DataGridOnParentRowsLabelStyleChangedDescr" xml:space="preserve">
<value>Event raised when the value of the ParentRowsLabelStyle property is changed on DataGrid.</value>
</data>
<data name="DataGridOnParentRowsVisibleChangedDescr" xml:space="preserve">
<value>Event raised when the value of the ParentRowsVisible property is changed on DataGrid.</value>
</data>
<data name="DataGridOnReadOnlyChangedDescr" xml:space="preserve">
<value>Event raised when the value of the ReadOnly property is changed on DataGrid.</value>
</data>
<data name="DataGridParentRowsBackColorDescr" xml:space="preserve">
<value>Indicates the background color of the parent rows.</value>
</data>
<data name="DataGridParentRowsForeColorDescr" xml:space="preserve">
<value>Indicates the color of the text in the parent rows.</value>
</data>
<data name="DataGridParentRowsLabelStyleDescr" xml:space="preserve">
<value>Indicates whether the parent rows show labels for the table and for the columns.</value>
</data>
<data name="DataGridParentRowsVisibleDescr" xml:space="preserve">
<value>Indicates whether the parent rows area is visible.</value>
</data>
<data name="DataGridPreferredColumnWidthDescr" xml:space="preserve">
<value>Specifies what the default pixel widths of the grid columns are. The default value for PreferredColumnWidth is 75.</value>
</data>
<data name="DataGridPreferredRowHeightDescr" xml:space="preserve">
<value>Indicates the preferred height of the rows.</value>
</data>
<data name="DataGridPushedIncorrectValueIntoColumn" xml:space="preserve">
<value>Value {0} Do you want to correct this value?</value>
</data>
<data name="DataGridReadOnlyDescr" xml:space="preserve">
<value>Indicates whether rows in the grid can be edited, added, or deleted.</value>
</data>
<data name="DataGridRowHeadersVisibleDescr" xml:space="preserve">
<value>Indicates whether the row headers are visible.</value>
</data>
<data name="DataGridRowHeaderWidthDescr" xml:space="preserve">
<value>Indicates the width of the row headers.</value>
</data>
<data name="DataGridRowRowHeight" xml:space="preserve">
<value>DataGridRow.Height cannot be negative.</value>
</data>
<data name="DataGridRowRowNumber" xml:space="preserve">
<value>DataGridRow cannot have a negative row number.</value>
</data>
<data name="DataGridScrollEventDescr" xml:space="preserve">
<value>Occurs when the user scrolls either the horizontal or vertical scroll bar.</value>
</data>
<data name="DataGridSelectedIndexDescr" xml:space="preserve">
<value>Indicates the index of the current row.</value>
</data>
<data name="DataGridSelectionBackColorDescr" xml:space="preserve">
<value>Indicates the background color of any selected cells or rows.</value>
</data>
<data name="DataGridSelectionForeColorDescr" xml:space="preserve">
<value>Indicates the color of the text in any selected cells or rows.</value>
</data>
<data name="DataGridSetListManager" xml:space="preserve">
<value>ListManager can be set using the DataSource and DataMember properties.</value>
</data>
<data name="DataGridSetSelectIndex" xml:space="preserve">
<value>Position on a null ListManager cannot be set.</value>
</data>
<data name="DataGridSettingCurrentCellNotGood" xml:space="preserve">
<value>CurrentCell cannot be set at this time. Moving your code to the Form.Load event should solve this problem.</value>
</data>
<data name="DataGridTableCollectionMissingTable" xml:space="preserve">
<value>DataGridTable instance does not exist in the collection.</value>
</data>
<data name="DataGridTableStyleCollectionAddedParentedTableStyle" xml:space="preserve">
<value>DataGridTableStyle that is already parented to another DataGrid cannot be added.</value>
</data>
<data name="DataGridTableStyleDuplicateMappingName" xml:space="preserve">
<value>Data grid table styles collection already contains a table style with the same mapping name.</value>
</data>
<data name="DataGridTableStyleTransparentAlternatingBackColorNotAllowed" xml:space="preserve">
<value>DataGridTableStyle does not support transparent AlternatingBackColor.</value>
</data>
<data name="DataGridTableStyleTransparentBackColorNotAllowed" xml:space="preserve">
<value>DataGridTableStyle does not support transparent BackColor.</value>
</data>
<data name="DataGridTableStyleTransparentHeaderBackColorNotAllowed" xml:space="preserve">
<value>DataGridTableStyle does not support transparent HeaderBackColor.</value>
</data>
<data name="DataGridTableStyleTransparentSelectionBackColorNotAllowed" xml:space="preserve">
<value>DataGridTableStyle does not support transparent SelectionBackColor.</value>
</data>
<data name="DataGridToolTipEmptyIcon" xml:space="preserve">
<value>null rectangle for icon bounds when adding tool tip.</value>
</data>
<data name="DataGridTransparentAlternatingBackColorNotAllowed" xml:space="preserve">
<value>DataGrid control does not support transparent AlternatingBackColor.</value>
</data>
<data name="DataGridTransparentBackColorNotAllowed" xml:space="preserve">
<value>DataGrid control does not support transparent BackColor.</value>
</data>
<data name="DataGridTransparentCaptionBackColorNotAllowed" xml:space="preserve">
<value>DataGrid control does not support transparent CaptionBackColor.</value>
</data>
<data name="DataGridTransparentHeaderBackColorNotAllowed" xml:space="preserve">
<value>DataGrid control does not support transparent HeaderBackColor.</value>
</data>
<data name="DataGridTransparentParentRowsBackColorNotAllowed" xml:space="preserve">
<value>DataGrid control does not support transparent ParentRowsBackColor.</value>
</data>
<data name="DataGridTransparentSelectionBackColorNotAllowed" xml:space="preserve">
<value>DataGrid control does not support transparent SelectionBackColor.</value>
</data>
<data name="DataGridUnbound" xml:space="preserve">
<value>Data cannot be read from a DataGrid which is not bound to a DataTable.</value>
</data>
<data name="DataGridVertScrollBarDescr" xml:space="preserve">
<value>Returns the vertical scroll bar used by the grid.</value>
</data>
</root>
Loading