diff --git a/src/BootstrapBlazor/Attributes/AutoGenerateBaseAttribute.cs b/src/BootstrapBlazor/Attributes/AutoGenerateBaseAttribute.cs index c05bef4244d..e3a21d311ba 100644 --- a/src/BootstrapBlazor/Attributes/AutoGenerateBaseAttribute.cs +++ b/src/BootstrapBlazor/Attributes/AutoGenerateBaseAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,69 +6,82 @@ namespace BootstrapBlazor.Components; /// -/// Base class for AutoGenerateColumn attribute, used to mark auto-generated columns in +/// AutoGenerateColumn 属性基类,用于标记 中的自动生成列 +/// Base class for AutoGenerateColumn attribute, used to mark auto-generated columns in /// public abstract class AutoGenerateBaseAttribute : Attribute { /// - /// Gets or sets whether the current column is editable. Default is true. When set to false, the auto-generated edit UI will not generate this column. + /// 获得/设置 当前列是否可编辑。默认为 true。当设置为 false 时,自动编辑 UI 不会生成此列。 + /// Gets or sets whether the current column is editable. Default is true. When set to false, the auto-generated edit UI will not generate this column. /// [Obsolete("Deprecated. If it is editable, use the Readonly parameter. If it is visible, use the Ignore parameter.")] [ExcludeFromCodeCoverage] public bool Editable { get; set; } = true; /// - /// Gets or sets whether the current column is rendered. Default is false. When set to true, the UI will not generate this column. + /// 获得/设置 当前列是否渲染。默认为 false。当设置为 true 时,UI 不会生成此列。 + /// Gets or sets whether the current column is rendered. Default is false. When set to true, the UI will not generate this column. /// public bool Ignore { get; set; } /// - /// Gets or sets whether the current edit item is read-only. Default is false. + /// 获得/设置 当前编辑项是否只读。默认为 false。 + /// Gets or sets whether the current edit item is read-only. Default is false. /// public bool Readonly { get; set; } /// - /// Gets or sets whether the current edit item is visible. Default is true. + /// 获得/设置 当前编辑项是否可见。默认为 true。 + /// Gets or sets whether the current edit item is visible. Default is true. /// public bool Visible { get; set; } = true; /// - /// Gets or sets whether sorting is allowed. Default is false. + /// 获得/设置 是否允许排序。默认为 false。 + /// Gets or sets whether sorting is allowed. Default is false. /// public bool Sortable { get; set; } /// - /// Gets or sets whether data filtering is allowed. Default is false. + /// 获得/设置 是否允许数据筛选。默认为 false。 + /// Gets or sets whether data filtering is allowed. Default is false. /// public bool Filterable { get; set; } /// - /// Gets or sets whether the column participates in search. Default is false. + /// 获得/设置 此列是否参与搜索。默认为 false。 + /// Gets or sets whether the column participates in search. Default is false. /// public bool Searchable { get; set; } /// - /// Gets or sets whether text wrapping is allowed in this column. Default is false. + /// 获得/设置 此列是否允许文本换行。默认为 false。 + /// Gets or sets whether text wrapping is allowed in this column. Default is false. /// public bool TextWrap { get; set; } /// - /// Gets or sets whether text overflow is ellipsis in this column. Default is false. + /// 获得/设置 此列文本溢出时是否显示省略号。默认为 false。 + /// Gets or sets whether text overflow is ellipsis in this column. Default is false. /// public bool TextEllipsis { get; set; } /// - /// Gets or sets the text alignment. Default is Alignment.None. + /// 获得/设置 文本对齐方式。默认为 Alignment.None。 + /// Gets or sets the text alignment. Default is Alignment.None. /// public Alignment Align { get; set; } /// - /// Gets or sets whether to show tooltips on mouse hover. Default is false. + /// 获得/设置 鼠标悬停时是否显示提示信息。默认为 false。 + /// Gets or sets whether to show tooltips on mouse hover. Default is false. /// public bool ShowTips { get; set; } /// - /// Gets or sets whether the column can be copied. Default is false. + /// 获得/设置 列是否可以被复制。默认为 false。 + /// Gets or sets whether the column can be copied. Default is false. /// public bool ShowCopyColumn { get; set; } } diff --git a/src/BootstrapBlazor/Attributes/AutoGenerateClassAttribute.cs b/src/BootstrapBlazor/Attributes/AutoGenerateClassAttribute.cs index c5943dcb201..267554cbd2c 100644 --- a/src/BootstrapBlazor/Attributes/AutoGenerateClassAttribute.cs +++ b/src/BootstrapBlazor/Attributes/AutoGenerateClassAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// AutoGenerateColumn attribute class, used to mark auto-generated columns in +/// AutoGenerateColumn 属性类,用于在 中标记自动生成的列 +/// AutoGenerateColumn attribute class, used to mark auto-generated columns in /// [AttributeUsage(AttributeTargets.Class)] public class AutoGenerateClassAttribute : AutoGenerateBaseAttribute diff --git a/src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs b/src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs index 606e71a00ab..b21ef5ee3ff 100644 --- a/src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs +++ b/src/BootstrapBlazor/Attributes/AutoGenerateColumnAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,19 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// AutoGenerateColumn attribute class, used to mark auto-generated columns in +/// AutoGenerateColumn 属性类,用于在 中标记自动生成的列 +/// AutoGenerateColumn attribute class, used to mark auto-generated columns in /// [AttributeUsage(AttributeTargets.Property)] public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColumn { /// - /// Gets or sets the display order. The rules are as follows: - /// - /// >0 for the front, 1,2,3... - /// - /// =0 for the middle (default) - /// - /// <0 for the back, ...-3,-2,-1 + /// 获得/设置 显示顺序。规则如下: + /// Gets or sets the display order. The rules are as follows: + /// >0 正序排列,1,2,3... + /// >0 for the front, 1,2,3... + /// =0 保持默认 + /// =0 for the middle (default) + /// <0 倒序排列,...-3,-2,-1 + /// <0 for the back, ...-3,-2,-1 /// public int Order { get; set; } @@ -33,7 +35,8 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu public bool SkipValidate { get; set; } /// - /// Gets or sets whether the column is read-only when adding a new item. Default is null, using the value. + /// 获得/设置 新建时此列是否只读。默认值为 null,使用 值。 + /// Gets or sets whether the column is read-only when adding a new item. Default is null, using the value. /// public bool IsReadonlyWhenAdd { get; set; } @@ -44,7 +47,8 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu } /// - /// Gets or sets whether the column is read-only when editing an item. Default is null, using the value. + /// 获得/设置 编辑时此列是否只读。默认值为 null,使用 值。 + /// Gets or sets whether the column is read-only when editing an item. Default is null, using the value. /// public bool IsReadonlyWhenEdit { get; set; } @@ -55,7 +59,8 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu } /// - /// Gets or sets whether the column is visible when adding a new item. Default is null, using the value. + /// 获得/设置 新建时此列是否可见。默认值为 null,使用 值。 + /// Gets or sets whether the column is visible when adding a new item. Default is null, using the value. /// public bool IsVisibleWhenAdd { get; set; } = true; @@ -66,7 +71,8 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu } /// - /// Gets or sets whether the column is visible when editing an item. Default is null, using the value. + /// 获得/设置 编辑时此列是否可见。默认值为 null,使用 值。 + /// Gets or sets whether the column is visible when editing an item. Default is null, using the value. /// public bool IsVisibleWhenEdit { get; set; } = true; @@ -90,7 +96,8 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu public string? RequiredErrorMessage { get; set; } /// - /// Gets or sets whether to show label tooltip. Mostly used when the label text is too long and gets truncated. Default is false. + /// 获得/设置 是否显示标签工具提示。通常用于标签文本过长被截断时。默认为 false。 + /// Gets or sets whether to show label tooltip. Mostly used when the label text is too long and gets truncated. Default is false. /// public bool ShowLabelTooltip { get; set; } @@ -101,14 +108,16 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu } /// - /// Gets or sets the default sort order. Default is SortOrder.Unset. + /// 获得/设置 默认排序顺序。默认为 SortOrder.Unset。 + /// Gets or sets the default sort order. Default is SortOrder.Unset. /// public SortOrder DefaultSortOrder { get; set; } IEnumerable? IEditorItem.Items { get; set; } /// - /// Gets or sets the column width. + /// 获得/设置 列宽。 + /// Gets or sets the column width. /// public int Width { get; set; } @@ -230,6 +239,9 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu /// public bool ShowSearchWhenSelect { get; set; } + /// + /// + /// /// /// /// @@ -253,17 +265,17 @@ public class AutoGenerateColumnAttribute : AutoGenerateBaseAttribute, ITableColu ILookupService? ILookup.LookupService { get; set; } /// - /// > + /// /// public string? LookupServiceKey { get; set; } /// - /// > + /// /// public object? LookupServiceData { get; set; } /// - /// > + /// /// public StringComparison LookupStringComparison { get; set; } = StringComparison.OrdinalIgnoreCase; diff --git a/src/BootstrapBlazor/Attributes/BootstrapModuleAutoLoaderAttribute.cs b/src/BootstrapBlazor/Attributes/BootstrapModuleAutoLoaderAttribute.cs index 620fac2a15f..d52fedca741 100644 --- a/src/BootstrapBlazor/Attributes/BootstrapModuleAutoLoaderAttribute.cs +++ b/src/BootstrapBlazor/Attributes/BootstrapModuleAutoLoaderAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// Constructor +/// 构造函数 +/// Constructor /// /// class BootstrapModuleAutoLoaderAttribute(string? path = null) : JSModuleAutoLoaderAttribute(path) { /// - /// Gets or sets the module name. Automatically uses scripts from the modules folder. + /// 获得/设置 模块名称。自动使用 modules 文件夹中的脚本。 + /// Gets or sets the module name. Automatically uses scripts from the modules folder. /// public string? ModuleName { get; set; } } diff --git a/src/BootstrapBlazor/Attributes/FileValidationAttribute.cs b/src/BootstrapBlazor/Attributes/FileValidationAttribute.cs index 3e3d601027c..829a845fd9d 100644 --- a/src/BootstrapBlazor/Attributes/FileValidationAttribute.cs +++ b/src/BootstrapBlazor/Attributes/FileValidationAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// 上传文件扩展名验证标签类 +/// 上传文件扩展名验证标签类 +/// Upload file extension validation attribute class /// [AttributeUsage(AttributeTargets.Property)] public class FileValidationAttribute : ValidationAttribute @@ -17,17 +18,20 @@ public class FileValidationAttribute : ValidationAttribute private IStringLocalizer? Localizer { get; set; } /// - /// 获得/设置 允许的扩展名 + /// 获得/设置 允许的扩展名 + /// Gets or sets allowed extensions /// public string[] Extensions { get; set; } = []; /// - /// 获得/设置 文件大小 默认为 0 未限制 + /// 获得/设置 文件大小 默认为 0 未限制 + /// Gets or sets file size. Default is 0 (no limit) /// public long FileSize { get; set; } /// - /// 是否合规判断方法 + /// 是否合规判断方法 + /// Is valid method /// /// /// diff --git a/src/BootstrapBlazor/Attributes/JSModuleAutoLoaderAttribute.cs b/src/BootstrapBlazor/Attributes/JSModuleAutoLoaderAttribute.cs index b23753ae99c..9d9d1907b3a 100644 --- a/src/BootstrapBlazor/Attributes/JSModuleAutoLoaderAttribute.cs +++ b/src/BootstrapBlazor/Attributes/JSModuleAutoLoaderAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,29 +6,34 @@ namespace BootstrapBlazor.Components; /// -/// JSModuleAutoLoaderAttribute class +/// JSModuleAutoLoaderAttribute 类 +/// JSModuleAutoLoaderAttribute class /// -/// The path to the JavaScript module +/// JavaScript 模块的路径The path to the JavaScript module [AttributeUsage(AttributeTargets.Class)] public class JSModuleAutoLoaderAttribute(string? path = null) : Attribute { /// - /// Gets the path property + /// 获得 路径属性 + /// Gets the path property /// public string? Path { get; } = path; /// - /// Represents a reference to a JavaScript object. Default value is false. + /// 表示对 JavaScript 对象的引用。默认值为 false。 + /// Represents a reference to a JavaScript object. Default value is false. /// public bool JSObjectReference { get; set; } /// - /// Gets or sets whether to automatically invoke init. Default is true. + /// 获得/设置 是否自动调用 init。默认值为 true。 + /// Gets or sets whether to automatically invoke init. Default is true. /// public bool AutoInvokeInit { get; set; } = true; /// - /// Gets or sets whether to automatically invoke dispose. Default is true. + /// 获得/设置 是否自动调用 dispose。默认值为 true。 + /// Gets or sets whether to automatically invoke dispose. Default is true. /// public bool AutoInvokeDispose { get; set; } = true; } diff --git a/src/BootstrapBlazor/Attributes/JSModuleNotInheritedAttribute.cs b/src/BootstrapBlazor/Attributes/JSModuleNotInheritedAttribute.cs index dc2005784d9..68c91bfb5e6 100644 --- a/src/BootstrapBlazor/Attributes/JSModuleNotInheritedAttribute.cs +++ b/src/BootstrapBlazor/Attributes/JSModuleNotInheritedAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,11 +6,11 @@ namespace BootstrapBlazor.Components; /// -/// JSModuleNotInheritedAttribute +/// JSModuleNotInheritedAttribute +/// JSModuleNotInheritedAttribute /// [AttributeUsage(AttributeTargets.Class)] public sealed class JSModuleNotInheritedAttribute : Attribute { - // 增加 sealed 关键字防止二开写派生类导致 type.GetCustomAttribute() 报错 - // BootstrapModuleComponentBase 类 OnLoadJSModule 方法 + } diff --git a/src/BootstrapBlazor/Attributes/NullableBoolItemsAttribute.cs b/src/BootstrapBlazor/Attributes/NullableBoolItemsAttribute.cs index 19b21468b50..6e7770de64b 100644 --- a/src/BootstrapBlazor/Attributes/NullableBoolItemsAttribute.cs +++ b/src/BootstrapBlazor/Attributes/NullableBoolItemsAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,23 +6,27 @@ namespace BootstrapBlazor.Components; /// -/// Nullable boolean type converter +/// 可为空布尔类型转换器 +/// Nullable boolean type converter /// [AttributeUsage(AttributeTargets.Property)] public class NullableBoolItemsAttribute : Attribute { /// - /// Gets or sets the display text for null value + /// 获得/设置 空值显示文本 + /// Gets or sets the display text for null value /// public string? NullValueDisplayText { get; set; } /// - /// Gets or sets the display text for true value + /// 获得/设置 True 值显示文本 + /// Gets or sets the display text for true value /// public string? TrueValueDisplayText { get; set; } /// - /// Gets or sets the display text for false value + /// 获得/设置 False 值显示文本 + /// Gets or sets the display text for false value /// public string? FalseValueDisplayText { get; set; } } diff --git a/src/BootstrapBlazor/Attributes/PlaceHolderAttribute.cs b/src/BootstrapBlazor/Attributes/PlaceHolderAttribute.cs index 435aac53fe8..b7db0ca6e59 100644 --- a/src/BootstrapBlazor/Attributes/PlaceHolderAttribute.cs +++ b/src/BootstrapBlazor/Attributes/PlaceHolderAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,14 +6,16 @@ namespace BootstrapBlazor.Components; /// -/// PlaceHolderAttribute class used to define a placeholder for a property. +/// PlaceHolderAttribute 类,用于定义属性的占位符。 +/// PlaceHolderAttribute class used to define a placeholder for a property. /// -/// The placeholder text. +/// 占位符文本The placeholder text. [AttributeUsage(AttributeTargets.Property)] public class PlaceHolderAttribute(string placeholder) : Attribute { /// - /// Gets the placeholder text. + /// 获得 占位符文本 + /// Gets the placeholder text. /// - public string Text { get; } = placeholder; + public string Text => placeholder; } diff --git a/src/BootstrapBlazor/Attributes/TabItemOptionAttribute.cs b/src/BootstrapBlazor/Attributes/TabItemOptionAttribute.cs index 25fc4d3ee13..9e379f456ed 100644 --- a/src/BootstrapBlazor/Attributes/TabItemOptionAttribute.cs +++ b/src/BootstrapBlazor/Attributes/TabItemOptionAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,23 +6,27 @@ namespace BootstrapBlazor.Components; /// -/// TabItem configuration attribute class +/// TabItem 配置属性类 +/// TabItem configuration attribute class /// [AttributeUsage(AttributeTargets.Class)] public class TabItemOptionAttribute : Attribute { /// - /// Gets or sets the text of the tab item. + /// 获得/设置 TabItem 文本 + /// Gets or sets the text of the tab item. /// public string? Text { get; set; } /// - /// Gets or sets whether the current TabItem is closable. Default is true. + /// 获得/设置 当前 TabItem 是否可关闭。默认值为 true。 + /// Gets or sets whether the current TabItem is closable. Default is true. /// public bool Closable { get; set; } = true; /// - /// Gets or sets the icon string. + /// 获得/设置 图标字符串 + /// Gets or sets the icon string. /// public string? Icon { get; set; } } diff --git a/src/BootstrapBlazor/Attributes/TableMetadataForAttribute.cs b/src/BootstrapBlazor/Attributes/TableMetadataForAttribute.cs index 0588f57a62e..a077e75115a 100644 --- a/src/BootstrapBlazor/Attributes/TableMetadataForAttribute.cs +++ b/src/BootstrapBlazor/Attributes/TableMetadataForAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,14 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// Define a group of UI generation metadata for target data type -/// Usually model types are at different layer to the blazor component UI layer. -/// In this case, use to define a metadata type for Table component. -/// Then register metadata type with +/// 定义目标数据类型的 UI 生成元数据组 +/// 通常模型类型位于与 Blazor 组件 UI 层不同的层。 +/// 在这种情况下,使用 为 Table 组件定义元数据类型。 +/// 然后使用 注册元数据类型 +/// Define a group of UI generation metadata for target data type +/// Usually model types are at different layer to the blazor component UI layer. +/// In this case, use to define a metadata type for Table component. +/// Then register metadata type with /// /// -/// Example: -/// the Pig data type is usually at biz or data layer +/// 示例: +/// Pig 数据类型通常位于业务层或数据层 +/// Example: +/// the Pig data type is usually at biz or data layer /// /// public class Pig /// { @@ -22,7 +28,8 @@ namespace BootstrapBlazor.Components; /// public string? Name2 { get; set; } /// } /// -/// the PigMetadata can be defined at UI/component layer +/// PigMetadata 可以定义在 UI/组件层 +/// the PigMetadata can be defined at UI/component layer /// /// [TableMetadataFor(typeof(Pig))] /// [AutoGenerateClass(Align = Alignment.Center)] @@ -35,28 +42,33 @@ namespace BootstrapBlazor.Components; /// public string? Name2 { get; set; } /// } /// -/// before using the metadata, it needs to register the metadata types. -/// register metadata types in assembly +/// 在使用元数据之前,需要注册元数据类型。 +/// 在程序集中注册元数据类型 +/// before using the metadata, it needs to register the metadata types. +/// register metadata types in assembly /// /// TableMetadataTypeService.RegisterMetadataTypes(typeof(Pig).Assembly); /// var cols = Utility.GetTableColumns<Pig>().ToList(); /// Assert.Single(cols); /// -/// or you can register types individually +/// 或者您可以单独注册类型 +/// or you can register types individually /// /// TableMetadataTypeService.RegisterMetadataType(metadataType, dataType); /// /// /// /// -/// Constructor TableMetadataForAttribute for target data type +/// TableMetadataForAttribute 构造函数 +/// Constructor TableMetadataForAttribute for target data type /// -/// The target model/data type +/// 目标模型/数据类型The target model/data type [AttributeUsage(AttributeTargets.Class)] public class TableMetadataForAttribute(Type dataType) : Attribute { /// - /// Gets the target model/data type + /// 获得 目标模型/数据类型 + /// Gets the target model/data type /// public Type DataType => dataType; } diff --git a/src/BootstrapBlazor/Components/Affix/Affix.razor.cs b/src/BootstrapBlazor/Components/Affix/Affix.razor.cs index 2b9c3823db4..8e5f5ff9148 100644 --- a/src/BootstrapBlazor/Components/Affix/Affix.razor.cs +++ b/src/BootstrapBlazor/Components/Affix/Affix.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,30 +8,39 @@ namespace BootstrapBlazor.Components; /// -/// Affix 固钉组件 +/// Affix 固钉组件 +/// Affix component /// public partial class Affix { /// - /// 获得/设置 指定偏移量后触发 + /// 获得/设置 指定偏移量后触发 + /// Gets or sets the offset value to trigger + /// 10.2.2 /// [Parameter] public float Offset { get; set; } /// - /// 获得/设置 固定位置枚举 默认 + /// 获得/设置 固定位置枚举 默认 + /// Gets or sets the affix position. Default is + /// 10.2.2 /// [Parameter] public AffixPosition Position { get; set; } /// - /// 获得/设置 z-index 值 默认 100 + /// 获得/设置 z-index 值 默认 100 + /// Gets or sets the z-index value. Default is 100 + /// 10.2.2 /// [Parameter] public int? ZIndex { get; set; } /// - /// 获得/设置 组件内容 + /// 获得/设置 组件内容 + /// Gets or sets the child content + /// 10.2.2 /// [Parameter] [EditorRequired] diff --git a/src/BootstrapBlazor/Components/Ajax/AjaxOption.cs b/src/BootstrapBlazor/Components/Ajax/AjaxOption.cs index c83b7ca185a..2c35072132e 100644 --- a/src/BootstrapBlazor/Components/Ajax/AjaxOption.cs +++ b/src/BootstrapBlazor/Components/Ajax/AjaxOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,29 +6,34 @@ namespace BootstrapBlazor.Components; /// -/// Ajax配置类 +/// Ajax配置类 +/// Ajax configuration class /// public class AjaxOption { /// - /// 获取/设置 要上传的参数类 + /// 获取/设置 要上传的参数类 + /// Gets or sets the parameter object to upload /// [NotNull] public object? Data { get; set; } /// - /// 获取/设置 传输方式,默认为POST + /// 获取/设置 传输方式,默认为POST + /// Gets or sets the transfer method. Default is POST /// public string Method { get; set; } = "POST"; /// - /// 获取/设置 请求的URL + /// 获取/设置 请求的URL + /// Gets or sets the request URL /// [NotNull] public string? Url { get; set; } /// - /// 获得/设置 是否获得序列化 Json 结果 参数 默认为 true + /// 获得/设置 是否获得序列化 Json 结果 参数 默认为 true + /// Gets or sets whether to get the serialized Json result. Default is true /// [NotNull] public bool ToJson { get; set; } = true; diff --git a/src/BootstrapBlazor/Components/Alert/Alert.razor.cs b/src/BootstrapBlazor/Components/Alert/Alert.razor.cs index 2e6c939c51e..fc3c835e55e 100644 --- a/src/BootstrapBlazor/Components/Alert/Alert.razor.cs +++ b/src/BootstrapBlazor/Components/Alert/Alert.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Alert 组件 +/// Alert 组件 +/// Alert component /// public partial class Alert { /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Gets the class name /// /// private string? ClassName => CssBuilder.Default("alert fade show") @@ -27,13 +29,17 @@ public partial class Alert private bool IsShown { get; set; } = true; /// - /// 获得/设置 是否显示阴影 默认 false 不显示 + /// 获得/设置 是否显示阴影 默认 false 不显示 + /// Gets or sets whether to show shadow. Default is false + /// 10.2.2 /// [Parameter] public bool ShowShadow { get; set; } /// - /// 获得/设置 是否显示边框 默认 false 不显示 + /// 获得/设置 是否显示边框 默认 false 不显示 + /// Gets or sets whether to show border. Default is false + /// 10.2.2 /// [Parameter] public bool ShowBorder { get; set; } diff --git a/src/BootstrapBlazor/Components/Alert/AlertBase.cs b/src/BootstrapBlazor/Components/Alert/AlertBase.cs index 38a8c321080..ed735400720 100644 --- a/src/BootstrapBlazor/Components/Alert/AlertBase.cs +++ b/src/BootstrapBlazor/Components/Alert/AlertBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,49 +6,63 @@ namespace BootstrapBlazor.Components; /// -/// Alert 警告框组件 +/// Alert 警告框组件 +/// Alert component /// public abstract class AlertBase : BootstrapComponentBase { /// - /// 获得 图标样式字符串 + /// 获得 图标样式字符串 + /// Gets the icon class string /// protected string? IconString => CssBuilder.Default("alert-icon") .AddClass(Icon) .Build(); /// - /// 获得/设置 颜色 + /// 获得/设置 颜色 + /// Gets or sets the color + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.Primary; /// - /// 获得/设置 是否显示关闭按钮 + /// 获得/设置 是否显示关闭按钮 + /// Gets or sets whether to show the dismiss button + /// 10.2.2 /// [Parameter] public bool ShowDismiss { get; set; } /// - /// 获得/设置 显示图标 + /// 获得/设置 显示图标 + /// Gets or sets the icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 是否显示左侧 Bar + /// 获得/设置 是否显示左侧 Bar + /// Gets or sets whether to show the left bar + /// 10.2.2 /// [Parameter] public bool ShowBar { get; set; } /// - /// 子组件 + /// 子组件 + /// Child content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 关闭警告框回调方法 + /// 关闭警告框回调方法 + /// Callback method when the alert is dismissed + /// 10.2.2 /// [Parameter] public Func? OnDismiss { get; set; } diff --git a/src/BootstrapBlazor/Components/Anchor/Anchor.razor.cs b/src/BootstrapBlazor/Components/Anchor/Anchor.razor.cs index f7a48cad0dd..5895e3d100d 100644 --- a/src/BootstrapBlazor/Components/Anchor/Anchor.razor.cs +++ b/src/BootstrapBlazor/Components/Anchor/Anchor.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,41 +6,53 @@ namespace BootstrapBlazor.Components; /// -/// Anchor 组件部分类 +/// Anchor 组件部分类 +/// Anchor component /// public partial class Anchor { /// - /// 获得/设置 目标组件 Id + /// 获得/设置 目标组件 Id + /// Gets or sets the target component Id + /// 10.2.2 /// [Parameter] public string? Target { get; set; } /// - /// 获得/设置 滚动组件 Id 默认为 null 使用最近滚动条容器元素 + /// 获得/设置 滚动组件 Id 默认为 null 使用最近滚动条容器元素 + /// Gets or sets the scroll component Id. Default is null, using the nearest scroll container element + /// 10.2.2 /// [Parameter] public string? Container { get; set; } /// - /// 获得/设置 滚动时是否开启动画 默认 true + /// 获得/设置 滚动时是否开启动画 默认 true + /// Gets or sets whether to enable animation when scrolling. Default is true + /// 10.2.2 /// [Parameter] public bool IsAnimation { get; set; } = true; /// - /// 获得 滚动动画 + /// 获得 滚动动画 + /// Gets the scroll animation /// protected string? AnimationString => IsAnimation ? "true" : null; /// - /// 获得/设置 距离顶端偏移量 默认为 0 + /// 获得/设置 距离顶端偏移量 默认为 0 + /// Gets or sets the offset from the top. Default is 0 + /// 10.2.2 /// [Parameter] public int Offset { get; set; } /// - /// 获得/设置 子内容 + /// 获得/设置 子内容 + /// Gets or sets the child content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/AnchorLink/AnchorLink.razor.cs b/src/BootstrapBlazor/Components/AnchorLink/AnchorLink.razor.cs index c39cda12d0b..8523fc03e59 100644 --- a/src/BootstrapBlazor/Components/AnchorLink/AnchorLink.razor.cs +++ b/src/BootstrapBlazor/Components/AnchorLink/AnchorLink.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// AnchorLink 组件 +/// AnchorLink 组件 +/// AnchorLink component /// public partial class AnchorLink { /// - /// 获得/设置 组件 Text 显示文字 + /// 获得/设置 组件 Text 显示文字 + /// Gets or sets the component text display + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 组件 拷贝成功后 显示文字 + /// 获得/设置 组件 拷贝成功后 显示文字 + /// Gets or sets the display text after successful copy + /// 10.2.2 /// [Parameter] public string? TooltipText { get; set; } /// - /// 获得/设置 锚点图标 默认 fa-solid fa-link + /// 获得/设置 锚点图标 默认 fa-solid fa-link + /// Gets or sets the anchor icon. Default is fa-solid fa-link + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } diff --git a/src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs b/src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs index 3025f9f0348..20af86de2a8 100644 --- a/src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs +++ b/src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,75 +8,96 @@ namespace BootstrapBlazor.Components; /// -/// AutoComplete component +/// AutoComplete 组件 +/// AutoComplete component /// public partial class AutoComplete { /// - /// Gets or sets the collection of matching data obtained by inputting a string + /// 获得/设置 通过输入字符串获得的匹配数据集合 + /// Gets or sets the collection of matching data obtained by inputting a string + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// Gets or sets custom collection filtering rules, default is null + /// 获得/设置 自定义集合过滤规则 默认为 null + /// Gets or sets custom collection filtering rules, default is null + /// 10.2.2 /// [Parameter] public Func>>? OnCustomFilter { get; set; } /// - /// Gets or sets the icon + /// 获得/设置 图标 + /// Gets or sets the icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// Gets or sets the loading icon + /// 获得/设置 加载图标 + /// Gets or sets the loading icon + /// 10.2.2 /// [Parameter] public string? LoadingIcon { get; set; } /// - /// Gets or sets the number of items to display when matching data + /// 获得/设置 匹配数据时显示的数量 + /// Gets or sets the number of items to display when matching data + /// 10.2.2 /// [Parameter] [NotNull] public int? DisplayCount { get; set; } /// - /// Gets or sets whether to enable fuzzy search, default is false + /// 获得/设置 是否开启模糊搜索 默认为 false + /// Gets or sets whether to enable fuzzy search, default is false + /// 10.2.2 /// [Parameter] public bool IsLikeMatch { get; set; } /// - /// Gets or sets whether to ignore case when matching, default is true + /// 获得/设置 匹配时是否忽略大小写 默认为 true + /// Gets or sets whether to ignore case when matching, default is true + /// 10.2.2 /// [Parameter] public bool IgnoreCase { get; set; } = true; /// - /// Gets or sets whether to expand the dropdown candidate menu when focused, default is true + /// 获得/设置 获得焦点时是否展开下拉候选菜单 默认为 true + /// Gets or sets whether to expand the dropdown candidate menu when focused, default is true + /// 10.2.2 /// [Parameter] public bool ShowDropdownListOnFocus { get; set; } = true; /// - /// Gets or sets whether to show the no matching data option, default is true + /// 获得/设置 是否显示无匹配数据选项 默认为 true + /// Gets or sets whether to show the no matching data option, default is true + /// 10.2.2 /// [Parameter] public bool ShowNoDataTip { get; set; } = true; /// - /// IStringLocalizer service instance + /// IStringLocalizer 服务实例 + /// IStringLocalizer service instance /// [Inject] [NotNull] private IStringLocalizer? Localizer { get; set; } /// - /// Gets the string setting for automatically displaying the dropdown when focused + /// 获得 获得焦点时自动显示下拉框设置字符串 + /// Gets the string setting for automatically displaying the dropdown when focused /// private string? ShowDropdownListOnFocusString => ShowDropdownListOnFocus ? "true" : null; @@ -92,7 +113,8 @@ public partial class AutoComplete .Build(); /// - /// Gets the clear icon class string. + /// 获得 清除图标样式 + /// Gets the clear icon class string. /// private string? ClearClassString => CssBuilder.Default("clear-icon") .AddClass($"text-{Color.ToDescriptionString()}", Color != Color.None) @@ -164,13 +186,15 @@ protected override async Task OnAfterRenderAsync(bool firstRender) private string? GetChangedEventCallbackName() => (OnValueChanged != null || ValueChanged.HasDelegate) ? nameof(TriggerChange) : null; /// - /// Gets whether show the clear button. + /// 获得 是否显示清除按钮 + /// Gets whether show the clear button. /// /// private bool GetClearable() => IsClearable && !IsDisabled; /// - /// Callback method when a candidate item is clicked + /// 点击候选项目时回调方法 + /// Callback method when a candidate item is clicked /// private async Task OnClickItem(string val) { @@ -195,7 +219,8 @@ private async Task OnClickItem(string val) private List Rows => _filterItems ?? [.. Items]; /// - /// 点击清空按钮时调用此方法 由 Javascript 触发 + /// 点击清空按钮时调用此方法 由 Javascript 触发 + /// Method called when the clear button is clicked. Triggered by Javascript /// /// [JSInvokable] @@ -208,7 +233,8 @@ public async Task TriggerClear() } /// - /// TriggerFilter method + /// TriggerFilter 方法 + /// TriggerFilter method /// /// [JSInvokable] @@ -238,7 +264,8 @@ public async Task TriggerFilter(string val) } /// - /// 支持双向绑定 由客户端 JavaScript 触发 + /// 支持双向绑定 由客户端 JavaScript 触发 + /// Supports two-way binding. Triggered by client-side JavaScript /// /// /// diff --git a/src/BootstrapBlazor/Components/AutoComplete/PopoverCompleteBase.cs b/src/BootstrapBlazor/Components/AutoComplete/PopoverCompleteBase.cs index 71148e67728..9b51e48f3c8 100644 --- a/src/BootstrapBlazor/Components/AutoComplete/PopoverCompleteBase.cs +++ b/src/BootstrapBlazor/Components/AutoComplete/PopoverCompleteBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// 弹窗可悬浮组件基类 +/// 弹窗可悬浮组件基类 +/// Base class for popover complete component /// [BootstrapModuleAutoLoader("AutoComplete/AutoComplete.razor.js", JSObjectReference = true)] public abstract class PopoverCompleteBase : BootstrapInputBase, IPopoverBaseComponent { /// - /// 图标主题服务 + /// 图标主题服务 + /// Icon theme service /// [Inject] [NotNull] @@ -20,24 +22,29 @@ public abstract class PopoverCompleteBase : BootstrapInputBase, /// /// + /// 10.2.2 /// [Parameter] public Placement Placement { get; set; } = Placement.Bottom; /// /// + /// 10.2.2 /// [Parameter] public string? CustomClass { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool ShowShadow { get; set; } = true; /// - /// 获得/设置 无匹配数据时显示提示信息 默认提示"无匹配数据" + /// 获得/设置 无匹配数据时显示提示信息 默认提示"无匹配数据" + /// Gets or sets the tip info when no matching data. Default is "No matched data" + /// 10.2.2 /// [Parameter] [NotNull] @@ -45,119 +52,148 @@ public abstract class PopoverCompleteBase : BootstrapInputBase, /// /// + /// 10.2.2 /// [Parameter] public bool IsPopover { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? Offset { get; set; } /// - /// 获得/设置 防抖时间 默认为 0 即不开启 + /// 获得/设置 防抖时间 默认为 0 即不开启 + /// Gets or sets the debounce time. Default is 0 (disabled) + /// 10.2.2 /// [Parameter] public int Debounce { get; set; } /// - /// 获得/设置 下拉菜单选择回调方法 默认 null + /// 获得/设置 下拉菜单选择回调方法 默认 null + /// Gets or sets the callback method for dropdown item selection. Default is null + /// 10.2.2 /// [Parameter] public Func? OnSelectedItemChanged { get; set; } /// - /// 获得/设置 是否跳过 Enter 按键处理 默认 false + /// 获得/设置 是否跳过 Enter 按键处理 默认 false + /// Gets or sets whether to skip Enter key processing. Default is false + /// 10.2.2 /// [Parameter] public bool SkipEnter { get; set; } /// - /// 获得/设置 是否跳过 Esc 按键处理 默认 false + /// 获得/设置 是否跳过 Esc 按键处理 默认 false + /// Gets or sets whether to skip Esc key processing. Default is false + /// 10.2.2 /// [Parameter] public bool SkipEsc { get; set; } /// - /// 获得/设置 滚动行为 默认 + /// 获得/设置 滚动行为 默认 + /// Gets or sets the scroll behavior. Default is + /// 10.2.2 /// [Parameter] public ScrollIntoViewBehavior ScrollIntoViewBehavior { get; set; } = ScrollIntoViewBehavior.Smooth; /// - /// 获得/设置 候选项模板 默认 null + /// 获得/设置 候选项模板 默认 null + /// Gets or sets the item template. Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } /// - /// Gets or sets whether the select component is clearable. Default is false. + /// 获得/设置 选择组件是否可清除 默认为 false + /// Gets or sets whether the select component is clearable. Default is false. + /// 10.2.2 /// [Parameter] public bool IsClearable { get; set; } /// - /// Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up. + /// 获得/设置 右侧清除图标 默认为 fa-solid fa-angle-up + /// Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up. + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearIcon { get; set; } /// - /// 配置类实例 + /// 配置类实例 + /// configuration instance /// [Inject] [NotNull] protected IOptions? BootstrapBlazorOptions { get; set; } /// - /// 获得 是否跳过 ESC 按键字符串 + /// 获得 是否跳过 ESC 按键字符串 + /// Gets the skip ESC key string /// protected string? SkipEscString => SkipEsc ? "true" : null; /// - /// 获得 是否跳过 Enter 按键字符串 + /// 获得 是否跳过 Enter 按键字符串 + /// Gets the skip Enter key string /// protected string? SkipEnterString => SkipEnter ? "true" : null; /// - /// 获得 滚动行为字符串 + /// 获得 滚动行为字符串 + /// Gets the scroll behavior string /// protected string? ScrollIntoViewBehaviorString => ScrollIntoViewBehavior == ScrollIntoViewBehavior.Smooth ? null : ScrollIntoViewBehavior.ToDescriptionString(); /// - /// 防抖时长字符串 + /// 防抖时长字符串 + /// Debounce duration string /// protected string? DurationString => Debounce > 0 ? $"{Debounce}" : null; /// - /// data-bs-toggle 值 + /// data-bs-toggle 值 + /// data-bs-toggle value /// protected string? ToggleString => IsPopover ? Constants.DropdownToggleString : null; /// - /// 偏移量字符串 + /// 偏移量字符串 + /// Offset string /// protected string? OffsetString => IsPopover ? null : Offset; /// - /// 输入框 Id + /// 输入框 Id + /// Input Id /// protected string InputId => $"{Id}_input"; /// - /// 弹窗位置字符串 + /// 弹窗位置字符串 + /// Popover placement string /// protected string? PlacementString => Placement == Placement.Auto ? null : Placement.ToDescriptionString(); /// - /// 获得输入框 Id + /// 获得输入框 Id + /// Gets the input Id /// protected override string? GetInputId() => InputId; /// - /// 获得 CustomClass 字符串 + /// 获得 CustomClass 字符串 + /// Gets the CustomClass string /// protected virtual string? CustomClassString => CssBuilder.Default(CustomClass) .AddClass("shadow", ShowShadow) @@ -177,13 +213,15 @@ protected override void OnParametersSet() } /// - /// 触发 OnBlurAsync 回调前回调方法 + /// 触发 OnBlurAsync 回调前回调方法 + /// Callback method before triggering OnBlurAsync /// /// protected virtual Task OnBeforeBlurAsync() => Task.CompletedTask; /// - /// 触发 OnBlur 回调方法 由 Javascript 触发 + /// 触发 OnBlur 回调方法 由 Javascript 触发 + /// Trigger OnBlur callback method. Triggered by Javascript /// [JSInvokable] public async Task TriggerBlur() diff --git a/src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs b/src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs index 466bbb9059a..f776a16789f 100644 --- a/src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs +++ b/src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,76 +10,99 @@ namespace BootstrapBlazor.Components; /// -/// AutoFill component +/// AutoFill 组件 +/// AutoFill component /// /// The type of the value. public partial class AutoFill { /// - /// Gets or sets the collection of items for the component. + /// 获得/设置 组件数据集合 + /// Gets or sets the collection of items for the component. + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// Gets or sets the number of items to display when matching data. Default is null. + /// 获得/设置 匹配数据时显示的数量 默认为 null + /// Gets or sets the number of items to display when matching data. Default is null. + /// 10.2.2 /// [Parameter] [NotNull] public int? DisplayCount { get; set; } /// - /// Gets or sets whether to enable fuzzy search. Default is false. + /// 获得/设置 是否开启模糊搜索 默认为 false + /// Gets or sets whether to enable fuzzy search. Default is false. + /// 10.2.2 /// [Parameter] public bool IsLikeMatch { get; set; } /// - /// Gets or sets whether to ignore case when matching. Default is true. + /// 获得/设置 匹配时是否忽略大小写 默认为 true + /// Gets or sets whether to ignore case when matching. Default is true. + /// 10.2.2 /// [Parameter] public bool IgnoreCase { get; set; } = true; /// - /// Gets or sets whether to expand the dropdown candidate menu when focused. Default is true. + /// 获得/设置 获得焦点时是否展开下拉候选菜单 默认为 true + /// Gets or sets whether to expand the dropdown candidate menu when focused. Default is true. + /// 10.2.2 /// [Parameter] public bool ShowDropdownListOnFocus { get; set; } = true; /// - /// Gets or sets the method to get the display text from the model. Default is to use the ToString override method. + /// 获得/设置 获取显示文本方法 默认为使用 ToString 方法 + /// Gets or sets the method to get the display text from the model. Default is to use the ToString override method. + /// 10.2.2 /// [Parameter] [NotNull] public Func? OnGetDisplayText { get; set; } /// - /// Gets or sets the icon. + /// 获得/设置 图标 + /// Gets or sets the icon. + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// Gets or sets the loading icon. + /// 获得/设置 加载图标 + /// Gets or sets the loading icon. + /// 10.2.2 /// [Parameter] public string? LoadingIcon { get; set; } /// - /// Gets or sets the custom collection filtering rules. + /// 获得/设置 自定义集合过滤规则 + /// Gets or sets the custom collection filtering rules. + /// 10.2.2 /// [Parameter] public Func>>? OnCustomFilter { get; set; } /// - /// Gets or sets whether to show the no matching data option. Default is true. + /// 获得/设置 是否显示无匹配数据选项 默认为 true + /// Gets or sets whether to show the no matching data option. Default is true. + /// 10.2.2 /// [Parameter] public bool ShowNoDataTip { get; set; } = true; /// - /// Gets or sets the candidate item template. Default is null. + /// 获得/设置 候选项模板 默认为 null + /// Gets or sets the candidate item template. Default is null. + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 ItemTemplate 代替;Deprecated please use ItemTemplate parameter")] @@ -87,40 +110,58 @@ public partial class AutoFill public RenderFragment? Template { get => ItemTemplate; set => ItemTemplate = value; } /// - /// Gets or sets whether virtual scrolling is enabled. Default is false. + /// 获得/设置 是否开启虚拟滚动 默认为 false + /// Gets or sets whether virtual scrolling is enabled. Default is false. + /// 10.2.2 /// [Parameter] public bool IsVirtualize { get; set; } /// - /// Gets or sets the row height for virtual scrolling. Default is 50f. + /// 获得/设置 虚拟滚动行高 默认为 50f + /// Gets or sets the row height for virtual scrolling. Default is 50f. + /// 10.2.2 /// - /// Effective when is set to true. + /// + /// 为 true 时生效 + /// Effective when is set to true. + /// [Parameter] public float RowHeight { get; set; } = 50f; /// - /// Gets or sets the overscan count for virtual scrolling. Default is 3. + /// 获得/设置 虚拟滚动预加载行数 默认为 3 + /// Gets or sets the overscan count for virtual scrolling. Default is 3. + /// 10.2.2 /// - /// Effective when is set to true. + /// + /// 为 true 时生效 + /// Effective when is set to true. + /// [Parameter] public int OverscanCount { get; set; } = 3; /// - /// Gets or sets the callback method for loading virtualized items. + /// 获得/设置 虚拟滚动加载回调方法 + /// Gets or sets the callback method for loading virtualized items. + /// 10.2.2 /// [Parameter] [NotNull] public Func>>? OnQueryAsync { get; set; } /// - /// Gets or sets the callback method when the clear button is clicked. Default is null. + /// 获得/设置 点击清除按钮回调方法 默认为 null + /// Gets or sets the callback method when the clear button is clicked. Default is null. + /// 10.2.2 /// [Parameter] public Func? OnClearAsync { get; set; } /// - /// 获得/设置 输入框内容无效时是否自动清空内容 默认 false + /// 获得/设置 输入框内容无效时是否自动清空内容 默认 false + /// Gets or sets whether to clear the content automatically when the input is invalid. Default is false + /// 10.2.2 /// [Parameter] public bool IsAutoClearWhenInvalid { get; set; } @@ -146,14 +187,16 @@ public partial class AutoFill private string? _lastClientValue; /// - /// Gets the component style. + /// 获得 组件样式 + /// Gets the component style. /// private string? ClassString => CssBuilder.Default("auto-complete auto-fill") .AddClass("is-clearable", IsClearable) .Build(); /// - /// Gets the clear icon class string. + /// 获得 清除图标样式 + /// Gets the clear icon class string. /// private string? ClearClassString => CssBuilder.Default("clear-icon") .AddClass($"text-{Color.ToDescriptionString()}", Color != Color.None) @@ -215,7 +258,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) private string? _clientValue; /// - /// 由客户端 JavaScript 触发 + /// 由客户端 JavaScript 触发 + /// Triggered by client-side JavaScript /// /// /// @@ -228,15 +272,17 @@ public void TriggerChange(string v) private bool IsNullable() => !ValueType.IsValueType || NullableUnderlyingType != null; /// - /// Gets whether show the clear button. + /// 获得 是否显示清除按钮 + /// Gets whether show the clear button. /// /// private bool GetClearable() => IsClearable && !IsDisabled && IsNullable(); /// - /// Callback method when a candidate item is clicked. + /// 点击候选项目时回调方法 + /// Callback method when a candidate item is clicked. /// - /// The value of the clicked item. + /// 点击项的值The value of the clicked item. private async Task OnClickItem(TValue val) { CurrentValue = val; @@ -274,9 +320,10 @@ private async ValueTask> LoadItems(ItemsProviderRequ private string? _searchText; /// - /// Triggers the filter method. + /// 触发过滤方法 + /// Triggers the filter method. /// - /// The value to filter by. + /// 过滤值The value to filter by. [JSInvokable] public async Task TriggerFilter(string val) { diff --git a/src/BootstrapBlazor/Components/AutoRedirect/AutoRedirect.cs b/src/BootstrapBlazor/Components/AutoRedirect/AutoRedirect.cs index 1c33a3c647f..904c6c2a8a9 100644 --- a/src/BootstrapBlazor/Components/AutoRedirect/AutoRedirect.cs +++ b/src/BootstrapBlazor/Components/AutoRedirect/AutoRedirect.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,37 +6,47 @@ namespace BootstrapBlazor.Components; /// -/// AutoRedirect component +/// AutoRedirect 组件 +/// AutoRedirect component /// [BootstrapModuleAutoLoader(ModuleName = "autoredirect", JSObjectReference = true)] public class AutoRedirect : BootstrapModuleComponentBase { /// - /// 获得/设置 重定向地址 + /// 获得/设置 重定向地址 + /// Gets or sets the redirect URL + /// 10.2.2 /// [Parameter] public string? RedirectUrl { get; set; } /// - /// 获得/设置 是否强制导航 默认 false + /// 获得/设置 是否强制导航 默认 false + /// Gets or sets whether to force load. Default is false + /// 10.2.2 /// [Parameter] public bool IsForceLoad { get; set; } /// - /// 获得/设置 自动锁屏间隔单位 秒 默认 60000 毫秒 + /// 获得/设置 自动锁屏间隔单位 秒 默认 60000 毫秒 + /// Gets or sets the auto lock screen interval in milliseconds. Default is 60000 ms + /// 10.2.2 /// [Parameter] public int Interval { get; set; } = 60000; /// - /// 获得/设置 地址跳转前回调方法 返回 true 时中止跳转 + /// 获得/设置 地址跳转前回调方法 返回 true 时中止跳转 + /// Gets or sets the callback method before redirect. Returns true to cancel redirect + /// 10.2.2 /// [Parameter] public Func>? OnBeforeRedirectAsync { get; set; } /// - /// 获得/设置 NavigationManager 实例 + /// 获得/设置 NavigationManager 实例 + /// Gets or sets the NavigationManager instance /// [Inject] [NotNull] @@ -49,7 +59,8 @@ public class AutoRedirect : BootstrapModuleComponentBase protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, Interval, nameof(Lock)); /// - /// 锁屏操作由 JS 调用 + /// 锁屏操作由 JS 调用 + /// Lock screen operation called by JS /// [JSInvokable] public async Task Lock() diff --git a/src/BootstrapBlazor/Components/Avatar/Avatar.razor.cs b/src/BootstrapBlazor/Components/Avatar/Avatar.razor.cs index 0e5e77c80c8..f8f481f93fd 100644 --- a/src/BootstrapBlazor/Components/Avatar/Avatar.razor.cs +++ b/src/BootstrapBlazor/Components/Avatar/Avatar.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Avatar 头像框组件 +/// Avatar 头像框组件 +/// Avatar component /// public partial class Avatar { /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Gets the class name /// /// private string? ClassName => CssBuilder.Default("avatar") @@ -24,60 +26,79 @@ public partial class Avatar .Build(); /// - /// 获得 图片样式 + /// 获得 图片样式 + /// Gets the image class string /// private string? ImgClassString => (IsLoaded.HasValue && IsLoaded.Value) ? null : "d-none"; /// - /// 获得/设置 是否为圆形 + /// 获得/设置 是否为圆形 + /// Gets or sets whether it is a circle + /// 10.2.2 /// [Parameter] public bool IsCircle { get; set; } /// - /// 获得/设置 Image 头像路径地址 + /// 获得/设置 Image 头像路径地址 + /// Gets or sets the image path + /// 10.2.2 /// [Parameter] public string? Url { get; set; } /// - /// 获得/设置 是否为图标 + /// 获得/设置 是否为图标 + /// Gets or sets whether it is an icon + /// 10.2.2 /// [Parameter] public bool IsIcon { get; set; } /// - /// 获得/设置 头像框显示图标 + /// 获得/设置 头像框显示图标 + /// Gets or sets the icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 是否为显示为文字 + /// 获得/设置 是否显示为文字 + /// Gets or sets whether to display text + /// 10.2.2 /// [Parameter] public bool IsText { get; set; } /// - /// 获得/设置 头像框显示文字 + /// 获得/设置 头像框显示文字 + /// Gets or sets the text + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 头像框大小 + /// 获得/设置 头像框大小 + /// Gets or sets the size + /// 10.2.2 /// [Parameter] public Size Size { get; set; } = Size.Medium; /// - /// 获得/设置 是否显示 Border 默认为 false + /// 获得/设置 是否显示 Border 默认为 false + /// Gets or sets whether to show border. Default is false + /// 10.2.2 /// [Parameter] public bool IsBorder { get; set; } /// - /// 获得/设置 获取图片地址异步回调方法 + /// 获得/设置 获取图片地址异步回调方法 + /// Gets or sets the async callback method to get image url + /// 10.2.2 /// [Parameter] public Func>? GetUrlAsync { get; set; } @@ -87,12 +108,14 @@ public partial class Avatar private IIconTheme? IconTheme { get; set; } /// - /// 获得/设置 是否显示图片 + /// 获得/设置 是否显示图片 + /// Gets or sets whether to show image /// private bool? IsLoaded { get; set; } /// - /// OnInitializedAsync 方法 + /// OnParametersSetAsync 方法 + /// OnParametersSetAsync method /// /// protected override async Task OnParametersSetAsync() @@ -106,7 +129,8 @@ protected override async Task OnParametersSetAsync() } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { @@ -115,7 +139,8 @@ protected override void OnParametersSet() } /// - /// 图片加载失败时回调此方法 + /// 图片加载失败时回调此方法 + /// Callback method when image load fails /// private void OnError() { @@ -124,7 +149,8 @@ private void OnError() } /// - /// 图片加载成功时回调此方法 + /// 图片加载成功时回调此方法 + /// Callback method when image load succeeds /// private void OnLoad() { diff --git a/src/BootstrapBlazor/Components/Badge/Badge.razor.cs b/src/BootstrapBlazor/Components/Badge/Badge.razor.cs index e37d63a76da..e52a9c6ced1 100644 --- a/src/BootstrapBlazor/Components/Badge/Badge.razor.cs +++ b/src/BootstrapBlazor/Components/Badge/Badge.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Badge component +/// Badge 徽章组件 +/// Badge component /// public partial class Badge { @@ -17,20 +18,26 @@ public partial class Badge .Build(); /// - /// Gets or sets the color of the badge. Default is . + /// 获得/设置 徽章颜色 默认为 + /// Gets or sets the color of the badge. Default is . + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.Primary; /// - /// Gets or sets whether the badge should be displayed as a pill (rounded) or not. Default is false. + /// 获得/设置 徽章是否显示为胶囊形式 默认为 false + /// Gets or sets whether the badge should be displayed as a pill (rounded) or not. Default is false. + /// 10.2.2 /// /// [Parameter] public bool IsPill { get; set; } /// - /// Gets or sets the child content of the component. Default is false. + /// 获得/设置 子组件内容 默认为 false + /// Gets or sets the child content of the component. Default is false. + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.cs b/src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.cs index 9066a5d66aa..0af11045477 100644 --- a/src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.cs +++ b/src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,60 +6,79 @@ namespace BootstrapBlazor.Components; /// -/// ShieldBadge component +/// ShieldBadge 徽章组件 +/// ShieldBadge component /// public partial class ShieldBadge { /// - /// Gets or sets the icon. Default is null. + /// 获得/设置 图标 默认为 null + /// Gets or sets the icon. Default is null. + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// Gets or sets the icon color. Default is null. + /// 获得/设置 图标颜色 默认为 null + /// Gets or sets the icon color. Default is null. + /// 10.2.2 /// [Parameter] public string? IconColor { get; set; } /// - /// Gets or sets the text of badge. Default is null. + /// 获得/设置 徽章文本 默认为 null + /// Gets or sets the text of badge. Default is null. + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// Gets or sets the text color. Default is null. + /// 获得/设置 文本颜色 默认为 null + /// Gets or sets the text color. Default is null. + /// 10.2.2 /// [Parameter] public string? TextColor { get; set; } /// - /// Gets or sets the text background color. Default is null. + /// 获得/设置 文本背景颜色 默认为 null + /// Gets or sets the text background color. Default is null. + /// 10.2.2 /// [Parameter] public string? TextBackgroundColor { get; set; } /// - /// Gets or sets the label of badge. Default is null. + /// 获得/设置 徽章标签 默认为 null + /// Gets or sets the label of badge. Default is null. + /// 10.2.2 /// [Parameter] public string? Label { get; set; } /// - /// Gets or sets the label color of badge. Default is null. + /// 获得/设置 标签颜色 默认为 null + /// Gets or sets the label color of badge. Default is null. + /// 10.2.2 /// [Parameter] public string? LabelColor { get; set; } /// - /// Gets or sets the label background color. Default is null. + /// 获得/设置 标签背景颜色 默认为 null + /// Gets or sets the label background color. Default is null. + /// 10.2.2 /// [Parameter] public string? LabelBackgroundColor { get; set; } /// - /// Gets or sets the badge radius. Default is 3. + /// 获得/设置 徽章圆角半径 默认为 3 + /// Gets or sets the badge radius. Default is 3. + /// 10.2.2 /// [Parameter] public int Radius { get; set; } = 3; diff --git a/src/BootstrapBlazor/Components/BaseComponents/BootstrapBlazorRoot.razor.cs b/src/BootstrapBlazor/Components/BaseComponents/BootstrapBlazorRoot.razor.cs index a9c1d1e19a6..096db46b6c6 100644 --- a/src/BootstrapBlazor/Components/BaseComponents/BootstrapBlazorRoot.razor.cs +++ b/src/BootstrapBlazor/Components/BaseComponents/BootstrapBlazorRoot.razor.cs @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapBlazorRoot 组件 +/// BootstrapBlazorRoot 组件 +/// BootstrapBlazorRoot component /// public partial class BootstrapBlazorRoot { @@ -24,37 +25,47 @@ public partial class BootstrapBlazorRoot private IEnumerable? Generators { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Gets or sets child content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得 Message 组件实例 + /// 获得 Message 组件实例 + /// Gets the Message component instance /// [NotNull] public Message? MessageContainer { get; private set; } /// - /// 获得 ToastContainer 组件实例 + /// 获得 ToastContainer 组件实例 + /// Gets the ToastContainer component instance /// [NotNull] public ToastContainer? ToastContainer { get; private set; } /// - /// 获得/设置 是否开启全局异常捕获 默认 null 使用 设置值 + /// 获得/设置 是否开启全局异常捕获 默认 null 使用 设置值 + /// Gets or sets whether to enable global exception handling. Default is null (use ) + /// 10.2.2 /// [Parameter] public bool? EnableErrorLogger { get; set; } /// - /// 获得/设置 是否记录异常到 默认 null 使用 设置值 + /// 获得/设置 是否记录异常到 默认 null 使用 设置值 + /// Gets or sets whether to log exceptions to . Default is null (use ) + /// 10.2.2 /// [Parameter] public bool? EnableErrorLoggerILogger { get; set; } /// - /// 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 + /// 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 + /// Gets or sets whether to show Error toast. Default is null (use ) + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 ShowErrorLoggerToast 参数. Deprecated, please use ShowErrorLoggerToast parameter")] @@ -62,19 +73,25 @@ public partial class BootstrapBlazorRoot public bool? ShowToast { get => ShowErrorLoggerToast; set => ShowErrorLoggerToast = value; } /// - /// 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 + /// 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 + /// Gets or sets whether to show Error toast. Default is null (use ) + /// 10.2.2 /// [Parameter] public bool? ShowErrorLoggerToast { get; set; } /// - /// 获得/设置 Error Toast 弹窗标题 + /// 获得/设置 Error Toast 弹窗标题 + /// Gets or sets Error Toast title + /// 10.2.2 /// [Parameter] public string? ToastTitle { get; set; } /// - /// 获得/设置 自定义错误处理回调方法 + /// 获得/设置 自定义错误处理回调方法 + /// Gets or sets custom error callback method + /// 10.2.2 /// [Parameter] public Func? OnErrorHandleAsync { get; set; } diff --git a/src/BootstrapBlazor/Components/BaseComponents/BootstrapComponentBase.cs b/src/BootstrapBlazor/Components/BaseComponents/BootstrapComponentBase.cs index 26a0c22983f..22fdcee4abf 100644 --- a/src/BootstrapBlazor/Components/BaseComponents/BootstrapComponentBase.cs +++ b/src/BootstrapBlazor/Components/BaseComponents/BootstrapComponentBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,32 +8,37 @@ namespace BootstrapBlazor.Components; /// -/// Bootstrap Blazor 组件基类 +/// Bootstrap Blazor 组件基类 +/// Bootstrap Blazor component base class /// public abstract class BootstrapComponentBase : ComponentBase, IHandleEvent { /// - /// 获得/设置 用户自定义属性 + /// 获得/设置 用户自定义属性 + /// Gets or sets user defined attributes /// [Parameter(CaptureUnmatchedValues = true)] [JsonIgnore] public IDictionary? AdditionalAttributes { get; set; } /// - /// 异常捕获组件 + /// 异常捕获组件 + /// Exception handling component /// [CascadingParameter] protected IErrorLogger? ErrorLogger { get; set; } /// - /// 获得/设置 IJSRuntime 实例 + /// 获得/设置 IJSRuntime 实例 + /// Gets or sets IJSRuntime instance /// [Inject] [NotNull] protected IJSRuntime? JSRuntime { get; set; } /// - /// 获得/设置 是否需要 Render 组件 默认 false 需要重新渲染组件 + /// 获得/设置 是否需要 Render 组件 默认 false 需要重新渲染组件 + /// Gets or sets whether to render the component. Default is false (re-render required) /// protected bool IsNotRender { get; set; } diff --git a/src/BootstrapBlazor/Components/BaseComponents/BootstrapModuleComponentBase.cs b/src/BootstrapBlazor/Components/BaseComponents/BootstrapModuleComponentBase.cs index 0baeea2e985..b338d852d00 100644 --- a/src/BootstrapBlazor/Components/BaseComponents/BootstrapModuleComponentBase.cs +++ b/src/BootstrapBlazor/Components/BaseComponents/BootstrapModuleComponentBase.cs @@ -8,42 +8,50 @@ namespace BootstrapBlazor.Components; /// -/// Bootstrap blazor JavaScript isolation base class +/// Bootstrap Blazor JavaScript 隔离基类 +/// Bootstrap blazor JavaScript isolation base class /// public abstract class BootstrapModuleComponentBase : IdComponentBase, IAsyncDisposable { /// - /// Instance of + /// 实例 + /// Instance of /// protected JSModule? Module { get; set; } /// - /// 获得/设置 脚本路径 + /// 获得/设置 脚本路径 + /// Gets or sets the module path /// protected string? ModulePath { get; set; } /// - /// 获得/设置 是否自动调用 init 默认 true + /// 获得/设置 是否自动调用 init 默认 true + /// Gets or sets whether to auto invoke init. Default is true /// protected bool AutoInvokeInit { get; set; } = true; /// - /// 获得/设置 是否自动调用 dispose 默认 true + /// 获得/设置 是否自动调用 dispose 默认 true + /// Gets or sets whether to auto invoke dispose. Default is true /// protected bool AutoInvokeDispose { get; set; } = true; /// - /// 获得/设置 DotNetObjectReference 实例 + /// 获得/设置 DotNetObjectReference 实例 + /// Gets or sets DotNetObjectReference instance /// protected DotNetObjectReference? Interop { get; set; } /// - /// 获得/设置 Module 是否加载完成 + /// 获得/设置 Module 是否加载完成 + /// Gets or sets whether the module is loaded /// protected TaskCompletionSource ModuleLoadTask { get; } = new(); /// - /// 获得/设置 Module 是否初始化完成 + /// 获得/设置 Module 是否初始化完成 + /// Gets or sets whether the module is initialized /// protected TaskCompletionSource ModuleInitTask { get; } = new(); @@ -77,7 +85,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } /// - /// 加载 JS Module 方法 + /// 加载 JS Module 方法 + /// Load JS Module method /// protected virtual void OnLoadJSModule() { @@ -103,13 +112,15 @@ protected virtual void OnLoadJSModule() } /// - /// call JavaScript method + /// 调用 JavaScript 方法 + /// Call JavaScript method /// /// protected virtual Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop); /// - /// call JavaScript method + /// 调用 JavaScript 方法 + /// Call JavaScript method /// /// /// @@ -117,7 +128,8 @@ protected virtual void OnLoadJSModule() protected Task InvokeVoidAsync(string identifier, params object?[]? args) => InvokeVoidAsync(identifier, CancellationToken.None, args); /// - /// call JavaScript method + /// 调用 JavaScript 方法 + /// Call JavaScript method /// /// /// @@ -132,7 +144,8 @@ protected async Task InvokeVoidAsync(string identifier, TimeSpan timeout, params } /// - /// call JavaScript method + /// 调用 JavaScript 方法 + /// Call JavaScript method /// /// /// @@ -147,7 +160,8 @@ protected async Task InvokeVoidAsync(string identifier, CancellationToken cancel } /// - /// call JavaScript method + /// 调用 JavaScript 方法 + /// Call JavaScript method /// /// /// @@ -155,7 +169,8 @@ protected async Task InvokeVoidAsync(string identifier, CancellationToken cancel protected Task InvokeAsync(string identifier, params object?[]? args) => InvokeAsync(identifier, CancellationToken.None, args); /// - /// call JavaScript method + /// 调用 JavaScript 方法 + /// Call JavaScript method /// /// /// @@ -172,7 +187,8 @@ protected async Task InvokeVoidAsync(string identifier, CancellationToken cancel } /// - /// call JavaScript method + /// 调用 JavaScript 方法 + /// Call JavaScript method /// /// /// @@ -189,7 +205,8 @@ protected async Task InvokeVoidAsync(string identifier, CancellationToken cancel } /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. /// /// /// diff --git a/src/BootstrapBlazor/Components/BaseComponents/DynamicElement.cs b/src/BootstrapBlazor/Components/BaseComponents/DynamicElement.cs index d2ade8f08e3..81b637fa9e4 100644 --- a/src/BootstrapBlazor/Components/BaseComponents/DynamicElement.cs +++ b/src/BootstrapBlazor/Components/BaseComponents/DynamicElement.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,79 +9,103 @@ namespace BootstrapBlazor.Components; /// -/// 动态元素组件 +/// 动态元素组件 +/// 动态元素component /// public class DynamicElement : BootstrapComponentBase { /// - /// 获得/设置 TagName 属性 默认为 div + /// 获得/设置 TagName 属性 默认为 div + /// Gets or sets TagName property Default is为 div + /// 10.2.2 /// [Parameter] [NotNull] public string? TagName { get; set; } = "div"; /// - /// 获得/设置 是否触发 Click 事件 默认 true + /// 获得/设置 是否触发 Click 事件 默认 true + /// Gets or sets whether触发 Click 事件 Default is true + /// 10.2.2 /// [Parameter] public bool TriggerClick { get; set; } = true; /// - /// 获得/设置 是否阻止默认行为 默认 false + /// 获得/设置 是否阻止默认行为 默认 false + /// Gets or sets whether阻止Default is行为 Default is false + /// 10.2.2 /// [Parameter] public bool PreventDefault { get; set; } /// - /// 获得/设置 是否事件冒泡 默认为 false + /// 获得/设置 是否事件冒泡 默认为 false + /// Gets or sets whether事件冒泡 Default is为 false + /// 10.2.2 /// [Parameter] public bool StopPropagation { get; set; } /// - /// 获得/设置 Click 回调委托 + /// 获得/设置 Click 回调委托 + /// Gets or sets Click 回调delegate + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } /// - /// 获得/设置 是否触发 DoubleClick 事件 默认 true + /// 获得/设置 是否触发 DoubleClick 事件 默认 true + /// Gets or sets whether触发 DoubleClick 事件 Default is true + /// 10.2.2 /// [Parameter] public bool TriggerDoubleClick { get; set; } = true; /// - /// 获得/设置 DoubleClick 回调委托 + /// 获得/设置 DoubleClick 回调委托 + /// Gets or sets DoubleClick 回调delegate + /// 10.2.2 /// [Parameter] public Func? OnDoubleClick { get; set; } /// - /// 获得/设置 OnContextMenu 回调委托 + /// 获得/设置 OnContextMenu 回调委托 + /// Gets or sets OnContextMenu 回调delegate + /// 10.2.2 /// [Parameter] public Func? OnContextMenu { get; set; } /// - /// 获得/设置 是否触发 OnContextMenu 事件 默认 false + /// 获得/设置 是否触发 OnContextMenu 事件 默认 false + /// Gets or sets whether触发 OnContextMenu 事件 Default is false + /// 10.2.2 /// [Parameter] public bool TriggerContextMenu { get; set; } /// - /// 获得/设置 内容组件 + /// 获得/设置 内容组件 + /// Gets or sets contentcomponent + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否生成指定 Tag 元素 默认 true 生成 + /// 获得/设置 是否生成指定 Tag 元素 默认 true 生成 + /// Gets or sets whether生成指定 Tag 元素 Default is true 生成 + /// 10.2.2 /// [Parameter] public bool GenerateElement { get; set; } = true; /// - /// BuildRenderTree 方法 + /// BuildRenderTree 方法 + /// BuildRenderTree 方法 /// /// protected override void BuildRenderTree(RenderTreeBuilder builder) diff --git a/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs b/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs index 17f0c93fa16..81d861e440d 100644 --- a/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs +++ b/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,26 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// 自动生成客户端 ID 组件基类 +/// 自动生成客户端 ID 组件基类 +/// Base class for auto-generating client ID component /// public abstract class IdComponentBase : BootstrapComponentBase { /// - /// 获得/设置 组件 id 属性 + /// 获得/设置 组件 id 属性 + /// Gets or sets the component id + /// 10.2.2 /// [Parameter] [NotNull] public string? Id { get; set; } /// - /// 获得 实例 + /// 获得 实例 + /// Gets the instance /// [Inject] [NotNull] protected IComponentIdGenerator? ComponentIdGenerator { get; set; } /// - /// 获得 弹窗客户端 ID + /// 获得 弹窗客户端 ID + /// Gets the popup client ID /// protected virtual string? RetrieveId() => Id; diff --git a/src/BootstrapBlazor/Components/BaseComponents/RenderTemplate.razor.cs b/src/BootstrapBlazor/Components/BaseComponents/RenderTemplate.razor.cs index 0bd7342bd4f..e71f305fd0c 100644 --- a/src/BootstrapBlazor/Components/BaseComponents/RenderTemplate.razor.cs +++ b/src/BootstrapBlazor/Components/BaseComponents/RenderTemplate.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,23 @@ namespace BootstrapBlazor.Components; /// -/// RenderTemplate component +/// RenderTemplate component +/// RenderTemplate component /// public partial class RenderTemplate { /// - /// Gets or sets the child component + /// 获得/设置 the child component + /// Gets or sets the child component + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// Gets or sets the callback delegate for the first load + /// 获得/设置 the 回调 委托 for the first load + /// Gets or sets the callback delegate for the first load + /// 10.2.2 /// [Parameter] public Func? OnRenderAsync { get; set; } @@ -38,7 +43,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } /// - /// Render method + /// Render method + /// Render method /// public void Render() { diff --git a/src/BootstrapBlazor/Components/Block/Block.cs b/src/BootstrapBlazor/Components/Block/Block.cs index 62fd248e52d..ac842addb53 100644 --- a/src/BootstrapBlazor/Components/Block/Block.cs +++ b/src/BootstrapBlazor/Components/Block/Block.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,54 +10,71 @@ namespace BootstrapBlazor.Components; /// -/// 条件输出自组件 +/// 条件输出自组件 +/// Conditional Output Component /// public class Block : BootstrapComponentBase { /// - /// 获得/设置 Block 名字 此名字通过 第一个参数传递给使用者 + /// 获得/设置 Block 名字 此名字通过 第一个参数传递给使用者 + /// Gets or sets the Block name. This name is passed to the user via the first parameter of + /// 10.2.2 /// [Parameter] public string? Name { get; set; } /// - /// 获得/设置 Block 允许的角色集合 + /// 获得/设置 Block 允许的角色集合 + /// Gets or sets the allowed roles for the Block + /// 10.2.2 /// [Parameter] public IEnumerable? Roles { get; set; } /// - /// 获得/设置 Block 允许的用户集合 + /// 获得/设置 Block 允许的用户集合 + /// Gets or sets the allowed users for the Block + /// 10.2.2 /// [Parameter] public IEnumerable? Users { get; set; } /// - /// 获得/设置 是否显示此 Block 默认显示 返回 true 时显示 + /// 获得/设置 是否显示此 Block 默认显示 返回 true 时显示 + /// Gets or sets whether to show this Block. Default is true + /// 10.2.2 /// [Parameter] public Func>? OnQueryCondition { get; set; } /// - /// 获得/设置 是否显示此 Block 默认显示 null 未参与判断 设置 true 时显示 + /// 获得/设置 是否显示此 Block 默认显示 null 未参与判断 设置 true 时显示 + /// Gets or sets whether to show this Block. Default is null (not participating in judgment). Show if set to true + /// 10.2.2 /// [Parameter] public bool? Condition { get; set; } /// - /// 获得/设置 子组件内容 + /// 获得/设置 子组件内容 + /// Gets or sets the child content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 符合条件显示的内容 + /// 获得/设置 符合条件显示的内容 + /// Gets or sets the authorized content + /// 10.2.2 /// [Parameter] public RenderFragment? Authorized { get; set; } /// - /// 获得/设置 不符合条件显示的内容 + /// 获得/设置 不符合条件显示的内容 + /// Gets or sets the not authorized content + /// 10.2.2 /// [Parameter] public RenderFragment? NotAuthorized { get; set; } @@ -68,7 +85,8 @@ public class Block : BootstrapComponentBase private bool IsShow { get; set; } /// - /// OnParametersSetAsync 方法 + /// OnParametersSetAsync 方法 + /// OnParametersSetAsync method /// /// protected override async Task OnParametersSetAsync() @@ -122,7 +140,8 @@ private async Task ProcessAuthorizeAsync() } /// - /// BuildRenderTree 方法 + /// BuildRenderTree 方法 + /// BuildRenderTree method /// /// protected override void BuildRenderTree(RenderTreeBuilder builder) diff --git a/src/BootstrapBlazor/Components/BootstrapBlazorRootOutlet/BootstrapBlazorRootContent.cs b/src/BootstrapBlazor/Components/BootstrapBlazorRootOutlet/BootstrapBlazorRootContent.cs index 63a2b2a63fd..efe41898c00 100644 --- a/src/BootstrapBlazor/Components/BootstrapBlazorRootOutlet/BootstrapBlazorRootContent.cs +++ b/src/BootstrapBlazor/Components/BootstrapBlazorRootOutlet/BootstrapBlazorRootContent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,26 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapBlazorRootContent Component +/// BootstrapBlazorRootContent Component +/// BootstrapBlazorRootContent Component /// public class BootstrapBlazorRootContent : IComponent, IDisposable { private object? _registeredIdentifier; /// - /// Gets or sets the ID that determines which instance will render - /// the content of this instance. + /// 获得/设置 the ID that determines which 实例 will render the 内容 of this 实例. + /// Gets or sets the ID that determines which instance will render the content of this instance. + /// 10.2.2 /// [Parameter] public string? RootName { get; set; } /// - /// Gets or sets the ID that determines which instance will render - /// the content of this instance. + /// 获得/设置 the ID that determines which 实例 will render the 内容 of this 实例. + /// Gets or sets the ID that determines which instance will render the content of this instance. + /// 10.2.2 /// [Parameter] public object? RootId { get; set; } /// - /// Gets or sets the content. + /// 获得/设置 the 内容. + /// Gets or sets the content. + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/BootstrapBlazorRootOutlet/BootstrapBlazorRootOutlet.cs b/src/BootstrapBlazor/Components/BootstrapBlazorRootOutlet/BootstrapBlazorRootOutlet.cs index 1eb29b987bb..ecba0b6b7e8 100644 --- a/src/BootstrapBlazor/Components/BootstrapBlazorRootOutlet/BootstrapBlazorRootOutlet.cs +++ b/src/BootstrapBlazor/Components/BootstrapBlazorRootOutlet/BootstrapBlazorRootOutlet.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapBlazorRootOutlet Component +/// BootstrapBlazorRootOutlet 组件 +/// BootstrapBlazorRootOutlet Component /// public class BootstrapBlazorRootOutlet : IComponent, IDisposable { @@ -17,7 +18,8 @@ public class BootstrapBlazorRootOutlet : IComponent, IDisposable private RenderHandle _renderHandle; /// - /// Gets the default identifier that can be used to subscribe to all instances. + /// 获得可用于订阅所有 实例的默认标识符 + /// Gets the default identifier that can be used to subscribe to all instances. /// public static readonly object DefaultIdentifier = new(); @@ -25,15 +27,17 @@ public class BootstrapBlazorRootOutlet : IComponent, IDisposable private BootstrapBlazorRootRegisterService RootRegisterService { get; set; } = default!; /// - /// Gets or sets the ID that determines which instances will provide - /// content to this instance. + /// 获得/设置确定哪些 实例将为此实例提供内容的 ID + /// Gets or sets the ID that determines which instances will provide content to this instance. + /// 10.2.2 /// [Parameter] public string? RootName { get; set; } /// - /// Gets or sets the ID that determines which instances will provide - /// content to this instance. + /// 获得/设置确定哪些 实例将为此实例提供内容的 ID + /// Gets or sets the ID that determines which instances will provide content to this instance. + /// 10.2.2 /// [Parameter] public object? RootId { get; set; } diff --git a/src/BootstrapBlazor/Components/Breadcrumb/Breadcrumb.razor.cs b/src/BootstrapBlazor/Components/Breadcrumb/Breadcrumb.razor.cs index 84961d8ea67..b55c620dbdf 100644 --- a/src/BootstrapBlazor/Components/Breadcrumb/Breadcrumb.razor.cs +++ b/src/BootstrapBlazor/Components/Breadcrumb/Breadcrumb.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// Breadcrumb 组件 +/// Breadcrumb 组件 +/// Breadcrumb component /// public sealed partial class Breadcrumb { /// - /// 获得/设置 数据集 + /// 获得/设置 数据集 + /// Gets or sets the data collection + /// 10.2.2 /// [Parameter] [NotNull] diff --git a/src/BootstrapBlazor/Components/Breadcrumb/BreadcrumbItem.cs b/src/BootstrapBlazor/Components/Breadcrumb/BreadcrumbItem.cs index c9d275198e7..fa463c057c0 100644 --- a/src/BootstrapBlazor/Components/Breadcrumb/BreadcrumbItem.cs +++ b/src/BootstrapBlazor/Components/Breadcrumb/BreadcrumbItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// BreadcrumbItem Class +/// BreadcrumbItem 类 +/// BreadcrumbItem Class /// /// /// @@ -14,17 +15,20 @@ namespace BootstrapBlazor.Components; public class BreadcrumbItem(string text, string? url = null, string? cssClass = null) { /// - /// 获得/设置 显示文字 + /// 获得/设置 显示文字 + /// Gets or sets the display text /// public string Text { get; } = text; /// - /// 获得/设置 导航地址 + /// 获得/设置 导航地址 + /// Gets or sets the navigation URL /// public string? Url { get; } = url; /// - /// 获得/设置 样式名称 + /// 获得/设置 样式名称 + /// Gets or sets the style name /// public string? CssClass { get; } = cssClass; } diff --git a/src/BootstrapBlazor/Components/Button/Button.razor.cs b/src/BootstrapBlazor/Components/Button/Button.razor.cs index 04fbd78942b..56fe6019f7f 100644 --- a/src/BootstrapBlazor/Components/Button/Button.razor.cs +++ b/src/BootstrapBlazor/Components/Button/Button.razor.cs @@ -6,18 +6,22 @@ namespace BootstrapBlazor.Components; /// -/// Button 按钮组件 +/// Button 按钮组件 +/// Button component /// public partial class Button : ButtonBase { /// - /// 获得/设置 是否自动获取焦点 默认 false 不自动获取焦点 + /// 获得/设置 是否自动获取焦点 默认 false 不自动获取焦点 + /// Gets or sets whether to auto focus. Default is false + /// 10.2.2 /// [Parameter] public bool IsAutoFocus { get; set; } /// - /// 获得/设置 html button 实例 + /// 获得/设置 html button 实例 + /// Gets or sets the html button instance /// protected ElementReference ButtonElement { get; set; } @@ -38,7 +42,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } /// - /// OnClickButton 方法 + /// OnClickButton 方法 + /// OnClickButton method /// protected virtual async Task OnClickButton() { @@ -60,7 +65,8 @@ protected virtual async Task OnClickButton() } /// - /// 自动获得焦点方法 + /// 自动获得焦点方法 + /// Auto focus method /// /// public ValueTask FocusAsync() => ButtonElement.FocusAsync(); diff --git a/src/BootstrapBlazor/Components/Button/ButtonBase.cs b/src/BootstrapBlazor/Components/Button/ButtonBase.cs index 05205e4fd17..6197c01d63d 100644 --- a/src/BootstrapBlazor/Components/Button/ButtonBase.cs +++ b/src/BootstrapBlazor/Components/Button/ButtonBase.cs @@ -8,13 +8,15 @@ namespace BootstrapBlazor.Components; /// -/// Button 按钮组件 +/// Button 按钮组件 +/// Button component /// [BootstrapModuleAutoLoader("Button/Button.razor.js")] public abstract class ButtonBase : TooltipWrapperBase { /// - /// 获得 按钮样式集合 + /// 获得 按钮样式集合 + /// Gets the button style collection /// /// protected string? ClassName => CssBuilder.Default("btn") @@ -28,146 +30,186 @@ public abstract class ButtonBase : TooltipWrapperBase .Build(); /// - /// 获得 按钮 disabled 属性 + /// 获得 按钮 disabled 属性 + /// Gets the button disabled attribute /// protected string? Disabled => IsDisabled ? "disabled" : null; /// - /// 获得 按钮 aria-disabled 属性 + /// 获得 按钮 aria-disabled 属性 + /// Gets the button aria-disabled attribute /// protected string DisabledString => IsDisabled ? "true" : "false"; /// - /// 获得 按钮 tab index 属性 + /// 获得 按钮 tab index 属性 + /// Gets the button tab index attribute /// protected string? Tab => IsDisabled ? "-1" : null; /// - /// 获得/设置 按钮风格枚举 + /// 获得/设置 按钮风格枚举 + /// Gets or sets the button style enum + /// 10.2.2 /// [Parameter] public ButtonStyle ButtonStyle { get; set; } /// - /// 获得/设置 按钮类型 Submit 为表单提交按钮 Reset 为表单重置按钮 默认为 Button + /// 获得/设置 按钮类型 Submit 为表单提交按钮 Reset 为表单重置按钮 默认为 Button + /// Gets or sets the button type. Submit for form submission, Reset for form reset. Default is Button + /// 10.2.2 /// [Parameter] public ButtonType ButtonType { get; set; } = ButtonType.Button; /// - /// 获得/设置 OnClick 事件 + /// 获得/设置 OnClick 事件 + /// Gets or sets the OnClick event + /// 10.2.2 /// [Parameter] public EventCallback OnClick { get; set; } /// - /// 获得/设置 OnClick 事件不刷新父组件 + /// 获得/设置 OnClick 事件不刷新父组件 + /// Gets or sets the OnClickWithoutRender event + /// 10.2.2 /// [Parameter] public Func? OnClickWithoutRender { get; set; } /// - /// 获得/设置 按钮颜色 默认 + /// 获得/设置 按钮颜色 默认 + /// Gets or sets the button color. Default is + /// 10.2.2 /// [Parameter] public virtual Color Color { get; set; } = Color.Primary; /// - /// 获得/设置 显示图标 + /// 获得/设置 显示图标 + /// Gets or sets the icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 正在加载动画图标 默认为 fa-solid fa-spin fa-spinner + /// 获得/设置 正在加载动画图标 默认为 fa-solid fa-spin fa-spinner + /// Gets or sets the loading icon. Default is fa-solid fa-spin fa-spinner + /// 10.2.2 /// [Parameter] [NotNull] public string? LoadingIcon { get; set; } /// - /// 获得/设置 是否为异步按钮,默认为 false 如果为 true 表示是异步按钮,点击按钮后禁用自身并且等待异步完成,过程中显示 loading 动画 + /// 获得/设置 是否为异步按钮,默认为 false 如果为 true 表示是异步按钮,点击按钮后禁用自身并且等待异步完成,过程中显示 loading 动画 + /// Gets or sets whether it is an async button. Default is false. If true, it disables itself after click and shows loading animation until async operation completes + /// 10.2.2 /// [Parameter] public bool IsAsync { get; set; } /// - /// 获得/设置 是否异步结束后是否保持禁用状态,默认为 false + /// 获得/设置 是否异步结束后是否保持禁用状态,默认为 false + /// Gets or sets whether to keep disabled state after async operation. Default is false + /// 10.2.2 /// - /// 开启时有效 + /// 开启时有效Effective when is true [Parameter] public bool IsKeepDisabled { get; set; } /// - /// 获得/设置 显示文字 + /// 获得/设置 显示文字 + /// Gets or sets the display text + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 Outline 样式 默认 false + /// 获得/设置 Outline 样式 默认 false + /// Gets or sets the Outline style. Default is false + /// 10.2.2 /// [Parameter] public bool IsOutline { get; set; } /// - /// 获得/设置 Size 大小 + /// 获得/设置 Size 大小 + /// Gets or sets the Size + /// 10.2.2 /// [Parameter] public Size Size { get; set; } /// - /// 获得/设置 Block 模式 + /// 获得/设置 Block 模式 + /// Gets or sets the Block mode + /// 10.2.2 /// [Parameter] public bool IsBlock { get; set; } /// - /// 获得/设置 是否禁用 默认为 false + /// 获得/设置 是否禁用 默认为 false + /// Gets or sets whether it is disabled. Default is false + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// 获得/设置 点击事件是否向上传播 默认 false + /// 获得/设置 点击事件是否向上传播 默认 false + /// Gets or sets whether to propagate click event. Default is false + /// 10.2.2 /// [Parameter] public bool StopPropagation { get; set; } /// - /// 获得/设置 RenderFragment 实例 + /// 获得/设置 RenderFragment 实例 + /// Gets or sets the RenderFragment instance + /// 10.2.2 /// [Parameter] [NotNull] public RenderFragment? ChildContent { get; set; } /// - /// 获得 ValidateForm 实例 + /// 获得 ValidateForm 实例 + /// Gets the ValidateForm instance /// [CascadingParameter] protected ValidateForm? ValidateForm { get; set; } /// - /// 获得 IconTheme 实例 + /// 获得 IconTheme 实例 + /// Gets the IconTheme instance /// [Inject] [NotNull] protected IIconTheme? IconTheme { get; set; } /// - /// 获得/设置 是否当前正在异步执行操作 + /// 获得/设置 是否当前正在异步执行操作 + /// Gets or sets whether an async operation is currently executing /// protected bool IsAsyncLoading { get; set; } private string? _lastTooltipText; /// - /// 获得 异步属性字符串 + /// 获得 异步属性字符串 + /// Gets the async attribute string /// protected string? IsAsyncString => IsAsync ? "true" : null; /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized method /// protected override void OnInitialized() { @@ -181,7 +223,8 @@ protected override void OnInitialized() } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { @@ -197,7 +240,8 @@ protected override void OnParametersSet() private bool _prevDisable; /// - /// OnAfterRenderAsync 方法 + /// OnAfterRenderAsync 方法 + /// OnAfterRenderAsync method /// /// /// @@ -237,7 +281,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } /// - /// 处理点击方法 + /// 处理点击方法 + /// Handle click method /// /// protected virtual async Task HandlerClick() @@ -257,7 +302,8 @@ protected virtual async Task HandlerClick() } /// - /// 设置按钮是否可用状态 + /// 设置按钮是否可用状态 + /// Set button disabled state /// /// public void SetDisable(bool disable) @@ -267,9 +313,10 @@ public void SetDisable(bool disable) } /// - /// 触发按钮异步操作方法 + /// 触发按钮异步操作方法 + /// Trigger button async operation /// - /// true 时显示正在操作 false 时表示结束 + /// true 时显示正在操作 false 时表示结束true to show loading, false to indicate completion internal void TriggerAsync(bool loading) { IsAsyncLoading = loading; @@ -277,7 +324,8 @@ internal void TriggerAsync(bool loading) } /// - /// 显示 Tooltip 方法 + /// 显示 Tooltip 方法 + /// Show Tooltip method /// /// public virtual async Task ShowTooltip() @@ -289,7 +337,8 @@ public virtual async Task ShowTooltip() } /// - /// 销毁 Tooltip 方法 + /// 销毁 Tooltip 方法 + /// Remove Tooltip method /// /// public virtual async Task RemoveTooltip() @@ -301,7 +350,8 @@ public virtual async Task RemoveTooltip() } /// - /// DisposeAsyncCore 方法 + /// DisposeAsyncCore 方法 + /// DisposeAsyncCore method /// /// /// diff --git a/src/BootstrapBlazor/Components/Button/CountButton.cs b/src/BootstrapBlazor/Components/Button/CountButton.cs index 7acfe34561d..1d45a0209b1 100644 --- a/src/BootstrapBlazor/Components/Button/CountButton.cs +++ b/src/BootstrapBlazor/Components/Button/CountButton.cs @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// CountButton 组件 +/// CountButton 组件 +/// CountButton component /// public class CountButton : Button { /// - /// 倒计时数量 默认 5 秒 + /// 倒计时数量 默认 5 秒 + /// Countdown seconds. Default is 5 + /// 10.2.2 /// [Parameter] public int Count { get; set; } = 5; /// - /// 倒计时文本 默认 null 使用 参数 + /// 倒计时文本 默认 null 使用 参数 + /// Countdown text. Default is null (uses ) + /// 10.2.2 /// [Parameter] public string? CountText { get; set; } /// - /// 倒计时格式化回调方法 + /// 倒计时格式化回调方法 + /// Countdown format callback method + /// 10.2.2 /// [Parameter] public Func? CountTextCallback { get; set; } @@ -47,7 +54,6 @@ protected override async Task OnClickButton() /// /// /// - /// protected override async Task HandlerClick() { if (OnClickWithoutRender != null) diff --git a/src/BootstrapBlazor/Components/Button/DialButton.razor.cs b/src/BootstrapBlazor/Components/Button/DialButton.razor.cs index f04376f66bc..83245fc2362 100644 --- a/src/BootstrapBlazor/Components/Button/DialButton.razor.cs +++ b/src/BootstrapBlazor/Components/Button/DialButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,103 +6,135 @@ namespace BootstrapBlazor.Components; /// -/// 拨号按钮组件 +/// 拨号按钮组件 +/// DialButton component /// public partial class DialButton { /// - /// 数据项模板 + /// 数据项模板 + /// Data item template + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 按钮模板 + /// 按钮模板 + /// Button template + /// 10.2.2 /// [Parameter] public RenderFragment? ButtonTemplate { get; set; } /// - /// 展开部分模板 + /// 展开部分模板 + /// Expanded section template + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } /// - /// 展开项集合 + /// 展开项集合 + /// Expanded item collection + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 按钮颜色 + /// 获得/设置 按钮颜色 + /// Gets or sets the button color + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.Primary; /// - /// 获得/设置 动画延时 默认 400 单位 ms 毫秒 + /// 获得/设置 动画延时 默认 400 单位 ms 毫秒 + /// Gets or sets the animation duration. Default is 400ms + /// 10.2.2 /// [Parameter] public int Duration { get; set; } = 400; /// - /// 获得/设置 位置 + /// 获得/设置 位置 + /// Gets or sets the placement + /// 10.2.2 /// [Parameter] public Placement Placement { get; set; } /// - /// 获得/设置 时扇形分布半径值 默认 75; + /// 获得/设置 时扇形分布半径值 默认 75; + /// Gets or sets the radial radius when is . Default is 75 + /// 10.2.2 /// [Parameter] public int Radius { get; set; } = 75; /// - /// 获得/设置 弹窗便宜量 默认 8px + /// 获得/设置 弹窗偏移量 默认 8px + /// Gets or sets the offset. Default is 8px + /// 10.2.2 /// [Parameter] public float Offset { get; set; } = 8; /// - /// 获得/设置 Size 大小 + /// 获得/设置 Size 大小 + /// Gets or sets the Size + /// 10.2.2 /// [Parameter] public Size Size { get; set; } /// - /// 获得/设置 显示图标 + /// 获得/设置 显示图标 + /// Gets or sets the icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 是否禁用 默认为 false + /// 获得/设置 是否禁用 默认为 false + /// Gets or sets whether it is disabled. Default is false + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// 获得/设置 是否自动关闭弹窗 默认为 true + /// 获得/设置 是否自动关闭弹窗 默认为 true + /// Gets or sets whether to auto close. Default is true + /// 10.2.2 /// [Parameter] public bool IsAutoClose { get; set; } = true; /// - /// 获得/设置 OnClick 事件 + /// 获得/设置 OnClick 事件 + /// Gets or sets the OnClick event + /// 10.2.2 /// [Parameter] public EventCallback OnClick { get; set; } /// - /// 获得/设置 呈现方式 默认为 直线 + /// 获得/设置 呈现方式 默认为 直线 + /// Gets or sets the presentation mode. Default is Linear + /// 10.2.2 /// [Parameter] public DialMode DialMode { get; set; } /// - /// 获得 按钮样式集合 + /// 获得 按钮样式集合 + /// Gets the button style collection /// /// private string? ClassString => CssBuilder.Default("dial-button") @@ -111,7 +143,8 @@ public partial class DialButton .Build(); /// - /// 获得 按钮样式集合 + /// 获得 按钮样式集合 + /// Gets the button style collection /// /// private string? ButtonClassString => CssBuilder.Default("btn") @@ -122,7 +155,8 @@ public partial class DialButton private string? IsAutoCloseString => IsAutoClose ? "true" : null; /// - /// 获得 按钮 disabled 属性 + /// 获得 按钮 disabled 属性 + /// Gets the button disabled attribute /// private string? Disabled => IsDisabled ? "disabled" : null; diff --git a/src/BootstrapBlazor/Components/Button/DialButtonItem.cs b/src/BootstrapBlazor/Components/Button/DialButtonItem.cs index 9c6c31ed3ff..c2e8e98f0cd 100644 --- a/src/BootstrapBlazor/Components/Button/DialButtonItem.cs +++ b/src/BootstrapBlazor/Components/Button/DialButtonItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,26 +6,33 @@ namespace BootstrapBlazor.Components; /// -/// DialButtonItem 项组件 +/// DialButtonItem 项组件 +/// DialButtonItem component /// public class DialButtonItem : ComponentBase, IDisposable { /// - /// 获得/设置 显示图标 + /// 获得/设置 显示图标 + /// Gets or sets the icon + /// 10.2.2 /// [Parameter] [NotNull] public string? Icon { get; set; } /// - /// 获得/设置 选项值 + /// 获得/设置 选项值 + /// Gets or sets the value + /// 10.2.2 /// [Parameter] [NotNull] public string? Value { get; set; } /// - /// 获得/设置 组件内容 + /// 获得/设置 组件内容 + /// Gets or sets the child content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } @@ -42,7 +49,8 @@ protected override void OnInitialized() } /// - /// 资源销毁 + /// 资源销毁 + /// Dispose usage /// /// protected virtual void Dispose(bool disposing) @@ -54,7 +62,8 @@ protected virtual void Dispose(bool disposing) } /// - /// 资源销毁 + /// 资源销毁 + /// Dispose usage /// /// public void Dispose() diff --git a/src/BootstrapBlazor/Components/Button/ExportPdfButton.cs b/src/BootstrapBlazor/Components/Button/ExportPdfButton.cs index 1eb493a5f40..8b1518b4a21 100644 --- a/src/BootstrapBlazor/Components/Button/ExportPdfButton.cs +++ b/src/BootstrapBlazor/Components/Button/ExportPdfButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,60 +6,79 @@ namespace BootstrapBlazor.Components; /// -/// 导出 Pdf 按钮 +/// 导出 Pdf 按钮 +/// Export PDF button /// public class ExportPdfButton : Button { /// - /// 获得/设置 导出 Pdf 选择器 默认为 null + /// 获得/设置 导出 Pdf 选择器 默认为 null + /// Gets or sets the export PDF selector. Default is null + /// 10.2.2 /// [Parameter] public string? Selector { get; set; } /// - /// 获得/设置 导出 Pdf 元素 Id 默认为 null + /// 获得/设置 导出 Pdf 元素 Id 默认为 null + /// Gets or sets the export PDF element Id. Default is null + /// 10.2.2 /// [Parameter] public string? ElementId { get; set; } /// - /// 获得/设置 导出 Pdf 所需样式表文件集合 默认为 null + /// 获得/设置 导出 Pdf 所需样式表文件集合 默认为 null + /// Gets or sets the export PDF properties style tags. Default is null + /// 10.2.2 /// [Parameter] public List? StyleTags { get; set; } /// - /// 获得/设置 导出 Pdf 所需脚本文件集合 默认为 null + /// 获得/设置 导出 Pdf 所需脚本文件集合 默认为 null + /// Gets or sets the export PDF properties script tags. Default is null + /// 10.2.2 /// [Parameter] public List? ScriptTags { get; set; } /// - /// 获得/设置 导出 Pdf 文件名 默认为 null 未设置时使用 pdf-时间戳.pdf + /// 获得/设置 导出 Pdf 文件名 默认为 null 未设置时使用 pdf-时间戳.pdf + /// Gets or sets the export PDF file name. Default is null (uses pdf-timestamp.pdf) + /// 10.2.2 /// [Parameter] public string? FileName { get; set; } /// - /// 获得/设置 导出 Pdf 之前回调委托 默认为 null + /// 获得/设置 导出 Pdf 之前回调委托 默认为 null + /// Gets or sets the callback delegate before export PDF. Default is null + /// 10.2.2 /// [Parameter] public Func? OnBeforeExport { get; set; } /// - /// 获得/设置 下载 Pdf 之前回调委托 默认为 null + /// 获得/设置 下载 Pdf 之前回调委托 默认为 null + /// Gets or sets the callback delegate before download PDF. Default is null + /// 10.2.2 /// [Parameter] public Func? OnBeforeDownload { get; set; } /// - /// 获得/设置 下载 Pdf 之后回调委托 默认为 null + /// 获得/设置 下载 Pdf 之后回调委托 默认为 null + /// Gets or sets the callback delegate after download PDF. Default is null + /// 10.2.2 /// [Parameter] public Func? OnAfterDownload { get; set; } /// - /// 获得/设置 是否自动下载 Pdf 默认为 true + /// 获得/设置 是否自动下载 Pdf 默认为 true + /// Gets or sets whether to auto download PDF. Default is true + /// 10.2.2 /// [Parameter] public bool AutoDownload { get; set; } = true; @@ -102,7 +121,8 @@ protected override async Task HandlerClick() var html = await _getHtmlModule.GetHtml(ElementId, Selector); if (!string.IsNullOrEmpty(html)) { - // 通过模板生成完整的 Html + // 通过模板生成完整的 Html + // Generate complete HTML via template var htmlString = $""" @@ -116,7 +136,8 @@ protected override async Task HandlerClick() """; - // 增加网页所需样式表文件 + // 增加网页所需样式表文件 + // Add style tags required by the page List styles = [ $"{NavigationManager.BaseUri}_content/BootstrapBlazor.FontAwesome/css/font-awesome.min.css", $"{NavigationManager.BaseUri}_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css" @@ -126,10 +147,12 @@ protected override async Task HandlerClick() styles.AddRange(StyleTags); } - // 增加网页所需脚本文件 + // 增加网页所需脚本文件 + // Add script tags required by the page var scripts = ScriptTags ?? []; - // 生成 Pdf 流 + // 生成 Pdf 流 + // Generate PDF stream using var stream = await Html2PdfService.PdfStreamFromHtmlAsync(htmlString, styles, scripts); if (OnBeforeDownload != null) @@ -139,7 +162,8 @@ protected override async Task HandlerClick() if (AutoDownload) { - // 下载 Pdf 文件 + // 下载 Pdf 文件 + // Download PDF file var downloadFileName = FileName ?? $"pdf-{DateTime.Now:yyyyMMddHHmmss}.pdf"; await DownloadService.DownloadFromStreamAsync(downloadFileName, stream); @@ -152,7 +176,8 @@ protected override async Task HandlerClick() } /// - /// 设置配置方法 + /// 设置配置方法 + /// Set configuration method /// /// internal void SetOptions(ExportPdfButtonOptions options) diff --git a/src/BootstrapBlazor/Components/Button/ExportPdfButtonSettings.cs b/src/BootstrapBlazor/Components/Button/ExportPdfButtonSettings.cs index 0152234b798..97ea68e4754 100644 --- a/src/BootstrapBlazor/Components/Button/ExportPdfButtonSettings.cs +++ b/src/BootstrapBlazor/Components/Button/ExportPdfButtonSettings.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// ExportPdfButtonSettings 配置类 +/// ExportPdfButtonSettings 配置类 +/// ExportPdfButtonSettings configuration class /// public class ExportPdfButtonSettings : ComponentBase { /// - /// 获得/设置 ExportPdfButtonOptions 参数配置类实例 + /// 获得/设置 ExportPdfButtonOptions 参数配置类实例 + /// Gets or sets the ExportPdfButtonOptions parameter configuration class instance /// [Parameter, NotNull, EditorRequired] public ExportPdfButtonOptions? Options { get; set; } diff --git a/src/BootstrapBlazor/Components/Button/LinkButton.cs b/src/BootstrapBlazor/Components/Button/LinkButton.cs index 39cecde442b..c3a1cc43f04 100644 --- a/src/BootstrapBlazor/Components/Button/LinkButton.cs +++ b/src/BootstrapBlazor/Components/Button/LinkButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,36 +9,47 @@ namespace BootstrapBlazor.Components; /// -/// LinkButton 组件 +/// LinkButton 组件 +/// LinkButton component /// public class LinkButton : ButtonBase { /// - /// 获得/设置 Url 默认为 # + /// 获得/设置 Url 默认为 # + /// Gets or sets the URL. Default is # + /// 10.2.2 /// [Parameter] public string? Url { get; set; } /// - /// 获得/设置 A 标签 target 参数 默认 null + /// 获得/设置 A 标签 target 参数 默认 null + /// Gets or sets the anchor target parameter. Default is null + /// 10.2.2 /// [Parameter] public string? Target { get; set; } /// - /// 获得/设置 显示图片地址 默认为 null + /// 获得/设置 显示图片地址 默认为 null + /// Gets or sets the image URL. Default is null + /// 10.2.2 /// [Parameter] public string? ImageUrl { get; set; } /// - /// The css class of img element default value null + /// css class of img element default value null + /// The css class of img element default value null + /// 10.2.2 /// [Parameter] public string? ImageCss { get; set; } /// - /// 获得/设置 是否为垂直布局 默认 false + /// 获得/设置 是否为垂直布局 默认 false + /// Gets or sets whether it is vertical layout. Default is false + /// 10.2.2 /// [Parameter] public bool IsVertical { get; set; } @@ -63,7 +74,7 @@ public class LinkButton : ButtonBase private bool TriggerClick => !IsDisabled || (string.IsNullOrEmpty(Url)); /// - /// + /// /// /// protected override void BuildRenderTree(RenderTreeBuilder builder) @@ -127,7 +138,8 @@ private async Task OnClickButton() await HandlerClick(); - // 恢复按钮 + // 恢复按钮 + // Restore button if (IsAsync) { IsDisabled = IsKeepDisabled; diff --git a/src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.cs b/src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.cs index 2a09677ec10..b2a699c8dfe 100644 --- a/src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.cs +++ b/src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.cs @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// PopConfirmButton 组件 +/// PopConfirmButton 组件 +/// PopConfirmButton component /// public partial class PopConfirmButton { @@ -30,7 +31,9 @@ public partial class PopConfirmButton .Build(); /// - /// 获得/设置 按钮颜色 + /// 获得/设置 按钮颜色 + /// Gets or sets the button color + /// 10.2.2 /// [Parameter] public override Color Color { get; set; } = Color.None; @@ -42,7 +45,8 @@ public partial class PopConfirmButton private bool _renderTooltip; /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { @@ -72,7 +76,8 @@ protected override void OnParametersSet() private string? TriggerCloseString => OnClose != null ? "true" : null; /// - /// 显示确认弹窗方法 + /// 显示确认弹窗方法 + /// Show confirm popup method /// private async Task Show() { @@ -89,7 +94,8 @@ private async Task Show() } /// - /// 确认回调方法 + /// 确认回调方法 + /// Confirm callback method /// /// private async Task OnClickConfirm() diff --git a/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs b/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs index d646af29f78..19459b5b0b0 100644 --- a/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs +++ b/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,150 +6,194 @@ namespace BootstrapBlazor.Components; /// -/// 确认弹窗按钮组件 +/// 确认弹窗按钮组件 +/// PopConfirm Button component /// [BootstrapModuleAutoLoader("Button/PopConfirmButton.razor.js", JSObjectReference = true)] public abstract class PopConfirmButtonBase : ButtonBase { /// - /// 弹窗位置字符串 + /// 弹窗位置字符串 + /// Placement string /// protected override string? PlacementString => Placement != Placement.Auto ? Placement.ToDescriptionString() : null; /// - /// Trigger 字符串 + /// Trigger 字符串 + /// Trigger string /// protected override string? TriggerString => Trigger == "click" ? null : Trigger; /// - /// 获得/设置 是否为 A 标签 默认 false 使用 button 渲染 + /// 获得/设置 是否为 A 标签 默认 false 使用 button 渲染 + /// Gets or sets whether it is an anchor tag. Default is false (renders as button) + /// 10.2.2 /// [Parameter] public bool IsLink { get; set; } /// - /// 获得/设置 弹窗显示位置 默认 + /// 获得/设置 弹窗显示位置 默认 + /// Gets or sets the popup placement. Default is + /// 10.2.2 /// - /// 仅支持 + /// 仅支持 Only supports [Parameter] public Placement Placement { get; set; } /// - /// 获得/设置 弹窗触发方式 默认 click 可设置 hover focus + /// 获得/设置 弹窗触发方式 默认 click 可设置 hover focus + /// Gets or sets the popup trigger method. Default is click (can be hover, focus) + /// 10.2.2 /// [Parameter] public string? Trigger { get; set; } /// - /// 获得/设置 显示文字 + /// 获得/设置 显示文字 + /// Gets or sets the display text + /// 10.2.2 /// [Parameter] public string? Content { get; set; } /// - /// 获得/设置 自定义内容 + /// 获得/设置 自定义内容 + /// Gets or sets the custom content + /// 10.2.2 /// [Parameter] [NotNull] public RenderFragment? BodyTemplate { get; set; } /// - /// 获得/设置 点击确认时回调方法 + /// 获得/设置 点击确认时回调方法 + /// Gets or sets the callback method when confirm is clicked + /// 10.2.2 /// [Parameter] public Func? OnConfirm { get; set; } /// - /// 获得/设置 是否显示确认按钮 + /// 获得/设置 是否显示确认按钮 + /// Gets or sets whether to show the confirm button + /// 10.2.2 /// [Parameter] public bool ShowConfirmButton { get; set; } = true; /// - /// 获得/设置 点击关闭时回调方法 + /// 获得/设置 点击关闭时回调方法 + /// Gets or sets the callback method when close is clicked + /// 10.2.2 /// [Parameter] public Func? OnClose { get; set; } /// - /// 获得/设置 是否显示关闭按钮 + /// 获得/设置 是否显示关闭按钮 + /// Gets or sets whether to show the close button + /// 10.2.2 /// [Parameter] public bool ShowCloseButton { get; set; } = true; /// - /// 获得/设置 点击确认弹窗前回调方法 返回真时弹出弹窗 返回假时不弹出 默认 null + /// 获得/设置 点击确认弹窗前回调方法 返回真时弹出弹窗 返回假时不弹出 默认 null + /// Gets or sets the callback method before showing the confirm popup. Returns true to show, false to prevent. Default is null + /// 10.2.2 /// [Parameter] [NotNull] public Func>? OnBeforeClick { get; set; } /// - /// 获得/设置 显示标题 + /// 获得/设置 显示标题 + /// Gets or sets the title + /// 10.2.2 /// [Parameter] public string? Title { get; set; } /// - /// 获得/设置 确认按钮颜色 + /// 获得/设置 关闭按钮颜色 + /// Gets or sets the close button color + /// 10.2.2 /// [Parameter] public Color CloseButtonColor { get; set; } = Color.Secondary; /// - /// 获得/设置 关闭按钮显示文字 默认为 关闭 + /// 获得/设置 关闭按钮显示文字 默认为 关闭 + /// Gets or sets the close button text. Default is Close + /// 10.2.2 /// [Parameter] [NotNull] public string? CloseButtonText { get; set; } /// - /// 获得/设置 关闭按钮显示图标 + /// 获得/设置 关闭按钮显示图标 + /// Gets or sets the close button icon + /// 10.2.2 /// [Parameter] public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 确认按钮显示文字 默认为 确定 + /// 获得/设置 确认按钮显示文字 默认为 确定 + /// Gets or sets the confirm button text. Default is OK + /// 10.2.2 /// [Parameter] [NotNull] public string? ConfirmButtonText { get; set; } /// - /// 获得/设置 确认按钮颜色 + /// 获得/设置 确认按钮颜色 + /// Gets or sets the confirm button color + /// 10.2.2 /// [Parameter] public Color ConfirmButtonColor { get; set; } = Color.Primary; /// - /// 获得/设置 确认按钮显示图标 + /// 获得/设置 确认按钮显示图标 + /// Gets or sets the confirm button icon + /// 10.2.2 /// [Parameter] public string? ConfirmButtonIcon { get; set; } /// - /// 获得/设置 确认框图标 + /// 获得/设置 确认框图标 + /// Gets or sets the confirm icon + /// 10.2.2 /// [Parameter] [NotNull] public string? ConfirmIcon { get; set; } /// - /// 获得/设置 自定义样式 默认 null + /// 获得/设置 自定义样式 默认 null + /// Gets or sets the custom class. Default is null + /// 10.2.2 /// - /// 由 data-bs-custom-class 实现 + /// 由 data-bs-custom-class 实现Implemented by data-bs-custom-class [Parameter] public string? CustomClass { get; set; } /// - /// 获得/设置 是否显示阴影 默认 true + /// 获得/设置 是否显示阴影 默认 true + /// Gets or sets whether to show shadow. Default is true + /// 10.2.2 /// [Parameter] public bool ShowShadow { get; set; } = true; /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { @@ -171,7 +215,8 @@ protected override void OnParametersSet() protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(TriggerCloseCallback)); /// - /// Trigger OnClose event callback. + /// Trigger OnClose event 回调. + /// Trigger OnClose event callback. /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs b/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs index ad5d382ddc7..88ea4ca4d78 100644 --- a/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs +++ b/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,20 +6,23 @@ namespace BootstrapBlazor.Components; /// -/// Popover Confirm 组件 +/// Popover Confirm 组件 +/// Popover Confirm component /// [BootstrapModuleAutoLoader("Button/PopConfirmButtonContent.razor.js", AutoInvokeInit = false, AutoInvokeDispose = false)] public partial class PopConfirmButtonContent { /// - /// 获得 关闭按钮样式 + /// 获得 关闭按钮样式 + /// Gets the close button style /// private string? CloseButtonClass => CssBuilder.Default("btn btn-xs") .AddClass($"btn-{CloseButtonColor.ToDescriptionString()}") .Build(); /// - /// 获得 关闭按钮样式 + /// 获得 确认按钮样式 + /// Gets the confirm button style /// private string? ConfirmButtonClass => CssBuilder.Default("btn btn-xs") .AddClass($"btn-{ConfirmButtonColor.ToDescriptionString()}") @@ -30,85 +33,113 @@ public partial class PopConfirmButtonContent .Build(); /// - /// 获得/设置 是否显示确认按钮 + /// 获得/设置 是否显示确认按钮 + /// Gets or sets whether to show confirm button + /// 10.2.2 /// [Parameter] public bool ShowConfirmButton { get; set; } = true; /// - /// 获得/设置 是否显示关闭按钮 + /// 获得/设置 是否显示关闭按钮 + /// Gets or sets whether to show close button + /// 10.2.2 /// [Parameter] public bool ShowCloseButton { get; set; } = true; /// - /// 获得/设置 显示标题 + /// 获得/设置 显示标题 + /// Gets or sets the title + /// 10.2.2 /// [Parameter] public string? Title { get; set; } /// - /// 获得/设置 显示文字 + /// 获得/设置 显示文字 + /// Gets or sets the content + /// 10.2.2 /// [Parameter] public string? Content { get; set; } /// - /// 获得/设置 自定义组件 + /// 获得/设置 自定义组件 + /// Gets or sets the child content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 关闭按钮显示图标 + /// 获得/设置 关闭按钮显示图标 + /// Gets or sets the close button icon + /// 10.2.2 /// [Parameter] public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 关闭按钮显示文字 + /// 获得/设置 关闭按钮显示文字 + /// Gets or sets the close button text + /// 10.2.2 /// [Parameter] public string? CloseButtonText { get; set; } /// - /// 获得/设置 确认按钮颜色 + /// 获得/设置 关闭按钮颜色 + /// Gets or sets the close button color + /// 10.2.2 /// [Parameter] public Color CloseButtonColor { get; set; } = Color.Secondary; /// - /// 获得/设置 确认按钮显示图标 + /// 获得/设置 确认按钮显示图标 + /// Gets or sets the confirm button icon + /// 10.2.2 /// [Parameter] public string? ConfirmButtonIcon { get; set; } /// - /// 获得/设置 确认按钮显示文字 + /// 获得/设置 确认按钮显示文字 + /// Gets or sets the confirm button text + /// 10.2.2 /// [Parameter] public string? ConfirmButtonText { get; set; } /// - /// 获得/设置 确认按钮颜色 + /// 获得/设置 确认按钮颜色 + /// Gets or sets the confirm button color + /// 10.2.2 /// [Parameter] public Color ConfirmButtonColor { get; set; } = Color.Primary; /// - /// 获得/设置 确认框图标 + /// 获得/设置 确认框图标 + /// Gets or sets the confirm icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 确认按钮回调方法 + /// 获得/设置 确认按钮回调方法 + /// Gets or sets the confirm callback + /// 10.2.2 /// [Parameter] public Func? OnConfirm { get; set; } /// - /// 获得/设置 确认按钮回调方法 + /// 获得/设置 关闭按钮回调方法 + /// Gets or sets the close callback + /// 10.2.2 /// [Parameter] public Func? OnClose { get; set; } @@ -130,7 +161,8 @@ protected override void OnParametersSet() } /// - /// 点击关闭按钮调用此方法 + /// 点击关闭按钮调用此方法 + /// Method called when close button is clicked /// public async Task OnCloseClick() { @@ -142,7 +174,8 @@ public async Task OnCloseClick() } /// - /// 点击确认按钮调用此方法 + /// 点击确认按钮调用此方法 + /// Method called when confirm button is clicked /// public async Task OnConfirmClick() { diff --git a/src/BootstrapBlazor/Components/Button/PulseButton.razor.cs b/src/BootstrapBlazor/Components/Button/PulseButton.razor.cs index 4f83f938c62..50c405f5a4a 100644 --- a/src/BootstrapBlazor/Components/Button/PulseButton.razor.cs +++ b/src/BootstrapBlazor/Components/Button/PulseButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,23 @@ namespace BootstrapBlazor.Components; /// -/// PulseButton 按钮组件 +/// PulseButton 按钮组件 +/// PulseButton component /// public partial class PulseButton { /// - /// 获得/设置 显示图片地址 默认为 null + /// 获得/设置 显示图片地址 默认为 null + /// Gets or sets the image URL. Default is null + /// 10.2.2 /// [Parameter] public string? ImageUrl { get; set; } /// - /// 获得/设置 心跳环颜色 默认 + /// 获得/设置 心跳环颜色 默认 + /// Gets or sets the pulse color. Default is + /// 10.2.2 /// [Parameter] public Color PulseColor { get; set; } = Color.Warning; @@ -31,7 +36,8 @@ public partial class PulseButton .Build(); /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Button/ShareButton.cs b/src/BootstrapBlazor/Components/Button/ShareButton.cs index 7897b59222b..f6b3dc74564 100644 --- a/src/BootstrapBlazor/Components/Button/ShareButton.cs +++ b/src/BootstrapBlazor/Components/Button/ShareButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// 分享按钮 +/// 分享按钮 +/// Share button /// public class ShareButton : Button { /// - /// 获得/设置 分享内容上下文 默认 null + /// 获得/设置 分享内容上下文 默认 null + /// Gets or sets the share context. Default is null + /// 10.2.2 /// [Parameter] public ShareButtonContext? ShareContext { get; set; } diff --git a/src/BootstrapBlazor/Components/Button/ShareButtonContext.cs b/src/BootstrapBlazor/Components/Button/ShareButtonContext.cs index b6f9387d08e..823ccf3e589 100644 --- a/src/BootstrapBlazor/Components/Button/ShareButtonContext.cs +++ b/src/BootstrapBlazor/Components/Button/ShareButtonContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 分享按钮上下文类 +/// 分享按钮上下文类 +/// ShareButton context class /// public class ShareButtonContext { /// - /// 获得/设置 分享标题 + /// 获得/设置 分享标题 + /// Gets or sets the share title /// public string? Title { get; set; } /// - /// 获得/设置 分享描述文字 + /// 获得/设置 分享描述文字 + /// Gets or sets the share text /// public string? Text { get; set; } /// - /// 获得/设置 分享链接地址 + /// 获得/设置 分享链接地址 + /// Gets or sets the share URL /// public string? Url { get; set; } } diff --git a/src/BootstrapBlazor/Components/Button/SlideButton.razor.cs b/src/BootstrapBlazor/Components/Button/SlideButton.razor.cs index e7c65c1bd82..ec2a6c4fe70 100644 --- a/src/BootstrapBlazor/Components/Button/SlideButton.razor.cs +++ b/src/BootstrapBlazor/Components/Button/SlideButton.razor.cs @@ -6,116 +6,152 @@ namespace BootstrapBlazor.Components; /// -/// SlideButton 组件 +/// SlideButton 组件 +/// SlideButton component /// public partial class SlideButton { /// - /// 获得/设置 数据项模板 + /// 获得/设置 数据项模板 + /// Gets or sets the data item template + /// 10.2.2 /// [Parameter] public RenderFragment? SlideButtonItems { get; set; } /// - /// 获得/设置 按钮模板 + /// 获得/设置 按钮模板 + /// Gets or sets the button template + /// 10.2.2 /// [Parameter] public RenderFragment? ButtonTemplate { get; set; } /// - /// 获得/设置 展开按钮项模板 + /// 获得/设置 展开按钮项模板 + /// Gets or sets the expanded button item template + /// 10.2.2 /// [Parameter] public RenderFragment? ButtonItemTemplate { get; set; } /// - /// 获得/设置 展开部分模板 + /// 获得/设置 展开部分模板 + /// Gets or sets the expanded body template + /// 10.2.2 /// [Parameter] public RenderFragment? BodyTemplate { get; set; } /// - /// 获得/设置 展开项集合 + /// 获得/设置 展开项集合 + /// Gets or sets the expanded items collection + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 展开项 Header 文本 + /// 获得/设置 展开项 Header 文本 + /// Gets or sets the header text + /// 10.2.2 /// [Parameter] [NotNull] public string? HeaderText { get; set; } /// - /// 获得/设置 按钮颜色 + /// 获得/设置 按钮颜色 + /// Gets or sets the button color + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.Primary; /// - /// 获得/设置 展开项显示位置 + /// 获得/设置 展开项显示位置 + /// Gets or sets the placement + /// 10.2.2 /// [Parameter] public Placement Placement { get; set; } /// - /// 获得/设置 弹窗偏移量 默认 8px + /// 获得/设置 弹窗偏移量 默认 8px + /// Gets or sets the offset. Default is 8px + /// 10.2.2 /// [Parameter] public float Offset { get; set; } = 8; /// - /// 获得/设置 Size 大小 + /// 获得/设置 Size 大小 + /// Gets or sets the Size + /// 10.2.2 /// [Parameter] public Size Size { get; set; } /// - /// 获得/设置 显示图标 + /// 获得/设置 显示图标 + /// Gets or sets the icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 显示文本 + /// 获得/设置 显示文本 + /// Gets or sets the text + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 是否禁用 默认为 false + /// 获得/设置 是否禁用 默认为 false + /// Gets or sets whether it is disabled. Default is false + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// 获得/设置 是否自动关闭弹窗 默认为 true + /// 获得/设置 是否自动关闭弹窗 默认为 true + /// Gets or sets whether to auto close. Default is true + /// 10.2.2 /// [Parameter] public bool IsAutoClose { get; set; } = true; /// - /// 获得/设置 OnClick 事件 + /// 获得/设置 OnClick 事件 + /// Gets or sets the OnClick event + /// 10.2.2 /// [Parameter] public EventCallback OnClick { get; set; } /// - /// 获得/设置 是否显示标题 默认 false 不显示 + /// 获得/设置 是否显示标题 默认 false 不显示 + /// Gets or sets whether to show header. Default is false + /// 10.2.2 /// [Parameter] public bool ShowHeader { get; set; } /// - /// 获得/设置 Header 部分模板 + /// 获得/设置 Header 部分模板 + /// Gets or sets the header template + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得 按钮样式集合 + /// 获得 按钮样式集合 + /// Gets the button style collection /// /// private string? ClassString => CssBuilder.Default("slide-button") @@ -123,7 +159,8 @@ public partial class SlideButton .Build(); /// - /// 获得 按钮样式集合 + /// 获得 按钮样式集合 + /// Gets the button style collection /// /// private string? ButtonClassString => CssBuilder.Default("btn") @@ -138,7 +175,8 @@ public partial class SlideButton private string? IsAutoCloseString => IsAutoClose ? "true" : null; /// - /// 获得 按钮 disabled 属性 + /// 获得 按钮 disabled 属性 + /// Gets the button disabled attribute /// private string? Disabled => IsDisabled ? "disabled" : null; diff --git a/src/BootstrapBlazor/Components/Button/SlideButtonItem.cs b/src/BootstrapBlazor/Components/Button/SlideButtonItem.cs index 59a7566c72c..4643cb720ae 100644 --- a/src/BootstrapBlazor/Components/Button/SlideButtonItem.cs +++ b/src/BootstrapBlazor/Components/Button/SlideButtonItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// SlideButton 项组件 +/// SlideButton 项组件 +/// SlideButtonItem component /// public class SlideButtonItem : ComponentBase, IDisposable { /// - /// 显示文本 + /// 显示文本 + /// Display text + /// 10.2.2 /// [Parameter] [NotNull] @@ -21,7 +24,9 @@ public class SlideButtonItem : ComponentBase, IDisposable public string? Text { get; set; } /// - /// 选项值 + /// 选项值 + /// Option value + /// 10.2.2 /// [Parameter] [NotNull] @@ -42,7 +47,8 @@ protected override void OnInitialized() } /// - /// 资源销毁 + /// 资源销毁 + /// Dispose usage /// /// protected virtual void Dispose(bool disposing) @@ -54,7 +60,8 @@ protected virtual void Dispose(bool disposing) } /// - /// 资源销毁 + /// 资源销毁 + /// Dispose usage /// /// public void Dispose() diff --git a/src/BootstrapBlazor/Components/Button/SwitchButton.razor.cs b/src/BootstrapBlazor/Components/Button/SwitchButton.razor.cs index 95dba0b9745..3b095c38d4c 100644 --- a/src/BootstrapBlazor/Components/Button/SwitchButton.razor.cs +++ b/src/BootstrapBlazor/Components/Button/SwitchButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,38 +9,49 @@ namespace BootstrapBlazor.Components; /// -/// Switch Button +/// Switch Button +/// Switch Button /// public partial class SwitchButton { /// - /// 获得/设置 On 状态显示文字 + /// 获得/设置 On 状态显示文字 + /// Gets or sets the On state display text + /// 10.2.2 /// [Parameter] [NotNull] public string? OnText { get; set; } /// - /// 获得/设置 Off 状态显示文字 + /// 获得/设置 Off 状态显示文字 + /// Gets or sets the Off state display text + /// 10.2.2 /// [Parameter] [NotNull] public string? OffText { get; set; } /// - /// 获得/设置 当前状态 + /// 获得/设置 当前状态 + /// Gets or sets the current state + /// 10.2.2 /// [Parameter] public bool ToggleState { get; set; } /// - /// 状态切换回调方法 + /// 状态切换回调方法 + /// State toggle callback method + /// 10.2.2 /// [Parameter] public EventCallback ToggleStateChanged { get; set; } /// - /// 点击回调方法 + /// 点击回调方法 + /// Click callback method + /// 10.2.2 /// [Parameter] public EventCallback OnClick { get; set; } @@ -50,7 +61,8 @@ public partial class SwitchButton private IStringLocalizer? Localizer { get; set; } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Button/ToggleButton.razor.cs b/src/BootstrapBlazor/Components/Button/ToggleButton.razor.cs index a08cb2f21f5..049a73d882c 100644 --- a/src/BootstrapBlazor/Components/Button/ToggleButton.razor.cs +++ b/src/BootstrapBlazor/Components/Button/ToggleButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// Toggle Button 按钮组件 +/// Toggle Button 按钮组件 +/// Toggle Button component /// public partial class ToggleButton { /// - /// 获得/设置 状态切换回调方法 + /// 获得/设置 状态切换回调方法 + /// Gets or sets the state toggle callback method + /// 10.2.2 /// [Parameter] public Func? OnToggleAsync { get; set; } /// - /// 获得/设置 当前状态是否为激活状态 默认 false + /// 获得/设置 当前状态是否为激活状态 默认 false + /// Gets or sets whether the current state is active. Default is false + /// 10.2.2 /// [Parameter] public bool IsActive { get; set; } /// - /// 获得/设置 激活状态回调方法 + /// 获得/设置 激活状态回调方法 + /// Gets or sets the active state callback method + /// 10.2.2 /// [Parameter] public EventCallback IsActiveChanged { get; set; } @@ -42,7 +49,8 @@ private async Task OnClickButton() await HandlerClick(); - // 恢复按钮 + // 恢复按钮 + // Restore button if (IsAsync) { IsDisabled = IsKeepDisabled; diff --git a/src/BootstrapBlazor/Components/Calendar/BodyTemplateContext.cs b/src/BootstrapBlazor/Components/Calendar/BodyTemplateContext.cs index a7bfc50fded..3365b5aa5a2 100644 --- a/src/BootstrapBlazor/Components/Calendar/BodyTemplateContext.cs +++ b/src/BootstrapBlazor/Components/Calendar/BodyTemplateContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// BodyTemplateContext 上下文类 +/// BodyTemplateContext 上下文类 +/// BodyTemplateContext context class /// public class BodyTemplateContext { /// - /// 获得/设置 当前星期日数据集合 + /// 获得/设置 当前星期日数据集合 + /// Gets or sets the current sunday data collection /// public List Values { get; } = []; } diff --git a/src/BootstrapBlazor/Components/Calendar/Calendar.razor.cs b/src/BootstrapBlazor/Components/Calendar/Calendar.razor.cs index a9ef687ba3b..abd1a38b09c 100644 --- a/src/BootstrapBlazor/Components/Calendar/Calendar.razor.cs +++ b/src/BootstrapBlazor/Components/Calendar/Calendar.razor.cs @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// 日历框组件 +/// 日历框组件 +/// Calendar component /// public partial class Calendar { @@ -47,12 +48,14 @@ public partial class Calendar private List? Months { get; set; } /// - /// 获得 当前日历框年月 + /// 获得 当前日历框年月 + /// Get the current calendar year and month /// private string? GetTitle() => Localizer["Title", Value.Year, Months.ElementAt(Value.Month - 1)]; /// - /// 获得 当前日历周文字 + /// 获得 当前日历周文字 + /// Get the current calendar week text /// [NotNull] private string? WeekNumberText { get; set; } @@ -62,14 +65,16 @@ public partial class Calendar private IStringLocalizer? Localizer { get; set; } /// - /// 获得 周日期 + /// 获得 周日期 + /// Get week day /// /// /// private string GetWeekDayString(int offset) => $"{Value.AddDays(offset - (int)Value.DayOfWeek).Day}"; /// - /// 获得 周日期样式 + /// 获得 周日期样式 + /// Get week day style /// /// /// @@ -90,7 +95,8 @@ public partial class Calendar .Build(); /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized method /// /// protected override void OnInitialized() @@ -117,7 +123,8 @@ protected override void OnInitialized() } /// - /// 获得/设置 日历框开始时间 + /// 获得/设置 日历框开始时间 + /// Gets or sets the calendar start date /// protected DateTime StartDate { @@ -130,7 +137,8 @@ protected DateTime StartDate } /// - /// 获得 当前周数 + /// 获得 当前周数 + /// Get the current week count /// protected int GetWeekCount() { @@ -139,72 +147,94 @@ protected int GetWeekCount() } /// - /// 获得/设置 日历框结束时间 + /// 获得/设置 日历框结束时间 + /// Gets or sets the calendar end date /// protected DateTime EndDate => StartDate.AddDays(42); /// - /// 获得/设置 组件值 + /// 获得/设置 组件值 + /// Gets or sets the component value + /// 10.2.2 /// [Parameter] public DateTime Value { get; set; } /// - /// 获得/设置 值改变时回调委托 + /// 获得/设置 值改变时回调委托 + /// Gets or sets the value change callback delegate + /// 10.2.2 /// [Parameter] public EventCallback ValueChanged { get; set; } /// - /// 获得/设置 值改变时回调委托 + /// 获得/设置 值改变时回调委托 + /// Gets or sets the value change callback delegate + /// 10.2.2 /// [Parameter] public Func? OnValueChanged { get; set; } /// - /// 获得/设置 是否显示周视图 默认为 月视图 + /// 获得/设置 是否显示周视图 默认为 月视图 + /// Gets or sets whether to display the week view. Default is month view + /// 10.2.2 /// [Parameter] public CalendarViewMode ViewMode { get; set; } /// - /// 获得/设置 周内容 时有效 + /// 获得/设置 周内容 时有效 + /// Gets or sets the week content. Valid when + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 列头模板 + /// 获得/设置 列头模板 + /// Gets or sets the header template + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 Body 模板仅 有效 + /// 获得/设置 Body 模板仅 有效 + /// Gets or sets the body template. Valid only when + /// 10.2.2 /// [Parameter] public RenderFragment? BodyTemplate { get; set; } /// - /// 获得/设置 单元格模板 + /// 获得/设置 单元格模板 + /// Gets or sets the cell template + /// 10.2.2 /// [Parameter] public RenderFragment? CellTemplate { get; set; } /// - /// 获得/设置 是否显示年按钮 + /// 获得/设置 是否显示年按钮 + /// Gets or sets whether to show the year buttons + /// 10.2.2 /// [Parameter] public bool ShowYearButtons { get; set; } = true; /// - /// 获得/设置 星期第一天 默认 + /// 获得/设置 星期第一天 默认 + /// Gets or sets the first day of the week. Default is + /// 10.2.2 /// [Parameter] public DayOfWeek FirstDayOfWeek { get; set; } = DayOfWeek.Sunday; /// - /// 选中日期时回调此方法 + /// 选中日期时回调此方法 + /// Callback method when selecting a date /// /// protected async Task OnCellClickCallback(DateTime value) @@ -221,7 +251,8 @@ protected async Task OnCellClickCallback(DateTime value) } /// - /// 右侧快捷切换年按钮回调此方法 + /// 右侧快捷切换年按钮回调此方法 + /// Callback method for the right shortcut switch year button /// /// protected async Task OnChangeYear(int offset) @@ -238,7 +269,8 @@ protected async Task OnChangeYear(int offset) } /// - /// 右侧快捷切换月按钮回调此方法 + /// 右侧快捷切换月按钮回调此方法 + /// Callback method for the right shortcut switch month button /// /// protected async Task OnChangeMonth(int offset) @@ -255,7 +287,8 @@ protected async Task OnChangeMonth(int offset) } /// - /// 右侧快捷切换周按钮回调此方法 + /// 右侧快捷切换周按钮回调此方法 + /// Callback method for the right shortcut switch week button /// /// protected async Task OnChangeWeek(int offset) @@ -293,7 +326,8 @@ private List GetWeekList() { var list = Localizer[nameof(WeekLists)].Value.Split(',', StringSplitOptions.RemoveEmptyEntries).ToList(); - // 调整顺序 + // 调整顺序 + // Adjust order var firstDayIndex = (int)FirstDayOfWeek; return [.. list.Skip(firstDayIndex), .. list.Take(firstDayIndex)]; } diff --git a/src/BootstrapBlazor/Components/Calendar/CalendarCellValue.cs b/src/BootstrapBlazor/Components/Calendar/CalendarCellValue.cs index 6b61dcdba27..ec35f8d49a5 100644 --- a/src/BootstrapBlazor/Components/Calendar/CalendarCellValue.cs +++ b/src/BootstrapBlazor/Components/Calendar/CalendarCellValue.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 日历组件单元格值结构体 +/// 日历组件单元格值结构体 +/// Calendar component cell value structure /// public class CalendarCellValue { /// - /// 获得/设置 当前单元格值 + /// 获得/设置 当前单元格值 + /// Gets or sets the current cell value /// public DateTime CellValue { get; set; } /// - /// 获得/设置 日历框组件值 + /// 获得/设置 日历框组件值 + /// Gets or sets the calendar component value /// public DateTime CalendarValue { get; set; } /// - /// 获得/设置 单元格默认样式 + /// 获得/设置 单元格默认样式 + /// Gets or sets the cell default style /// public string? DefaultCss { get; set; } } diff --git a/src/BootstrapBlazor/Components/Camera/Camera.razor.cs b/src/BootstrapBlazor/Components/Camera/Camera.razor.cs index f3873621345..be2b14cda98 100644 --- a/src/BootstrapBlazor/Components/Camera/Camera.razor.cs +++ b/src/BootstrapBlazor/Components/Camera/Camera.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,66 +8,87 @@ namespace BootstrapBlazor.Components; /// -/// Camera 组件 +/// Camera 组件 +/// Camera component /// public partial class Camera { /// - /// 获得/设置 当前设备 Id 默认 null + /// 获得/设置 当前设备 Id 默认 null + /// Gets or sets 当前设备 Id Default is null + /// 10.2.2 /// [Parameter] public string? DeviceId { get; set; } /// - /// 获得/设置 是否自动开启摄像头 默认为 false + /// 获得/设置 是否自动开启摄像头 默认为 false + /// Gets or sets whether自动开启摄像头 Default is为 false + /// 10.2.2 /// [Parameter] public bool AutoStart { get; set; } /// - /// 获得/设置 摄像头视频宽度 默认 320 + /// 获得/设置 摄像头视频宽度 默认 320 + /// Gets or sets 摄像头视频width Default is 320 + /// 10.2.2 /// [Parameter] public int? VideoWidth { get; set; } = 320; /// - /// 获得/设置 摄像头视频高度 默认 240 + /// 获得/设置 摄像头视频高度 默认 240 + /// Gets or sets 摄像头视频height Default is 240 + /// 10.2.2 /// [Parameter] public int? VideoHeight { get; set; } = 240; /// - /// 获得/设置 拍照格式为 Jpeg 默认为 false 使用 png 格式 + /// 获得/设置 拍照格式为 Jpeg 默认为 false 使用 png 格式 + /// Gets or sets 拍照格式为 Jpeg Default is为 false 使用 png 格式 + /// 10.2.2 /// [Parameter] public bool CaptureJpeg { get; set; } /// - /// 获得/设置 图像质量 默认为 0.9 + /// 获得/设置 图像质量 默认为 0.9 + /// Gets or sets 图像质量 Default is为 0.9 + /// 10.2.2 /// [Parameter] public float Quality { get; set; } = 0.9f; /// - /// 获得/设置 初始化摄像头回调方法 + /// 获得/设置 初始化摄像头回调方法 + /// Gets or sets 初始化摄像头callback method + /// 10.2.2 /// [Parameter] public Func, Task>? OnInit { get; set; } /// - /// 获得/设置 拍照出错回调方法 + /// 获得/设置 拍照出错回调方法 + /// Gets or sets 拍照出错callback method + /// 10.2.2 /// [Parameter] public Func? OnError { get; set; } /// - /// 获得/设置 打开摄像头回调方法 + /// 获得/设置 打开摄像头回调方法 + /// Gets or sets 打开摄像头callback method + /// 10.2.2 /// [Parameter] public Func? OnOpen { get; set; } /// - /// 获得/设置 关闭摄像头回调方法 + /// 获得/设置 关闭摄像头回调方法 + /// Gets or sets 关闭摄像头callback method + /// 10.2.2 /// [Parameter] public Func? OnClose { get; set; } @@ -108,19 +129,22 @@ protected override async Task OnAfterRenderAsync(bool firstRender) protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop); /// - /// 打开摄像头 + /// 打开摄像头 + /// 打开摄像头 /// /// public Task Open() => InvokeVoidAsync("open", Id); /// - /// 关闭摄像头 + /// 关闭摄像头 + /// 关闭摄像头 /// /// public Task Close() => InvokeVoidAsync("close", Id); /// - /// 拍照方法 + /// 拍照方法 + /// 拍照方法 /// /// public async Task Capture() @@ -139,14 +163,16 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } /// - /// 保存并下载图片 + /// 保存并下载图片 + /// 保存并下载图片 /// - /// 文件名 + /// 文件名文件名 /// public Task SaveAndDownload(string? fileName = null) => InvokeVoidAsync("download", Id, fileName); /// - /// 重置宽高方法 + /// 重置宽高方法 + /// 重置宽高方法 /// /// /// @@ -154,7 +180,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) public Task Resize(int width, int height) => InvokeVoidAsync("resize", Id, width, height); /// - /// 初始化设备方法 + /// 初始化设备方法 + /// 初始化设备方法 /// /// /// @@ -173,7 +200,8 @@ public async Task TriggerInit(List devices) } /// - /// 扫描发生错误回调方法 + /// 扫描发生错误回调方法 + /// 扫描发生错误callback method /// /// /// @@ -187,7 +215,8 @@ public async Task TriggerError(string err) } /// - /// 开启摄像头回调方法 + /// 开启摄像头回调方法 + /// 开启摄像头callback method /// /// [JSInvokable] @@ -200,7 +229,8 @@ public async Task TriggerOpen() } /// - /// 停止摄像头回调方法 + /// 停止摄像头回调方法 + /// 停止摄像头callback method /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/Camera/DeviceItem.cs b/src/BootstrapBlazor/Components/Camera/DeviceItem.cs index 058159791aa..f07734f45af 100644 --- a/src/BootstrapBlazor/Components/Camera/DeviceItem.cs +++ b/src/BootstrapBlazor/Components/Camera/DeviceItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 摄像头信息类 +/// 摄像头信息类 +/// 摄像头信息类 /// public class DeviceItem { /// - /// 获得/设置 设备 ID + /// 获得/设置 设备 ID + /// Gets or sets 设备 ID /// public string DeviceId { get; set; } = ""; /// - /// 获得/设置 设备标签 + /// 获得/设置 设备标签 + /// Gets or sets 设备标签 /// public string Label { get; set; } = ""; } diff --git a/src/BootstrapBlazor/Components/Captcha/Captcha.razor.cs b/src/BootstrapBlazor/Components/Captcha/Captcha.razor.cs index 36c1a9606db..10491401bee 100644 --- a/src/BootstrapBlazor/Components/Captcha/Captcha.razor.cs +++ b/src/BootstrapBlazor/Components/Captcha/Captcha.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// Captcha 组件 +/// Captcha 组件 +/// Captcha component /// public partial class Captcha { @@ -17,14 +18,16 @@ public partial class Captcha private int OriginX { get; set; } /// - /// 获得 组件宽度 + /// 获得 组件宽度 + /// Gets componentwidth /// private string? StyleString => CssBuilder.Default() .AddClass($"width: {Width + 42}px;", Width > 0) .Build(); /// - /// 获得 加载图片失败样式 + /// 获得 加载图片失败样式 + /// Gets 加载图片失败style /// private string? FailedStyle => CssBuilder.Default() .AddClass($"width: {Width}px;", Width > 0) @@ -32,102 +35,134 @@ public partial class Captcha .Build(); /// - /// 获得/设置 Header 显示文本 + /// 获得/设置 Header 显示文本 + /// Gets or sets Header display文本 + /// 10.2.2 /// [Parameter] [NotNull] public string? HeaderText { get; set; } /// - /// 获得/设置 Bar 显示文本 + /// 获得/设置 Bar 显示文本 + /// Gets or sets Bar display文本 + /// 10.2.2 /// [Parameter] [NotNull] public string? BarText { get; set; } /// - /// 获得/设置 Bar 显示文本 + /// 获得/设置 Bar 显示文本 + /// Gets or sets Bar display文本 + /// 10.2.2 /// [Parameter] [NotNull] public string? FailedText { get; set; } /// - /// 获得/设置 Bar 显示文本 + /// 获得/设置 Bar 显示文本 + /// Gets or sets Bar display文本 + /// 10.2.2 /// [Parameter] [NotNull] public string? LoadText { get; set; } /// - /// 获得/设置 验证码结果回调委托 + /// 获得/设置 验证码结果回调委托 + /// Gets or sets 验证码结果回调delegate + /// 10.2.2 /// [Parameter] public Func? OnValidAsync { get; set; } /// - /// 获得/设置 图床路径 默认值为 images + /// 获得/设置 图床路径 默认值为 images + /// Gets or sets 图床路径 Default is值为 images + /// 10.2.2 /// [Parameter] public string ImagesPath { get; set; } = "images"; /// - /// 获得/设置 图床路径 默认值为 Pic.jpg + /// 获得/设置 图床路径 默认值为 Pic.jpg + /// Gets or sets 图床路径 Default is值为 Pic.jpg + /// 10.2.2 /// [Parameter] public string ImagesName { get; set; } = "Pic.jpg"; /// - /// 获得/设置 获取背景图方法委托 + /// 获得/设置 获取背景图方法委托 + /// Gets or sets 获取背景图方法delegate + /// 10.2.2 /// [Parameter] public Func? GetImageName { get; set; } /// - /// 获得/设置 容错偏差 + /// 获得/设置 容错偏差 + /// Gets or sets 容错偏差 + /// 10.2.2 /// [Parameter] public int Offset { get; set; } = 5; /// - /// 获得/设置 图片宽度 + /// 获得/设置 图片宽度 + /// Gets or sets 图片width + /// 10.2.2 /// [Parameter] public int Width { get; set; } = 280; /// - /// 获得/设置 拼图边长 + /// 获得/设置 拼图边长 + /// Gets or sets 拼图边长 + /// 10.2.2 /// [Parameter] public int SideLength { get; set; } = 42; /// - /// 获得/设置 拼图直径 + /// 获得/设置 拼图直径 + /// Gets or sets 拼图直径 + /// 10.2.2 /// [Parameter] public int Diameter { get; set; } = 9; /// - /// 获得/设置 图片高度 + /// 获得/设置 图片高度 + /// Gets or sets 图片height + /// 10.2.2 /// [Parameter] public int Height { get; set; } = 155; /// - /// 获得/设置 刷新按钮图标 默认值 fa-solid fa-arrows-rotate + /// 获得/设置 刷新按钮图标 默认值 fa-solid fa-arrows-rotate + /// Gets or sets 刷新buttonicon Default is值 fa-solid fa-arrows-rotate + /// 10.2.2 /// [Parameter] [NotNull] public string? RefreshIcon { get; set; } /// - /// 获得/设置 随机图片最大张数 默认 1024 + /// 获得/设置 随机图片最大张数 默认 1024 + /// Gets or sets 随机图片最大张数 Default is 1024 + /// 10.2.2 /// [Parameter] public int Max { get; set; } = 1024; /// - /// 获得/设置 刷新按钮图标 默认值 fa-solid fa-arrow-right + /// 获得/设置 刷新按钮图标 默认值 fa-solid fa-arrow-right + /// Gets or sets 刷新buttonicon Default is值 fa-solid fa-arrow-right + /// 10.2.2 /// [Parameter] [NotNull] @@ -142,7 +177,8 @@ public partial class Captcha private IIconTheme? IconTheme { get; set; } /// - /// + /// + /// /// protected override void OnParametersSet() { @@ -158,18 +194,21 @@ protected override void OnParametersSet() } /// - /// + /// + /// /// /// protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(Verify), GetCaptchaOption()); /// - /// 点击刷新按钮时回调此方法 + /// 点击刷新按钮时回调此方法 + /// 点击刷新button时回调此方法 /// private Task OnClickRefresh() => Reset(); /// - /// 验证方差方法 + /// 验证方差方法 + /// 验证方差方法 /// [JSInvokable] public async Task Verify(int offset, List trails) @@ -230,7 +269,8 @@ private static bool CalcStddev(List trails) } /// - /// 重置组件方法 + /// 重置组件方法 + /// 重置component方法 /// public async Task Reset() { diff --git a/src/BootstrapBlazor/Components/Captcha/CaptchaOption.cs b/src/BootstrapBlazor/Components/Captcha/CaptchaOption.cs index 6f1706db8ee..144273aad3f 100644 --- a/src/BootstrapBlazor/Components/Captcha/CaptchaOption.cs +++ b/src/BootstrapBlazor/Components/Captcha/CaptchaOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,47 +6,56 @@ namespace BootstrapBlazor.Components; /// -/// Captcha 滑块验证码组件 +/// Captcha 滑块验证码组件 +/// Captcha 滑块验证码component /// public class CaptchaOption { /// - /// 获得/设置 验证码图片宽度 + /// 获得/设置 验证码图片宽度 + /// Gets or sets 验证码图片width /// public int Width { get; set; } /// - /// 获得/设置 验证码图片高度 + /// 获得/设置 验证码图片高度 + /// Gets or sets 验证码图片height /// public int Height { get; set; } /// - /// 获得/设置 拼图边长 默认 42 + /// 获得/设置 拼图边长 默认 42 + /// Gets or sets 拼图边长 Default is 42 /// public int SideLength { get; set; } = 42; /// - /// 获得/设置 拼图直径 默认 9 + /// 获得/设置 拼图直径 默认 9 + /// Gets or sets 拼图直径 Default is 9 /// public int Diameter { get; set; } = 9; /// - /// 获得/设置 拼图 X 位置 + /// 获得/设置 拼图 X 位置 + /// Gets or sets 拼图 X 位置 /// public int OffsetX { get; set; } /// - /// 获得/设置 拼图 Y 位置 + /// 获得/设置 拼图 Y 位置 + /// Gets or sets 拼图 Y 位置 /// public int OffsetY { get; set; } /// - /// 获得/设置 拼图宽度 + /// 获得/设置 拼图宽度 + /// Gets or sets 拼图width /// public int BarWidth { get; set; } /// - /// 获得/设置 拼图背景图片路径 + /// 获得/设置 拼图背景图片路径 + /// Gets or sets 拼图背景图片路径 /// public string? ImageUrl { get; set; } } diff --git a/src/BootstrapBlazor/Components/Card/Card.razor.cs b/src/BootstrapBlazor/Components/Card/Card.razor.cs index fbd1d12a7a6..43fc17426e6 100644 --- a/src/BootstrapBlazor/Components/Card/Card.razor.cs +++ b/src/BootstrapBlazor/Components/Card/Card.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Card 组件 +/// Card 组件 +/// Card component /// public partial class Card { /// - /// Card 组件样式 + /// Card 组件样式 + /// Card component style /// protected string? ClassString => CssBuilder.Default("card") .AddClass("text-center", IsCenter) @@ -22,14 +24,16 @@ public partial class Card .Build(); /// - /// 获得 收缩图标样式 + /// 获得 收缩图标样式 + /// Get the collapse icon style /// protected string? ArrowClassString => CssBuilder.Default("card-collapse-arrow") .AddClass(CollapseIcon) .Build(); /// - /// 设置 Body Class 组件样式 + /// 设置 Body Class 组件样式 + /// Set Body Class component style /// protected string? BodyClassName => CssBuilder.Default("card-body") .AddClass($"text-{Color.ToDescriptionString()}", Color != Color.None) @@ -38,86 +42,113 @@ public partial class Card .Build(); /// - /// 节点是否展开 aria Label + /// 节点是否展开 aria Label + /// Node expansion status aria Label /// protected string? ExpandedString => Collapsed ? "false" : "true"; /// - /// 设置 Footer Class 样式 + /// 设置 Footer Class 样式 + /// Set Footer Class style /// protected string? FooterClassName => CssBuilder.Default("card-footer") .AddClass("text-muted", IsCenter) .Build(); /// - /// 获得/设置 Card Header 高度 padding Y轴值 默认 null - /// 单位需自行给定 如 0.25rem + /// 获得/设置 Card Header 高度 padding Y轴值 默认 null + /// Gets or sets the Card Header height padding Y-axis value. Default is null + /// 单位需自行给定 如 0.25rem + /// Units need to be given by yourself, such as 0.25rem + /// 10.2.2 /// [Parameter] public string? HeaderPaddingY { get; set; } /// - /// 获得/设置 收缩展开箭头图标 默认 fa-solid fa-circle-chevron-right + /// 获得/设置 收缩展开箭头图标 默认 fa-solid fa-circle-chevron-right + /// Gets or sets the collapse/expand arrow icon. Default is fa-solid fa-circle-chevron-right + /// 10.2.2 /// [Parameter] public string? CollapseIcon { get; set; } /// - /// 获得/设置 HeaderTemplate 显示文本 + /// 获得/设置 HeaderTemplate 显示文本 + /// Gets or sets the HeaderTemplate display text + /// 10.2.2 /// [Parameter] public string? HeaderText { get; set; } /// - /// 获得/设置 CardHeard 模板 + /// 获得/设置 CardHeard 模板 + /// Gets or sets the CardHeader template + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 BodyTemplate 模板 + /// 获得/设置 BodyTemplate 模板 + /// Gets or sets the BodyTemplate template + /// 10.2.2 /// [Parameter] public RenderFragment? BodyTemplate { get; set; } /// - /// 获得/设置 FooterTemplate 模板 + /// 获得/设置 FooterTemplate 模板 + /// Gets or sets the FooterTemplate template + /// 10.2.2 /// [Parameter] public RenderFragment? FooterTemplate { get; set; } /// - /// 获得/设置 Card 颜色 + /// 获得/设置 Card 颜色 + /// Gets or sets the Card color + /// 10.2.2 /// [Parameter] public Color Color { get; set; } /// - /// 获得/设置 是否居中 默认 false + /// 获得/设置 是否居中 默认 false + /// Gets or sets whether to center. Default is false + /// 10.2.2 /// [Parameter] public bool IsCenter { get; set; } /// - /// 获得/设置 是否可收缩 默认 false + /// 获得/设置 是否可收缩 默认 false + /// Gets or sets whether it is collapsible. Default is false + /// 10.2.2 /// [Parameter] public bool IsCollapsible { get; set; } /// - /// 获得/设置 是否收缩 默认 false 展开 + /// 获得/设置 是否收缩 默认 false 展开 + /// Gets or sets whether it is collapsed. Default is false (expanded) + /// 10.2.2 /// [Parameter] public bool Collapsed { get; set; } /// - /// 获得/设置 是否收缩 默认 false 展开 + /// 获得/设置 是否收缩 默认 false 展开 + /// Gets or sets whether it is collapsed. Default is false (expanded) + /// 10.2.2 /// [Parameter] public EventCallback CollapsedChanged { get; set; } /// - /// 获得/设置 是否显示阴影 默认 false + /// 获得/设置 是否显示阴影 默认 false + /// Gets or sets whether to show shadow. Default is false + /// 10.2.2 /// [Parameter] public bool IsShadow { get; set; } @@ -150,7 +181,8 @@ protected override void OnParametersSet() private string? BodyId => $"{Id}_body"; /// - /// The callback click collapse button + /// The callback click collapse button + /// The callback click collapse button /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/Carousel/Carousel.razor.cs b/src/BootstrapBlazor/Components/Carousel/Carousel.razor.cs index a52a8b9789b..3dc16c7e2ae 100644 --- a/src/BootstrapBlazor/Components/Carousel/Carousel.razor.cs +++ b/src/BootstrapBlazor/Components/Carousel/Carousel.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Carousel 组件 +/// Carousel 组件 +/// Carousel component /// public partial class Carousel { /// - /// 获得 class 样式集合 + /// 获得 class 样式集合 + /// Get the class style collection /// private string? ClassName => CssBuilder.Default("carousel slide") .AddClass("carousel-fade", IsFade) @@ -19,20 +21,23 @@ public partial class Carousel .Build(); /// - /// 获得 data-target 属性值 + /// 获得 data-target 属性值 + /// Get data-target attribute value /// /// private string? TargetId => $"#{Id}"; /// - /// 获得 Style 样式 + /// 获得 Style 样式 + /// Get Style style /// private string? StyleName => CssBuilder.Default() .AddClass($"width: {Width.ConvertToPercentString()};", !string.IsNullOrEmpty(Width)) .Build(); /// - /// 检查是否 active + /// 检查是否 active + /// Check if active /// /// /// @@ -42,79 +47,105 @@ public partial class Carousel .Build(); /// - /// 获得 Images 集合 + /// 获得 Images 集合 + /// Get Images collection + /// 10.2.2 /// [Parameter] public IEnumerable Images { get; set; } = []; /// - /// 获得/设置 内部图片的宽度 + /// 获得/设置 内部图片的宽度 + /// Gets or sets the width of internal images + /// 10.2.2 /// [Parameter] public string? Width { get; set; } /// - /// 获得/设置 是否采用淡入淡出效果 默认为 false + /// 获得/设置 是否采用淡入淡出效果 默认为 false + /// Gets or sets whether to use fade effect. Default is false + /// 10.2.2 /// [Parameter] public bool IsFade { get; set; } /// - /// 获得/设置 点击 Image 回调委托 + /// 获得/设置 点击 Image 回调委托 + /// Gets or sets the Click Image callback delegate + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } /// - /// 获得/设置 幻灯片切换后回调方法 + /// 获得/设置 幻灯片切换后回调方法 + /// Gets or sets the callback method after slide switch + /// 10.2.2 /// [Parameter] public Func? OnSlideChanged { get; set; } /// - /// 获得/设置 子组件 要求使用 + /// 获得/设置 子组件 要求使用 + /// Gets or sets child component. Requires + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否显示控制按钮 默认 true + /// 获得/设置 是否显示控制按钮 默认 true + /// Gets or sets whether to show control buttons. Default is true + /// 10.2.2 /// [Parameter] public bool ShowControls { get; set; } = true; /// - /// 获得/设置 是否显示指示标志 默认 true + /// 获得/设置 是否显示指示标志 默认 true + /// Gets or sets whether to show indicators. Default is true + /// 10.2.2 /// [Parameter] public bool ShowIndicators { get; set; } = true; /// - /// 获得/设置 是否禁用移动端手势滑动 默认 false + /// 获得/设置 是否禁用移动端手势滑动 默认 false + /// Gets or sets whether to disable mobile touch swiping. Default is false + /// 10.2.2 /// [Parameter] public bool DisableTouchSwiping { get; set; } /// - /// 获得/设置 上一页图标 + /// 获得/设置 上一页图标 + /// Gets or sets the previous icon + /// 10.2.2 /// [Parameter] public string? PreviousIcon { get; set; } /// - /// 获得/设置 下一页图标 + /// 获得/设置 下一页图标 + /// Gets or sets the next icon + /// 10.2.2 /// [Parameter] public string? NextIcon { get; set; } /// - /// 获得/设置 鼠标悬停时是否暂停播放 默认 true + /// 获得/设置 鼠标悬停时是否暂停播放 默认 true + /// Gets or sets whether to pause on hover. Default is true + /// 10.2.2 /// [Parameter] public bool HoverPause { get; set; } = true; /// - /// 获得/设置 自动播放方式 默认 + /// 获得/设置 自动播放方式 默认 + /// Gets or sets the auto play mode. Default is + /// 10.2.2 /// [Parameter] public CarouselPlayMode PlayMode { get; set; } @@ -128,7 +159,8 @@ public partial class Carousel private string? PauseString => HoverPause ? "hover" : "false"; /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { @@ -173,7 +205,8 @@ protected override void OnParametersSet() private string? InvokeMethodName => OnSlideChanged == null ? null : nameof(TriggerSlideChanged); /// - /// 点击 Image 是触发此方法 + /// 点击 Image 是触发此方法 + /// Trigger this method when clicking Image /// /// protected async Task OnClickImage(string imageUrl) @@ -184,19 +217,22 @@ protected async Task OnClickImage(string imageUrl) private List Items { get; } = new(10); /// - /// 添加子项 + /// 添加子项 + /// Add child item /// /// internal void AddItem(CarouselItem item) => Items.Add(item); /// - /// 移除子项 + /// 移除子项 + /// Remove child item /// /// internal void RemoveItem(CarouselItem item) => Items.Remove(item); /// - /// 幻灯片切换事件回调 由 JavaScript 调用 + /// 幻灯片切换事件回调 由 JavaScript 调用 + /// Slide switch event callback called by JavaScript /// /// /// diff --git a/src/BootstrapBlazor/Components/Carousel/CarouselImage.cs b/src/BootstrapBlazor/Components/Carousel/CarouselImage.cs index 9b3ae29e288..ee55e9e7ad8 100644 --- a/src/BootstrapBlazor/Components/Carousel/CarouselImage.cs +++ b/src/BootstrapBlazor/Components/Carousel/CarouselImage.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,18 +8,23 @@ namespace BootstrapBlazor.Components; /// -/// +/// CarouselImage 内部组件 +/// CarouselImage internal component /// internal class CarouselImage : ComponentBase { /// - /// + /// 获得/设置 图片路径 + /// Gets or sets the image URL + /// 10.2.2 /// [Parameter] public string? ImageUrl { get; set; } /// - /// + /// 获得/设置 点击回调委托 + /// Gets or sets the click callback delegate + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } diff --git a/src/BootstrapBlazor/Components/Carousel/CarouselItem.cs b/src/BootstrapBlazor/Components/Carousel/CarouselItem.cs index dd5e7e7cad5..ea86d590bbc 100644 --- a/src/BootstrapBlazor/Components/Carousel/CarouselItem.cs +++ b/src/BootstrapBlazor/Components/Carousel/CarouselItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,36 +6,47 @@ namespace BootstrapBlazor.Components; /// -/// CarouselItem 类 +/// CarouselItem 类 +/// CarouselItem class /// public class CarouselItem : ComponentBase, IDisposable { /// - /// 获得/设置 子组件 默认 null + /// 获得/设置 子组件 默认 null + /// Gets or sets the child content. Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 Caption 文字 默认 null 可设置 自定义 + /// 获得/设置 Caption 文字 默认 null 可设置 自定义 + /// Gets or sets the Caption text. Default is null. Can be customized by setting + /// 10.2.2 /// [Parameter] public string? Caption { get; set; } /// - /// 获得/设置 Caption 样式 默认 null + /// 获得/设置 Caption 样式 默认 null + /// Gets or sets the Caption style. Default is null + /// 10.2.2 /// [Parameter] public string? CaptionClass { get; set; } /// - /// 获得/设置 Caption 模板 默认 null + /// 获得/设置 Caption 模板 默认 null + /// Gets or sets the Caption template. Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? CaptionTemplate { get; set; } /// - /// 获得/设置 Slider 切换时间间隔 默认 5000 + /// 获得/设置 Slider 切换时间间隔 默认 5000 + /// Gets or sets the Slider interval. Default is 5000 + /// 10.2.2 /// [Parameter] public int Interval { get; set; } = 5000; @@ -44,12 +55,14 @@ public class CarouselItem : ComponentBase, IDisposable private Carousel? Carousel { get; set; } /// - /// 获得 Interval 字符串 + /// 获得 Interval 字符串 + /// Get Interval string /// internal string? IntervalString => Interval == 5000 ? null : Interval.ToString(); /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized method /// protected override void OnInitialized() { @@ -57,19 +70,22 @@ protected override void OnInitialized() } /// - /// 获得 当前 Item Caption 样式字符串 + /// 获得 当前 Item Caption 样式字符串 + /// Get the current Item Caption style string /// public string? GetCaptionClassString => CssBuilder.Default("carousel-caption") .AddClass(CaptionClass) .Build(); /// - /// 获得 是否显示 Caption + /// 获得 是否显示 Caption + /// Get whether to show Caption /// internal bool ShowCaption => CaptionTemplate != null || !string.IsNullOrEmpty(Caption); /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose method /// /// protected virtual void Dispose(bool disposing) @@ -81,7 +97,8 @@ protected virtual void Dispose(bool disposing) } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose method /// public void Dispose() { diff --git a/src/BootstrapBlazor/Components/Cascader/Cascader.razor.cs b/src/BootstrapBlazor/Components/Cascader/Cascader.razor.cs index ef51afe828d..029914afa96 100644 --- a/src/BootstrapBlazor/Components/Cascader/Cascader.razor.cs +++ b/src/BootstrapBlazor/Components/Cascader/Cascader.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,96 +8,124 @@ namespace BootstrapBlazor.Components; /// -/// Cascader 组件实现类 +/// Cascader 组件实现类 +/// Cascader component implementation class /// /// public partial class Cascader { /// - /// 当前选中节点集合 + /// 当前选中节点集合 + /// Current selected item collection /// private List SelectedItems { get; } = []; /// - /// 获得/设置 Cascader 内部 Input 组件 Id + /// 获得/设置 Cascader 内部 Input 组件 Id + /// Gets or sets the internal Input component Id of Cascader /// private string? InputId => $"{Id}_input"; /// - /// 获得/设置 组件显示文字 + /// 获得/设置 组件显示文字 + /// Gets or sets the component display text /// protected string? DisplayTextString { get; set; } /// - /// 获得/设置 按钮颜色 + /// 获得/设置 按钮颜色 + /// Gets or sets the button color + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.None; /// - /// 获得/设置 组件 PlaceHolder 文字 默认为 请选择 ... + /// 获得/设置 组件 PlaceHolder 文字 默认为 请选择 ... + /// Gets or sets the component PlaceHolder text. Default is Please select ... + /// 10.2.2 /// [Parameter] public string? PlaceHolder { get; set; } /// - /// 获得/设置 绑定数据集 + /// 获得/设置 绑定数据集 + /// Gets or sets the bound data set + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 ValueChanged 方法 + /// 获得/设置 ValueChanged 方法 + /// Gets or sets the ValueChanged method + /// 10.2.2 /// [Parameter] public Func? OnSelectedItemChanged { get; set; } /// - /// 获得/设置 父节点是否可选择 默认 true + /// 获得/设置 父节点是否可选择 默认 true + /// Gets or sets whether the parent node is selectable. Default is true + /// 10.2.2 /// [Parameter] public bool ParentSelectable { get; set; } = true; /// - /// 获得/设置 是否显示全路径 默认 true + /// 获得/设置 是否显示全路径 默认 true + /// Gets or sets whether to show the full path. Default is true + /// 10.2.2 /// [Parameter] public bool ShowFullLevels { get; set; } = true; /// - /// 获得/设置 菜单指示图标 + /// 获得/设置 菜单指示图标 + /// Gets or sets the menu indicator icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 子菜单指示图标 + /// 获得/设置 子菜单指示图标 + /// Gets or sets the submenu indicator icon + /// 10.2.2 /// [Parameter] public string? SubMenuIcon { get; set; } /// - /// 获得/设置 是否可清除 默认 false + /// 获得/设置 是否可清除 默认 false + /// Gets or sets whether it is clearable. Default is false + /// 10.2.2 /// [Parameter] public bool IsClearable { get; set; } /// - /// 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up + /// 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up + /// Gets or sets the clear icon on the right. Default is fa-solid fa-angle-up + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearIcon { get; set; } /// - /// 获得/设置 清除文本内容 OnClear 回调方法 默认 null + /// 获得/设置 清除文本内容 OnClear 回调方法 默认 null + /// Gets or sets the OnClear callback method when clearing text content. Default is null + /// 10.2.2 /// [Parameter] public Func? OnClearAsync { get; set; } /// - /// 获得/设置 失去焦点回调方法 默认 null + /// 获得/设置 失去焦点回调方法 默认 null + /// Gets or sets the callback method when losing focus. Default is null + /// 10.2.2 /// [Parameter] public Func? OnBlurAsync { get; set; } @@ -123,7 +151,8 @@ public partial class Cascader .Build(); /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { @@ -151,7 +180,8 @@ protected override void OnParametersSet() } /// - /// 失去焦点时回调方法 + /// 失去焦点时回调方法 + /// Callback method when losing focus /// private async Task OnBlur() { @@ -162,7 +192,8 @@ private async Task OnBlur() } /// - /// 设置默认选中 + /// 设置默认选中 + /// Set default selection /// /// private void SetDefaultValue(string defaultValue) @@ -181,7 +212,8 @@ private void SetDefaultValue(string defaultValue) } /// - /// 根据指定值获取节点 + /// 根据指定值获取节点 + /// Get node by specified value /// /// /// @@ -214,7 +246,8 @@ private void SetDefaultValue(string defaultValue) .Build(); /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get style collection /// private string? InputClassName => CssBuilder.Default("form-control form-select") .AddClass($"border-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled) @@ -222,7 +255,8 @@ private void SetDefaultValue(string defaultValue) .Build(); /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get style collection /// private string? AppendClassName => CssBuilder.Default("form-select-append") .AddClass($"text-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled) @@ -231,7 +265,8 @@ private void SetDefaultValue(string defaultValue) private bool GetClearable() => IsClearable && !IsDisabled; /// - /// 选择项是否 Active 方法 + /// 选择项是否 Active 方法 + /// Check if the item is active method /// /// /// @@ -241,7 +276,8 @@ private void SetDefaultValue(string defaultValue) .Build(); /// - /// 下拉框选项点击时调用此方法 + /// 下拉框选项点击时调用此方法 + /// Call this method when the dropdown option is clicked /// private Task OnItemClick(CascaderItem item) => SetSelectedItem(item); @@ -274,7 +310,8 @@ private void RefreshDisplayText() => DisplayTextString = ShowFullLevels : SelectedItems.LastOrDefault()?.Text; /// - /// 设置选中所有父节点 + /// 设置选中所有父节点 + /// Set all parent nodes selected /// /// /// diff --git a/src/BootstrapBlazor/Components/Cascader/CascaderItem.cs b/src/BootstrapBlazor/Components/Cascader/CascaderItem.cs index 64a90cbf741..91416398895 100644 --- a/src/BootstrapBlazor/Components/Cascader/CascaderItem.cs +++ b/src/BootstrapBlazor/Components/Cascader/CascaderItem.cs @@ -6,51 +6,60 @@ namespace BootstrapBlazor.Components; /// -/// 级联选项类 +/// 级联选项类 +/// Cascader Item class /// public class CascaderItem { /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public CascaderItem() { } /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public CascaderItem(string value, string text) => (Value, Text) = (value, text); /// - /// 获得 父级节点 + /// 获得 父级节点 + /// Get Parent node /// public CascaderItem? Parent { get; private set; } /// - /// 获得/设置 子节点数据源 + /// 获得/设置 子节点数据源 + /// Gets or sets the child node data source /// public IEnumerable Items => _items; private readonly List _items = new(20); /// - /// 获得/设置 显示名称 + /// 获得/设置 显示名称 + /// Gets or sets the display text /// public string Text { get; set; } = ""; /// - /// 获得/设置 选项值 + /// 获得/设置 选项值 + /// Gets or sets the option value /// public string Value { get; set; } = ""; /// - /// 获得 是否存在子节点 + /// 获得 是否存在子节点 + /// Get whether there are child nodes /// public bool HasChildren => _items.Count > 0; /// - /// 添加 CascaderItem 方法 由 CascaderItem 方法加载时调用 + /// 添加 CascaderItem 方法 由 CascaderItem 方法加载时调用 + /// Add CascaderItem method called when CascaderItem method loads /// - /// CascaderItem 实例 + /// CascaderItem 实例CascaderItem instance public void AddItem(CascaderItem item) { item.Parent = this; diff --git a/src/BootstrapBlazor/Components/Cascader/SubCascader.razor.cs b/src/BootstrapBlazor/Components/Cascader/SubCascader.razor.cs index 7510b622696..0ac8fb05ec5 100644 --- a/src/BootstrapBlazor/Components/Cascader/SubCascader.razor.cs +++ b/src/BootstrapBlazor/Components/Cascader/SubCascader.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// SubCascader 组件 +/// SubCascader 组件 +/// SubCascader component /// public partial class SubCascader { /// - /// 获得/设置 组件数据源 + /// 获得/设置 组件数据源 + /// Gets or sets the component data source + /// 10.2.2 /// [Parameter] [NotNull] @@ -21,13 +24,17 @@ public partial class SubCascader public IEnumerable? Items { get; set; } /// - /// 获得/设置 选择项点击回调委托 + /// 获得/设置 选择项点击回调委托 + /// Gets or sets the selected item click callback delegate + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } /// - /// 获得/设置 子菜单指示图标 + /// 获得/设置 子菜单指示图标 + /// Gets or sets the submenu indicator icon + /// 10.2.2 /// [Parameter] public string? SubMenuIcon { get; set; } @@ -41,7 +48,8 @@ public partial class SubCascader .Build(); /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Checkbox/Checkbox.razor.cs b/src/BootstrapBlazor/Components/Checkbox/Checkbox.razor.cs index 9cc4b83c0c0..bc67ec1c05b 100644 --- a/src/BootstrapBlazor/Components/Checkbox/Checkbox.razor.cs +++ b/src/BootstrapBlazor/Components/Checkbox/Checkbox.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,13 +8,15 @@ namespace BootstrapBlazor.Components; /// -/// Checkbox 组件 +/// Checkbox 组件 +/// Checkbox component /// [BootstrapModuleAutoLoader(JSObjectReference = true)] public partial class Checkbox : ValidateBase { /// - /// 获得 class 样式集合 + /// 获得 class 样式集合 + /// Get the class style collection /// private string? ClassString => CssBuilder.Default("form-check") .AddClass("is-label", IsShowAfterLabel) @@ -28,7 +30,8 @@ public partial class Checkbox : ValidateBase private bool IsShowAfterLabel => ShowAfterLabel && !string.IsNullOrEmpty(DisplayText); /// - /// Input 元素样式 + /// Input 元素样式 + /// Input element style /// protected string? InputClassString => CssBuilder.Default("form-check-input") .AddClass($"border-{Color.ToDescriptionString()}", Color != Color.None) @@ -36,7 +39,8 @@ public partial class Checkbox : ValidateBase .Build(); /// - /// Check 状态字符串 + /// Check 状态字符串 + /// Check status string /// protected string? CheckedString => State switch { @@ -45,61 +49,80 @@ public partial class Checkbox : ValidateBase }; /// - /// 判断双向绑定类型是否为 boolean 类型 + /// 判断双向绑定类型是否为 boolean 类型 + /// Determine whether the two-way binding type is boolean /// private bool IsBoolean { get; set; } /// - /// 获得/设置 按钮颜色 默认为 None 未设置 + /// 获得/设置 按钮颜色 默认为 None 未设置 + /// Gets or sets the button color. Default is None (not set) + /// 10.2.2 /// [Parameter] public Color Color { get; set; } /// - /// 获得/设置 Size 大小 默认为 None + /// 获得/设置 Size 大小 默认为 None + /// Gets or sets the Size. Default is None + /// 10.2.2 /// [Parameter] public Size Size { get; set; } /// - /// 获得/设置 是否显示 Checkbox 后置 label 文字 默认为 false + /// 获得/设置 是否显示 Checkbox 后置 label 文字 默认为 false + /// Gets or sets whether to show the Checkbox post label text. Default is false + /// 10.2.2 /// [Parameter] public bool ShowAfterLabel { get; set; } /// - /// 获得/设置 选择框状态 + /// 获得/设置 选择框状态 + /// Gets or sets the checkbox state + /// 10.2.2 /// [Parameter] public CheckboxState State { get; set; } /// - /// 获得/设置 State 状态改变回调方法 + /// 获得/设置 State 状态改变回调方法 + /// Gets or sets the State change callback method + /// 10.2.2 /// /// [Parameter] public EventCallback StateChanged { get; set; } /// - /// 获得/设置 选中状态改变前回调此方法 返回 false 可以阻止状态改变 + /// 获得/设置 选中状态改变前回调此方法 返回 false 可以阻止状态改变 + /// Gets or sets the callback method before the selected state changes. Returning false can prevent the state change + /// 10.2.2 /// [Parameter] public Func>? OnBeforeStateChanged { get; set; } /// - /// 获得/设置 选择框状态改变时回调此方法 + /// 获得/设置 选择框状态改变时回调此方法 + /// Gets or sets the callback method when the checkbox state changes + /// 10.2.2 /// [Parameter] public Func? OnStateChanged { get; set; } /// - /// 获得/设置 是否事件冒泡 默认为 false + /// 获得/设置 是否事件冒泡 默认为 false + /// Gets or sets whether event bubbling. Default is false + /// 10.2.2 /// [Parameter] public bool StopPropagation { get; set; } /// - /// 获得/设置 子组件 RenderFragment 实例 + /// 获得/设置 子组件 RenderFragment 实例 + /// Gets or sets the child component RenderFragment instance + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } @@ -162,7 +185,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(OnStateChangedAsync)); /// - /// 点击组件触发方法 内部调用 回调方法 + /// 点击组件触发方法 内部调用 回调方法 + /// Click component trigger method. Internally calls callback method /// /// public async Task OnToggleClick() @@ -190,7 +214,8 @@ public async Task OnToggleClick() } /// - /// 触发 Click 方法 由 JavaScript 调用 + /// 触发 Click 方法 由 JavaScript 调用 + /// Trigger Click method. Called by JavaScript /// /// [JSInvokable] @@ -201,7 +226,8 @@ public ValueTask OnStateChangedAsync(CheckboxState state) } /// - /// 此变量为了提高性能,避免循环更新 + /// 此变量为了提高性能,避免循环更新 + /// This variable is to improve performance and avoid circular updates /// private bool _paddingStateChanged; @@ -235,7 +261,8 @@ private async Task InternalStateChanged(CheckboxState state) } /// - /// 设置 复选框状态方法 + /// 设置 复选框状态方法 + /// Set checkbox state method /// /// public async Task SetState(CheckboxState state) diff --git a/src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.cs b/src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.cs index 3b15e4aa451..b77c7579159 100644 --- a/src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.cs +++ b/src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// CheckboxList 组件基类 +/// CheckboxList 组件基类 +/// CheckboxList component base class /// public partial class CheckboxList : ValidateBase { /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get component style /// private string? ClassString => CssBuilder.Default("checkbox-list form-control") .AddClass("no-border", !ShowBorder && ValidCss != "is-invalid") @@ -22,7 +24,8 @@ public partial class CheckboxList : ValidateBase .Build(); /// - /// 获得 组件内部 Checkbox 项目样式 + /// 获得 组件内部 Checkbox 项目样式 + /// Get the Checkbox item style inside the component /// protected string? CheckboxItemClassString => CssBuilder.Default("checkbox-item") .AddClass(CheckboxItemClass) @@ -44,74 +47,97 @@ public partial class CheckboxList : ValidateBase .Build(); /// - /// 获得/设置 数据源 + /// 获得/设置 数据源 + /// Gets or sets the data source + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 是否为按钮样式 默认 false + /// 获得/设置 是否为按钮样式 默认 false + /// Gets or sets whether it is a button style. Default is false + /// 10.2.2 /// [Parameter] public bool IsButton { get; set; } /// - /// 获得/设置 是否显示按钮边框颜色 默认为 false + /// 获得/设置 是否显示按钮边框颜色 默认为 false + /// Gets or sets whether to show the button border color. Default is false + /// 10.2.2 /// [Parameter] public bool ShowButtonBorderColor { get; set; } /// - /// 获得/设置 Checkbox 组件布局样式 + /// 获得/设置 Checkbox 组件布局样式 + /// Gets or sets the Checkbox component layout style + /// 10.2.2 /// [Parameter] public string? CheckboxItemClass { get; set; } /// - /// 获得/设置 非按钮模式下是否显示组件边框 默认为 true + /// 获得/设置 非按钮模式下是否显示组件边框 默认为 true + /// Gets or sets whether to show the component border in non-button mode. Default is true + /// 10.2.2 /// [Parameter] public bool ShowBorder { get; set; } = true; /// - /// 获得/设置 是否为竖向排列 默认为 false + /// 获得/设置 是否为竖向排列 默认为 false + /// Gets or sets whether to arrange vertically. Default is false + /// 10.2.2 /// [Parameter] public bool IsVertical { get; set; } /// - /// 获得/设置 按钮颜色 默认为 None 未设置 + /// 获得/设置 按钮颜色 默认为 None 未设置 + /// Gets or sets the button color. Default is None (not set) + /// 10.2.2 /// [Parameter] public Color Color { get; set; } /// - /// 获得/设置 SelectedItemChanged 方法 + /// 获得/设置 SelectedItemChanged 方法 + /// Gets or sets the SelectedItemChanged method + /// 10.2.2 /// [Parameter] public Func, TValue, Task>? OnSelectedChanged { get; set; } /// - /// 获得/设置 最多选中数量 + /// 获得/设置 最多选中数量 + /// Gets or sets the maximum number of selected items + /// 10.2.2 /// [Parameter] public int MaxSelectedCount { get; set; } /// - /// 获得/设置 超过最大选中数量时回调委托 + /// 获得/设置 超过最大选中数量时回调委托 + /// Gets or sets the callback delegate when the maximum number of selected items is exceeded + /// 10.2.2 /// [Parameter] public Func? OnMaxSelectedCountExceed { get; set; } /// - /// 获得/设置 项模板 + /// 获得/设置 项模板 + /// Gets or sets the item template + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } /// - /// 获得 当前选项是否被禁用 + /// 获得 当前选项是否被禁用 + /// Get whether the current option is disabled /// /// /// @@ -120,7 +146,8 @@ public partial class CheckboxList : ValidateBase private Func>? _onBeforeStateChangedCallback; /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized method /// protected override void OnInitialized() { @@ -128,12 +155,14 @@ protected override void OnInitialized() EnsureParameterValid(); - // 处理 Required 标签 + // 处理 Required 标签 + // Process Required attribute AddRequiredValidator(); } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { @@ -196,7 +225,8 @@ private async Task OnBeforeStateChanged(CheckboxState state) private void InitValue() { - // 通过 Value 对集合进行赋值 + // 通过 Value 对集合进行赋值 + // Assign value to collection via Value if (Value != null) { var typeValue = typeof(TValue); @@ -218,7 +248,8 @@ private void InitValue() } /// - /// + /// + /// /// /// /// @@ -250,7 +281,8 @@ protected virtual void ProcessGenericItems(Type typeValue, IEnumerable? list) } /// - /// Checkbox 组件选项状态改变时触发此方法 + /// Checkbox 组件选项状态改变时触发此方法 + /// Trigger this method when the Checkbox component option state changes /// /// /// @@ -285,18 +317,21 @@ private async Task OnStateChanged(SelectedItem item, bool v) } /// - /// 点击选择框方法 + /// 点击选择框方法 + /// Click checkbox method /// private Task OnClick(SelectedItem item) => OnStateChanged(item, !item.Active); /// - /// 泛型参数约束检查 + /// 泛型参数约束检查 + /// Generic parameter constraint check /// protected virtual void EnsureParameterValid() { if (ValueType.IsGenericType) { - // 泛型参数 + // 泛型参数 + // Generic parameter if (!ValueType.IsAssignableTo(typeof(IEnumerable))) { throw new NotSupportedException(); diff --git a/src/BootstrapBlazor/Components/Checkbox/CheckboxListGeneric.razor.cs b/src/BootstrapBlazor/Components/Checkbox/CheckboxListGeneric.razor.cs index 7d5766f0288..f823cbe681f 100644 --- a/src/BootstrapBlazor/Components/Checkbox/CheckboxListGeneric.razor.cs +++ b/src/BootstrapBlazor/Components/Checkbox/CheckboxListGeneric.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// CheckboxList 组件基类 +/// CheckboxList 组件基类 +/// CheckboxList component base class /// public partial class CheckboxListGeneric : IModelEqualityComparer { /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get component style /// private string? ClassString => CssBuilder.Default("checkbox-list form-control") .AddClass("no-border", !ShowBorder && ValidCss != "is-invalid") @@ -20,7 +22,8 @@ public partial class CheckboxListGeneric : IModelEqualityComparer - /// 获得 组件内部 Checkbox 项目样式 + /// 获得 组件内部 Checkbox 项目样式 + /// Get the Checkbox item style inside the component /// private string? CheckboxItemClassString => CssBuilder.Default("checkbox-item") .AddClass(CheckboxItemClass) @@ -40,82 +43,108 @@ public partial class CheckboxListGeneric : IModelEqualityComparer - /// 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 + /// 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键
+ /// Gets or sets the data primary key attribute tag. Default is
Used to judge the data primary key tag. If the model does not set the primary key, you can use the parameter to customize the judgment
Data model supports joint primary keys
+ /// 10.2.2 /// [Parameter] [NotNull] public Type? CustomKeyAttribute { get; set; } = typeof(KeyAttribute); /// - /// 获得/设置 比较数据是否相同回调方法 默认为 null - /// 提供此回调方法时忽略 属性 + /// 获得/设置 比较数据是否相同回调方法 默认为 null + /// Gets or sets the callback method to compare whether the data is the same. Default is null + /// 提供此回调方法时忽略 属性 + /// Ignore the property when providing this callback method + /// 10.2.2 /// [Parameter] public Func? ModelEqualityComparer { get; set; } /// - /// 获得/设置 数据源 + /// 获得/设置 数据源 + /// Gets or sets the data source + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable>? Items { get; set; } /// - /// 获得/设置 是否为按钮样式 默认 false + /// 获得/设置 是否为按钮样式 默认 false + /// Gets or sets whether it is a button style. Default is false + /// 10.2.2 /// [Parameter] public bool IsButton { get; set; } /// - /// 获得/设置 Checkbox 组件布局样式 + /// 获得/设置 Checkbox 组件布局样式 + /// Gets or sets the Checkbox component layout style + /// 10.2.2 /// [Parameter] public string? CheckboxItemClass { get; set; } /// - /// 获得/设置 是否显示边框 默认为 true + /// 获得/设置 是否显示边框 默认为 true + /// Gets or sets whether to show the border. Default is true + /// 10.2.2 /// [Parameter] public bool ShowBorder { get; set; } = true; /// - /// 获得/设置 是否为竖向排列 默认为 false + /// 获得/设置 是否为竖向排列 默认为 false + /// Gets or sets whether to arrange vertically. Default is false + /// 10.2.2 /// [Parameter] public bool IsVertical { get; set; } /// - /// 获得/设置 按钮颜色 默认为 None 未设置 + /// 获得/设置 按钮颜色 默认为 None 未设置 + /// Gets or sets the button color. Default is None (not set) + /// 10.2.2 /// [Parameter] public Color Color { get; set; } /// - /// 获得/设置 SelectedItemChanged 方法 + /// 获得/设置 SelectedItemChanged 方法 + /// Gets or sets the SelectedItemChanged method + /// 10.2.2 /// [Parameter] public Func>, List, Task>? OnSelectedChanged { get; set; } /// - /// 获得/设置 最多选中数量 + /// 获得/设置 最多选中数量 + /// Gets or sets the maximum number of selected items + /// 10.2.2 /// [Parameter] public int MaxSelectedCount { get; set; } /// - /// 获得/设置 超过最大选中数量时回调委托 + /// 获得/设置 超过最大选中数量时回调委托 + /// Gets or sets the callback delegate when the maximum number of selected items is exceeded + /// 10.2.2 /// [Parameter] public Func? OnMaxSelectedCountExceed { get; set; } /// - /// 获得/设置 项模板 + /// 获得/设置 项模板 + /// Gets or sets the item template + /// 10.2.2 /// [Parameter] public RenderFragment>? ItemTemplate { get; set; } /// - /// 获得 当前选项是否被禁用 + /// 获得 当前选项是否被禁用 + /// Get whether the current option is disabled /// /// /// @@ -124,18 +153,21 @@ public partial class CheckboxListGeneric : IModelEqualityComparer>? _onBeforeStateChangedCallback; /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized method /// protected override void OnInitialized() { base.OnInitialized(); - // 处理 Required 标签 + // 处理 Required 标签 + // Process Required attribute AddRequiredValidator(); } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { @@ -150,7 +182,8 @@ protected override void OnParametersSet() _onBeforeStateChangedCallback = MaxSelectedCount > 0 ? new Func>(OnBeforeStateChanged) : null; - // set item active + // set item active + // set item active if (Value != null) { var item = Items.FirstOrDefault(i => IsEquals(i.Value)); @@ -180,7 +213,8 @@ private async Task OnBeforeStateChanged(CheckboxState state) } /// - /// Checkbox 组件选项状态改变时触发此方法 + /// Checkbox 组件选项状态改变时触发此方法 + /// Trigger this method when the Checkbox component option state changes /// /// /// @@ -201,7 +235,8 @@ private async Task OnStateChanged(SelectedItem item, bool v) } /// - /// 点击选择框方法 + /// 点击选择框方法 + /// Click checkbox method /// private Task OnClick(SelectedItem item) => OnStateChanged(item, !item.Active); diff --git a/src/BootstrapBlazor/Components/Circle/Circle.razor.cs b/src/BootstrapBlazor/Components/Circle/Circle.razor.cs index 5aaf1bb57cf..564fffd0cf5 100644 --- a/src/BootstrapBlazor/Components/Circle/Circle.razor.cs +++ b/src/BootstrapBlazor/Components/Circle/Circle.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,23 +6,28 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public sealed partial class Circle { /// - /// 获得/设置 当前值 + /// 获得/设置 当前值 + /// Get/Set current value + /// 10.2.2 /// [Parameter] public int Value { get; set; } /// - /// 获得/设置 当前进度值 + /// 获得/设置 当前进度值 + /// Get/Set current progress value /// private string? ValueString => $"{Math.Round(((1 - Value * 1.0 / 100) * CircleLength), 2)}"; /// - /// 获得/设置 Title 字符串 + /// 获得/设置 Title 字符串 + /// Get/Set Title string /// private string ValueTitleString => $"{Value}%"; } diff --git a/src/BootstrapBlazor/Components/Circle/CircleBase.cs b/src/BootstrapBlazor/Components/Circle/CircleBase.cs index 7e0ac160ed3..20554b2c09a 100644 --- a/src/BootstrapBlazor/Components/Circle/CircleBase.cs +++ b/src/BootstrapBlazor/Components/Circle/CircleBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,19 +6,22 @@ namespace BootstrapBlazor.Components; /// -/// Circle 组件基类 +/// Circle 组件基类 +/// Circle component base class /// public abstract class CircleBase : BootstrapModuleComponentBase { /// - /// 获得 组件样式字符串 + /// 获得 组件样式字符串 + /// Get component style string /// protected virtual string? ClassString => CssBuilder.Default("circle") .AddClassFromAttributes(AdditionalAttributes) .Build(); /// - /// 获得 预览框 Style 属性 + /// 获得 预览框 Style 属性 + /// Get preview box Style property /// protected string? PrevStyleString => CssBuilder.Default() .AddClass($"width: {Width}px;", Width > 0) @@ -27,64 +30,80 @@ public abstract class CircleBase : BootstrapModuleComponentBase .Build(); /// - /// 获得 进度条样式 + /// 获得 进度条样式 + /// Get progress bar style /// protected string? ProgressClassString => CssBuilder.Default("circle-progress") .AddClass($"circle-{Color.ToDescriptionString()}") .Build(); /// - /// 获得/设置 Dash 字符串 + /// 获得/设置 Dash 字符串 + /// Get/Set Dash string /// protected string DashString => $"{CircleLength}, {CircleLength}"; /// - /// 获得/设置 圆形进度半径 + /// 获得/设置 圆形进度半径 + /// Get/Set circular progress radius /// protected string CircleDiameter => $"{Width / 2}"; /// - /// 获得/设置 半径 + /// 获得/设置 半径 + /// Get/Set radius /// protected string CircleR => $"{Width / 2 - StrokeWidth}"; /// - /// 获得 圆形周长 + /// 获得 圆形周长 + /// Get circular circumference /// protected double CircleLength => Math.Round((Width / 2 - StrokeWidth) * 2 * Math.PI, 2); /// - /// 获得/设置 文件预览框宽度 + /// 获得/设置 文件预览框宽度 + /// Get/Set file preview box width + /// 10.2.2 /// [Parameter] public virtual int Width { get; set; } = 120; /// - /// 获得/设置 进度条宽度 默认为 2 + /// 获得/设置 进度条宽度 默认为 2 + /// Get/Set progress bar width, default is 2 + /// 10.2.2 /// [Parameter] public virtual int StrokeWidth { get; set; } = 2; /// - /// 获得/设置 组件进度条颜色 + /// 获得/设置 组件进度条颜色 + /// Get/Set component progress bar color + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.Primary; /// - /// 获得/设置 是否显示进度百分比 默认显示 + /// 获得/设置 是否显示进度百分比 默认显示 + /// Get/Set whether to show progress percentage, default is true + /// 10.2.2 /// [Parameter] public bool ShowProgress { get; set; } = true; /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set child content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Clipboard/ClipboardItem.cs b/src/BootstrapBlazor/Components/Clipboard/ClipboardItem.cs index adf54c7221d..7eca945bc49 100644 --- a/src/BootstrapBlazor/Components/Clipboard/ClipboardItem.cs +++ b/src/BootstrapBlazor/Components/Clipboard/ClipboardItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Represents an item on the clipboard with associated data and metadata. +/// Represents an item on the clipboard with associated 数据 and meta数据. +/// Represents an item on the clipboard with associated data and metadata. /// public class ClipboardItem { /// - /// Gets or sets the Internet Media Type (MIME type) of the content stored in the clipboard item. + /// 获得/设置 the Internet Media Type (MIME 类型) of the 内容 stored in the clipboard item. + /// Gets or sets the Internet Media Type (MIME type) of the content stored in the clipboard item. /// /// /// The MIME type is used to specify the nature and format of the data stored in the clipboard. @@ -20,7 +22,8 @@ public class ClipboardItem public string? MimeType { get; set; } /// - /// Gets or sets the raw data of the clipboard item. + /// 获得/设置 the raw 数据 of the clipboard item. + /// Gets or sets the raw data of the clipboard item. /// /// /// The data is stored as a byte array, allowing for any binary or text content @@ -29,7 +32,8 @@ public class ClipboardItem public byte[]? Data { get; set; } /// - /// Retrieves a text representation of the clipboard item if the MIME type indicates text content. + /// Retrieves a text representation of the clipboard item if the MIME 类型 indicates text 内容. + /// Retrieves a text representation of the clipboard item if the MIME type indicates text content. /// /// /// A string containing the text representation of the data if the MIME type starts with "text/", diff --git a/src/BootstrapBlazor/Components/ClockPicker/ClockPicker.razor.cs b/src/BootstrapBlazor/Components/ClockPicker/ClockPicker.razor.cs index 571a1284fa4..48ad5f7f899 100644 --- a/src/BootstrapBlazor/Components/ClockPicker/ClockPicker.razor.cs +++ b/src/BootstrapBlazor/Components/ClockPicker/ClockPicker.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,37 +8,47 @@ namespace BootstrapBlazor.Components; /// -/// ClockPicker 组件 +/// ClockPicker 组件 +/// ClockPicker component /// public partial class ClockPicker { /// - /// 获得/设置 样式 + /// 获得/设置 样式 + /// Get/Set style /// private string? ClassString => CssBuilder.Default("bb-clock-picker") .AddClassFromAttributes(AdditionalAttributes) .Build(); /// - /// 获得/设置 是否显示表盘刻度 默认 false + /// 获得/设置 是否显示表盘刻度 默认 false + /// Get/Set whether to show clock scale, default is false + /// 10.2.2 /// [Parameter] public bool ShowClockScale { get; set; } /// - /// 获得/设置 是否显示秒 默认 true + /// 获得/设置 是否显示秒 默认 true + /// Get/Set whether to show second, default is true + /// 10.2.2 /// [Parameter] public bool ShowSecond { get; set; } = true; /// - /// 获得/设置 是否显示分钟 默认 true + /// 获得/设置 是否显示分钟 默认 true + /// Get/Set whether to show minute, default is true + /// 10.2.2 /// [Parameter] public bool ShowMinute { get; set; } = true; /// - /// 获得/设置 是否自动切换 小时、分钟、秒 自动切换 默认 true + /// 获得/设置 是否自动切换 小时、分钟、秒 自动切换 默认 true + /// Get/Set whether to automatically switch hour/minute/second, default is true + /// 10.2.2 /// [Parameter] public bool IsAutoSwitch { get; set; } = true; @@ -54,7 +64,8 @@ public partial class ClockPicker private string? CurrentDateString => DatePicker.Value.ToString(DatePicker.DateFormat); /// - /// is hour or min or sec mode + /// is hour or min or sec mode + /// is hour or min or sec mode /// private TimeMode Mode { get; set; } = TimeMode.Hour; @@ -112,7 +123,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) private void SetMode(TimeMode mode) => Mode = mode; /// - /// 复位方法 + /// 复位方法 + /// Reset method /// internal void Reset() { @@ -126,7 +138,8 @@ private void SetTimePeriod(int hour) } /// - /// JSInvoke 调用此方法 + /// JSInvoke 调用此方法 + /// JSInvoke calls this method /// [JSInvokable] public void SetTime(int hour, int minute, int second) diff --git a/src/BootstrapBlazor/Components/Collapse/Collapse.razor.cs b/src/BootstrapBlazor/Components/Collapse/Collapse.razor.cs index 55ea52e301f..cb30d2ef79a 100644 --- a/src/BootstrapBlazor/Components/Collapse/Collapse.razor.cs +++ b/src/BootstrapBlazor/Components/Collapse/Collapse.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Collapse 组件 +/// Collapse 组件 +/// Collapse component /// public partial class Collapse { @@ -44,24 +45,31 @@ public partial class Collapse private string? ParentIdString => IsAccordion ? $"#{Id}" : null; /// - /// 获得/设置 CollapseItem 集合 + /// 获得/设置 CollapseItem 集合 + /// Get/Set CollapseItem collection /// protected List Items { get; } = new(10); /// - /// 获得/设置 是否为手风琴效果 默认为 false + /// 获得/设置 是否为手风琴效果 默认为 false + /// Get/Set whether to use accordion effect, default is false + /// 10.2.2 /// [Parameter] public bool IsAccordion { get; set; } /// - /// 获得/设置 CollapseItems 模板 + /// 获得/设置 CollapseItems 模板 + /// Get/Set CollapseItems template + /// 10.2.2 /// [Parameter] public RenderFragment? CollapseItems { get; set; } /// - /// 获得/设置 CollapseItem 展开收缩时回调方法 + /// 获得/设置 CollapseItem 展开收缩时回调方法 + /// Get/Set callback when CollapseItem expands or collapses + /// 10.2.2 /// [Parameter] public Func? OnCollapseChanged { get; set; } @@ -84,14 +92,16 @@ private async Task OnClickItem(CollapseItem item) } /// - /// 添加 CollapseItem 方法 由 CollapseItem 方法加载时调用 + /// 添加 CollapseItem 方法 由 CollapseItem 方法加载时调用 + /// Add CollapseItem method, called when CollapseItem loads /// - /// TabItemBase 实例 + /// TabItemBase 实例TabItemBase instance internal void AddItem(CollapseItem item) => Items.Add(item); /// - /// 移除 CollapseItem 方法 由 CollapseItem 方法 Dispose 时调用 + /// 移除 CollapseItem 方法 由 CollapseItem 方法 Dispose 时调用 + /// Remove CollapseItem method, called when CollapseItem disposes /// - /// TabItemBase 实例 + /// TabItemBase 实例TabItemBase instance internal void RemoveItem(CollapseItem item) => Items.Remove(item); } diff --git a/src/BootstrapBlazor/Components/Collapse/CollapseItem.cs b/src/BootstrapBlazor/Components/Collapse/CollapseItem.cs index 3df59a1a73f..89df6e0b35f 100644 --- a/src/BootstrapBlazor/Components/Collapse/CollapseItem.cs +++ b/src/BootstrapBlazor/Components/Collapse/CollapseItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,66 +6,85 @@ namespace BootstrapBlazor.Components; /// -/// CollapseItem 组件 +/// CollapseItem 组件 +/// CollapseItem component /// public class CollapseItem : BootstrapComponentBase, IDisposable { /// - /// 获得/设置 文本文字 + /// 获得/设置 文本文字 + /// Get/Set text + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 当前状态是否收缩 默认 true + /// 获得/设置 当前状态是否收缩 默认 true + /// Get/Set whether current status is collapsed, default is true + /// 10.2.2 /// [Parameter] public bool IsCollapsed { get; set; } = true; /// - /// 获得/设置 图标字符串 默认为 null + /// 获得/设置 图标字符串 默认为 null + /// Get/Set icon string, default is null + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 标题颜色 默认无颜色 Color.None + /// 获得/设置 标题颜色 默认无颜色 Color.None + /// Get/Set title color, default is Color.None + /// 10.2.2 /// [Parameter] public Color TitleColor { get; set; } /// - /// 获得/设置 CSS 样式名称 默认 null + /// 获得/设置 CSS 样式名称 默认 null + /// Get/Set CSS style name, default is null + /// 10.2.2 /// [Parameter] public string? Class { get; set; } /// - /// 获得/设置 组件内容 + /// 获得/设置 组件内容 + /// Get/Set component content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 Header CSS 样式名称 默认 null + /// 获得/设置 Header CSS 样式名称 默认 null + /// Get/Set Header CSS style name, default is null + /// 10.2.2 /// [Parameter] public string? HeaderClass { get; set; } /// - /// 获得/设置 组件 Header 模板 + /// 获得/设置 组件 Header 模板 + /// Get/Set component Header template + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 所属 Collapse 实例 + /// 获得/设置 所属 Collapse 实例 + /// Get/Set the Collapse instance it belongs to /// [CascadingParameter] protected Collapse? Collapse { get; set; } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized method /// protected override void OnInitialized() { @@ -75,7 +94,8 @@ protected override void OnInitialized() } /// - /// 设置是否被选中方法 + /// 设置是否被选中方法 + /// Set whether it is collapsed method /// /// public virtual void SetCollapsed(bool collapsed) => IsCollapsed = collapsed; @@ -83,7 +103,8 @@ protected override void OnInitialized() private bool disposedValue; /// - /// 资源销毁 + /// 资源销毁 + /// Resource disposal /// /// protected virtual void Dispose(bool disposing) diff --git a/src/BootstrapBlazor/Components/ColorPicker/ColorPicker.razor.cs b/src/BootstrapBlazor/Components/ColorPicker/ColorPicker.razor.cs index 8e2aa9ba156..d409b28f8c1 100644 --- a/src/BootstrapBlazor/Components/ColorPicker/ColorPicker.razor.cs +++ b/src/BootstrapBlazor/Components/ColorPicker/ColorPicker.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,39 +8,52 @@ namespace BootstrapBlazor.Components; /// -/// ColorPicker 颜色拾取器组件 +/// ColorPicker 颜色拾取器组件 +/// ColorPicker component /// public partial class ColorPicker { /// - /// 获得 class 样式集合 + /// 获得 class 样式集合 + /// Get class style collection /// protected string? ClassName => CssBuilder.Default("form-control") .AddClass(CssClass).AddClass(ValidCss) .Build(); /// - /// 获得/设置 显示模板 + /// 获得/设置 显示模板 + /// Get/Set display template + /// 10.2.2 /// [Parameter] public RenderFragment? Template { get; set; } /// - /// 获得/设置 显示颜色值格式化回调方法 + /// 获得/设置 显示颜色值格式化回调方法 + /// Get/Set display color value formatting callback method + /// 10.2.2 /// [Parameter] public Func>? Formatter { get; set; } /// - /// 获得/设置 是否支持透明度 默认 false 不支持 + /// 获得/设置 是否支持透明度 默认 false 不支持 + /// Get/Set whether to support opacity, default is false(not supported) + /// 10.2.2 /// [Parameter] public bool IsSupportOpacity { get; set; } /// - /// 获得/设置 预设候选颜色 开启时生效 默认 null + /// 获得/设置 预设候选颜色 开启时生效 默认 null + /// Get/Set preset candidate colors, effective when is enabled, default is null + /// 10.2.2 /// - /// 字符串集合格式为 ["rgba(244, 67, 54, 1)", "rgba(233, 30, 99, 0.95)"] + /// + /// 字符串集合格式为 ["rgba(244, 67, 54, 1)", "rgba(233, 30, 99, 0.95)"] + /// String collection format is ["rgba(244, 67, 54, 1)", "rgba(233, 30, 99, 0.95)"] + /// [Parameter] public List? Swatches { get; set; } @@ -106,7 +119,8 @@ private async Task FormatValue() } /// - /// 选中颜色值变化时回调此方法 由 JavaScript 调用 + /// 选中颜色值变化时回调此方法 由 JavaScript 调用 + /// Callback method when selected color value changes, called by JavaScript /// /// /// diff --git a/src/BootstrapBlazor/Components/ConnectionHub/ConnectionHub.cs b/src/BootstrapBlazor/Components/ConnectionHub/ConnectionHub.cs index 57114bf3447..332160ad053 100644 --- a/src/BootstrapBlazor/Components/ConnectionHub/ConnectionHub.cs +++ b/src/BootstrapBlazor/Components/ConnectionHub/ConnectionHub.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 客户端链接组件 +/// 客户端链接组件 +/// Client connection component /// [BootstrapModuleAutoLoader(ModuleName = "hub", JSObjectReference = true)] public class ConnectionHub : BootstrapModuleComponentBase @@ -57,7 +58,8 @@ protected override async Task InvokeInitAsync() } /// - /// JSInvoke 回调方法 + /// JSInvoke 回调方法 + /// JSInvoke callback method /// /// /// diff --git a/src/BootstrapBlazor/Components/ConnectionHub/ConnectionItem.cs b/src/BootstrapBlazor/Components/ConnectionHub/ConnectionItem.cs index d8f299db4cd..2155f3bc0d5 100644 --- a/src/BootstrapBlazor/Components/ConnectionHub/ConnectionItem.cs +++ b/src/BootstrapBlazor/Components/ConnectionHub/ConnectionItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,28 +6,33 @@ namespace BootstrapBlazor.Components; /// -/// 连接对象实体类 +/// 连接对象实体类 +/// Connection object entity class /// public class ConnectionItem { /// - /// 获得/设置 连接 Id + /// 获得/设置 连接 Id + /// Get/Set Connection Id /// [NotNull] public string? Id { get; internal set; } /// - /// 获得/设置 连接 Ip 地址 + /// 获得/设置 连接 Ip 地址 + /// Get/Set Connection IP address /// public ClientInfo? ClientInfo { get; set; } /// - /// 获得/设置 开始连接时间 + /// 获得/设置 开始连接时间 + /// Get/Set Connection start time /// public DateTimeOffset ConnectionTime { get; internal set; } /// - /// 获得/设置 上次心跳时间 + /// 获得/设置 上次心跳时间 + /// Get/Set Last beat time /// public DateTimeOffset LastBeatTime { get; internal set; } } diff --git a/src/BootstrapBlazor/Components/Console/Console.razor.cs b/src/BootstrapBlazor/Components/Console/Console.razor.cs index bebb06a2530..cf9e47b3d90 100644 --- a/src/BootstrapBlazor/Components/Console/Console.razor.cs +++ b/src/BootstrapBlazor/Components/Console/Console.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,26 +9,30 @@ namespace BootstrapBlazor.Components; /// -/// 控制台消息组件 +/// 控制台消息组件 +/// Console message component /// public partial class Console { /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get component style /// private string? ClassString => CssBuilder.Default("card console") .AddClassFromAttributes(AdditionalAttributes) .Build(); /// - /// 获得 Console Body Style 字符串 + /// 获得 Console Body Style 字符串 + /// Get Console Body Style string /// private string? BodyStyleString => CssBuilder.Default() .AddClass($"height: {Height}px;", Height > 0) .Build(); /// - /// 获取消息样式 + /// 获取消息样式 + /// Get message style /// /// /// @@ -38,117 +42,156 @@ public partial class Console .Build(); /// - /// 获得 客户端是否自动滚屏标识 + /// 获得 客户端是否自动滚屏标识 + /// Get client auto scroll flag /// private string? AutoScrollString => IsAutoScroll ? "auto" : null; /// - /// 获得/设置 组件绑定数据源 + /// 获得/设置 组件绑定数据源 + /// Get/Set component data source + /// 10.2.2 /// - /// 集合内置了最大消息数量功能 + /// + /// 集合内置了最大消息数量功能 + /// collection has built-in maximum message count function + /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 Header 显示文字 默认值为 系统监控 + /// 获得/设置 Header 显示文字 默认值为 系统监控 + /// Get/Set Header display text, default is System Monitor + /// 10.2.2 /// [Parameter] public string? HeaderText { get; set; } /// - /// 获得/设置 指示灯 Title 显示文字 + /// 获得/设置 指示灯 Title 显示文字 + /// Get/Set indicator Title display text + /// 10.2.2 /// [Parameter] public string? LightTitle { get; set; } /// - /// 获得/设置 指示灯 是否闪烁 默认 true 闪烁 + /// 获得/设置 指示灯 是否闪烁 默认 true 闪烁 + /// Get/Set whether indicator flashes, default is true(flashing) + /// 10.2.2 /// [Parameter] public bool IsFlashLight { get; set; } = true; /// - /// 获得/设置 指示灯颜色 + /// 获得/设置 指示灯颜色 + /// Get/Set indicator color + /// 10.2.2 /// [Parameter] public Color LightColor { get; set; } = Color.Success; /// - /// 获得/设置 是否显示指示灯 默认 true 显示 + /// 获得/设置 是否显示指示灯 默认 true 显示 + /// Get/Set whether to show indicator, default is true + /// 10.2.2 /// [Parameter] public bool ShowLight { get; set; } = true; /// - /// 获得/设置 自动滚屏显示文字 + /// 获得/设置 自动滚屏显示文字 + /// Get/Set auto scroll display text + /// 10.2.2 /// [Parameter] public string? AutoScrollText { get; set; } /// - /// 获得/设置 是否显示自动滚屏选项 默认 false + /// 获得/设置 是否显示自动滚屏选项 默认 false + /// Get/Set whether to show auto scroll option, default is false + /// 10.2.2 /// [Parameter] public bool ShowAutoScroll { get; set; } /// - /// 获得/设置 是否自动滚屏 默认 true + /// 获得/设置 是否自动滚屏 默认 true + /// Get/Set whether to auto scroll, default is true + /// 10.2.2 /// [Parameter] public bool IsAutoScroll { get; set; } = true; /// - /// 获得/设置 按钮 显示文字 默认值为 清屏 + /// 获得/设置 按钮 显示文字 默认值为 清屏 + /// Get/Set button display text, default is Clear + /// 10.2.2 /// [Parameter] public string? ClearButtonText { get; set; } /// - /// 获得/设置 按钮 显示图标 默认值为 fa-solid fa-xmark + /// 获得/设置 按钮 显示图标 默认值为 fa-solid fa-xmark + /// Get/Set button display icon, default is fa-solid fa-xmark + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearButtonIcon { get; set; } /// - /// 获得/设置 清除按钮颜色 默认值为 Color.Secondary + /// 获得/设置 清除按钮颜色 默认值为 Color.Secondary + /// Get/Set clear button color, default is Color.Secondary + /// 10.2.2 /// [Parameter] public Color ClearButtonColor { get; set; } = Color.Secondary; /// - /// 获得/设置 清空委托方法 + /// 获得/设置 清空委托方法 + /// Get/Set clear delegate method + /// 10.2.2 /// [Parameter] public Func? OnClear { get; set; } /// - /// 获得/设置 组件高度 默认为 126px; + /// 获得/设置 组件高度 默认为 126px; + /// Get/Set component height, default is 126px + /// 10.2.2 /// [Parameter] public int Height { get; set; } /// - /// 获得/设置 Footer 模板 + /// 获得/设置 Footer 模板 + /// Get/Set Footer template + /// 10.2.2 /// [Parameter] public RenderFragment? FooterTemplate { get; set; } /// - /// 获得/设置 Header 模板 + /// 获得/设置 Header 模板 + /// Get/Set Header template + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 Item 模板 + /// 获得/设置 Item 模板 + /// Get/Set Item template + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } /// - /// 获得 是否显示 Footer + /// 获得 是否显示 Footer + /// Get whether to show Footer /// private bool ShowFooter => OnClear != null || ShowAutoScroll || FooterTemplate != null; @@ -192,7 +235,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } /// - /// 清空控制台消息方法 + /// 清空控制台消息方法 + /// Clear console messages method /// public async Task OnClearConsole() { diff --git a/src/BootstrapBlazor/Components/Console/ConsoleLogger.razor.cs b/src/BootstrapBlazor/Components/Console/ConsoleLogger.razor.cs index daaab7631e3..57b430ade0e 100644 --- a/src/BootstrapBlazor/Components/Console/ConsoleLogger.razor.cs +++ b/src/BootstrapBlazor/Components/Console/ConsoleLogger.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,18 +8,23 @@ namespace BootstrapBlazor.Components; /// -/// Logger 组件 +/// Logger 组件 +/// Logger component /// public partial class ConsoleLogger { /// - /// 获得/设置 最大行数 默认 3 行 + /// 获得/设置 最大行数 默认 3 行 + /// Get/Set max rows, default is 3 + /// 10.2.2 /// [Parameter] public int Max { get; set; } = 3; /// - /// 获得/设置 是否为 Html 代码 默认 false + /// 获得/设置 是否为 Html 代码 默认 false + /// Get/Set whether it is Html code, default is false + /// 10.2.2 /// [Parameter] public bool IsHtml { get; set; } @@ -27,7 +32,8 @@ public partial class ConsoleLogger private ConcurrentQueue Message { get; } = new(); /// - /// 获得 按钮样式集合 + /// 获得 按钮样式集合 + /// Get button style collection /// /// private string? ClassName => CssBuilder.Default("console-logger") @@ -38,7 +44,8 @@ public partial class ConsoleLogger private string Class { get; set; } = "collapse"; /// - /// 输入日志方法 + /// 输入日志方法 + /// Log method /// /// public void Log(string message) diff --git a/src/BootstrapBlazor/Components/Console/ConsoleMessageCollection.cs b/src/BootstrapBlazor/Components/Console/ConsoleMessageCollection.cs index 97a0ee9f7d2..4f4deb7c8dd 100644 --- a/src/BootstrapBlazor/Components/Console/ConsoleMessageCollection.cs +++ b/src/BootstrapBlazor/Components/Console/ConsoleMessageCollection.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,12 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// Console 组件消息辅助类 +/// Console 组件消息辅助类 +/// Console component message helper class /// public class ConsoleMessageCollection(int maxCount = 2000) : IEnumerable, IDisposable { /// - /// 获得/设置 最大记录数 默认 2000 + /// 获得/设置 最大记录数 默认 2000 + /// Get/Set max record count, default is 2000 /// public int MaxCount { get; set; } = maxCount; @@ -23,7 +25,8 @@ public class ConsoleMessageCollection(int maxCount = 2000) : IEnumerable _messages = new(); /// - /// 添加方法 + /// 添加方法 + /// Add method /// /// public void Add(ConsoleMessageItem item) @@ -38,7 +41,8 @@ public void Add(ConsoleMessageItem item) } /// - /// 清空集合方法 + /// 清空集合方法 + /// Clear collection method /// public void Clear() { @@ -57,7 +61,6 @@ public void Clear() /// /// /// - /// IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); private void Dispose(bool disposing) @@ -69,7 +72,8 @@ private void Dispose(bool disposing) } /// - /// 销毁资源 + /// 销毁资源 + /// Dispose resources /// public void Dispose() { diff --git a/src/BootstrapBlazor/Components/Console/ConsoleMessageItem.cs b/src/BootstrapBlazor/Components/Console/ConsoleMessageItem.cs index a02011c32f6..ec3ab2a3074 100644 --- a/src/BootstrapBlazor/Components/Console/ConsoleMessageItem.cs +++ b/src/BootstrapBlazor/Components/Console/ConsoleMessageItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,28 +6,33 @@ namespace BootstrapBlazor.Components; /// -/// 控制台消息实体类 +/// 控制台消息实体类 +/// Console message entity class /// public class ConsoleMessageItem { /// - /// 获得/设置 控制台输出消息 + /// 获得/设置 控制台输出消息 + /// Get/Set console output message /// [NotNull] public string? Message { get; set; } /// - /// 获得/设置 控制台消息颜色 默认为 White 白色 + /// 获得/设置 控制台消息颜色 默认为 White 白色 + /// Get/Set console message color, default is White /// public Color Color { get; set; } /// - /// 获得/设置 自定义样式名称 默认 null + /// 获得/设置 自定义样式名称 默认 null + /// Get/Set custom style name, default is null /// public string? CssClass { get; set; } /// - /// 获得/设置 是否为 Html 原生字符串 默认 false + /// 获得/设置 是否为 Html 原生字符串 默认 false + /// Get/Set whether it is Html raw string, default is false /// public bool IsHtml { get; set; } } diff --git a/src/BootstrapBlazor/Components/ContextMenu/ContextMenu.razor.cs b/src/BootstrapBlazor/Components/ContextMenu/ContextMenu.razor.cs index 435c9576a69..5901449d401 100644 --- a/src/BootstrapBlazor/Components/ContextMenu/ContextMenu.razor.cs +++ b/src/BootstrapBlazor/Components/ContextMenu/ContextMenu.razor.cs @@ -16,6 +16,7 @@ public partial class ContextMenu /// /// 获得/设置 是否显示阴影 默认 /// Flags whether to show a shadow around the context menu. Default is . + /// 10.2.2 /// [Parameter] public bool ShowShadow { get; set; } = true; @@ -23,6 +24,7 @@ public partial class ContextMenu /// /// 获得/设置 弹出前回调方法 默认 null /// Defines the callback that is executed before showing the context menu. Default is . + /// 10.2.2 /// [Parameter] public Func? OnBeforeShowCallback { get; set; } @@ -30,6 +32,7 @@ public partial class ContextMenu /// /// 获得/设置 子组件 /// The that represents the child content. + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } @@ -61,7 +64,9 @@ public partial class ContextMenu private object? _contextItem; + /// /// + /// protected override void OnInitialized() { base.OnInitialized(); @@ -69,7 +74,9 @@ protected override void OnInitialized() ContextMenuZone.RegisterContextMenu(this); } + /// /// + /// protected override async Task OnAfterRenderAsync(bool firstRender) { await base.OnAfterRenderAsync(firstRender); diff --git a/src/BootstrapBlazor/Components/ContextMenu/ContextMenuDivider.cs b/src/BootstrapBlazor/Components/ContextMenu/ContextMenuDivider.cs index a42e3701984..d3619c5d433 100644 --- a/src/BootstrapBlazor/Components/ContextMenu/ContextMenuDivider.cs +++ b/src/BootstrapBlazor/Components/ContextMenu/ContextMenuDivider.cs @@ -17,7 +17,9 @@ public class ContextMenuDivider : Divider, IContextMenuItem, IDisposable [NotNull] private ContextMenu? ContextMenu { get; set; } + /// /// + /// protected override void OnInitialized() { base.OnInitialized(); @@ -25,7 +27,9 @@ protected override void OnInitialized() ContextMenu.AddItem(this); } + /// /// + /// protected override void BuildRenderTree(RenderTreeBuilder builder) { } private bool disposedValue; @@ -50,7 +54,9 @@ protected virtual void Dispose(bool disposing) } } + /// /// + /// public void Dispose() { Dispose(disposing: true); diff --git a/src/BootstrapBlazor/Components/ContextMenu/ContextMenuItem.cs b/src/BootstrapBlazor/Components/ContextMenu/ContextMenuItem.cs index 30e22411ccc..01f839012d5 100644 --- a/src/BootstrapBlazor/Components/ContextMenu/ContextMenuItem.cs +++ b/src/BootstrapBlazor/Components/ContextMenu/ContextMenuItem.cs @@ -14,13 +14,15 @@ public class ContextMenuItem : ComponentBase, IContextMenuItem, IDisposable /// /// 获得/设置 显示文本 /// The text to display. + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// /// 获得/设置 图标 - /// The CSS class name that represents an icon (if any) + /// The CSS class name that represents an icon (if any) + /// 10.2.2 /// /// /// @@ -33,6 +35,7 @@ public class ContextMenuItem : ComponentBase, IContextMenuItem, IDisposable /// /// 获得/设置 是否被禁用 默认 false 优先级低于 /// Flags whether the item is disabled. Default is . It has a lower priority than . + /// 10.2.2 /// [Parameter] public bool Disabled { get; set; } @@ -40,6 +43,7 @@ public class ContextMenuItem : ComponentBase, IContextMenuItem, IDisposable /// /// 获得/设置 是否被禁用回调方法 默认 null 优先级高于 /// Defines the callback to determine if the item is disabled. Default is . It has a higher priority than . + /// 10.2.2 /// [Parameter] public Func? OnDisabledCallback { get; set; } @@ -47,6 +51,7 @@ public class ContextMenuItem : ComponentBase, IContextMenuItem, IDisposable /// /// 获得/设置 点击回调方法 默认 null /// Defines the click callback. Default is . + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } @@ -82,7 +87,9 @@ protected virtual void Dispose(bool disposing) } } + /// /// + /// public void Dispose() { Dispose(disposing: true); diff --git a/src/BootstrapBlazor/Components/ContextMenu/ContextMenuTrigger.cs b/src/BootstrapBlazor/Components/ContextMenu/ContextMenuTrigger.cs index f378f5b6487..e5a4b8bea4c 100644 --- a/src/BootstrapBlazor/Components/ContextMenu/ContextMenuTrigger.cs +++ b/src/BootstrapBlazor/Components/ContextMenu/ContextMenuTrigger.cs @@ -14,13 +14,16 @@ namespace BootstrapBlazor.Components; /// public class ContextMenuTrigger : BootstrapComponentBase { - /// + /// + /// + /// [Parameter] public RenderFragment? ChildContent { get; set; } /// /// 获得/设置 包裹组件 TagName 默认为 div /// The HTML tag name to use for the trigger. Default is <div>. + /// 10.2.2 /// [Parameter] public string WrapperTag { get; set; } = "div"; @@ -28,6 +31,7 @@ public class ContextMenuTrigger : BootstrapComponentBase /// /// 获得/设置 上下文数据 /// Gets or sets the context data. + /// 10.2.2 /// [Parameter] public object? ContextItem { get; set; } @@ -50,7 +54,9 @@ public class ContextMenuTrigger : BootstrapComponentBase .AddClassFromAttributes(AdditionalAttributes) .Build(); + /// /// + /// protected override void OnParametersSet() { base.OnParametersSet(); @@ -58,7 +64,9 @@ protected override void OnParametersSet() OnTouchDelay ??= Options.CurrentValue.ContextMenuOptions.OnTouchDelay; } + /// /// + /// protected override void BuildRenderTree(RenderTreeBuilder builder) { builder.OpenElement(0, WrapperTag); diff --git a/src/BootstrapBlazor/Components/ContextMenu/ContextMenuZone.razor.cs b/src/BootstrapBlazor/Components/ContextMenu/ContextMenuZone.razor.cs index e61c5be0eb5..bdf0f983457 100644 --- a/src/BootstrapBlazor/Components/ContextMenu/ContextMenuZone.razor.cs +++ b/src/BootstrapBlazor/Components/ContextMenu/ContextMenuZone.razor.cs @@ -13,7 +13,9 @@ namespace BootstrapBlazor.Components; /// public partial class ContextMenuZone { + /// /// + /// [Parameter] public RenderFragment? ChildContent { get; set; } @@ -29,7 +31,6 @@ public partial class ContextMenuZone /// /// 鼠标事件参数Mouse event arguments /// 上下文项Context item - /// 异步任务An asynchronous task internal async Task OnContextMenu(MouseEventArgs args, object? contextItem) { // 弹出关联菜单 diff --git a/src/BootstrapBlazor/Components/ContextMenu/IContextMenuItem.cs b/src/BootstrapBlazor/Components/ContextMenu/IContextMenuItem.cs index 756b415f446..f686bc051c3 100644 --- a/src/BootstrapBlazor/Components/ContextMenu/IContextMenuItem.cs +++ b/src/BootstrapBlazor/Components/ContextMenu/IContextMenuItem.cs @@ -3,15 +3,12 @@ // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone -using static System.Net.WebRequestMethods; - namespace BootstrapBlazor.Components; /// /// IContextMenuItem 接口 /// The interface for a menu item in a context menu. /// -/// This is a marker interface. public interface IContextMenuItem { diff --git a/src/BootstrapBlazor/Components/CountUp/CountUp.razor.cs b/src/BootstrapBlazor/Components/CountUp/CountUp.razor.cs index 9a71db9f263..18381d859b3 100644 --- a/src/BootstrapBlazor/Components/CountUp/CountUp.razor.cs +++ b/src/BootstrapBlazor/Components/CountUp/CountUp.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,25 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// CountUp 组件 +/// CountUp 组件 +/// CountUp component /// public partial class CountUp { /// - /// 获得/设置 Value 值 + /// 获得/设置 Value 值 + /// Get/Set Value + /// 10.2.2 /// [Parameter] [NotNull] public TValue? Value { get; set; } /// - /// 获得/设置 计数配置项 默认 null + /// 获得/设置 计数配置项 默认 null + /// Get/Set count configuration item, default is null + /// 10.2.2 /// [Parameter] public CountUpOption? Option { get; set; } /// - /// 获得/设置 计数结束回调方法 默认 null + /// 获得/设置 计数结束回调方法 默认 null + /// Get/Set callback method when counting ends, default is null + /// 10.2.2 /// [Parameter] public Func? OnCompleted { get; set; } @@ -73,7 +80,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, Value, OnCompleted != null ? nameof(OnCompleteCallback) : null, Option); /// - /// OnCompleted 回调方法 + /// OnCompleted 回调方法 + /// OnCompleted callback method /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/CountUp/CountUpOption.cs b/src/BootstrapBlazor/Components/CountUp/CountUpOption.cs index 7f764a00c17..81803dcca8a 100644 --- a/src/BootstrapBlazor/Components/CountUp/CountUpOption.cs +++ b/src/BootstrapBlazor/Components/CountUp/CountUpOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,88 +8,105 @@ namespace BootstrapBlazor.Components; /// -/// CountUp 配置类 +/// CountUp 配置类 +/// CountUp configuration class /// public class CountUpOption { /// - /// 开始计数值 默认 0 + /// 开始计数值 默认 0 + /// Start value, default is 0 /// [JsonPropertyName("startVal")] public decimal StartValue { get; set; } /// - /// 小数位数 默认 0 + /// 小数位数 默认 0 + /// Decimal places, default is 0 /// public int DecimalPlaces { get; set; } /// - /// 动画时长 默认 2.0 单位秒 + /// 动画时长 默认 2.0 单位秒 + /// Animation duration, default is 2.0 seconds /// public float Duration { get; set; } = 2.0f; /// - /// 是否使用分隔符 默认 false + /// 是否使用分隔符 默认 false + /// Whether to use separator, default is false /// public bool UseIndianSeparators { get; set; } /// - /// 是否使用过渡动画 默认 true + /// 是否使用过渡动画 默认 true + /// Whether to use easing animation, default is true /// public bool UseEasing { get; set; } = true; /// - /// 是否分组 默认 true + /// 是否分组 默认 true + /// Whether to use grouping, default is true /// public bool UseGrouping { get; set; } = true; /// - /// 分隔符 默认 逗号 , + /// 分隔符 默认 逗号 , + /// Separator, default is comma , /// public string Separator { get; set; } = ","; /// - /// 小数点符号 默认 点 . + /// 小数点符号 默认 点 . + /// Decimal point symbol, default is dot . /// public string Decimal { get; set; } = "."; /// - /// 前缀文本 默认 string.Empty 未设置 + /// 前缀文本 默认 string.Empty 未设置 + /// Prefix text, default is string.Empty (not set) /// public string Prefix { get; set; } = string.Empty; /// - /// 后缀文本 默认 string.Empty 未设置 + /// 后缀文本 默认 string.Empty 未设置 + /// Suffix text, default is string.Empty (not set) /// public string Suffix { get; set; } = string.Empty; /// - /// 动画阈值 默认 999 + /// 动画阈值 默认 999 + /// Animation threshold, default is 999 /// public int SmartEasingThreshold { get; set; } = 999; /// - /// 动画总量 默认 333 + /// 动画总量 默认 333 + /// Animation amount, default is 333 /// public int SmartEasingAmount { get; set; } = 333; /// - /// 是否启用滚动监听 默认 false + /// 是否启用滚动监听 默认 false + /// Whether to enable scroll spy, default is false /// public bool EnableScrollSpy { get; set; } /// - /// 滚动延时 默认 200 毫秒 + /// 滚动延时 默认 200 毫秒 + /// Scroll spy delay, default is 200 ms /// public int ScrollSpyDelay { get; set; } = 200; /// - /// 滚动监听一次 默认 false + /// 滚动监听一次 默认 false + /// Scroll spy once, default is false /// public bool ScrollSpyOnce { get; set; } /// - /// numeral glyph substitution default null + /// numeral glyph substitution default null + /// numeral glyph substitution default null /// public char[]? Numerals { get; set; } } diff --git a/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.cs b/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.cs index a5984149495..1286912a84e 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.cs +++ b/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.cs @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// 日期选择组件 +/// 日期选择组件 +/// Date Picker component /// public partial class DatePickerBody { /// - /// 获得/设置 日历框开始时间 + /// 获得/设置 日历框开始时间 + /// Get/Set Calendar start time /// private DateTime StartDate { @@ -26,22 +28,26 @@ private DateTime StartDate } /// - /// 获得/设置 日历框结束时间 + /// 获得/设置 日历框结束时间 + /// Get/Set Calendar end time /// private DateTime EndDate => GetSafeDayDateTime(StartDate, 42); /// - /// 获得/设置 当前日历框月份 + /// 获得/设置 当前日历框月份 + /// Get/Set Current Calendar Month /// private DateTime CurrentDate { get; set; } /// - /// 获得/设置 当前日历框时刻值 + /// 获得/设置 当前日历框时刻值 + /// Get/Set Current Calendar Time /// private TimeSpan CurrentTime { get; set; } /// - /// 获得/设置 当前选中时间 未点击确认时 与 Value 可能不一致 + /// 获得/设置 当前选中时间 未点击确认时 与 Value 可能不一致 + /// Get/Set Current Selected Time. It may check with Value when not confirmed /// private DateTime SelectValue { get; set; } @@ -54,7 +60,8 @@ private DateTime StartDate .Build(); /// - /// 获得/设置 日期样式 + /// 获得/设置 日期样式 + /// Get/Set Date Style /// private string? GetDayClass(DateTime day, bool overflow) => CssBuilder.Default() .AddClass("prev-month", IsPrevMonth(day)) @@ -84,42 +91,48 @@ private bool IsRange(DateTime day) => Ranger != null private bool IsDisabled(DateTime day) => day < MinValue || day > MaxValue || IsDisableDay(day); /// - /// 获得 上一月按钮样式 + /// 获得 上一月按钮样式 + /// Get Previous Month Button Style /// private string? PrevMonthClassName => CssBuilder.Default("picker-panel-icon-btn pick-panel-arrow-left") .AddClass("d-none", CurrentViewMode == DatePickerViewMode.Year || CurrentViewMode == DatePickerViewMode.Month) .Build(); /// - /// 获得 下一月按钮样式 + /// 获得 下一月按钮样式 + /// Get Next Month Button Style /// private string? NextMonthClassName => CssBuilder.Default("picker-panel-icon-btn pick-panel-arrow-right") .AddClass("d-none", CurrentViewMode == DatePickerViewMode.Year || CurrentViewMode == DatePickerViewMode.Month) .Build(); /// - /// 获得 年月日显示表格样式 + /// 获得 年月日显示表格样式 + /// Get Date Table Style /// private string? DateViewClassName => CssBuilder.Default("date-table") .AddClass("d-none", CurrentViewMode == DatePickerViewMode.Year || CurrentViewMode == DatePickerViewMode.Month) .Build(); /// - /// 获得 年月日显示表格样式 + /// 获得 年显示表格样式 + /// Get Year Table Style /// private string? YearViewClassName => CssBuilder.Default("year-table") .AddClass("d-none", CurrentViewMode != DatePickerViewMode.Year) .Build(); /// - /// 获得 年月日显示表格样式 + /// 获得 月显示表格样式 + /// Get Month Table Style /// private string? MonthViewClassName => CssBuilder.Default("month-table") .AddClass("d-none", CurrentViewMode != DatePickerViewMode.Month) .Build(); /// - /// 获得 年月日显示表格样式 + /// 获得 当前月显示表格样式 + /// Get Current Month Table Style /// private string? CurrentMonthViewClassName => CssBuilder.Default("picker-panel-header-label") .AddClass("d-none", CurrentViewMode is DatePickerViewMode.Year or DatePickerViewMode.Month) @@ -131,7 +144,8 @@ private bool IsRange(DateTime day) => Ranger != null private string? YearText { get; set; } /// - /// 获得 年显示文字 + /// 获得 年显示文字 + /// Get Year Display Text /// private string? YearString => CurrentViewMode switch { @@ -148,83 +162,108 @@ private bool IsRange(DateTime day) => Ranger != null private string? YearPeriodText { get; set; } /// - /// 获得/设置 组件显示模式 默认为显示年月日模式 + /// 获得/设置 组件显示模式 默认为显示年月日模式 + /// Get/Set Component Display Mode. Default is Date Mode /// private DatePickerViewMode CurrentViewMode { get; set; } /// - /// 获得/设置 组件显示模式 默认为显示年月日模式 + /// 获得/设置 组件显示模式 默认为显示年月日模式 + /// Gets or sets componentdisplay模式 Default is为display年月日模式 + /// 10.2.2 /// [Parameter] public DatePickerViewMode ViewMode { get; set; } = DatePickerViewMode.Date; /// - /// 获得/设置 日期时间格式字符串 默认为 null + /// 获得/设置 日期时间格式字符串 默认为 null + /// Get/Set Date Time Format String. Default is null + /// 10.2.2 /// [Parameter] [NotNull] public string? DateTimeFormat { get; set; } /// - /// 获得/设置 日期格式字符串 默认为 null + /// 获得/设置 日期格式字符串 默认为 null + /// Get/Set Date Format String. Default is null + /// 10.2.2 /// [Parameter] [NotNull] public string? DateFormat { get; set; } /// - /// 获得/设置 时间格式字符串 默认为 null + /// 获得/设置 时间格式字符串 默认为 null + /// Get/Set Time Format String. Default is null + /// 10.2.2 /// [Parameter] [NotNull] public string? TimeFormat { get; set; } /// - /// 获得/设置 是否显示快捷侧边栏 默认 false 不显示 + /// 获得/设置 是否显示快捷侧边栏 默认 false 不显示 + /// Get/Set Whether to Show Sidebar. Default is false + /// 10.2.2 /// [Parameter] public bool ShowSidebar { get; set; } /// - /// 获得/设置 侧边栏模板 默认 null + /// 获得/设置 侧边栏模板 默认 null + /// Get/Set Sidebar Template. Default is null + /// 10.2.2 /// [Parameter] public RenderFragment>? SidebarTemplate { get; set; } /// - /// 获得/设置 是否显示左侧控制按钮 默认显示 + /// 获得/设置 是否显示左侧控制按钮 默认显示 + /// Get/Set Whether to Show Left Control Buttons. Default is true + /// 10.2.2 /// [Parameter] public bool ShowLeftButtons { get; set; } = true; /// - /// 获得/设置 是否显示右侧控制按钮 默认显示 + /// 获得/设置 是否显示右侧控制按钮 默认显示 + /// Get/Set Whether to Show Right Control Buttons. Default is true + /// 10.2.2 /// [Parameter] public bool ShowRightButtons { get; set; } = true; /// - /// 获得/设置 是否显示 Footer 区域 默认为 false 不显示 + /// 获得/设置 是否显示 Footer 区域 默认为 false 不显示 + /// Get/Set Whether to Show Footer Area. Default is false + /// 10.2.2 /// [Parameter] public bool ShowFooter { get; set; } /// - /// 获得/设置 时间 PlaceHolder 字符串 + /// 获得/设置 时间 PlaceHolder 字符串 + /// Get/Set Time Placeholder String + /// 10.2.2 /// [Parameter] [NotNull] public string? TimePlaceHolder { get; set; } /// - /// 获得/设置 日期 PlaceHolder 字符串 + /// 获得/设置 日期 PlaceHolder 字符串 + /// Get/Set Date Placeholder String + /// 10.2.2 /// [Parameter] [NotNull] public string? DatePlaceHolder { get; set; } /// - /// 获得/设置 是否允许为空 默认 false 不允许为空 + /// 获得/设置 是否允许为空 默认 false 不允许为空 + /// Get/Set Whether to Allow Null. Default is false + /// 10.2.2 /// [Parameter] [Obsolete("已过期,请使用 ShowClearButton 代替 Please use ShowClearButton")] @@ -236,173 +275,228 @@ public bool AllowNull } /// - /// 获得/设置 是否显示 Clear 按钮 默认 false 不显示 + /// 获得/设置 是否显示 Clear 按钮 默认 false 不显示 + /// Get/Set Whether to Show Clear Button. Default is false + /// 10.2.2 /// [Parameter] public bool ShowClearButton { get; set; } /// - /// 获得/设置 点击日期时是否自动关闭弹窗 默认 false + /// 获得/设置 点击日期时是否自动关闭弹窗 默认 false + /// Get/Set Whether to Auto Close Popup When Date Clicked. Default is false + /// 10.2.2 /// [Parameter] public bool AutoClose { get; set; } /// - /// 获得/设置 确认按钮回调委托 + /// 获得/设置 确认按钮回调委托 + /// Get/Set Confirm Button Callback Delegate + /// 10.2.2 /// [Parameter] public Func? OnConfirm { get; set; } /// - /// 获得/设置 清空按钮回调委托 + /// 获得/设置 清空按钮回调委托 + /// Get/Set Clear Button Callback Delegate + /// 10.2.2 /// [Parameter] public Func? OnClear { get; set; } /// - /// 获得/设置 清空按钮文字 + /// 获得/设置 清空按钮文字 + /// Get/Set Clear Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearButtonText { get; set; } /// - /// 获得/设置 此刻按钮文字 + /// 获得/设置 此刻按钮文字 + /// Get/Set Now Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? NowButtonText { get; set; } /// - /// 获得/设置 确定按钮文字 + /// 获得/设置 确定按钮文字 + /// Get/Set Confirm Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ConfirmButtonText { get; set; } /// - /// 获得/设置 组件值 + /// 获得/设置 组件值 + /// Get/Set Component Value + /// 10.2.2 /// [Parameter] public DateTime Value { get; set; } /// - /// 获得/设置 组件值改变时回调委托供双向绑定使用 + /// 获得/设置 组件值改变时回调委托供双向绑定使用 + /// Get/Set Value Changed Callback Delegate for Two-Way Binding + /// 10.2.2 /// [Parameter] public EventCallback ValueChanged { get; set; } /// - /// 获得/设置 当前日期最大值 + /// 获得/设置 当前日期最大值 + /// Get/Set Max Date + /// 10.2.2 /// [Parameter] public DateTime? MaxValue { get; set; } /// - /// 获得/设置 当前日期最小值 + /// 获得/设置 当前日期最小值 + /// Get/Set Min Date + /// 10.2.2 /// [Parameter] public DateTime? MinValue { get; set; } /// - /// 获得/设置 上一年图标 + /// 获得/设置 上一年图标 + /// Get/Set Previous Year Icon + /// 10.2.2 /// [Parameter] public string? PreviousYearIcon { get; set; } /// - /// 获得/设置 上一年图标 + /// 获得/设置 下一年图标 + /// Get/Set Next Year Icon + /// 10.2.2 /// [Parameter] public string? NextYearIcon { get; set; } /// - /// 获得/设置 上一年图标 + /// 获得/设置 上一月图标 + /// Get/Set Previous Month Icon + /// 10.2.2 /// [Parameter] public string? PreviousMonthIcon { get; set; } /// - /// 获得/设置 上一年图标 + /// 获得/设置 下一月图标 + /// Get/Set Next Month Icon + /// 10.2.2 /// [Parameter] public string? NextMonthIcon { get; set; } /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Get/Set Child Content Template + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 年月改变时回调方法 + /// 获得/设置 年月改变时回调方法 + /// Get/Set Callback Method When Year/Month Changed + /// 10.2.2 /// [Parameter] public Func? OnDateChanged { get; set; } /// - /// 获得/设置 日单元格模板 + /// 获得/设置 日单元格模板 + /// Get/Set Day Cell Template + /// 10.2.2 /// [Parameter] public RenderFragment? DayTemplate { get; set; } /// - /// 获得/设置 禁用日单元格模板 + /// 获得/设置 禁用日单元格模板 + /// Get/Set Disabled Day Cell Template + /// 10.2.2 /// [Parameter] public RenderFragment? DayDisabledTemplate { get; set; } /// - /// 获得/设置 是否显示中国阴历历法 默认 false + /// 获得/设置 是否显示中国阴历历法 默认 false + /// Get/Set Whether to Show Chinese Lunar Calendar. Default is false + /// 10.2.2 /// /// 日期范围 1901 年 2 月 19 日 - 2101 年 1 月 28 日 [Parameter] public bool ShowLunar { get; set; } /// - /// 获得/设置 是否显示中国 24 节气 默认 false + /// 获得/设置 是否显示中国 24 节气 默认 false + /// Get/Set Whether to Show Chinese Solar Term. Default is false + /// 10.2.2 /// [Parameter] public bool ShowSolarTerm { get; set; } /// - /// 获得/设置 是否显示节日 默认 false + /// 获得/设置 是否显示节日 默认 false + /// Get/Set Whether to Show Festivals. Default is false + /// 10.2.2 /// [Parameter] public bool ShowFestivals { get; set; } /// - /// 获得/设置 是否显示休假日 默认 false + /// 获得/设置 是否显示休假日 默认 false + /// Get/Set Whether to Show Holidays. Default is false + /// 10.2.2 /// [Parameter] public bool ShowHolidays { get; set; } /// - /// 获得/设置 是否为 Range 内使用 默认为 false + /// 获得/设置 是否为 Range 内使用 默认为 false + /// Get/Set Whether to Use in Range. Default is false /// [CascadingParameter] private DateTimeRange? Ranger { get; set; } /// - /// 获取/设置 获得月自定义禁用日期回调方法,默认 null 内部默认启用数据缓存 可通过 参数关闭 + /// 获取/设置 获得月自定义禁用日期回调方法,默认 null 内部默认启用数据缓存 可通过 参数关闭 + /// Get/Set Callback Method to Get Custom Disabled Days of Month. Default is null. Internal Default Enable Data Cache. Can be Closed via Parameter + /// 10.2.2 /// [Parameter] public Func>>? OnGetDisabledDaysCallback { get; set; } /// - /// 获得/设置 是否启用获得自定义禁用日期缓存 + /// 获得/设置 是否启用获得自定义禁用日期缓存 + /// Get/Set Whether to Enable Custom Disabled Days Cache + /// 10.2.2 /// [Parameter] public bool EnableDisabledDaysCache { get; set; } = true; /// - /// 获得/设置 星期第一天 默认 + /// 获得/设置 星期第一天 默认 + /// Get/Set First Day of Week. Default is + /// 10.2.2 /// [Parameter] public DayOfWeek FirstDayOfWeek { get; set; } = DayOfWeek.Sunday; /// - /// 获得/设置 选择时间方式 默认使用 + /// 获得/设置 选择时间方式 默认使用 + /// Get/Set Pick Time Mode. Default is + /// 10.2.2 /// [Parameter] public PickTimeMode PickTimeMode { get; set; } = PickTimeMode.Dropdown; @@ -575,7 +669,8 @@ private async Task UpdateDisabledDaysCache(bool force) } /// - /// 判定当前日期是否为禁用日期 + /// 判定当前日期是否为禁用日期 + /// Determine Whether Current Date is Disabled /// /// /// @@ -590,7 +685,8 @@ public bool IsDisableDay(DateTime val) } /// - /// 清除内部缓存方法 + /// 清除内部缓存方法 + /// Clear Internal Cache Method /// public void ClearDisabledDays() => _monthDisabledDaysCache.Clear(); @@ -603,7 +699,8 @@ private async Task OnValueChanged() } /// - /// 点击上一年按钮时调用此方法 + /// 点击上一年按钮时调用此方法 + /// Method Called When Previous Year Button Clicked /// private async Task OnClickPrevYear() { @@ -623,7 +720,8 @@ private async Task OnClickPrevYear() } /// - /// 点击上一月按钮时调用此方法 + /// 点击上一月按钮时调用此方法 + /// Method Called When Previous Month Button Clicked /// private async Task OnClickPrevMonth() { @@ -641,7 +739,8 @@ private async Task OnClickPrevMonth() } /// - /// 点击下一年按钮时调用此方法 + /// 点击下一年按钮时调用此方法 + /// Method Called When Next Year Button Clicked /// private async Task OnClickNextYear() { @@ -661,7 +760,8 @@ private async Task OnClickNextYear() } /// - /// 点击下一月按钮时调用此方法 + /// 点击下一月按钮时调用此方法 + /// Method Called When Next Month Button Clicked /// private async Task OnClickNextMonth() { @@ -679,7 +779,8 @@ private async Task OnClickNextMonth() } /// - /// Day 选择时触发此方法 + /// Day 选择时触发此方法 + /// Method Triggered When Day Selected /// /// private async Task OnClickDateTime(DateTime d) @@ -743,7 +844,8 @@ private void OnShowTimePicker() private bool ShouldConfirm => !IsDateTimeMode && (AutoClose || ShowFooter == false); /// - /// 设置组件显示视图方法 + /// 设置组件显示视图方法 + /// Set Component Display View Method /// /// private async Task SwitchView(DatePickerViewMode view) @@ -778,7 +880,8 @@ internal void SwitchDateView() } /// - /// 设置组件显示视图方法 + /// 设置组件显示视图方法 + /// Set Component Display View Method /// /// /// @@ -798,7 +901,8 @@ private async Task SwitchView(DatePickerViewMode view, DateTime d) } /// - /// 通过当前时间计算年跨度区间 + /// 通过当前时间计算年跨度区间 + /// 通过当前时间计算年跨度区间 /// /// private string GetYearPeriod() @@ -808,21 +912,24 @@ private string GetYearPeriod() } /// - /// 获取 年视图下的年份 + /// 获取 年视图下的年份 + /// 获取 年视图下的年份 /// /// /// private DateTime GetYear(int year) => GetSafeYearDateTime(CurrentDate, year - (CurrentDate.Year % 20)); /// - /// 获取 年视图下月份单元格显示文字 + /// 获取 年视图下月份单元格显示文字 + /// 获取 年视图下月份单元格display文字 /// /// /// private string GetYearText(int year) => GetYear(year).Year.ToString(); /// - /// 获取 年视图下的年份单元格样式 + /// 获取 年视图下的年份单元格样式 + /// 获取 年视图下的年份单元格style /// /// private string? GetYearClassName(int year, bool overflow) => CssBuilder.Default() @@ -832,14 +939,16 @@ private string GetYearPeriod() .Build(); /// - /// 获取 年视图下的月份 + /// 获取 年视图下的月份 + /// 获取 年视图下的月份 /// /// /// private DateTime GetMonth(int month) => CurrentDate.GetSafeMonthDateTime(month - CurrentDate.Month); /// - /// 获取 月视图下的月份单元格样式 + /// 获取 月视图下的月份单元格样式 + /// 获取 月视图下的月份单元格style /// /// private string? GetMonthClassName(int month) => CssBuilder.Default() @@ -848,21 +957,24 @@ private string GetYearPeriod() .Build(); /// - /// 获取 日视图下日单元格显示文字 + /// 获取 日视图下日单元格显示文字 + /// 获取 日视图下日单元格display文字 /// /// /// private static string GetDayText(int day) => day.ToString(); /// - /// 获取 月视图下月份单元格显示文字 + /// 获取 月视图下月份单元格显示文字 + /// 获取 月视图下月份单元格display文字 /// /// /// private string GetMonthText(int month) => MonthLists[month - 1]; /// - /// 点击 此刻时调用此方法 + /// 点击 此刻时调用此方法 + /// 点击 此刻时调用此方法 /// private async Task ClickNowButton() { @@ -893,7 +1005,8 @@ private async Task ClickConfirmButton() } /// - /// 点击 清除按钮调用此方法 + /// 点击 清除按钮调用此方法 + /// 点击 清除button调用此方法 /// /// private async Task ClickClearButton() @@ -934,7 +1047,8 @@ private void ResetTimePickerPanel() private bool Validate() => !IsDisabled(SelectValue); /// - /// 获得安全的年数据 + /// 获得安全的年数据 + /// Gets安全的年data /// /// /// @@ -951,7 +1065,8 @@ protected static DateTime GetSafeYearDateTime(DateTime dt, int year) } /// - /// 获得安全的日视图日期 + /// 获得安全的日视图日期 + /// Gets安全的日视图日期 /// /// /// @@ -968,7 +1083,8 @@ private static DateTime GetSafeDayDateTime(DateTime dt, int day) } /// - /// 判断日视图是否溢出方法 + /// 判断日视图是否溢出方法 + /// 判断日视图whether溢出方法 /// /// /// @@ -976,7 +1092,8 @@ private static DateTime GetSafeDayDateTime(DateTime dt, int day) private static bool IsDayOverflow(DateTime dt, int day) => DateTime.MaxValue.AddDays(0 - day) < dt; /// - /// 判断年视图是否溢出方法 + /// 判断年视图是否溢出方法 + /// 判断年视图whether溢出方法 /// /// /// diff --git a/src/BootstrapBlazor/Components/DateTimePicker/DatePickerCell.razor.cs b/src/BootstrapBlazor/Components/DateTimePicker/DatePickerCell.razor.cs index 62f85d4e95d..becbae2b733 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/DatePickerCell.razor.cs +++ b/src/BootstrapBlazor/Components/DateTimePicker/DatePickerCell.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// DateTimePickerCell 组件 +/// DateTimePickerCell 组件 +/// DateTimePickerCell component /// public sealed partial class DatePickerCell { @@ -17,51 +18,67 @@ public sealed partial class DatePickerCell .Build(); /// - /// 获得/设置 日期 + /// 获得/设置 日期 + /// Get/Set Date + /// 10.2.2 /// [Parameter] public DateTime Value { get; set; } /// - /// 获得/设置 日期 + /// 获得/设置 日期 + /// Get/Set Date + /// 10.2.2 /// [Parameter] [NotNull] public string? Text { get; set; } /// - /// 获得/设置 按钮点击回调方法 默认 null + /// 获得/设置 按钮点击回调方法 默认 null + /// Get/Set Button Click Callback Method. Default is null + /// 10.2.2 /// [Parameter] [NotNull] public Func? OnClick { get; set; } /// - /// 获得/设置 单元格模板 默认 null + /// 获得/设置 单元格模板 默认 null + /// Get/Set Cell Template. Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? Template { get; set; } /// - /// 获得/设置 是否显示中国阴历历法 默认 false + /// 获得/设置 是否显示中国阴历历法 默认 false + /// Get/Set Whether to Show Chinese Lunar Calendar. Default is false + /// 10.2.2 /// [Parameter] public bool ShowLunar { get; set; } /// - /// 获得/设置 是否显示中国 24 节气 默认 false + /// 获得/设置 是否显示中国 24 节气 默认 false + /// Get/Set Whether to Show Chinese Solar Term. Default is false + /// 10.2.2 /// [Parameter] public bool ShowSolarTerm { get; set; } /// - /// 获得/设置 是否节日 默认 false + /// 获得/设置 是否节日 默认 false + /// Get/Set Whether to Show Festivals. Default is false + /// 10.2.2 /// [Parameter] public bool ShowFestivals { get; set; } /// - /// 获得/设置 是否显示休假日 默认 false + /// 获得/设置 是否显示休假日 默认 false + /// Get/Set Whether to Show Holidays. Default is false + /// 10.2.2 /// [Parameter] public bool ShowHolidays { get; set; } diff --git a/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs b/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs index d3312ef8766..59abe1ed5f5 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs +++ b/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,12 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// DateTimePicker 组件 +/// DateTimePicker 组件 +/// DateTimePicker component /// public partial class DateTimePicker { /// - /// 获得 组件样式名称 + /// 获得 组件样式名称 + /// Get Component Class Name /// private string? ClassString => CssBuilder.Default("select datetime-picker") .AddClass("disabled", IsDisabled) @@ -23,7 +25,8 @@ public partial class DateTimePicker .Build(); /// - /// 获得 组件文本框样式名称 + /// 获得 组件文本框样式名称 + /// Get Component Input Class Name /// private string? InputClassName => CssBuilder.Default("dropdown-toggle form-control datetime-picker-input") .AddClass("has-icon", ShowIcon) @@ -36,7 +39,8 @@ public partial class DateTimePicker .Build(); /// - /// 获得 组件小图标样式 + /// 获得 组件小图标样式 + /// Get Component Icon Class Name /// private string? DateTimePickerIconClassString => CssBuilder.Default("datetime-picker-bar") .AddClass(Icon) @@ -45,7 +49,8 @@ public partial class DateTimePicker private string? TabIndexString => ValidateForm != null ? "0" : null; /// - /// 获得 Placeholder 显示字符串 + /// 获得 Placeholder 显示字符串 + /// Get Placeholder String /// private string? PlaceholderString => ViewMode switch { @@ -54,30 +59,39 @@ public partial class DateTimePicker }; /// - /// 获得/设置 是否允许为空 + /// 获得/设置 是否允许为空 + /// Get/Set Whether to Allow Null /// private bool AllowNull { get; set; } /// - /// 获得/设置 是否显示为按钮样式 默认 false + /// 获得/设置 是否显示为按钮样式 默认 false + /// Get/Set Whether to Show as Button. Default is false + /// 10.2.2 /// [Parameter] public bool IsButton { get; set; } /// - /// 获得/设置 选择按钮文本 默认 null 读取资源文件 + /// 获得/设置 选择按钮文本 默认 null 读取资源文件 + /// Get/Set Picker Button Text. Default is null. Read from resource file + /// 10.2.2 /// [Parameter] public string? PickerButtonText { get; set; } /// - /// 获得/设置 选择按钮颜色 默认 + /// 获得/设置 选择按钮颜色 默认 + /// Get/Set Button Color. Default is + /// 10.2.2 /// [Parameter] public Color ButtonColor { get; set; } = Color.Primary; /// - /// 获得/设置 时间格式化字符串 默认值为 null + /// 获得/设置 时间格式化字符串 默认值为 null + /// Get/Set Date Time Format String. Default is null + /// 10.2.2 /// [Parameter] [Obsolete("已过期,请使用 DateTimeFormat/DateFormat/TimeFormat 分别设置; Please use DateTimeFormat/DateFormat/TimeFormat")] @@ -89,188 +103,248 @@ public string? Format } /// - /// 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd HH:mm:ss" + /// 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd HH:mm:ss" + /// Get/Set Date Time Format String. Default is "yyyy-MM-dd HH:mm:ss" + /// 10.2.2 /// [Parameter] [NotNull] public string? DateTimeFormat { get; set; } /// - /// 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd" + /// 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd" + /// Get/Set Date Format String. Default is "yyyy-MM-dd" + /// 10.2.2 /// [Parameter] [NotNull] public string? DateFormat { get; set; } /// - /// 获得/设置 时间格式化字符串 默认值为 "HH:mm:ss" + /// 获得/设置 时间格式化字符串 默认值为 "HH:mm:ss" + /// Get/Set Time Format String. Default is "HH:mm:ss" + /// 10.2.2 /// [Parameter] [NotNull] public string? TimeFormat { get; set; } /// - /// 获得/设置 星期第一天 默认 + /// 获得/设置 星期第一天 默认 + /// Get/Set First Day of Week. Default is + /// 10.2.2 /// [Parameter] public DayOfWeek FirstDayOfWeek { get; set; } = DayOfWeek.Sunday; /// - /// 获得/设置 组件图标 默认 fa-regular fa-calendar-days + /// 获得/设置 组件图标 默认 fa-regular fa-calendar-days + /// Get/Set Component Icon. Default is fa-regular fa-calendar-days + /// 10.2.2 /// [Parameter] [NotNull] public string? Icon { get; set; } /// - /// 获得/设置 是否显示组件图标 默认 true 显示 + /// 获得/设置 是否显示组件图标 默认 true 显示 + /// Get/Set Whether to Show Component Icon. Default is true + /// 10.2.2 /// [Parameter] public bool ShowIcon { get; set; } = true; /// - /// 获得/设置 控件边框颜色样式 默认为 None 显示 + /// 获得/设置 控件边框颜色样式 默认为 None 显示 + /// Get/Set Component Border Color Style. Default is None + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.None; /// - /// 获得/设置 组件显示模式 默认为显示年月日模式 + /// 获得/设置 组件显示模式 默认为显示年月日模式 + /// Get/Set Component Display Mode. Default is Date Mode + /// 10.2.2 /// [Parameter] public DatePickerViewMode ViewMode { get; set; } = DatePickerViewMode.Date; /// - /// 获得/设置 选择时间方式 默认使用 + /// 获得/设置 选择时间方式 默认使用 + /// Get/Set Pick Time Mode. Default is + /// 10.2.2 /// [Parameter] public PickTimeMode PickTimeMode { get; set; } = PickTimeMode.Dropdown; /// - /// 获得/设置 是否显示快捷侧边栏 默认不显示 + /// 获得/设置 是否显示快捷侧边栏 默认不显示 + /// Get/Set Whether to Show Sidebar. Default is not shown + /// 10.2.2 /// [Parameter] public bool ShowSidebar { get; set; } /// - /// 获得/设置 侧边栏模板 默认 null + /// 获得/设置 侧边栏模板 默认 null + /// Get/Set Sidebar Template. Default is null + /// 10.2.2 /// [Parameter] [NotNull] public RenderFragment>? SidebarTemplate { get; set; } /// - /// 获得/设置 当前日期最大值 + /// 获得/设置 当前日期最大值 + /// Get/Set Max Date + /// 10.2.2 /// [Parameter] public DateTime? MaxValue { get; set; } /// - /// 获得/设置 当前日期最小值 + /// 获得/设置 当前日期最小值 + /// Get/Set Min Date + /// 10.2.2 /// [Parameter] public DateTime? MinValue { get; set; } /// - /// 获得/设置 是否点击日期后自动关闭弹窗 默认 true + /// 获得/设置 是否点击日期后自动关闭弹窗 默认 true + /// Get/Set Whether to Auto Close Popup When Date Clicked. Default is true + /// 10.2.2 /// [Parameter] public bool AutoClose { get; set; } = true; /// - /// 获得/设置 是否可以编辑内容 默认 false + /// 获得/设置 是否可以编辑内容 默认 false + /// Get/Set Whether to Allow Edit. Default is false + /// 10.2.2 /// [Parameter] public bool IsEditable { get; set; } /// - /// 获得/设置 是否自动设置值为当前时间 默认 true + /// 获得/设置 是否自动设置值为当前时间 默认 true + /// Get/Set Whether to Auto Set Value to Current Time. Default is true + /// 10.2.2 /// /// 当 Value 值为 时自动设置时间为 不为空类型时此参数生效 [Parameter] public bool AutoToday { get; set; } = true; /// - /// 获得/设置 是否将 显示为空字符串 默认 true + /// 获得/设置 是否将 显示为空字符串 默认 true + /// Get/Set Whether to Display as Empty String. Default is true + /// 10.2.2 /// /// 可为空类型时此参数生效 [Parameter] public bool DisplayMinValueAsEmpty { get; set; } = true; /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Get/Set Child Content Template + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 日期占位符文本 默认 null 读取资源文件 + /// 获得/设置 日期占位符文本 默认 null 读取资源文件 + /// Get/Set Date Placeholder Text. Default is null. Read from resource file + /// 10.2.2 /// [Parameter] public string? DatePlaceHolderText { get; set; } /// - /// 获得/设置 日期时间占位符文本 默认 null 读取资源文件 + /// 获得/设置 日期时间占位符文本 默认 null 读取资源文件 + /// Get/Set Date Time Placeholder Text. Default is null. Read from resource file + /// 10.2.2 /// [Parameter] public string? DateTimePlaceHolderText { get; set; } /// - /// 获得/设置 日单元格模板 + /// 获得/设置 日单元格模板 + /// Get/Set Day Cell Template + /// 10.2.2 /// [Parameter] public RenderFragment? DayTemplate { get; set; } /// - /// 获得/设置 禁用日单元格模板 + /// 获得/设置 禁用日单元格模板 + /// Get/Set Disabled Day Cell Template + /// 10.2.2 /// [Parameter] public RenderFragment? DayDisabledTemplate { get; set; } /// - /// 获得/设置 是否显示中国阴历历法 默认 false + /// 获得/设置 是否显示中国阴历历法 默认 false + /// Get/Set Whether to Show Chinese Lunar Calendar. Default is false + /// 10.2.2 /// [Parameter] public bool ShowLunar { get; set; } /// - /// 获得/设置 是否显示中国 24 节气 默认 false + /// 获得/设置 是否显示中国 24 节气 默认 false + /// Get/Set Whether to Show Chinese Solar Term. Default is false + /// 10.2.2 /// [Parameter] public bool ShowSolarTerm { get; set; } /// - /// 获得/设置 是否显示节日 默认 false + /// 获得/设置 是否显示节日 默认 false + /// Get/Set Whether to Show Festivals. Default is false + /// 10.2.2 /// [Parameter] public bool ShowFestivals { get; set; } /// - /// 获得/设置 是否显示休假日 默认 false + /// 获得/设置 是否显示休假日 默认 false + /// Get/Set Whether to Show Holidays. Default is false + /// 10.2.2 /// [Parameter] public bool ShowHolidays { get; set; } /// - /// 获取/设置 获得自定义禁用日期回调方法,默认 null 内部默认启用数据缓存 可通过 参数关闭 + /// 获取/设置 获得自定义禁用日期回调方法,默认 null 内部默认启用数据缓存 可通过 参数关闭 + /// Get/Set Callback Method to Get Custom Disabled Days. Default is null. Internal Default Enable Data Cache. Can be Closed via Parameter + /// 10.2.2 /// [Parameter] public Func>>? OnGetDisabledDaysCallback { get; set; } /// - /// 获得/设置 是否启用获得年自定义禁用日期缓存 + /// 获得/设置 是否启用获得年自定义禁用日期缓存 + /// Get/Set Whether to Enable Custom Disabled Days Cache of Year + /// 10.2.2 /// [Parameter] public bool EnableDisabledDaysCache { get; set; } = true; /// - /// 获得/设置 是否将禁用日期显示为空字符串 默认 false 开启后组件会频繁调用 方法,建议外部使用缓存提高性能 + /// 获得/设置 是否将禁用日期显示为空字符串 默认 false 开启后组件会频繁调用 方法,建议外部使用缓存提高性能 + /// Get/Set Whether to Display Disabled Day as Empty. Default is false. When enabled, component will frequently call method, suggesting external cache usage for performance + /// 10.2.2 /// [Parameter] public bool DisplayDisabledDayAsEmpty { get; set; } /// - /// 获得/设置 失去焦点回调方法 默认 null + /// 获得/设置 失去焦点回调方法 默认 null + /// Get/Set OnBlur Callback Method. Default is null + /// 10.2.2 /// [Parameter] public Func? OnBlurAsync { get; set; } @@ -302,7 +376,8 @@ protected override void OnInitialized() } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { @@ -418,7 +493,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } /// - /// 格式化数值方法 + /// 格式化数值方法 + /// Format Value Method /// protected override string FormatValueAsString(TValue? value) { @@ -451,12 +527,14 @@ protected override string FormatValueAsString(TValue? value) private bool MinValueToToday(DateTime val) => val == DateTime.MinValue && !AllowNull && AutoToday; /// - /// 清除内部缓存方法 + /// 清除内部缓存方法 + /// Clear Internal Cache Method /// public void ClearDisabledDays() => _pickerBody.ClearDisabledDays(); /// - /// 确认按钮点击时回调此方法 + /// 确认按钮点击时回调此方法 + /// Method Called When Confirm Button Clicked /// private async Task OnConfirm() { @@ -530,7 +608,8 @@ protected virtual async Task OnBlur() } /// - /// 客户端弹窗关闭后由 Javascript 调用此方法 + /// 客户端弹窗关闭后由 Javascript 调用此方法 + /// Method Called by Javascript After Client Popup Closed /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/DateTimePicker/PickTimeMode.cs b/src/BootstrapBlazor/Components/DateTimePicker/PickTimeMode.cs index 71cffe69f79..8be8fc51daf 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/PickTimeMode.cs +++ b/src/BootstrapBlazor/Components/DateTimePicker/PickTimeMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 组件选择时间方式枚举 +/// 组件选择时间方式枚举 +/// Enum for Pick Time Mode of Component /// public enum PickTimeMode { /// - /// 使用 Dropdown 下拉方式选择时间 + /// 使用 Dropdown 下拉方式选择时间 + /// Pick Time via Dropdown /// Dropdown, /// - /// 使用 Clock 拖拽指针方式选择时间 + /// 使用 Clock 拖拽指针方式选择时间 + /// Pick Time via Clock /// Clock } diff --git a/src/BootstrapBlazor/Components/DateTimePicker/PopoverDropdownBase.cs b/src/BootstrapBlazor/Components/DateTimePicker/PopoverDropdownBase.cs index d7042b9a125..7ddf1e1cd25 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/PopoverDropdownBase.cs +++ b/src/BootstrapBlazor/Components/DateTimePicker/PopoverDropdownBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,37 +6,46 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// /// public abstract class PopoverDropdownBase : ValidateBase { /// - /// 获得/设置 弹窗位置 默认为 Bottom + /// 获得/设置 弹窗位置 默认为 Bottom + /// Get/Set Popover Placement. Default is Bottom + /// 10.2.2 /// [Parameter] public Placement Placement { get; set; } = Placement.Bottom; /// - /// 获得/设置 自定义样式 参数 默认 null + /// 获得/设置 自定义样式 参数 默认 null + /// Get/Set Custom Class. Default is null + /// 10.2.2 /// /// 由 data-bs-custom-class 实现 [Parameter] public string? CustomClass { get; set; } /// - /// 获得/设置 是否显示阴影 默认 true + /// 获得/设置 是否显示阴影 默认 true + /// Get/Set Whether to Show Shadow. Default is true + /// 10.2.2 /// [Parameter] public bool ShowShadow { get; set; } = true; /// - /// 弹窗位置字符串 + /// 弹窗位置字符串 + /// Popover Placement String /// protected string? PlacementString => Placement == Placement.Auto ? null : Placement.ToDescriptionString(); /// - /// 获得 CustomClass 字符串 + /// 获得 CustomClass 字符串 + /// Get CustomClass String /// protected virtual string? CustomClassString => CssBuilder.Default(CustomClass) .AddClass("popover-region") diff --git a/src/BootstrapBlazor/Components/DateTimePicker/TimePickerOption.cs b/src/BootstrapBlazor/Components/DateTimePicker/TimePickerOption.cs index ff62c39a4a8..a2f2c30660d 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/TimePickerOption.cs +++ b/src/BootstrapBlazor/Components/DateTimePicker/TimePickerOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,27 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// 配置类 +/// 配置类 +/// Configuration Class /// internal class TimePickerOption { /// - /// 是否显示表盘刻度 默认 false + /// 是否显示表盘刻度 默认 false + /// Whether to Show Clock Scale. Default is false /// public bool ShowClockScale { get; set; } /// - /// 是否显示秒 默认 true + /// 是否显示秒 默认 true + /// Whether to Show Second. Default is true /// public bool ShowSecond { get; set; } = true; /// - /// 是否显示分钟 默认 true + /// 是否显示分钟 默认 true + /// Whether to Show Minute. Default is true /// public bool ShowMinute { get; set; } = true; /// - /// 是否自动切换 小时、分钟、秒 自动切换 默认 true + /// 是否自动切换 小时、分钟、秒 自动切换 默认 true + /// Whether to Auto Switch Hour, Minute, Second. Default is true /// public bool IsAutoSwitch { get; set; } = true; } diff --git a/src/BootstrapBlazor/Components/DateTimePicker/TimePickerSetting.cs b/src/BootstrapBlazor/Components/DateTimePicker/TimePickerSetting.cs index c385de2e880..852e48406ca 100644 --- a/src/BootstrapBlazor/Components/DateTimePicker/TimePickerSetting.cs +++ b/src/BootstrapBlazor/Components/DateTimePicker/TimePickerSetting.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,30 +6,39 @@ namespace BootstrapBlazor.Components; /// -/// TimePicker 配置项 +/// TimePicker 配置项 +/// TimePicker Setting /// public class TimePickerSetting : ComponentBase { /// - /// 是否显示表盘刻度 默认 false + /// 是否显示表盘刻度 默认 false + /// Whether to Show Clock Scale. Default is false + /// 10.2.2 /// [Parameter] public bool ShowClockScale { get; set; } /// - /// 是否显示秒 默认 true + /// 是否显示秒 默认 true + /// Whether to Show Second. Default is true + /// 10.2.2 /// [Parameter] public bool ShowSecond { get; set; } = true; /// - /// 是否显示分钟 默认 true + /// 是否显示分钟 默认 true + /// Whether to Show Minute. Default is true + /// 10.2.2 /// [Parameter] public bool ShowMinute { get; set; } = true; /// - /// 是否自动切换 小时、分钟、秒 自动切换 默认 true + /// 是否自动切换 小时、分钟、秒 自动切换 默认 true + /// Whether to Auto Switch Hour, Minute, Second. Default is true + /// 10.2.2 /// [Parameter] public bool IsAutoSwitch { get; set; } = true; diff --git a/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRange.razor.cs b/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRange.razor.cs index 70e320f5ff6..0463b92736e 100644 --- a/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRange.razor.cs +++ b/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRange.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,12 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// DateTimeRange 时间范围组件 +/// DateTimeRange 时间范围组件 +/// DateTimeRange component /// public partial class DateTimeRange { /// - /// 获得 组件样式名称 + /// 获得 组件样式名称 + /// Get Component Class Name /// private string? ClassString => CssBuilder.Default("select datetime-range form-control") .AddClass("disabled", IsDisabled) @@ -24,7 +26,8 @@ public partial class DateTimeRange .Build(); /// - /// 获得 组件小图标样式 + /// 获得 组件小图标样式 + /// Get Component Icon Class Name /// private string? DateTimePickerIconClassString => CssBuilder.Default("range-bar") .AddClass(Icon) @@ -32,7 +35,8 @@ public partial class DateTimeRange .Build(); /// - /// 获得 用户选中的时间范围 + /// 获得 用户选中的时间范围 + /// Get User Selected Date Range /// internal DateTimeRangeValue SelectedValue { get; } = new DateTimeRangeValue(); @@ -90,81 +94,107 @@ private string? EndValueString private string? SeparateText { get; set; } /// - /// 获得/设置 是否可以编辑内容 默认 false + /// 获得/设置 是否可以编辑内容 默认 false + /// Get/Set Whether to Allow Edit. Default is false + /// 10.2.2 /// [Parameter] public bool IsEditable { get; set; } /// - /// 获得/设置 是否点击快捷侧边栏自动关闭弹窗 默认 false + /// 获得/设置 是否点击快捷侧边栏自动关闭弹窗 默认 false + /// Get/Set Whether to Auto Close Popup When Sidebar Item Clicked. Default is false + /// 10.2.2 /// [Parameter] public bool AutoCloseClickSideBar { get; set; } /// - /// Gets or sets whether to automatically close the popup after a date range is selected. Default is false. + /// 获得/设置 是否 to automatically close the popup after a date range is selected. 默认为 false. + /// Gets or sets whether to automatically close the popup after a date range is selected. Default is false. + /// 10.2.2 /// [Parameter] public bool AutoClose { get; set; } /// - /// Gets or sets whether show the selected value. Default is false. + /// 获得/设置 是否 show the selected value. 默认为 false. + /// Gets or sets whether show the selected value. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowSelectedValue { get; set; } /// - /// 获得/设置 清空按钮文字 + /// 获得/设置 清空按钮文字 + /// Get/Set Clear Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearButtonText { get; set; } /// - /// 获得/设置 清空图标 默认 fa-solid fa-circle-xmark + /// 获得/设置 清空图标 默认 fa-solid fa-circle-xmark + /// Get/Set Clear Icon. Default is fa-solid fa-circle-xmark + /// 10.2.2 /// [Parameter] public string? ClearIcon { get; set; } /// - /// 获得/设置 组件显示模式 默认为显示年月日模式 + /// 获得/设置 组件显示模式 默认为显示年月日模式 + /// Get/Set Component Display Mode. Default is Date Mode + /// 10.2.2 /// [Parameter] public DatePickerViewMode ViewMode { get; set; } = DatePickerViewMode.Date; /// - /// 获得/设置 组件显示模式 默认为显示年月日模式 + /// 获得/设置 组件显示模式 默认为显示年月日模式 + /// Get/Set Component Display Mode. Default is Date Mode + /// 10.2.2 /// [Parameter] public DateTimeRangeRenderMode RenderMode { get; set; } = DateTimeRangeRenderMode.Double; /// - /// 获得/设置 今天按钮文字 + /// 获得/设置 今天按钮文字 + /// Get/Set Today Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? TodayButtonText { get; set; } /// - /// 获得/设置 确定按钮文字 + /// 获得/设置 确定按钮文字 + /// Get/Set Confirm Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ConfirmButtonText { get; set; } /// - /// 获得/设置 最大值 + /// 获得/设置 最大值 + /// Get/Set Max Value + /// 10.2.2 /// [Parameter] public DateTime MaxValue { get; set; } = DateTime.MaxValue; /// - /// 获得/设置 最小值 + /// 获得/设置 最小值 + /// Get/Set Min Value + /// 10.2.2 /// [Parameter] public DateTime MinValue { get; set; } = DateTime.MinValue; /// - /// 获得/设置 是否允许为空 默认为 true + /// 获得/设置 是否允许为空 默认为 true + /// Get/Set Whether to Allow Null. Default is true + /// 10.2.2 /// [Parameter] [Obsolete("已过期,请使用 ShowClearButton 代替")] @@ -176,95 +206,125 @@ public bool AllowNull } /// - /// 获得/设置 是否显示清空按钮 默认 true + /// 获得/设置 是否显示清空按钮 默认 true + /// Get/Set Whether to Show Clear Button. Default is true + /// 10.2.2 /// [Parameter] public bool ShowClearButton { get; set; } = true; /// - /// 获得/设置 组件图标 + /// 获得/设置 组件图标 + /// Get/Set Component Icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 是否显示今天按钮 默认为 false + /// 获得/设置 是否显示今天按钮 默认为 false + /// Get/Set Whether to Show Today Button. Default is false + /// 10.2.2 /// [Parameter] public bool ShowToday { get; set; } /// - /// 获得/设置 是否显示快捷侧边栏 默认不显示 + /// 获得/设置 是否显示快捷侧边栏 默认不显示 + /// Get/Set Whether to Show Sidebar. Default is not shown + /// 10.2.2 /// [Parameter] public bool ShowSidebar { get; set; } /// - /// 获得/设置 侧边栏快捷选项集合 + /// 获得/设置 侧边栏快捷选项集合 + /// Get/Set Sidebar Items + /// 10.2.2 /// [Parameter] [NotNull] public List? SidebarItems { get; set; } /// - /// 点击确认按钮回调委托方法 + /// 点击确认按钮回调委托方法 + /// Callback Method When Confirm Button Clicked + /// 10.2.2 /// [Parameter] public Func? OnConfirm { get; set; } /// - /// 点击清空按钮回调委托方法 + /// 点击清空按钮回调委托方法 + /// Callback Method When Clear Button Clicked + /// 10.2.2 /// [Parameter] public Func? OnClearValue { get; set; } /// - /// 获得/设置 时间格式化字符串 默认值为 "HH:mm:ss" + /// 获得/设置 时间格式化字符串 默认值为 "HH:mm:ss" + /// Get/Set Time Format String. Default is "HH:mm:ss" + /// 10.2.2 /// [Parameter] [NotNull] public string? TimeFormat { get; set; } /// - /// 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd" + /// 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd" + /// Get/Set Date Format String. Default is "yyyy-MM-dd" + /// 10.2.2 /// [Parameter] [NotNull] public string? DateFormat { get; set; } /// - /// 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd HH:mm:ss" + /// 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd HH:mm:ss" + /// Get/Set Date Time Format String. Default is "yyyy-MM-dd HH:mm:ss" + /// 10.2.2 /// [Parameter] [NotNull] public string? DateTimeFormat { get; set; } /// - /// 获得/设置 是否显示中国阴历历法 默认 false + /// 获得/设置 是否显示中国阴历历法 默认 false + /// Get/Set Whether to Show Chinese Lunar Calendar. Default is false + /// 10.2.2 /// [Parameter] public bool ShowLunar { get; set; } /// - /// 获得/设置 是否显示中国 24 节气 默认 false + /// 获得/设置 是否显示中国 24 节气 默认 false + /// Get/Set Whether to Show Chinese Solar Term. Default is false + /// 10.2.2 /// [Parameter] public bool ShowSolarTerm { get; set; } /// - /// 获得/设置 是否显示节日 默认 false + /// 获得/设置 是否显示节日 默认 false + /// Get/Set Whether to Show Festivals. Default is false + /// 10.2.2 /// [Parameter] public bool ShowFestivals { get; set; } /// - /// 获得/设置 是否显示休假日 默认 false + /// 获得/设置 是否显示休假日 默认 false + /// Get/Set Whether to Show Holidays. Default is false + /// 10.2.2 /// [Parameter] public bool ShowHolidays { get; set; } /// - /// Gets or sets the date value changed event callback. + /// 获得/设置 the date value changed event 回调. + /// Gets or sets the date value changed event callback. + /// 10.2.2 /// [Parameter] public Func? OnDateClick { get; set; } @@ -366,7 +426,8 @@ private async Task OnClickSidebarItem(DateTimeRangeSidebarItem item) } /// - /// 点击 清除按钮调用此方法 + /// 点击 清除按钮调用此方法 + /// Method Called When Clear Button Clicked /// /// private async Task ClickClearButton() @@ -411,7 +472,8 @@ private Task OnEndDateChanged(DateTime value) } /// - /// 点击 确认时调用此方法 + /// 点击 确认时调用此方法 + /// Method Called When Confirm Button Clicked /// private async Task ClickTodayButton() { @@ -424,7 +486,8 @@ private async Task ClickTodayButton() } /// - /// 点击 确认时调用此方法 + /// 点击 确认时调用此方法 + /// Method Called When Confirm Button Clicked /// private async Task ClickConfirmButton() { @@ -463,7 +526,8 @@ private async Task ClickConfirmButton() } /// - /// 更新值方法 + /// 更新值方法 + /// Update Value Method /// /// private async Task UpdateValue(DateTime d) @@ -557,7 +621,8 @@ private void ResetBodyValue() } /// - /// 客户端弹窗关闭后由 Javascript 调用此方法 + /// 客户端弹窗关闭后由 Javascript 调用此方法 + /// Method Called by Javascript After Client Popup Closed /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRangeSidebarItem.cs b/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRangeSidebarItem.cs index c4c6e52af39..b6ae18b9314 100644 --- a/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRangeSidebarItem.cs +++ b/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRangeSidebarItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,23 +6,27 @@ namespace BootstrapBlazor.Components; /// -/// DateTimeRange 组件侧边栏快捷项目类 +/// DateTimeRange 组件侧边栏快捷项目类 +/// DateTimeRange Component Sidebar Item Class /// public class DateTimeRangeSidebarItem { /// - /// 获得/设置 快捷项目文本 + /// 获得/设置 快捷项目文本 + /// Get/Set Item Text /// [NotNull] public string? Text { get; set; } /// - /// 获得/设置 开始时间 + /// 获得/设置 开始时间 + /// Get/Set Start Time /// public DateTime StartDateTime { get; set; } /// - /// 获得/设置 开始时间 + /// 获得/设置 结束时间 + /// Get/Set End Time /// public DateTime EndDateTime { get; set; } } diff --git a/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRangeValue.cs b/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRangeValue.cs index 0400ce4e468..80a73d7f62e 100644 --- a/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRangeValue.cs +++ b/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRangeValue.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// DateTimeRangeValue 对象 +/// DateTimeRangeValue 对象 +/// DateTimeRangeValue Object /// public class DateTimeRangeValue { /// - /// 获得/设置 开始时间 + /// 获得/设置 开始时间 + /// Get/Set Start Time /// public DateTime Start { get; set; } /// - /// 获得/设置 结束时间 + /// 获得/设置 结束时间 + /// Get/Set End Time /// public DateTime End { get; set; } /// - /// 获得/设置 可为空开始时间 + /// 获得/设置 可为空开始时间 + /// Get/Set Nullable Start Time /// public DateTime? NullStart { @@ -30,7 +34,8 @@ public DateTime? NullStart } /// - /// 获得/设置 可为空结束时间 + /// 获得/设置 可为空结束时间 + /// Get/Set Nullable End Time /// public DateTime? NullEnd { @@ -39,7 +44,8 @@ public DateTime? NullEnd } /// - /// ToString 方法 + /// ToString 方法 + /// ToString Method /// /// public override string ToString() diff --git a/src/BootstrapBlazor/Components/Dialog/Dialog.razor.cs b/src/BootstrapBlazor/Components/Dialog/Dialog.razor.cs index 5b3f3969e53..b3574425b46 100644 --- a/src/BootstrapBlazor/Components/Dialog/Dialog.razor.cs +++ b/src/BootstrapBlazor/Components/Dialog/Dialog.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Dialog component +/// Dialog component +/// Dialog component /// public partial class Dialog : IDisposable { @@ -178,7 +179,8 @@ private static RenderFragment RenderDialog(int index, Dictionary }; /// - /// Dispose method + /// Dispose method + /// Dispose method /// /// protected virtual void Dispose(bool disposing) diff --git a/src/BootstrapBlazor/Components/Dialog/DialogBase.cs b/src/BootstrapBlazor/Components/Dialog/DialogBase.cs index 3f51ae81b6b..c1d1ce35692 100644 --- a/src/BootstrapBlazor/Components/Dialog/DialogBase.cs +++ b/src/BootstrapBlazor/Components/Dialog/DialogBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,61 +6,79 @@ namespace BootstrapBlazor.Components; /// -/// Dialog 组件基类 +/// Dialog 组件基类 +/// Dialog Base Component /// public abstract class DialogBase : BootstrapModuleComponentBase { /// - /// 获得/设置 EditModel 实例 + /// 获得/设置 EditModel 实例 + /// Get/Set EditModel Instance + /// 10.2.2 /// [Parameter] [NotNull] public TModel? Model { get; set; } /// - /// 获得/设置 BodyTemplate 实例 + /// 获得/设置 BodyTemplate 实例 + /// Get/Set BodyTemplate Instance + /// 10.2.2 /// [Parameter] public RenderFragment? BodyTemplate { get; set; } /// - /// 获得 数据项集合 + /// 获得 数据项集合 + /// Get Items + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// - /// 获得/设置 是否显示标签 + /// 获得/设置 是否显示标签 + /// Get/Set Whether to Show Label + /// 10.2.2 /// [Parameter] public bool ShowLabel { get; set; } /// - /// 获得/设置 每行显示组件数量 默认为 null + /// 获得/设置 每行显示组件数量 默认为 null + /// Get/Set Items Per Row. Default is null + /// 10.2.2 /// [Parameter] public int? ItemsPerRow { get; set; } /// - /// 获得/设置 设置行格式 默认 Row 布局 + /// 获得/设置 设置行格式 默认 Row 布局 + /// Get/Set Row Layout. Default is Row + /// 10.2.2 /// [Parameter] public RowType RowType { get; set; } /// - /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// Get/Set Label Alignment in Inline Mode. Default is None, equivalent to Left + /// 10.2.2 /// [Parameter] public Alignment LabelAlign { get; set; } /// - /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// Get/Set Unset Group Items Position. Default is false (at the end) + /// 10.2.2 /// [Parameter] public bool ShowUnsetGroupItemsOnTop { get; set; } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { diff --git a/src/BootstrapBlazor/Components/Dialog/DialogCloseButton.cs b/src/BootstrapBlazor/Components/Dialog/DialogCloseButton.cs index f3e9b502602..0089d0fe3a2 100644 --- a/src/BootstrapBlazor/Components/Dialog/DialogCloseButton.cs +++ b/src/BootstrapBlazor/Components/Dialog/DialogCloseButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,15 @@ namespace BootstrapBlazor.Components; /// -/// 弹窗内关闭按钮组件 +/// 弹窗内关闭按钮组件 +/// Dialog Close Button Component /// public partial class DialogCloseButton : Button { /// - /// 获得/设置 按钮颜色 + /// 获得/设置 按钮颜色 + /// Get/Set Button Color + /// 10.2.2 /// [Parameter] public override Color Color { get; set; } = Color.Secondary; diff --git a/src/BootstrapBlazor/Components/Dialog/DialogOption.cs b/src/BootstrapBlazor/Components/Dialog/DialogOption.cs index a88c4070691..9db4396581f 100644 --- a/src/BootstrapBlazor/Components/Dialog/DialogOption.cs +++ b/src/BootstrapBlazor/Components/Dialog/DialogOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,204 +6,244 @@ namespace BootstrapBlazor.Components; /// -/// Configuration class for the Dialog component +/// Configuration class for the Dialog component +/// Configuration class for the Dialog component /// public class DialogOption { /// - /// Gets or sets the related modal instance + /// 获得/设置 the related modal 实例 + /// Gets or sets the related modal instance /// internal Modal? Modal { get; set; } /// - /// Gets or sets the dialog title + /// 获得/设置 the dialog title + /// Gets or sets the dialog title /// public string? Title { get; set; } /// - /// Gets or sets the custom style of the dialog + /// 获得/设置 the custom 样式 of the dialog + /// Gets or sets the custom style of the dialog /// public string? Class { get; set; } /// - /// Gets or sets the size of the dialog + /// 获得/设置 the size of the dialog + /// Gets or sets the size of the dialog /// public Size Size { get; set; } = Size.ExtraExtraLarge; /// - /// Gets or sets the full screen size of the dialog, default is None + /// 获得/设置 the full screen size of the dialog, default is None + /// Gets or sets the full screen size of the dialog, default is None /// /// To ensure functionality, when this value is set, , , and are not available public FullScreenSize FullScreenSize { get; set; } = FullScreenSize.None; /// - /// Gets or sets whether to show the maximize button, default is false + /// 获得/设置 是否 to show the maximize 按钮, default is false + /// Gets or sets whether to show the maximize button, default is false /// /// To ensure functionality, when this value is set to true, and are not available public bool ShowMaximizeButton { get; set; } /// - /// Gets or sets whether the dialog is vertically centered, default is true + /// 获得/设置 是否 the dialog is vertically centered, default is true + /// Gets or sets whether the dialog is vertically centered, default is true /// public bool IsCentered { get; set; } = true; /// - /// Gets or sets whether the dialog content scrolls when it is too long, default is false + /// 获得/设置 是否 the dialog 内容 scrolls when it is too long, default is false + /// Gets or sets whether the dialog content scrolls when it is too long, default is false /// public bool IsScrolling { get; set; } = false; /// - /// Gets or sets whether to show the resize button, default is false + /// 获得/设置 是否 to show the resize 按钮, default is false + /// Gets or sets whether to show the resize button, default is false /// public bool ShowResize { get; set; } /// - /// Gets or sets whether to show the close button, default is true + /// 获得/设置 是否 to show the close 按钮, default is true + /// Gets or sets whether to show the close button, default is true /// public bool ShowCloseButton { get; set; } = true; /// - /// Gets or sets whether to show the header close button, default is true + /// 获得/设置 是否 to show the header close 按钮, default is true + /// Gets or sets whether to show the header close button, default is true /// public bool ShowHeaderCloseButton { get; set; } = true; /// - /// Gets or sets whether to enable fade animation, default is null + /// 获得/设置 是否 to enable fade animation, default is null + /// Gets or sets whether to enable fade animation, default is null /// public bool? IsFade { get; set; } /// - /// Gets or sets whether to support closing the dialog with the ESC key, default is true + /// 获得/设置 是否 to support closing the dialog with the ESC key, default is true + /// Gets or sets whether to support closing the dialog with the ESC key, default is true /// public bool IsKeyboard { get; set; } = true; /// - /// Gets or sets whether to support closing the dialog by clicking the backdrop, default is false + /// 获得/设置 是否 to support closing the dialog by clicking the backdrop, default is false + /// Gets or sets whether to support closing the dialog by clicking the backdrop, default is false /// public bool IsBackdrop { get; set; } /// - /// Gets or sets whether to show the footer, default is true + /// 获得/设置 是否 to show the footer, default is true + /// Gets or sets whether to show the footer, default is true /// public bool ShowFooter { get; set; } = true; /// - /// Gets or sets whether to show the print button, default is false + /// 获得/设置 是否 to show the print 按钮, default is false + /// Gets or sets whether to show the print button, default is false /// public bool ShowPrintButton { get; set; } /// - /// Gets or sets whether to show the save button, default is false + /// 获得/设置 是否 to show the save 按钮, default is false + /// Gets or sets whether to show the save button, default is false /// public bool ShowSaveButton { get; set; } /// - /// Gets or sets whether to show the print button in the header, default is false + /// 获得/设置 是否 to show the print 按钮 in the header, default is false + /// Gets or sets whether to show the print button in the header, default is false /// public bool ShowPrintButtonInHeader { get; set; } /// - /// Gets or sets the text of the print button in the header, default is "Print" from the resource file + /// 获得/设置 the text of the print 按钮 in the header, default is "Print" from the resource file + /// Gets or sets the text of the print button in the header, default is "Print" from the resource file /// public string? PrintButtonText { get; set; } /// - /// Gets or sets the related data, mostly used for passing values + /// 获得/设置 the related 数据, mostly used for passing values + /// Gets or sets the related data, mostly used for passing values /// public object? BodyContext { get; set; } /// - /// Gets or sets the ModalBody component + /// 获得/设置 the ModalBody component + /// Gets or sets the ModalBody component /// public RenderFragment? BodyTemplate { get; set; } /// - /// Gets or sets the ModalFooter component + /// 获得/设置 the ModalFooter component + /// Gets or sets the ModalFooter component /// public RenderFragment? FooterTemplate { get; set; } /// - /// Gets or sets the ModalHeader component template + /// 获得/设置 the ModalHeader component 模板 + /// Gets or sets the ModalHeader component template /// public RenderFragment? HeaderTemplate { get; set; } /// - /// Gets or sets the custom buttons in the ModalHeader component + /// 获得/设置 the custom 按钮s in the ModalHeader component + /// Gets or sets the custom buttons in the ModalHeader component /// public RenderFragment? HeaderToolbarTemplate { get; set; } /// - /// Gets or sets the custom component + /// 获得/设置 the custom component + /// Gets or sets the custom component /// public BootstrapDynamicComponent? Component { get; set; } /// - /// Gets or sets the icon of the save button, default is null and uses the current theme icon + /// 获得/设置 the 图标 of the save 按钮, default is null and uses the current theme 图标 + /// Gets or sets the icon of the save button, default is null and uses the current theme icon /// public string? SaveButtonIcon { get; set; } /// - /// Gets or sets the text of the save button + /// 获得/设置 the text of the save 按钮 + /// Gets or sets the text of the save button /// public string? SaveButtonText { get; set; } /// - /// Gets or sets the callback method for the save button + /// 获得/设置 the 回调方法 for the save 按钮 + /// Gets or sets the callback method for the save button /// public Func>? OnSaveAsync { get; set; } /// - /// Gets or sets the icon of the close button, default is null and uses the current theme icon + /// 获得/设置 the 图标 of the close 按钮, default is null and uses the current theme 图标 + /// Gets or sets the icon of the close button, default is null and uses the current theme icon /// public string? CloseButtonIcon { get; set; } /// - /// Gets or sets the text of the close button + /// 获得/设置 the text of the close 按钮 + /// Gets or sets the text of the close button /// public string? CloseButtonText { get; set; } /// - /// Gets or sets the callback method for closing the dialog + /// 获得/设置 the 回调方法 for closing the dialog + /// Gets or sets the callback method for closing the dialog /// public Func? OnCloseAsync { get; set; } /// - /// Gets or sets whether to automatically close the dialog after saving successfully, default is true + /// 获得/设置 是否 to automatically close the dialog after saving successfully, default is true + /// Gets or sets whether to automatically close the dialog after saving successfully, default is true /// public bool IsAutoCloseAfterSave { get; set; } = true; /// - /// Gets or sets whether the dialog can be dragged, default is false + /// 获得/设置 是否 the dialog can be dragged, default is false + /// Gets or sets whether the dialog can be dragged, default is false /// public bool IsDraggable { get; set; } /// - /// Gets or sets the callback method when the dialog is shown + /// 获得/设置 the 回调方法 when the dialog is shown + /// Gets or sets the callback method when the dialog is shown /// public Func? OnShownAsync { get; set; } /// - /// Gets or sets whether to show the export PDF button, default is false + /// 获得/设置 是否 to show the export PDF 按钮, default is false + /// Gets or sets whether to show the export PDF button, default is false /// public bool ShowExportPdfButton { get; set; } /// - /// Gets or sets whether to show the export PDF button in the header, default is false + /// 获得/设置 是否 to show the export PDF 按钮 in the header, default is false + /// Gets or sets whether to show the export PDF button in the header, default is false /// public bool ShowExportPdfButtonInHeader { get; set; } /// - /// Gets or sets the configuration options for the export PDF button + /// 获得/设置 the configuration options for the export PDF 按钮 + /// Gets or sets the configuration options for the export PDF button /// public ExportPdfButtonOptions? ExportPdfButtonOptions { get; set; } /// - /// Gets or sets whether to hide the previous dialog when opening a new one, default is false + /// 获得/设置 是否 to hide the previous dialog when opening a new one, default is false + /// Gets or sets whether to hide the previous dialog when opening a new one, default is false /// public bool IsHidePreviousDialog { get; set; } /// - /// Method to close the dialog + /// Method to close the dialog + /// Method to close the dialog /// public async Task CloseDialogAsync() { @@ -214,7 +254,8 @@ public async Task CloseDialogAsync() } /// - /// Method to convert parameters to component attributes + /// Method to convert parameters to component attributes + /// Method to convert parameters to component attributes /// /// public Dictionary ToAttributes() diff --git a/src/BootstrapBlazor/Components/Dialog/DialogResult.cs b/src/BootstrapBlazor/Components/Dialog/DialogResult.cs index 88596e712a8..ee82b6674e6 100644 --- a/src/BootstrapBlazor/Components/Dialog/DialogResult.cs +++ b/src/BootstrapBlazor/Components/Dialog/DialogResult.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,27 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// 对话框返回类型 +/// 对话框返回类型 +/// Dialog Result Type /// public enum DialogResult { /// - /// 未设置 + /// 未设置 + /// Unset /// Unset, /// - /// 是 + /// + /// Yes /// Yes, /// - /// 否 + /// + /// No /// No, /// - /// 关闭 + /// 关闭 + /// Close /// Close } diff --git a/src/BootstrapBlazor/Components/Dialog/DialogSaveButton.cs b/src/BootstrapBlazor/Components/Dialog/DialogSaveButton.cs index d8dacd4aa9f..fc1ea412521 100644 --- a/src/BootstrapBlazor/Components/Dialog/DialogSaveButton.cs +++ b/src/BootstrapBlazor/Components/Dialog/DialogSaveButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// 弹窗内保存按钮组件 +/// 弹窗内保存按钮组件 +/// Dialog Save Button Component /// public partial class DialogSaveButton : Button { @@ -17,7 +18,9 @@ public partial class DialogSaveButton : Button private IStringLocalizer? Localizer { get; set; } /// - /// 获得/设置 保存回调方法 返回 true 时自动关闭弹窗 + /// 获得/设置 保存回调方法 返回 true 时自动关闭弹窗 + /// Get/Set Save Callback Method. Close Dialog when return true + /// 10.2.2 /// [Parameter] public Func>? OnSaveAsync { get; set; } diff --git a/src/BootstrapBlazor/Components/Dialog/DialogService.cs b/src/BootstrapBlazor/Components/Dialog/DialogService.cs index 006b6d77ddf..37e0a7ed2e7 100644 --- a/src/BootstrapBlazor/Components/Dialog/DialogService.cs +++ b/src/BootstrapBlazor/Components/Dialog/DialogService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,15 +6,17 @@ namespace BootstrapBlazor.Components; /// -/// Dialog 组件服务 +/// Dialog 组件服务 +/// Dialog Service /// public class DialogService : BootstrapServiceBase { /// - /// 显示 Dialog 方法 + /// 显示 Dialog 方法 + /// Show Dialog /// - /// 弹窗配置信息实体类 - /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件 + /// 弹窗配置信息实体类Dialog Option + /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件Specific Dialog Component. Default is null, use component built-in dialog component /// public Task Show(DialogOption option, Dialog? dialog = null) => Invoke(option, dialog); } diff --git a/src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs b/src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs index 869bc035487..44de869303a 100644 --- a/src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs +++ b/src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs @@ -9,42 +9,55 @@ namespace BootstrapBlazor.Components; /// -/// 编辑弹窗组件 +/// 编辑弹窗组件 +/// Edit Dialog Component /// public partial class EditDialog { /// - /// 获得/设置 查询时是否显示正在加载中动画 默认为 false + /// 获得/设置 查询时是否显示正在加载中动画 默认为 false + /// Get/Set Whether to Show Loading Animation When Querying. Default is false + /// 10.2.2 /// [Parameter] public bool ShowLoading { get; set; } /// - /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false + /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false + /// Get/Set Whether Component Uses Tracking Mode to Update Editing Items Directly. Default is false + /// 10.2.2 /// [Parameter] public bool IsTracking { get; set; } /// - /// 获得/设置 实体类编辑模式 Add 还是 Update + /// 获得/设置 实体类编辑模式 Add 还是 Update + /// Get/Set Item Changed Type (Add or Update) + /// 10.2.2 /// [Parameter] public ItemChangedType ItemChangedType { get; set; } /// - /// 获得/设置 保存按钮图标 + /// 获得/设置 保存按钮图标 + /// Get/Set Save Button Icon + /// 10.2.2 /// [Parameter] public string? SaveButtonIcon { get; set; } /// - /// 获得/设置 保存按钮文本 + /// 获得/设置 保存按钮文本 + /// Get/Set Save Button Text + /// 10.2.2 /// [Parameter] public string? SaveButtonText { get; set; } /// - /// 获得/设置 保存回调委托 返回 false 时保持编辑弹窗 返回 true 时关闭编辑弹窗 + /// 获得/设置 保存回调委托 返回 false 时保持编辑弹窗 返回 true 时关闭编辑弹窗 + /// Get/Set Save Callback Delegate. Return false to keep edit dialog, true to close it + /// 10.2.2 /// [Parameter] #if NET6_0_OR_GREATER @@ -53,31 +66,41 @@ public partial class EditDialog public Func>? OnSaveAsync { get; set; } /// - /// 获得/设置 关闭按钮图标 + /// 获得/设置 关闭按钮图标 + /// Get/Set Close Button Icon + /// 10.2.2 /// [Parameter] public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 获得/设置 重置按钮文本 + /// 获得/设置 获得/设置 重置按钮文本 + /// Get/Set Reset Button Text + /// 10.2.2 /// [Parameter] public string? CloseButtonText { get; set; } /// - /// 获得/设置 关闭弹窗回调方法 + /// 获得/设置 关闭弹窗回调方法 + /// Get/Set Close Dialog Callback Method + /// 10.2.2 /// [Parameter] public Func? OnCloseAsync { get; set; } /// - /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// Get/Set Whether to Disable Auto Submit Form By Enter. Default is null + /// 10.2.2 /// [Parameter] public bool? DisableAutoSubmitFormByEnter { get; set; } /// - /// 获得/设置 DialogFooterTemplate 实例 + /// 获得/设置 DialogFooterTemplate 实例 + /// Get/Set DialogFooterTemplate Instance + /// 10.2.2 /// [Parameter] public RenderFragment? FooterTemplate { get; set; } @@ -94,7 +117,8 @@ public partial class EditDialog private IIconTheme? IconTheme { get; set; } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet Method /// protected override void OnParametersSet() { @@ -123,9 +147,10 @@ private async Task OnValidSubmitAsync(EditContext context) } /// - /// 显示/隐藏 Loading 遮罩 + /// 显示/隐藏 Loading 遮罩 + /// Show/Hide Loading Mask /// - /// true 时显示,false 时隐藏 + /// true 时显示,false 时隐藏true to show, false to hide /// public async ValueTask ToggleLoading(bool state) { diff --git a/src/BootstrapBlazor/Components/Dialog/EditDialogOption.cs b/src/BootstrapBlazor/Components/Dialog/EditDialogOption.cs index 543dcd9a208..4dafe440869 100644 --- a/src/BootstrapBlazor/Components/Dialog/EditDialogOption.cs +++ b/src/BootstrapBlazor/Components/Dialog/EditDialogOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// 编辑弹窗配置类 +/// 编辑弹窗配置类 +/// Edit Dialog Option Class /// public class EditDialogOption : DialogOption, ITableEditDialogOption { /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public EditDialogOption() { @@ -22,72 +24,86 @@ public EditDialogOption() } /// - /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false + /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false + /// Get/Set Whether Component Uses Tracking Mode to Update Editing Items Directly. Default is false /// public bool IsTracking { get; set; } /// - /// 获得/设置 是否显示标签 默认为 true 显示标签 + /// 获得/设置 是否显示标签 默认为 true 显示标签 + /// Get/Set Whether to Show Label. Default is true /// public bool ShowLabel { get; set; } = true; /// - /// 获得/设置 实体类编辑模式 Add 还是 Update + /// 获得/设置 实体类编辑模式 Add 还是 Update + /// Get/Set Item Changed Type (Add or Update) /// public ItemChangedType ItemChangedType { get; set; } /// - /// 获得/设置 每行显示组件数量 默认为 null + /// 获得/设置 每行显示组件数量 默认为 null + /// Get/Set Items Per Row. Default is null /// public int? ItemsPerRow { get; set; } /// - /// 获得/设置 设置行内组件布局格式 默认 Row 布局 + /// 获得/设置 设置行内组件布局格式 默认 Row 布局 + /// Get/Set Row Layout. Default is Row /// public RowType RowType { get; set; } /// - /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// Get/Set Label Alignment in Inline Mode. Default is None, equivalent to Left /// public Alignment LabelAlign { get; set; } /// - /// 获得/设置 查询时是否显示正在加载中动画 默认为 false + /// 获得/设置 查询时是否显示正在加载中动画 默认为 false + /// Get/Set Whether to Show Loading Animation When Querying. Default is false /// public bool ShowLoading { get; set; } /// - /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// Get/Set Unset Group Items Position. Default is false (at the end) /// public bool ShowUnsetGroupItemsOnTop { get; set; } /// - /// 获得/设置 编辑框模型 + /// 获得/设置 编辑框模型 + /// Get/Set Edit Model /// public TModel? Model { get; set; } /// - /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// Get/Set Whether to Disable Auto Submit Form By Enter. Default is null /// public bool? DisableAutoSubmitFormByEnter { get; set; } /// - /// 获得 编辑项集合 + /// 获得 编辑项集合 + /// Get Items /// public IEnumerable? Items { get; set; } /// - /// 获得/设置 EditDialog Body 模板 + /// 获得/设置 EditDialog Body 模板 + /// Get/Set EditDialog Body Template /// public RenderFragment? DialogBodyTemplate { get; set; } /// - /// 获得/设置 EditDialog Footer 模板 + /// 获得/设置 EditDialog Footer 模板 + /// Get/Set EditDialog Footer Template /// public RenderFragment? DialogFooterTemplate { get; set; } /// - /// 获得/设置 保存回调委托 + /// 获得/设置 保存回调委托 + /// Get/Set Save Callback Delegate /// public Func>? OnEditAsync { get; set; } } diff --git a/src/BootstrapBlazor/Components/Dialog/IResultDialog.cs b/src/BootstrapBlazor/Components/Dialog/IResultDialog.cs index bd1f16e1bfa..5539a56e1cf 100644 --- a/src/BootstrapBlazor/Components/Dialog/IResultDialog.cs +++ b/src/BootstrapBlazor/Components/Dialog/IResultDialog.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// IResultDialog 接口定义 +/// IResultDialog 接口定义 +/// IResultDialog Interface Definition /// public interface IResultDialog { /// - /// 关闭之前回调方法 返回 true 时关闭弹窗 返回 false 时阻止关闭弹窗 + /// 关闭之前回调方法 返回 true 时关闭弹窗 返回 false 时阻止关闭弹窗 + /// Callback Method Before Closing. Return true to close, false to prevent closing /// /// Task OnClosing(DialogResult result) => Task.FromResult(true); /// - /// 关闭后回调方法 + /// 关闭后回调方法 + /// Callback Method After Closing /// Task OnClose(DialogResult result); } diff --git a/src/BootstrapBlazor/Components/Dialog/IconDialog.razor.cs b/src/BootstrapBlazor/Components/Dialog/IconDialog.razor.cs index 5bdfcbbd4af..38cf0c8196d 100644 --- a/src/BootstrapBlazor/Components/Dialog/IconDialog.razor.cs +++ b/src/BootstrapBlazor/Components/Dialog/IconDialog.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,15 @@ namespace BootstrapBlazor.Components; /// -/// IconDialog Component +/// IconDialog Component +/// IconDialog Component /// public partial class IconDialog { /// - /// 获得/设置 Icon 名称 + /// 获得/设置 Icon 名称 + /// Get/Set Icon Name + /// 10.2.2 /// [Parameter] [NotNull] @@ -23,25 +26,33 @@ public partial class IconDialog public string? IconName { get; set; } /// - /// 获得/设置 Label 显示文字 + /// 获得/设置 Label 显示文字 + /// Get/Set Label Text + /// 10.2.2 /// [Parameter] public string? LabelText { get; set; } /// - /// 获得/设置 Label 显示文字 + /// 获得/设置 Label 显示文字 + /// Get/Set Label Text + /// 10.2.2 /// [Parameter] public string? LabelFullText { get; set; } /// - /// 获得/设置 拷贝按钮显示文字 + /// 获得/设置 拷贝按钮显示文字 + /// Get/Set Copy Button Text + /// 10.2.2 /// [Parameter] public string? ButtonText { get; set; } /// - /// 获得/设置 拷贝成功提示文字 + /// 获得/设置 拷贝成功提示文字 + /// Get/Set Copied Tooltip Text + /// 10.2.2 /// [Parameter] public string? CopiedTooltipText { get; set; } @@ -61,7 +72,8 @@ public partial class IconDialog private string IconStyle { get; set; } = "solid"; /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet Method /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Dialog/ResultDialogFooter.razor.cs b/src/BootstrapBlazor/Components/Dialog/ResultDialogFooter.razor.cs index c355e37d5f9..133eba06451 100644 --- a/src/BootstrapBlazor/Components/Dialog/ResultDialogFooter.razor.cs +++ b/src/BootstrapBlazor/Components/Dialog/ResultDialogFooter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,64 +8,83 @@ namespace BootstrapBlazor.Components; /// -/// ResultDialog 对话框类 +/// ResultDialog 对话框类 +/// ResultDialog Component /// public partial class ResultDialogFooter { /// - /// 显示确认按钮 + /// 显示确认按钮 + /// Show Yes Button + /// 10.2.2 /// [Parameter] [NotNull] public bool ShowYesButton { get; set; } = true; /// - /// 确认按钮文本 + /// 确认按钮文本 + /// Yes Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ButtonYesText { get; set; } /// - /// 确认按钮图标 + /// 确认按钮图标 + /// Yes Button Icon + /// 10.2.2 /// [Parameter] public string? ButtonYesIcon { get; set; } /// - /// 确认按钮颜色 + /// 确认按钮颜色 + /// Yes Button Color + /// 10.2.2 /// [Parameter] public Color ButtonYesColor { get; set; } = Color.Primary; /// - /// 显示取消按钮 + /// 显示取消按钮 + /// Show No Button + /// 10.2.2 /// [Parameter] [NotNull] public bool ShowNoButton { get; set; } = true; /// - /// 取消按钮文本 + /// 取消按钮文本 + /// No Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ButtonNoText { get; set; } /// - /// 取消按钮图标 + /// 取消按钮图标 + /// No Button Icon + /// 10.2.2 /// [Parameter] [NotNull] public string? ButtonNoIcon { get; set; } /// - /// 取消按钮颜色 + /// 取消按钮颜色 + /// No Button Color + /// 10.2.2 /// [Parameter] public Color ButtonNoColor { get; set; } = Color.Danger; /// - /// 显示关闭按钮 + /// 显示关闭按钮 + /// Show Close Button + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请删除即可; Deprecated. Just delete it.")] @@ -73,7 +92,9 @@ public partial class ResultDialogFooter public bool ShowCloseButton { get; set; } = true; /// - /// 关闭按钮文本 + /// 关闭按钮文本 + /// Close Button Text + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请删除即可; Deprecated. Just delete it.")] @@ -81,7 +102,9 @@ public partial class ResultDialogFooter public string? ButtonCloseText { get; set; } /// - /// 关闭按钮图标 + /// 关闭按钮图标 + /// Close Button Icon + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请删除即可; Deprecated. Just delete it.")] @@ -89,7 +112,9 @@ public partial class ResultDialogFooter public string? ButtonCloseIcon { get; set; } /// - /// 关闭按钮颜色 + /// 关闭按钮颜色 + /// Close Button Color + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请删除即可; Deprecated. Just delete it.")] @@ -97,7 +122,9 @@ public partial class ResultDialogFooter public Color ButtonCloseColor { get; set; } = Color.Secondary; /// - /// 获得/设置 点击关闭按钮回调方法 + /// 获得/设置 点击关闭按钮回调方法 + /// Get/Set Click Close Button Callback Method + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,删除即可; Deprecated. Just delete it.")] @@ -105,7 +132,9 @@ public partial class ResultDialogFooter public Func? OnClickClose { get; set; } /// - /// 获得/设置 点击确认按钮回调方法 + /// 获得/设置 点击确认按钮回调方法 + /// Get/Set Click Yes Button Callback Method + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,删除即可; Deprecated. Just delete it.")] @@ -113,7 +142,9 @@ public partial class ResultDialogFooter public Func? OnClickYes { get; set; } /// - /// 获得/设置 点击取消按钮回调方法 + /// 获得/设置 点击取消按钮回调方法 + /// Get/Set Click No Button Callback Method + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,删除即可; Deprecated. Just delete it.")] diff --git a/src/BootstrapBlazor/Components/Dialog/ResultDialogOption.cs b/src/BootstrapBlazor/Components/Dialog/ResultDialogOption.cs index 07e33295654..9518371199d 100644 --- a/src/BootstrapBlazor/Components/Dialog/ResultDialogOption.cs +++ b/src/BootstrapBlazor/Components/Dialog/ResultDialogOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 结果对话框配置类 +/// 结果对话框配置类 +/// Result Dialog Option Class /// public class ResultDialogOption : DialogOption { /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public ResultDialogOption() { @@ -20,68 +22,80 @@ public ResultDialogOption() } /// - /// 获得/设置 显示确认按钮 + /// 获得/设置 显示确认按钮 + /// Get/Set Show Yes Button /// public bool ShowYesButton { get; set; } = true; /// - /// 获得/设置 确认按钮文本 + /// 获得/设置 确认按钮文本 + /// Get/Set Yes Button Text /// public string? ButtonYesText { get; set; } /// - /// 获得/设置 确认按钮图标 + /// 获得/设置 确认按钮图标 + /// Get/Set Yes Button Icon /// public string? ButtonYesIcon { get; set; } /// - /// 获得/设置 确认按钮颜色 + /// 获得/设置 确认按钮颜色 + /// Get/Set Yes Button Color /// public Color ButtonYesColor { get; set; } = Color.Primary; /// - /// 获得/设置 显示取消按钮 + /// 获得/设置 显示取消按钮 + /// Get/Set Show No Button /// public bool ShowNoButton { get; set; } = true; /// - /// 获得/设置 取消按钮文本 + /// 获得/设置 取消按钮文本 + /// Get/Set No Button Text /// public string? ButtonNoText { get; set; } /// - /// 获得/设置 取消按钮图标 + /// 获得/设置 取消按钮图标 + /// Get/Set No Button Icon /// public string? ButtonNoIcon { get; set; } /// - /// 获得/设置 取消按钮颜色 + /// 获得/设置 取消按钮颜色 + /// Get/Set No Button Color /// public Color ButtonNoColor { get; set; } = Color.Danger; /// - /// 获得/设置 关闭按钮文本 + /// 获得/设置 关闭按钮文本 + /// Get/Set Close Button Text /// [Obsolete("已弃用,删除即可; Deprecated. Just delete it.")] [ExcludeFromCodeCoverage] public string? ButtonCloseText { get; set; } /// - /// 获得/设置 关闭按钮图标 + /// 获得/设置 关闭按钮图标 + /// Get/Set Close Button Icon /// [Obsolete("已弃用,删除即可; Deprecated. Just delete it.")] [ExcludeFromCodeCoverage] public string? ButtonCloseIcon { get; set; } /// - /// 获得/设置 关闭按钮颜色 + /// 获得/设置 关闭按钮颜色 + /// Get/Set Close Button Color /// [Obsolete("已弃用,删除即可; Deprecated. Just delete it.")] [ExcludeFromCodeCoverage] public Color ButtonCloseColor { get; set; } = Color.Secondary; /// - /// 获得/设置 组件参数集合 + /// 获得/设置 组件参数集合 + /// Get/Set Component Parameters /// [Obsolete("已过期,单词拼写错误。请使用 ComponentParameters 代替 Please use ComponentParameters")] [ExcludeFromCodeCoverage] @@ -92,17 +106,20 @@ public Dictionary? ComponentParamters } /// - /// 获得/设置 组件参数集合 + /// 获得/设置 组件参数集合 + /// Get/Set Component Parameters /// public Dictionary? ComponentParameters { get; set; } /// - /// 获得/设置 模态弹窗返回值任务实例 + /// 获得/设置 模态弹窗返回值任务实例 + /// Get/Set Modal Result Task Instance /// internal TaskCompletionSource ResultTask { get; set; } /// - /// 获得 模态框接口方法 + /// 获得 模态框接口方法 + /// Get Modal Interface Method /// internal Func? GetDialog { get; set; } } diff --git a/src/BootstrapBlazor/Components/Dialog/SearchDialog.razor.cs b/src/BootstrapBlazor/Components/Dialog/SearchDialog.razor.cs index 888f6e7953d..701ee2c67a9 100644 --- a/src/BootstrapBlazor/Components/Dialog/SearchDialog.razor.cs +++ b/src/BootstrapBlazor/Components/Dialog/SearchDialog.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,15 @@ namespace BootstrapBlazor.Components; /// -/// 查询弹窗组件 +/// 查询弹窗组件 +/// Search Dialog Component /// public partial class SearchDialog { /// - /// 获得/设置 重置回调委托 + /// 获得/设置 重置回调委托 + /// Get/Set Reset Callback Delegate + /// 10.2.2 /// /// [Parameter] @@ -21,7 +24,9 @@ public partial class SearchDialog public Func? OnResetSearchClick { get; set; } /// - /// 获得/设置 搜索回调委托 + /// 获得/设置 搜索回调委托 + /// Get/Set Search Callback Delegate + /// 10.2.2 /// /// [Parameter] @@ -29,27 +34,35 @@ public partial class SearchDialog public Func? OnSearchClick { get; set; } /// - /// 获得/设置 重置按钮文本 + /// 获得/设置 重置按钮文本 + /// Get/Set Reset Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ResetButtonText { get; set; } /// - /// 获得/设置 查询按钮文本 + /// 获得/设置 查询按钮文本 + /// Get/Set Query Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? QueryButtonText { get; set; } /// - /// 获得/设置 清空按钮图标 + /// 获得/设置 清空按钮图标 + /// Get/Set Clear Button Icon + /// 10.2.2 /// [Parameter] public string? ClearIcon { get; set; } /// - /// 获得/设置 搜索按钮图标 + /// 获得/设置 搜索按钮图标 + /// Get/Set Search Button Icon + /// 10.2.2 /// [Parameter] public string? SearchIcon { get; set; } @@ -63,7 +76,8 @@ public partial class SearchDialog private IIconTheme? IconTheme { get; set; } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet Method /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Dialog/SearchDialogOption.cs b/src/BootstrapBlazor/Components/Dialog/SearchDialogOption.cs index 9edcb4c9565..34b15494a94 100644 --- a/src/BootstrapBlazor/Components/Dialog/SearchDialogOption.cs +++ b/src/BootstrapBlazor/Components/Dialog/SearchDialogOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 查询弹窗配置类 +/// 查询弹窗配置类 +/// Search Dialog Option Class /// public class SearchDialogOption : DialogOption { /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public SearchDialogOption() { @@ -20,63 +22,75 @@ public SearchDialogOption() } /// - /// 获得/设置 是否显示标签 默认为 true 显示标签 + /// 获得/设置 是否显示标签 默认为 true 显示标签 + /// Get/Set Whether to Show Label. Default is true /// public bool ShowLabel { get; set; } = true; /// - /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// Get/Set Unset Group Items Position. Default is false (at the end) /// public bool ShowUnsetGroupItemsOnTop { get; set; } /// - /// 获得/设置 每行显示组件数量 默认为 null + /// 获得/设置 每行显示组件数量 默认为 null + /// Get/Set Items Per Row. Default is null /// public int? ItemsPerRow { get; set; } /// - /// 获得/设置 设置行内组件布局格式 默认 Row 布局 + /// 获得/设置 设置行内组件布局格式 默认 Row 布局 + /// Get/Set Row Layout. Default is Row /// public RowType RowType { get; set; } /// - /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// Get/Set Label Alignment in Inline Mode. Default is None, equivalent to Left /// public Alignment LabelAlign { get; set; } /// - /// 获得/设置 编辑框模型 + /// 获得/设置 编辑框模型 + /// Get/Set Search Model /// public TModel? Model { get; set; } /// - /// 获得 搜索条件集合 + /// 获得 搜索条件集合 + /// Get Search Items /// public IEnumerable? Items { get; set; } /// - /// 获得/设置 SearchDialog Body 模板 + /// 获得/设置 SearchDialog Body 模板 + /// Get/Set SearchDialog Body Template /// public RenderFragment? DialogBodyTemplate { get; set; } /// - /// 获得/设置 重置按钮文本 + /// 获得/设置 重置按钮文本 + /// Get/Set Reset Button Text /// public string? ResetButtonText { get; set; } /// - /// 获得/设置 查询按钮文本 + /// 获得/设置 查询按钮文本 + /// Get/Set Query Button Text /// public string? QueryButtonText { get; set; } /// - /// 获得/设置 重置回调委托 + /// 获得/设置 重置回调委托 + /// Get/Set Reset Callback Delegate /// /// public Func? OnResetSearchClick { get; set; } /// - /// 获得/设置 搜索回调委托 + /// 获得/设置 搜索回调委托 + /// Get/Set Search Callback Delegate /// /// public Func? OnSearchClick { get; set; } diff --git a/src/BootstrapBlazor/Components/Display/Display.razor.cs b/src/BootstrapBlazor/Components/Display/Display.razor.cs index 712780bc332..4684405dc71 100644 --- a/src/BootstrapBlazor/Components/Display/Display.razor.cs +++ b/src/BootstrapBlazor/Components/Display/Display.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// Display 组件 +/// Display 组件 +/// Display Component /// public partial class Display : ILookup { @@ -20,43 +21,52 @@ public partial class Display : ILookup private string? _displayText; /// - /// 获得/设置 异步格式化字符串 + /// 获得/设置 异步格式化字符串 + /// Get/Set Async Format String + /// 10.2.2 /// [Parameter] public Func>? FormatterAsync { get; set; } /// - /// 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd + /// 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd + /// Get/Set Format String. e.g. yyyy-MM-dd for DateTime + /// 10.2.2 /// [Parameter] public string? FormatString { get; set; } /// /// + /// 10.2.2 /// [Parameter] public IEnumerable? Lookup { get; set; } /// /// + /// 10.2.2 /// [Parameter] public ILookupService? LookupService { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? LookupServiceKey { get; set; } /// /// + /// 10.2.2 /// [Parameter] public object? LookupServiceData { get; set; } /// /// + /// 10.2.2 /// [Parameter] public StringComparison LookupStringComparison { get; set; } = StringComparison.OrdinalIgnoreCase; @@ -66,19 +76,23 @@ public partial class Display : ILookup private ILookupService? InjectLookupService { get; set; } /// - /// 获得/设置 类型解析回调方法 组件泛型为 Array 时内部调用 + /// 获得/设置 类型解析回调方法 组件泛型为 Array 时内部调用 + /// Get/Set Type Resolver Callback Method. Called internally when component generic type is Array + /// 10.2.2 /// [Parameter] public Func? TypeResolver { get; set; } /// - /// 获得/设置 是否显示 Tooltip 多用于标签文字过长导致裁减时使用 默认 false 不显示 + /// 获得/设置 是否显示 Tooltip 多用于标签文字过长导致裁减时使用 默认 false 不显示 + /// Get/Set Whether to Show Tooltip. Default is false + /// 10.2.2 /// [Parameter] public bool ShowTooltip { get; set; } /// - /// > + /// /// /// protected override async Task OnParametersSetAsync() @@ -90,7 +104,8 @@ protected override async Task OnParametersSetAsync() } /// - /// 数值格式化委托方法 + /// 数值格式化委托方法 + /// Value Format Delegate Method /// /// /// @@ -117,6 +132,7 @@ private async Task FormatText([DisallowNull] TValue value) else if (type.IsGenericType && type.IsAssignableTo(typeof(IEnumerable))) { // 泛型集合 IEnumerable + // Generic collection IEnumerable ret = await ConvertEnumerableToString(value); } else diff --git a/src/BootstrapBlazor/Components/Display/DisplayBase.cs b/src/BootstrapBlazor/Components/Display/DisplayBase.cs index 51346c6f2b7..1b11cc01a79 100644 --- a/src/BootstrapBlazor/Components/Display/DisplayBase.cs +++ b/src/BootstrapBlazor/Components/Display/DisplayBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,33 +9,40 @@ namespace BootstrapBlazor.Components; /// -/// 显示组件基类 +/// 显示组件基类 +/// Display Base Component /// public abstract class DisplayBase : BootstrapModuleComponentBase { /// - /// 是否显示 标签 + /// 是否显示 标签 + /// Whether to Show Label /// protected bool IsShowLabel { get; set; } /// - /// Gets the for the bound value. + /// 获得 the for the bound value. + /// Gets the for the bound value. /// protected FieldIdentifier? FieldIdentifier { get; set; } /// - /// 获得/设置 泛型参数 TValue 可为空类型 Type 实例,为空时表示类型不可为空 + /// 获得/设置 泛型参数 TValue 可为空类型 Type 实例,为空时表示类型不可为空 + /// Get/Set Generic Parameter TValue Nullable Type Instance. Null means type is not nullable /// protected Type? NullableUnderlyingType { get; set; } /// - /// 获得/设置 泛型参数 TValue 可为空类型 Type 实例 + /// 获得/设置 泛型参数 TValue 可为空类型 Type 实例 + /// Get/Set Generic Parameter TValue Nullable Type Instance /// [NotNull] protected Type? ValueType { get; set; } /// - /// Gets or sets the value of the input. This should be used with two-way binding. + /// 获得/设置 the value of the input. This should be used with two-way binding. + /// Gets or sets the value of the input. This should be used with two-way binding. + /// 10.2.2 /// /// /// @bind-Value="model.PropertyName" @@ -45,61 +52,76 @@ public abstract class DisplayBase : BootstrapModuleComponentBase public TValue? Value { get; set; } /// - /// Gets or sets a callback that updates the bound value. + /// 获得/设置 a 回调 that updates the bound value. + /// Gets or sets a callback that updates the bound value. + /// 10.2.2 /// [Parameter] public EventCallback ValueChanged { get; set; } /// - /// Gets or sets an expression that identifies the bound value. + /// 获得/设置 an expression that identifies the bound value. + /// Gets or sets an expression that identifies the bound value. + /// 10.2.2 /// [Parameter] public Expression>? ValueExpression { get; set; } /// - /// 获得/设置 是否显示前置标签 默认值为 null 为空时默认不显示标签 + /// 获得/设置 是否显示前置标签 默认值为 null 为空时默认不显示标签 + /// Get/Set Whether to Show Label. Default is null, not show label when null + /// 10.2.2 /// [Parameter] public bool? ShowLabel { get; set; } /// - /// 获得/设置 是否显示 Tooltip 多用于文字过长导致裁减时使用 默认 null + /// 获得/设置 是否显示 Tooltip 多用于文字过长导致裁减时使用 默认 null + /// Get/Set Whether to Show Tooltip. Default is null + /// 10.2.2 /// [Parameter] public bool? ShowLabelTooltip { get; set; } /// - /// 获得/设置 显示名称 + /// 获得/设置 显示名称 + /// Get/Set Display Text + /// 10.2.2 /// [Parameter] public string? DisplayText { get; set; } /// - /// 获得 ValidateForm 实例 + /// 获得 ValidateForm 实例 + /// Get ValidateForm Instance /// [CascadingParameter] protected ValidateForm? ValidateForm { get; set; } /// - /// 获得 IShowLabel 实例 + /// 获得 IShowLabel 实例 + /// Get IShowLabel Instance /// [CascadingParameter(Name = "EditorForm")] protected IShowLabel? EditorForm { get; set; } /// - /// 获得 InputGroup 实例 + /// 获得 InputGroup 实例 + /// Get InputGroup Instance /// [CascadingParameter] protected BootstrapInputGroup? InputGroup { get; set; } /// - /// 获得 IFilter 实例 + /// 获得 IFilter 实例 + /// Get IFilter Instance /// [CascadingParameter] protected IFilter? Filter { get; set; } /// - /// SetParametersAsync 方法 + /// SetParametersAsync 方法 + /// SetParametersAsync Method /// /// /// @@ -120,13 +142,15 @@ public override Task SetParametersAsync(ParameterView parameters) } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet Method /// protected override void OnParametersSet() { base.OnParametersSet(); // 显式设置显示标签时一定显示 + // Show label when explicitly set var showLabel = ShowLabel; if (Filter != null) @@ -137,6 +161,8 @@ protected override void OnParametersSet() { // 如果被 InputGroup 包裹不显示 Label // 组件自身未设置 ShowLabel 取 EditorForm/ValidateForm 级联值 + // If wrapped by InputGroup, do not show Label + // If component itself does not set ShowLabel, take EditorForm/ValidateForm cascading value if (ShowLabel == null && (EditorForm != null || ValidateForm != null)) { showLabel = EditorForm?.ShowLabel ?? ValidateForm?.ShowLabel ?? true; @@ -150,17 +176,20 @@ protected override void OnParametersSet() } // 设置显示标签时未提供 DisplayText 通过双向绑定获取 DisplayName + // When ShowLabel is set but DisplayText is not provided, get DisplayName through two-way binding if (IsShowLabel) { DisplayText ??= FieldIdentifier?.GetDisplayName(); } // 设置是否显示标签工具栏 + // Set whether to show label tooltip ShowLabelTooltip ??= EditorForm?.ShowLabelTooltip ?? ValidateForm?.ShowLabelTooltip; } /// - /// 将 Value 格式化为 String 方法 + /// 将 Value 格式化为 String 方法 + /// Format Value to String Method /// /// The value to format. /// A string representation of the value. diff --git a/src/BootstrapBlazor/Components/Divider/Divider.razor.cs b/src/BootstrapBlazor/Components/Divider/Divider.razor.cs index 5d73048584f..8243fdbf6b6 100644 --- a/src/BootstrapBlazor/Components/Divider/Divider.razor.cs +++ b/src/BootstrapBlazor/Components/Divider/Divider.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Divider 组件 +/// Divider 组件 +/// Divider Component /// public partial class Divider { /// - /// 获得 class 样式集合 + /// 获得 class 样式集合 + /// Get class style collection /// protected virtual string? ClassString => CssBuilder.Default("divider") .AddClass("divider-vertical", IsVertical) @@ -19,7 +21,8 @@ public partial class Divider .Build(); /// - /// 获得 class 样式集合 + /// 获得 class 样式集合 + /// Get class style collection /// protected virtual string? TextClassString => CssBuilder.Default("divider-text") .AddClass("is-left", Alignment.Left == Alignment) @@ -28,31 +31,41 @@ public partial class Divider .Build(); /// - /// 获得/设置 是否为垂直显示 默认为 false + /// 获得/设置 是否为垂直显示 默认为 false + /// Get/Set Whether to display vertically. Default is false + /// 10.2.2 /// [Parameter] public bool IsVertical { get; set; } /// - /// 获得/设置 组件对齐方式 默认为居中 + /// 获得/设置 组件对齐方式 默认为居中 + /// Get/Set Component Alignment. Default is Center + /// 10.2.2 /// [Parameter] public Alignment Alignment { get; set; } = Alignment.Center; /// - /// 获得/设置 文案显示文字 + /// 获得/设置 文案显示文字 + /// Get/Set Text + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 文案显示图标 + /// 获得/设置 文案显示图标 + /// Get/Set Icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 子内容 + /// 获得/设置 子内容 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Download/Download.cs b/src/BootstrapBlazor/Components/Download/Download.cs index b6639ac7d56..9164cb033e8 100644 --- a/src/BootstrapBlazor/Components/Download/Download.cs +++ b/src/BootstrapBlazor/Components/Download/Download.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// 下载组件 +/// 下载组件 +/// Download Component /// [BootstrapModuleAutoLoader(ModuleName = "download", AutoInvokeInit = false, AutoInvokeDispose = false)] public class Download : BootstrapModuleComponentBase @@ -18,7 +19,8 @@ public class Download : BootstrapModuleComponentBase private DownloadService? DownloadService { get; set; } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { @@ -29,7 +31,8 @@ protected override void OnInitialized() } /// - /// 调用 download 方法 + /// 调用 download 方法 + /// Call download Method /// /// /// @@ -50,7 +53,8 @@ protected virtual async Task DownloadFromStream(DownloadOption option) } /// - /// 调用 CreateUrl 方法 + /// 调用 CreateUrl 方法 + /// Call CreateUrl Method /// /// /// diff --git a/src/BootstrapBlazor/Components/Download/DownloadOption.cs b/src/BootstrapBlazor/Components/Download/DownloadOption.cs index 56b59112edb..7e301775ecc 100644 --- a/src/BootstrapBlazor/Components/Download/DownloadOption.cs +++ b/src/BootstrapBlazor/Components/Download/DownloadOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 文件下载配置类 +/// 文件下载配置类 +/// Download Option Class /// public class DownloadOption { /// - /// 获取/设置 要下载的文件数据字节数组 + /// 获取/设置 要下载的文件数据字节数组 + /// Get/Set File Content Byte Array /// public Stream? FileStream { get; set; } /// - /// 获得/设置 下载地址 + /// 获得/设置 下载地址 + /// Get/Set Download Url /// public string? Url { get; set; } /// - /// 获取/设置 下载文件另存为文件名 + /// 获取/设置 下载文件另存为文件名 + /// Get/Set Save as Filename /// public string? FileName { get; set; } } diff --git a/src/BootstrapBlazor/Components/Download/DownloadService.cs b/src/BootstrapBlazor/Components/Download/DownloadService.cs index 0366655140b..12c852be26d 100644 --- a/src/BootstrapBlazor/Components/Download/DownloadService.cs +++ b/src/BootstrapBlazor/Components/Download/DownloadService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,36 +6,42 @@ namespace BootstrapBlazor.Components; /// -/// 文件下载服务类 +/// 文件下载服务类 +/// Download Service Class /// public class DownloadService { /// - /// 获得 回调委托缓存集合 + /// 获得 回调委托缓存集合 + /// Get Callback Delegate Cache Collection /// protected List<(IComponent Key, Func Callback)> StreamCache { get; } = []; /// - /// 获得 获取地址的回调委托缓存集合 + /// 获得 获取地址的回调委托缓存集合 + /// Get Url Callback Delegate Cache Collection /// protected List<(IComponent Key, Func Callback)> UrlCache { get; } = []; /// - /// 注册服务 + /// 注册服务 + /// Register Service /// /// /// protected internal virtual void RegisterStream(IComponent key, Func callback) => StreamCache.Add((key, callback)); /// - /// 注册获取Url服务 + /// 注册获取Url服务 + /// Register Url Service /// /// /// protected internal virtual void RegisterUrl(IComponent key, Func callback) => UrlCache.Add((key, callback)); /// - /// 注销事件 + /// 注销事件 + /// Unregister Event /// protected internal virtual void UnRegisterStream(IComponent key) { @@ -47,7 +53,8 @@ protected internal virtual void UnRegisterStream(IComponent key) } /// - /// 注销获取Url事件 + /// 注销获取Url事件 + /// Unregister Url Event /// protected internal virtual void UnRegisterUrl(IComponent key) { @@ -59,9 +66,10 @@ protected internal virtual void UnRegisterUrl(IComponent key) } /// - /// 下载文件方法 + /// 下载文件方法 + /// Download File Method /// - /// 文件下载选项 + /// 文件下载选项文件下载选项 public virtual async Task DownloadFromStreamAsync(DownloadOption option) { var cb = StreamCache.LastOrDefault().Callback; @@ -72,9 +80,10 @@ public virtual async Task DownloadFromStreamAsync(DownloadOption option) } /// - /// 获取文件连接方法 + /// 获取文件连接方法 + /// Get File Url Method /// - /// 文件下载选项 + /// 文件下载选项文件下载选项 public virtual async Task DownloadFromUrlAsync(DownloadOption option) { var cb = UrlCache.LastOrDefault().Callback; diff --git a/src/BootstrapBlazor/Components/DragDrap/DragDropService.cs b/src/BootstrapBlazor/Components/DragDrap/DragDropService.cs index f6a7b4a9a6c..be00af54446 100644 --- a/src/BootstrapBlazor/Components/DragDrap/DragDropService.cs +++ b/src/BootstrapBlazor/Components/DragDrap/DragDropService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,38 +6,45 @@ namespace BootstrapBlazor.Components; /// -/// 拖拽服务 +/// 拖拽服务 +/// Drag Drop Service /// /// internal class DragDropService { /// - /// 活动的Item + /// 活动的Item + /// Active Item /// public T? ActiveItem { get; set; } /// - /// 悬停的项目 + /// 悬停的项目 + /// Drag Target Item /// public T? DragTargetItem { get; set; } /// - /// 被拖拽的Items + /// 被拖拽的Items + /// Dragged Items /// public List? Items { get; set; } /// - /// 活动的Id + /// 活动的Id + /// Active Id /// public int? ActiveSpacerId { get; set; } /// - /// 之前的位置 + /// 之前的位置 + /// Previous Index /// public int? OldIndex { get; set; } /// - /// 通知刷新 + /// 通知刷新 + /// Notify StateChanged /// public EventHandler? StateHasChanged { get; set; } diff --git a/src/BootstrapBlazor/Components/DragDrap/Dropzone.razor.cs b/src/BootstrapBlazor/Components/DragDrap/Dropzone.razor.cs index f8b08f20e01..f568813df82 100644 --- a/src/BootstrapBlazor/Components/DragDrap/Dropzone.razor.cs +++ b/src/BootstrapBlazor/Components/DragDrap/Dropzone.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,74 +8,97 @@ namespace BootstrapBlazor.Components; /// -/// 拖拽容器 +/// 拖拽容器 +/// Drag Drop Container /// /// public partial class Dropzone : IDisposable { /// - /// 获取/设置 拖拽列表 + /// 获取/设置 拖拽列表 + /// Get/Set Items to Drag + /// 10.2.2 /// [Parameter] [NotNull] public List? Items { get; set; } /// - /// 获取/设置 最大数量 默认 null 不限制 + /// 获取/设置 最大数量 默认 null 不限制 + /// Get/Set Max Items. Default is null (unlimited) + /// 10.2.2 /// [Parameter] public int? MaxItems { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 每个 Item 的特殊 class + /// 获得/设置 每个 Item 的特殊 class + /// Get/Set Item Wrapper Class + /// 10.2.2 /// [Parameter] public Func? ItemWrapperClass { get; set; } /// - /// 获得/设置 复制内容 + /// 获得/设置 复制内容 + /// Get/Set Copy Item Delegate + /// 10.2.2 /// [Parameter] public Func? CopyItem { get; set; } /// - /// 获得/设置 是否允许拖拽释放 + /// 获得/设置 是否允许拖拽释放 + /// Get/Set Accepts Delegate + /// 10.2.2 /// [Parameter] public Func? Accepts { get; set; } /// - /// 获得/设置 当拖拽因为数量超限被禁止时调用 + /// 获得/设置 当拖拽因为数量超限被禁止时调用 + /// Get/Set Callback for drop rejection by max item limit + /// 10.2.2 /// [Parameter] public EventCallback OnItemDropRejectedByMaxItemLimit { get; set; } /// - /// 获得/设置 当拖拽被禁止时调用 + /// 获得/设置 当拖拽被禁止时调用 + /// Get/Set Callback for drop rejection + /// 10.2.2 /// [Parameter] public EventCallback OnItemDropRejected { get; set; } /// - /// 获得/设置 返回被替换的 Item + /// 获得/设置 返回被替换的 Item + /// Get/Set Callback for Replaced Item Drop + /// 10.2.2 /// [Parameter] public EventCallback OnReplacedItemDrop { get; set; } /// - /// 获得/设置 返回放下的 Item + /// 获得/设置 返回放下的 Item + /// Get/Set Callback for Item Drop + /// 10.2.2 /// [Parameter] public EventCallback OnItemDrop { get; set; } /// - /// 获得/设置 当前节点是否允许被拖拽 + /// 获得/设置 当前节点是否允许被拖拽 + /// Get/Set Whether current item allows drag + /// 10.2.2 /// [Parameter] public Func? AllowsDrag { get; set; } @@ -260,6 +283,7 @@ private void OnDragEnd() DragDropService.Items.Insert(DragDropService.OldIndex.Value, DragDropService.ActiveItem); // 增加这行代码后单元测试有问题,等排查后再决定是否加上 + // Add this line caused unit test issue, decide later // commit the changes //DragDropService.Commit(); } @@ -313,9 +337,11 @@ private void OnDrop() var activeItem = DragDropService.ActiveItem; // 如果没有释放在Item上,则添加到最后 + // If not dropped on an Item, add to the end if (DragDropService.DragTargetItem == null) { // 当从其他位置拖拽过来的时候 + // When dragged from another specific location if (!Equals(DragDropService.Items, Items) && CopyItem != null) { Items.Insert(Items.Count, CopyItem(activeItem!)); @@ -354,7 +380,8 @@ private void Swap(TItem draggedOverItem, TItem activeItem) } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { @@ -368,7 +395,8 @@ private void ForceRender(object? sender, EventArgs e) } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose Method /// /// protected virtual void Dispose(bool disposing) @@ -380,7 +408,8 @@ protected virtual void Dispose(bool disposing) } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose Method /// public void Dispose() { diff --git a/src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs b/src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs index 384e4103767..4cc81a9a709 100644 --- a/src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs +++ b/src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Drawer component +/// Drawer component +/// Drawer component /// public partial class Drawer { /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get Component CSS Style /// private string? ClassString => CssBuilder.Default("drawer collapse") .AddClass("no-bd", !ShowBackdrop) @@ -25,7 +27,8 @@ public partial class Drawer .Build(); /// - /// 获得 抽屉 Style 字符串 + /// 获得 抽屉 Style 字符串 + /// Get Drawer Style String /// private string? DrawerStyleString => CssBuilder.Default() .AddClass($"--bb-drawer-width: {Width};", !string.IsNullOrEmpty(Width) && !IsVertical) @@ -35,7 +38,8 @@ public partial class Drawer private bool IsVertical => Placement == Placement.Top || Placement == Placement.Bottom; /// - /// 获得 抽屉样式 + /// 获得 抽屉样式 + /// Get Drawer CSS Style /// private string? DrawerClassString => CssBuilder.Default("drawer-body") .AddClass("left", Placement != Placement.Right && Placement != Placement.Top && Placement != Placement.Bottom) @@ -45,97 +49,129 @@ public partial class Drawer .Build(); /// - /// 获得/设置 抽屉宽度 左右布局时生效 + /// 获得/设置 抽屉宽度 左右布局时生效 + /// Get/Set Drawer Width. Effective when layout is Left/Right + /// 10.2.2 /// [Parameter] public string Width { get; set; } = "360px"; /// - /// 获得/设置 抽屉高度 上下布局时生效 + /// 获得/设置 抽屉高度 上下布局时生效 + /// Get/Set Drawer Height. Effective when layout is Top/Bottom + /// 10.2.2 /// [Parameter] public string Height { get; set; } = "290px"; /// - /// 获得/设置 抽屉是否打开 默认 false 未打开 + /// 获得/设置 抽屉是否打开 默认 false 未打开 + /// Get/Set Whether Drawer is Open. Default is false + /// 10.2.2 /// [Parameter] public bool IsOpen { get; set; } /// - /// 获得/设置 IsOpen 属性改变时回调委托方法 + /// 获得/设置 IsOpen 属性改变时回调委托方法 + /// Get/Set Callback for IsOpen Property Change + /// 10.2.2 /// [Parameter] public EventCallback IsOpenChanged { get; set; } /// - /// 获得/设置 点击背景遮罩时回调委托方法 默认为 null + /// 获得/设置 点击背景遮罩时回调委托方法 默认为 null + /// Get/Set Callback for Backdrop Click. Default is null + /// 10.2.2 /// [Parameter] public Func? OnClickBackdrop { get; set; } /// - /// 获得/设置 点击遮罩是否关闭抽屉 默认为 false + /// 获得/设置 点击遮罩是否关闭抽屉 默认为 false + /// Get/Set Whether to Close Drawer on Backdrop Click. Default is false + /// 10.2.2 /// [Parameter] public bool IsBackdrop { get; set; } /// - /// 获得/设置 是否显示遮罩 默认为 true 显示遮罩 + /// 获得/设置 是否显示遮罩 默认为 true 显示遮罩 + /// Get/Set Whether to Show Backdrop. Default is true + /// 10.2.2 /// [Parameter] public bool ShowBackdrop { get; set; } = true; /// - /// 获得/设置 组件出现位置 默认显示在 Left 位置 + /// 获得/设置 组件出现位置 默认显示在 Left 位置 + /// Get/Set Component Placement. Default is Left + /// 10.2.2 /// [Parameter] public Placement Placement { get; set; } = Placement.Left; /// - /// 获得/设置 组件定位位置 默认 null 未设置 使用样式内置定位 fixed 可更改为 absolute + /// 获得/设置 组件定位位置 默认 null 未设置 使用样式内置定位 fixed 可更改为 absolute + /// Get/Set Component Position. Default is null (Fixed). Can be set to absolute + /// 10.2.2 /// [Parameter] public string? Position { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否允许调整大小 默认 false + /// 获得/设置 是否允许调整大小 默认 false + /// Get/Set Whether to Allow Resize. Default is false + /// 10.2.2 /// [Parameter] public bool AllowResize { get; set; } /// - /// 获得/设置 z-index 参数值 默认 null 未设置 + /// 获得/设置 z-index 参数值 默认 null 未设置 + /// Get/Set z-index parameter. Default is null + /// 10.2.2 /// [Parameter] public int? ZIndex { get; set; } /// - /// 获得/设置 关闭抽屉回调委托 默认 null + /// 获得/设置 关闭抽屉回调委托 默认 null + /// Get/Set Close Drawer Callback Delegate. Default is null + /// 10.2.2 /// [Parameter] public Func? OnCloseAsync { get; set; } /// - /// 获得/设置 抽屉内容相关数据 多用于传值 + /// 获得/设置 抽屉内容相关数据 多用于传值 + /// Get/Set Drawer Context Data. Used for passing values + /// 10.2.2 /// [Parameter] public object? BodyContext { get; set; } /// - /// 获得/设置 是否支持键盘 ESC 关闭当前弹窗 默认 false + /// 获得/设置 是否支持键盘 ESC 关闭当前弹窗 默认 false + /// Get/Set Whether to support ESC key to close. Default is false + /// 10.2.2 /// [Parameter] public bool IsKeyboard { get; set; } /// - /// 获得/设置 抽屉显示时是否允许滚动 body 默认为 false 不滚动 + /// 获得/设置 抽屉显示时是否允许滚动 body 默认为 false 不滚动 + /// Get/Set Whether to allow body scrolling when drawer is shown. Default is false + /// 10.2.2 /// [Parameter] public bool BodyScroll { get; set; } @@ -185,7 +221,8 @@ private RenderFragment RenderBackdrop() => builder => }; /// - /// 点击背景遮罩方法 + /// 点击背景遮罩方法 + /// Backdrop Click Method /// public async Task OnContainerClick() { @@ -199,7 +236,8 @@ public async Task OnContainerClick() } /// - /// 关闭抽屉方法 + /// 关闭抽屉方法 + /// Close Drawer Method /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/Drawer/DrawerContainer.cs b/src/BootstrapBlazor/Components/Drawer/DrawerContainer.cs index cf7b1b7c5d3..523d56e772d 100644 --- a/src/BootstrapBlazor/Components/Drawer/DrawerContainer.cs +++ b/src/BootstrapBlazor/Components/Drawer/DrawerContainer.cs @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// Drawer 抽屉容器组件 +/// Drawer 抽屉容器组件 +/// Drawer Container Component /// public class DrawerContainer : ComponentBase, IDisposable { @@ -19,13 +20,15 @@ public class DrawerContainer : ComponentBase, IDisposable private DrawerOption? _option; /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { base.OnInitialized(); // 注册 Drawer 弹窗事件 + // Register Drawer popup event DrawerService.Register(this, Show); } @@ -114,7 +117,8 @@ private async Task OnCloseAsync(DrawerOption option) } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose Method /// /// private void Dispose(bool disposing) @@ -126,7 +130,8 @@ private void Dispose(bool disposing) } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose Method /// public void Dispose() { diff --git a/src/BootstrapBlazor/Components/Drawer/DrawerOption.cs b/src/BootstrapBlazor/Components/Drawer/DrawerOption.cs index 03f9c46d535..ce0b0332033 100644 --- a/src/BootstrapBlazor/Components/Drawer/DrawerOption.cs +++ b/src/BootstrapBlazor/Components/Drawer/DrawerOption.cs @@ -6,92 +6,110 @@ namespace BootstrapBlazor.Components; /// -/// Drawer 弹出窗参数配置类 +/// Drawer 弹出窗参数配置类 +/// Drawer Option Class /// public class DrawerOption { /// - /// 获得/设置 Drawer 组件样式 + /// 获得/设置 Drawer 组件样式 + /// Get/Set Drawer Component CSS Class /// public string? Class { get; set; } /// - /// 获得/设置 抽屉宽度 左右布局时生效 + /// 获得/设置 抽屉宽度 左右布局时生效 + /// Get/Set Drawer Width. Effective when layout is Left/Right /// public string? Width { get; set; } /// - /// 获得/设置 抽屉高度 上下布局时生效 + /// 获得/设置 抽屉高度 上下布局时生效 + /// Get/Set Drawer Height. Effective when layout is Top/Bottom /// public string? Height { get; set; } /// - /// 获得/设置 是否支持键盘 ESC 关闭当前弹窗 默认 false + /// 获得/设置 是否支持键盘 ESC 关闭当前弹窗 默认 false + /// Get/Set Whether to support ESC key to close. Default is false /// public bool IsKeyboard { get; set; } /// - /// 获得/设置 点击遮罩是否关闭抽屉 默认为 false + /// 获得/设置 点击遮罩是否关闭抽屉 默认为 false + /// Get/Set Whether to Close Drawer on Backdrop Click. Default is false /// public bool IsBackdrop { get; set; } /// - /// 获得/设置 是否显示遮罩 默认为 true 显示遮罩 + /// 获得/设置 是否显示遮罩 默认为 true 显示遮罩 + /// Get/Set Whether to Show Backdrop. Default is true /// public bool ShowBackdrop { get; set; } = true; /// - /// 获得/设置 抽屉显示时是否允许滚动 body 默认为 false 不滚动 + /// 获得/设置 抽屉显示时是否允许滚动 body 默认为 false 不滚动 + /// Get/Set Whether to allow body scrolling when drawer is shown. Default is false /// public bool BodyScroll { get; set; } /// - /// 获得/设置 组件出现位置 默认显示在 Left 位置 + /// 获得/设置 组件出现位置 默认显示在 Left 位置 + /// Get/Set Component Placement. Default is Left /// public Placement Placement { get; set; } = Placement.Left; /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content /// public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 自定义组件 + /// 获得/设置 自定义组件 + /// Get/Set Custom Component /// public BootstrapDynamicComponent? Component { get; set; } /// - /// 获得/设置 是否允许调整大小 默认 false + /// 获得/设置 是否允许调整大小 默认 false + /// Get/Set Whether to Allow Resize. Default is false /// public bool AllowResize { get; set; } /// - /// 获得/设置 点击背景遮罩时回调委托方法 默认为 null + /// 获得/设置 点击背景遮罩时回调委托方法 默认为 null + /// Get/Set Callback for Backdrop Click. Default is null /// public Func? OnClickBackdrop { get; set; } /// - /// 获得/设置 关闭当前 Drawer 回调委托 默认 null + /// 获得/设置 关闭当前 Drawer 回调委托 默认 null + /// Get/Set Close Drawer Callback Delegate. Default is null /// public Func? OnCloseAsync { get; set; } /// - /// 获得/设置 相关连数据,多用于传值使用 + /// 获得/设置 相关连数据,多用于传值使用 + /// Get/Set Context Data. Used for passing values /// public object? BodyContext { get; set; } /// - /// 获得/设置 z-index 参数值 默认 null 未设置 + /// 获得/设置 z-index 参数值 默认 null 未设置 + /// Get/Set z-index parameter. Default is null /// public int? ZIndex { get; set; } /// - /// 获得/设置 实例 + /// 获得/设置 实例 + /// Get/Set Instance /// internal Drawer? Drawer { get; set; } /// - /// 关闭抽屉弹窗方法 + /// 关闭抽屉弹窗方法 + /// Close Drawer Method /// public async Task CloseAsync() { diff --git a/src/BootstrapBlazor/Components/Drawer/DrawerService.cs b/src/BootstrapBlazor/Components/Drawer/DrawerService.cs index b05b75b12dc..f548ffde0e4 100644 --- a/src/BootstrapBlazor/Components/Drawer/DrawerService.cs +++ b/src/BootstrapBlazor/Components/Drawer/DrawerService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// Toast 弹出窗服务类 +/// Toast 弹出窗服务类 +/// Drawer Service Class /// public class DrawerService : BootstrapServiceBase { /// - /// Show 方法 + /// Show 方法 + /// Show Method /// - /// DrawerOption 实例 + /// DrawerOption 实例DrawerOption instance public Task Show(DrawerOption option) => Invoke(option); } diff --git a/src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs b/src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs index a2d3592e62c..56eda76facc 100644 --- a/src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs +++ b/src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// Dropdown 下拉框组件 +/// Dropdown 下拉框组件 +/// Dropdown Component /// public partial class Dropdown { /// - /// 获得 按钮弹出方向集合 + /// 获得 按钮弹出方向集合 + /// Get Direction Class Collection /// /// private string? DirectionClassName => CssBuilder.Default("btn-group") @@ -23,7 +25,8 @@ public partial class Dropdown .Build(); /// - /// 获得 按钮样式集合 + /// 获得 按钮样式集合 + /// Get Button Class Collection /// /// private string? ButtonClassName => CssBuilder.Default("btn") @@ -33,7 +36,8 @@ public partial class Dropdown .Build(); /// - /// 获得 按钮样式集合 + /// 获得 按钮样式集合 + /// Get Button Class Collection /// /// private string? ClassName => CssBuilder.Default("btn dropdown-toggle") @@ -44,19 +48,22 @@ public partial class Dropdown .Build(); /// - /// 获得 是否分裂式按钮 + /// 获得 是否分裂式按钮 + /// Get Is Split Button /// private string? DropdownToggle => !ShowSplit ? ToggleString : null; /// - /// 菜单对齐方式样式 + /// 菜单对齐方式样式 + /// Menu Alignment Class /// private string? MenuAlignmentClass => CssBuilder.Default("dropdown-menu shadow") .AddClass($"dropdown-menu-{MenuAlignment.ToDescriptionString()}", MenuAlignment == Alignment.Right) .Build(); /// - /// 获得/设置 设置当前项是否 Active 方法 + /// 获得/设置 设置当前项是否 Active 方法 + /// Get/Set Set Item Active Method /// /// /// @@ -66,127 +73,169 @@ public partial class Dropdown .Build(); /// - /// 获得/设置 颜色 默认 Color.Primary 无设置 + /// 获得/设置 颜色 默认 Color.Primary 无设置 + /// Get/Set Color. Default is Color.Primary + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.Primary; /// - /// 获得/设置 绑定数据集 + /// 获得/设置 绑定数据集 + /// Get/Set Data Items + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 选项模板 + /// 获得/设置 选项模板 + /// Get/Set Item Template + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } /// - /// 获得/设置 按钮内容模板 + /// 获得/设置 按钮内容模板 + /// Get/Set Button Content Template + /// 10.2.2 /// [Parameter] public RenderFragment? ButtonTemplate { get; set; } /// - /// 获得/设置 是否开启分裂式 默认 false + /// 获得/设置 是否开启分裂式 默认 false + /// Get/Set Is Split Button. Default is false + /// 10.2.2 /// [Parameter] public bool ShowSplit { get; set; } /// - /// 获得/设置 OnClick 事件 - /// 为 true 时生效 + /// 获得/设置 OnClick 事件 + /// 为 true 时生效 + /// Get/Set OnClick Event + /// Effective when is true + /// 10.2.2 /// [Parameter] public EventCallback OnClick { get; set; } /// - /// 获得/设置 OnClick 事件不刷新父组件 - /// 为 true 时生效 + /// 获得/设置 OnClick 事件不刷新父组件 + /// 为 true 时生效 + /// Get/Set OnClick Event without render parent + /// Effective when is true + /// 10.2.2 /// [Parameter] public Func? OnClickWithoutRender { get; set; } /// - /// 获得/设置 是否为异步按钮,默认为 false 如果为 true 表示是异步按钮,点击按钮后禁用自身并且等待异步完成,过程中显示 loading 动画 - /// 为 true 时生效 + /// 获得/设置 是否为异步按钮,默认为 false 如果为 true 表示是异步按钮,点击按钮后禁用自身并且等待异步完成,过程中显示 loading 动画 + /// 为 true 时生效 + /// Get/Set Is Async Button. Default is false. If true, button is disabled and shows loading animation on click + /// Effective when is true + /// 10.2.2 /// [Parameter] public bool IsAsync { get; set; } /// - /// 获得/设置 是否异步结束后是否保持禁用状态,默认为 false + /// 获得/设置 是否异步结束后是否保持禁用状态,默认为 false + /// Get/Set Keep Disabled after async completion. Default is false + /// 10.2.2 /// /// 开启时有效 [Parameter] public bool IsKeepDisabled { get; set; } /// - /// 获得/设置 显示图标 + /// 获得/设置 显示图标 + /// Get/Set Icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 正在加载动画图标 默认为 fa-solid fa-spin fa-spinner + /// 获得/设置 正在加载动画图标 默认为 fa-solid fa-spin fa-spinner + /// Get/Set Loading Icon. Default is fa-solid fa-spin fa-spinner + /// 10.2.2 /// [Parameter] [NotNull] public string? LoadingIcon { get; set; } /// - /// 获得/设置 获取菜单对齐方式 默认 none 未设置 + /// 获得/设置 获取菜单对齐方式 默认 none 未设置 + /// Get/Set Menu Alignment. Default is none + /// 10.2.2 /// [Parameter] public Alignment MenuAlignment { get; set; } /// - /// 获得/设置 下拉选项方向 默认 Dropdown 向下 + /// 获得/设置 下拉选项方向 默认 Dropdown 向下 + /// Get/Set Dropdown Direction. Default is Dropdown (down) + /// 10.2.2 /// [Parameter] public Direction Direction { get; set; } /// - /// 获得/设置 组件尺寸 默认 none 未设置 + /// 获得/设置 组件尺寸 默认 none 未设置 + /// Get/Set Size. Default is none + /// 10.2.2 /// [Parameter] public Size Size { get; set; } /// - /// 获得/设置 是否固定按钮文字 更改下拉框选项时按钮文字保持不变 默认 false 不固定 + /// 获得/设置 是否固定按钮文字 更改下拉框选项时按钮文字保持不变 默认 false 不固定 + /// Get/Set Whether Fixed Button Text. Default is false + /// 10.2.2 /// [Parameter] public bool IsFixedButtonText { get; set; } /// - /// 获得/设置 下拉菜单中是否显示固定文字 默认 false 不显示 + /// 获得/设置 下拉菜单中是否显示固定文字 默认 false 不显示 + /// Get/Set Whether Show Fixed Button Text in Dropdown. Default is false + /// 10.2.2 /// [Parameter] public bool ShowFixedButtonTextInDropdown { get; set; } /// - /// 获得/设置 固定按钮显示文字 默认 null + /// 获得/设置 固定按钮显示文字 默认 null + /// Get/Set Fixed Button Text. Default is null + /// 10.2.2 /// [Parameter] public string? FixedButtonText { get; set; } /// - /// 获得/设置 Items 模板 默认 null + /// 获得/设置 Items 模板 默认 null + /// Get/Set Items Template. Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? ItemsTemplate { get; set; } /// - /// SelectedItemChanged 回调方法 + /// SelectedItemChanged 回调方法 + /// SelectedItemChanged Callback + /// 10.2.2 /// [Parameter] public Func? OnSelectedItemChanged { get; set; } /// - /// 获得 IconTheme 实例 + /// 获得 IconTheme 实例 + /// Get IconTheme Instance /// [Inject] [NotNull] @@ -196,23 +245,27 @@ public partial class Dropdown private List? DataSource { get; set; } /// - /// 当前选择项实例 + /// 当前选择项实例 + /// Current Selected Item Instance /// private SelectedItem? SelectedItem { get; set; } /// - /// 获得/设置 是否当前正在异步执行操作 + /// 获得/设置 是否当前正在异步执行操作 + /// Get/Set Is Async Loading /// private bool _isAsyncLoading; /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet Method /// protected override void OnParametersSet() { base.OnParametersSet(); // 合并 Items 与 Options 集合 + // Merge Items and Options collection Items ??= []; if (!Items.Any() && typeof(TValue).IsEnum()) @@ -235,7 +288,8 @@ private IEnumerable GetItems() => (IsFixedButtonText && !ShowFixed : Items; /// - /// 下拉框选项点击时调用此方法 + /// 下拉框选项点击时调用此方法 + /// Call this when item clicked /// protected async Task OnItemClick(SelectedItem item) { @@ -244,6 +298,7 @@ protected async Task OnItemClick(SelectedItem item) CurrentValueAsString = item.Value; // 触发 SelectedItemChanged 事件 + // Trigger SelectedItemChanged event if (OnSelectedItemChanged != null) { await OnSelectedItemChanged.Invoke(SelectedItem); @@ -265,6 +320,7 @@ private async Task OnClickButton() await HandlerClick(); // 恢复按钮 + // Restore button if (IsAsync) { IsDisabled = IsKeepDisabled; @@ -275,7 +331,8 @@ private async Task OnClickButton() /// - /// 处理点击方法 + /// 处理点击方法 + /// Handle Click Method /// /// private async Task HandlerClick() diff --git a/src/BootstrapBlazor/Components/Dropdown/DropdownItem.razor.cs b/src/BootstrapBlazor/Components/Dropdown/DropdownItem.razor.cs index 16024d32a84..bee7c6137a9 100644 --- a/src/BootstrapBlazor/Components/Dropdown/DropdownItem.razor.cs +++ b/src/BootstrapBlazor/Components/Dropdown/DropdownItem.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,42 +6,55 @@ namespace BootstrapBlazor.Components; /// -/// DropdownItem 组件 +/// DropdownItem 组件 +/// DropdownItem Component /// public partial class DropdownItem { /// - /// 获得/设置 显示文本 + /// 获得/设置 显示文本 + /// Get/Set Text + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 图标 + /// 获得/设置 图标 + /// Get/Set Icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 是否被禁用 默认 false 优先级低于 + /// 获得/设置 是否被禁用 默认 false 优先级低于 + /// Get/Set Disabled. Default is false. Priority lower than + /// 10.2.2 /// [Parameter] public bool Disabled { get; set; } /// - /// 获得/设置 是否被禁用回调方法 默认 null 优先级高于 + /// 获得/设置 是否被禁用回调方法 默认 null 优先级高于 + /// Get/Set Disabled Callback. Default is null. Priority higher than + /// 10.2.2 /// [Parameter] public Func? OnDisabledCallback { get; set; } /// - /// 获得/设置 点击回调方法 默认 null + /// 获得/设置 点击回调方法 默认 null + /// Get/Set Click Callback. Default is null + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } /// - /// 获得/设置 组件内容 + /// 获得/设置 组件内容 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/DropdownWidget/DropdownWidget.razor.cs b/src/BootstrapBlazor/Components/DropdownWidget/DropdownWidget.razor.cs index 4fbb64d3d24..f7fcc424ff8 100644 --- a/src/BootstrapBlazor/Components/DropdownWidget/DropdownWidget.razor.cs +++ b/src/BootstrapBlazor/Components/DropdownWidget/DropdownWidget.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// DropdownWidget 组件 +/// DropdownWidget 组件 +/// DropdownWidget Component /// public sealed partial class DropdownWidget { @@ -15,25 +16,33 @@ public sealed partial class DropdownWidget .Build(); /// - /// 获得/设置 选项模板支持静态数据 + /// 获得/设置 选项模板支持静态数据 + /// Get/Set Child Content (Static Data) + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 挂件数据集合 + /// 获得/设置 挂件数据集合 + /// Get/Set Widget Items + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// - /// 获得/设置 下拉项关闭回调方法 + /// 获得/设置 下拉项关闭回调方法 + /// Get/Set Item Close Callback + /// 10.2.2 /// [Parameter] public Func? OnItemCloseAsync { get; set; } /// - /// 获得/设置 下拉项关闭回调方法 + /// 获得/设置 下拉项显示回调方法 + /// Get/Set Item Shown Callback + /// 10.2.2 /// [Parameter] public Func? OnItemShownAsync { get; set; } @@ -47,7 +56,8 @@ public sealed partial class DropdownWidget protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, new { Method = nameof(TriggerStateChanged) }); /// - /// 添加 DropdownWidgetItem 方法 + /// 添加 DropdownWidgetItem 方法 + /// Add DropdownWidgetItem Method /// /// internal void Add(DropdownWidgetItem item) @@ -58,7 +68,8 @@ internal void Add(DropdownWidgetItem item) private IEnumerable GetItems() => Items == null ? Childs : Childs.Concat(Items); /// - /// Widget 下拉项关闭回调方法 由 JavaScript 调用 + /// Widget 下拉项关闭回调方法 由 JavaScript 调用 + /// Widget Item State Changed Callback. Called by JavaScript /// /// /// diff --git a/src/BootstrapBlazor/Components/DropdownWidget/DropdownWidgetItem.cs b/src/BootstrapBlazor/Components/DropdownWidget/DropdownWidgetItem.cs index 75271aa1e20..863bd28fe3e 100644 --- a/src/BootstrapBlazor/Components/DropdownWidget/DropdownWidgetItem.cs +++ b/src/BootstrapBlazor/Components/DropdownWidget/DropdownWidgetItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,72 +6,93 @@ namespace BootstrapBlazor.Components; /// -/// DropdownWidgetItem 组件 +/// DropdownWidgetItem 组件 +/// DropdownWidgetItem Component /// public class DropdownWidgetItem : BootstrapComponentBase { /// - /// 获得/设置 挂件图标 + /// 获得/设置 挂件图标 + /// Get/Set Widget Icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 DropdownWidgetItem 组件项目的悬浮提示信息 + /// 获得/设置 DropdownWidgetItem 组件项目的悬浮提示信息 + /// Get/Set Tooltip Title + /// 10.2.2 /// [Parameter] public string? Title { get; set; } /// - /// 获得/设置 徽章颜色 默认为 Color.Success + /// 获得/设置 徽章颜色 默认为 Color.Success + /// Get/Set Badge Color. Default is Color.Success + /// 10.2.2 /// [Parameter] public Color BadgeColor { get; set; } = Color.Success; /// - /// 获得/设置 Header 颜色 默认为 Color.Primary + /// 获得/设置 Header 颜色 默认为 Color.Primary + /// Get/Set Header Color. Default is Color.Primary + /// 10.2.2 /// [Parameter] public Color HeaderColor { get; set; } = Color.Primary; /// - /// 获得/设置 徽章显示数量 + /// 获得/设置 徽章显示数量 + /// Get/Set Badge Number + /// 10.2.2 /// [Parameter] public string? BadgeNumber { get; set; } /// - /// 获得/设置 是否显示小箭头 默认为 true 显示 + /// 获得/设置 是否显示小箭头 默认为 true 显示 + /// Get/Set Whether to Show Arrow. Default is true + /// 10.2.2 /// [Parameter] public bool ShowArrow { get; set; } = true; /// - /// 获得/设置 Header 模板 + /// 获得/设置 Header 模板 + /// Get/Set Header Template + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 Body 模板 + /// 获得/设置 Body 模板 + /// Get/Set Body Template + /// 10.2.2 /// [Parameter] public RenderFragment? BodyTemplate { get; set; } /// - /// 获得/设置 Footer 模板 + /// 获得/设置 Footer 模板 + /// Get/Set Footer Template + /// 10.2.2 /// [Parameter] public RenderFragment? FooterTemplate { get; set; } /// - /// 获得/设置 父组件通过级联参数获得 + /// 获得/设置 父组件通过级联参数获得 + /// Get/Set Parent Container /// [CascadingParameter] private DropdownWidget? Container { get; set; } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { diff --git a/src/BootstrapBlazor/Components/EditorForm/EditorForm.razor.cs b/src/BootstrapBlazor/Components/EditorForm/EditorForm.razor.cs index d898e958be5..b61885213c1 100644 --- a/src/BootstrapBlazor/Components/EditorForm/EditorForm.razor.cs +++ b/src/BootstrapBlazor/Components/EditorForm/EditorForm.razor.cs @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// 编辑表单基类 +/// 编辑表单基类 +/// Editor Form Base Component /// [CascadingTypeParameter(nameof(TModel))] public partial class EditorForm : IShowLabel, IDisposable @@ -19,7 +20,8 @@ public partial class EditorForm : IShowLabel, IDisposable .Build(); /// - /// 支持每行多少个控件功能 + /// 支持每行多少个控件功能 + /// Support items per row function /// /// /// @@ -32,8 +34,8 @@ public partial class EditorForm : IShowLabel, IDisposable mdCols = Math.Max(0, Math.Min(12, Math.Ceiling(12d / ItemsPerRow.Value))); } return CssBuilder.Default("col-12") - .AddClass($"col-sm-{cols}", cols > 0) // 指定 Cols - .AddClass($"col-sm-6 col-md-{mdCols}", mdCols > 0 && cols == 0 && item.Rows == 0 && !Utility.IsCheckboxList(item.PropertyType, item.ComponentType)) // 指定 ItemsPerRow + .AddClass($"col-sm-{cols}", cols > 0) // 指定 ColsSpecify Cols + .AddClass($"col-sm-6 col-md-{mdCols}", mdCols > 0 && cols == 0 && item.Rows == 0 && !Utility.IsCheckboxList(item.PropertyType, item.ComponentType)) // 指定 ItemsPerRowSpecify ItemsPerRow .Build(); } @@ -48,131 +50,170 @@ public partial class EditorForm : IShowLabel, IDisposable .Build(); /// - /// 获得/设置 每行显示组件数量 默认为 null + /// 获得/设置 每行显示组件数量 默认为 null + /// Get/Set Items Per Row. Default is null + /// 10.2.2 /// [Parameter] public int? ItemsPerRow { get; set; } /// - /// 获得/设置 实体类编辑模式 Add 还是 Update + /// 获得/设置 实体类编辑模式 Add 还是 Update + /// Get/Set Item Changed Type. Add or Update + /// 10.2.2 /// [Parameter] public ItemChangedType ItemChangedType { get; set; } /// - /// 获得/设置 设置行格式 默认 Row 布局 + /// 获得/设置 设置行格式 默认 Row 布局 + /// Get/Set Row Type. Default is Row + /// 10.2.2 /// [Parameter] public RowType RowType { get; set; } /// - /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// Get/Set Label Alignment in Inline mode. Default is None, equivalent to Left + /// 10.2.2 /// [Parameter] public Alignment LabelAlign { get; set; } /// - /// 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 + /// 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width + /// Get/Set Label Width. Default is null, use global setting --bb-row-label-width if not set + /// 10.2.2 /// [Parameter] public int? LabelWidth { get; set; } /// - /// 获得/设置 列模板 设置 时本参数不生效 + /// 获得/设置 列模板 设置 时本参数不生效 + /// Get/Set Field Items Template. Not effective when is set + /// 10.2.2 /// [Parameter] public RenderFragment? FieldItems { get; set; } /// - /// 获得/设置 按钮模板 + /// 获得/设置 按钮模板 + /// Get/Set Buttons Template + /// 10.2.2 /// [Parameter] public RenderFragment? Buttons { get; set; } /// - /// 获得/设置 绑定模型 + /// 获得/设置 绑定模型 + /// Get/Set Model + /// 10.2.2 /// [Parameter] [NotNull] public TModel? Model { get; set; } /// - /// 获得/设置 是否显示前置标签 默认为 null 未设置时默认显示标签 + /// 获得/设置 是否显示前置标签 默认为 null 未设置时默认显示标签 + /// Get/Set Whether to Show Label. Default is null, show label if not set + /// 10.2.2 /// [Parameter] public bool? ShowLabel { get; set; } /// - /// 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null + /// 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null + /// Get/Set Whether to Show Label Tooltip. Default is null + /// 10.2.2 /// [Parameter] public bool? ShowLabelTooltip { get; set; } /// - /// 获得/设置 是否显示为 Display 组件 默认为 false + /// 获得/设置 是否显示为 Display 组件 默认为 false + /// Get/Set Whether to Show as Display Component. Default is false + /// 10.2.2 /// [Parameter] public bool IsDisplay { get; set; } /// - /// 获得/设置 是否显示 Display 组件的 Tooltip 默认为 false + /// 获得/设置 是否显示 Display 组件的 Tooltip 默认为 false + /// Get/Set Whether to Show Display Component Tooltip. Default is false + /// 10.2.2 /// [Parameter] public bool IsShowDisplayTooltip { get; set; } /// - /// 获得/设置 是否使用 SearchTemplate 默认 false 使用 EditTemplate 模板 + /// 获得/设置 是否使用 SearchTemplate 默认 false 使用 EditTemplate 模板 + /// Get/Set Whether to use SearchTemplate. Default is false, use EditTemplate /// - /// 多用于表格组件传递 集合给参数 + /// 多用于表格组件传递 集合给参数 时; Mostly used when passing collection to parameter in Table component [CascadingParameter(Name = "IsSearch")] [NotNull] private bool? IsSearch { get; set; } /// - /// 获得/设置 是否自动生成模型的所有属性 默认为 true 生成所有属性 + /// 获得/设置 是否自动生成模型的所有属性 默认为 true 生成所有属性 + /// Get/Set Whether to Auto Generate All Items. Default is true + /// 10.2.2 /// [Parameter] public bool AutoGenerateAllItem { get; set; } = true; /// - /// 获得/设置 级联上下文绑定字段信息集合 设置此参数后 模板不生效 + /// 获得/设置 级联上下文绑定字段信息集合 设置此参数后 模板不生效 + /// Get/Set Context Field Items Collection. template will not be effective if set + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// - /// 获得/设置 自定义列排序规则 默认 null 未设置 使用内部排序机制 1 2 3 0 -3 -2 -1 顺序 + /// 获得/设置 自定义列排序规则 默认 null 未设置 使用内部排序机制 1 2 3 0 -3 -2 -1 顺序 + /// Get/Set Custom Column Sort Rule. Default is null, use internal sort mechanism + /// 10.2.2 /// [Parameter] public Func, IEnumerable>? ColumnOrderCallback { get; set; } /// - /// 获得/设置 未设置 GroupName 编辑项是否放置在顶部 默认 false + /// 获得/设置 未设置 GroupName 编辑项是否放置在顶部 默认 false + /// Get/Set Whether to show unset GroupName items on top. Default is false + /// 10.2.2 /// [Parameter] public bool ShowUnsetGroupItemsOnTop { get; set; } /// - /// 获得/设置 默认占位符文本 默认 null + /// 获得/设置 默认占位符文本 默认 null + /// Get/Set Default Placeholder Text. Default is null + /// 10.2.2 /// [Parameter] [NotNull] public string? PlaceHolderText { get; set; } /// - /// 获得/设置 当值变化时是否重新渲染组件 默认 false + /// 获得/设置 当值变化时是否重新渲染组件 默认 false + /// Get/Set Whether to Re-render Component when Value Changed. Default is false + /// 10.2.2 /// [Parameter] public bool IsRenderWhenValueChanged { get; set; } /// - /// 获得/设置 级联上下文 EditContext 实例 内置于 EditForm 或者 ValidateForm 时有值 + /// 获得/设置 级联上下文 EditContext 实例 内置于 EditForm 或者 ValidateForm 时有值 + /// Get/Set Cascading EditContext Instance. Available when inside EditForm or ValidateForm /// [CascadingParameter] private EditContext? CascadedEditContext { get; set; } /// - /// 获得 ValidateForm 实例 + /// 获得 ValidateForm 实例 + /// Get ValidateForm Instance /// [CascadingParameter] private ValidateForm? ValidateForm { get; set; } @@ -186,7 +227,8 @@ public partial class EditorForm : IShowLabel, IDisposable private ILookupService? LookupService { get; set; } /// - /// 获得/设置 配置编辑项目集合 + /// 获得/设置 配置编辑项目集合 + /// Get/Set Editor Items Cache /// private readonly List _editorItems = []; @@ -209,7 +251,8 @@ private List RenderItems } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { @@ -232,6 +275,7 @@ protected override void OnInitialized() } // 统一设置所有 IEditorItem 的 PlaceHolder + // Set PlaceHolder for all IEditorItem PlaceHolderText ??= Localizer[nameof(PlaceHolderText)]; IsSearch ??= false; } @@ -244,6 +288,7 @@ protected override void OnParametersSet() base.OnParametersSet(); // 为空时使用级联参数 ValidateForm 的 ShowLabel + // Use cascading parameter ValidateForm's ShowLabel when null ShowLabel ??= ValidateForm?.ShowLabel; _itemsCache = null; } @@ -258,18 +303,22 @@ private List GetRenderItems() else { // 如果 EditorItems 有值表示 用户自定义列 + // If EditorItems has value, it means user defined columns if (AutoGenerateAllItem) { // 获取绑定模型所有属性 + // Get all properties of binding model var columns = Utility.GetTableColumns(defaultOrderCallback: ColumnOrderCallback).ToList(); // 通过设定的 FieldItems 模板获取项进行渲染 + // Render items by setting FieldItems template foreach (var el in _editorItems) { var item = columns.FirstOrDefault(i => i.GetFieldName() == el.GetFieldName()); if (item != null) { // 过滤掉不编辑与不可见的列 + // Filter out non-editable and invisible columns if (el.GetIgnore() || !el.IsVisible(ItemChangedType, IsSearch.Value) || string.IsNullOrEmpty(el.GetFieldName())) { columns.Remove(item); @@ -277,6 +326,7 @@ private List GetRenderItems() else { // 设置只读属性与列模板 + // Set Readonly property and column template item.CopyValue(el); } } @@ -313,6 +363,7 @@ private RenderFragment AutoGenerateTemplate(IEditorItem item) => builder => private void NotifyValueChanged(object? sender, FieldChangedEventArgs args) { // perf: 判断是否在编辑状态避免不必要的重绘 + // perf: Check if in edit state to avoid unnecessary redraw if (IsRenderWhenValueChanged) { StateHasChanged(); diff --git a/src/BootstrapBlazor/Components/EditorForm/EditorItem.cs b/src/BootstrapBlazor/Components/EditorForm/EditorItem.cs index fa0a5fee55e..e034536c661 100644 --- a/src/BootstrapBlazor/Components/EditorForm/EditorItem.cs +++ b/src/BootstrapBlazor/Components/EditorForm/EditorItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,18 +9,23 @@ namespace BootstrapBlazor.Components; /// -/// EditorItem component +/// EditorItem component +/// EditorItem component /// public class EditorItem : ComponentBase, IEditorItem { /// - /// 获得/设置 绑定字段值 + /// 获得/设置 绑定字段值 + /// Get/Set Field Value + /// 10.2.2 /// [Parameter] public TValue? Field { get; set; } /// - /// 获得/设置 绑定字段值变化回调委托 + /// 获得/设置 绑定字段值变化回调委托 + /// Get/Set Field Value Changed Callback + /// 10.2.2 /// [Parameter] public EventCallback FieldChanged { get; set; } @@ -32,13 +37,16 @@ public class EditorItem : ComponentBase, IEditorItem public Type? PropertyType { get; set; } /// - /// 获得/设置 ValueExpression 表达式 + /// 获得/设置 ValueExpression 表达式 + /// Get/Set ValueExpression + /// 10.2.2 /// [Parameter] public Expression>? FieldExpression { get; set; } /// /// + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,是否可编辑改用 Readonly 参数,是否可见改用 Ignore 参数; Deprecated If it is editable, use the Readonly parameter. If it is visible, use the Ignore parameter.")] @@ -46,67 +54,78 @@ public class EditorItem : ComponentBase, IEditorItem public bool Editable { get; set; } = true; /// - /// > + /// + /// 10.2.2 /// [Parameter] public bool? Ignore { get; set; } /// - /// > + /// + /// 10.2.2 /// [Parameter] public bool? Readonly { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? Required { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? RequiredErrorMessage { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool SkipValidate { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? ShowLabelTooltip { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? Step { get; set; } /// /// + /// 10.2.2 /// [Parameter] public int Rows { get; set; } /// /// + /// 10.2.2 /// [Parameter] public int Cols { get; set; } /// /// + /// 10.2.2 /// [Parameter] public RenderFragment? EditTemplate { get; set; } @@ -127,48 +146,56 @@ public class EditorItem : ComponentBase, IEditorItem /// /// + /// 10.2.2 /// [Parameter] public Type? ComponentType { get; set; } /// /// + /// 10.2.2 /// [Parameter] public IEnumerable>? ComponentParameters { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? PlaceHolder { get; set; } /// /// + /// 10.2.2 /// [Parameter] public int Order { get; set; } /// /// + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// /// + /// 10.2.2 /// [Parameter] public IEnumerable? Lookup { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool ShowSearchWhenSelect { get; set; } /// /// + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请删除;Deprecated, please delete")] @@ -177,36 +204,42 @@ public class EditorItem : ComponentBase, IEditorItem /// /// + /// 10.2.2 /// [Parameter] public bool IsPopover { get; set; } /// /// + /// 10.2.2 /// [Parameter] public StringComparison LookupStringComparison { get; set; } = StringComparison.OrdinalIgnoreCase; /// - /// > + /// + /// 10.2.2 /// [Parameter] public string? LookupServiceKey { get; set; } /// - /// > + /// + /// 10.2.2 /// [Parameter] public object? LookupServiceData { get; set; } /// /// + /// 10.2.2 /// [Parameter] public ILookupService? LookupService { get; set; } /// /// + /// 10.2.2 /// [Parameter] public List? ValidateRules { get; set; } @@ -216,12 +249,14 @@ public class EditorItem : ComponentBase, IEditorItem /// /// + /// 10.2.2 /// [Parameter] public string? GroupName { get; set; } /// /// + /// 10.2.2 /// [Parameter] public int GroupOrder { get; set; } @@ -240,18 +275,21 @@ protected override void OnInitialized() } // 获取模型属性定义类型 + // Get model property definition type PropertyType = typeof(TValue); } private FieldIdentifier? _fieldIdentifier; /// - /// Gets the display name for the field. + /// 获得 the 显示 name for the field. + /// Gets the display name for the field. /// public virtual string GetDisplayName() => Text ?? _fieldIdentifier?.GetDisplayName() ?? string.Empty; /// - /// Gets the field name for the field. + /// 获得 the field name for the field. + /// Gets the field name for the field. /// public string GetFieldName() => _fieldIdentifier?.FieldName ?? string.Empty; } diff --git a/src/BootstrapBlazor/Components/EditorForm/IEditorItem.cs b/src/BootstrapBlazor/Components/EditorForm/IEditorItem.cs index c7273baa78a..68806cf44a1 100644 --- a/src/BootstrapBlazor/Components/EditorForm/IEditorItem.cs +++ b/src/BootstrapBlazor/Components/EditorForm/IEditorItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,140 +6,167 @@ namespace BootstrapBlazor.Components; /// -/// IEditorItem interface +/// IEditorItem interface +/// IEditorItem interface /// public interface IEditorItem : ILookup { /// - /// Gets or sets the type of the bound column. + /// 获得/设置 the 类型 of the bound column. + /// Gets or sets the type of the bound column. /// Type PropertyType { get; } /// - /// Gets or sets whether the current edit item is editable. Default is true. + /// 获得/设置 是否 the current edit item is editable. 默认为 true. + /// Gets or sets whether the current edit item is editable. Default is true. /// [Obsolete("Deprecated. Use the Visible parameter. IsVisibleWhenAdd should be used when creating a new one, and IsVisibleWhenEdit should be used when editing. Use the Readonly parameter for read-only. IsReadonlyWhenAdd should be used when creating a new one, and IsReadonlyWhenEdit should be used when editing.")] bool Editable { get; set; } /// - /// Gets or sets whether the current edit item is read-only. Default is false. + /// 获得/设置 是否 the current edit item is read-only. 默认为 false. + /// Gets or sets whether the current edit item is read-only. Default is false. /// bool? Readonly { get; set; } /// - /// Gets or sets whether the current edit item is ignored. Default is false. When set to true, the UI will not generate this column. + /// 获得/设置 是否 the current edit item is ignored. 默认为 false. When set to true, the UI will not generate this column. + /// Gets or sets whether the current edit item is ignored. Default is false. When set to true, the UI will not generate this column. /// bool? Ignore { get; set; } /// - /// Gets or sets whether to skip validation. Default is false. + /// 获得/设置 是否 to skip validation. 默认为 false. + /// Gets or sets whether to skip validation. Default is false. /// bool SkipValidate { get; set; } /// - /// Gets or sets the header display text. + /// 获得/设置 the header 显示 text. + /// Gets or sets the header display text. /// string? Text { get; set; } /// - /// Gets or sets whether to show label tooltip. Mostly used when the label text is too long and gets truncated. Default is null. + /// 获得/设置 是否 to show label tooltip. Mostly used when the label text is too long and gets truncated. 默认为 null. + /// Gets or sets whether to show label tooltip. Mostly used when the label text is too long and gets truncated. Default is null. /// bool? ShowLabelTooltip { get; set; } /// - /// Gets or sets the placeholder text. Default is null. + /// 获得/设置 the placeholder text. 默认为 null. + /// Gets or sets the placeholder text. Default is null. /// string? PlaceHolder { get; set; } /// - /// Gets or sets the additional data source, generally used for components like Select or CheckboxList that require additional configuration. + /// 获得/设置 the additional 数据 source, generally used for components like Select or CheckboxList that require additional configuration. + /// Gets or sets the additional data source, generally used for components like Select or CheckboxList that require additional configuration. /// IEnumerable? Items { get; set; } /// - /// Gets or sets the step. Default is null. When set to "any", validation is ignored. + /// 获得/设置 the step. 默认为 null. When set to "any", validation is ignored. + /// Gets or sets the step. Default is null. When set to "any", validation is ignored. /// string? Step { get; set; } /// - /// Gets or sets the number of rows for a Textarea. Default is 0. + /// 获得/设置 the number of rows for a Textarea. 默认为 0. + /// Gets or sets the number of rows for a Textarea. Default is 0. /// int Rows { get; set; } /// - /// Gets or sets the field expand columns. Default is 0. + /// 获得/设置 the field expand columns. 默认为 0. + /// Gets or sets the field expand columns. Default is 0. /// int Cols { get; set; } /// - /// Gets or sets the edit template. + /// 获得/设置 the edit 模板. + /// Gets or sets the edit template. /// RenderFragment? EditTemplate { get; set; } /// - /// Gets or sets the component type. Default is null. + /// 获得/设置 the component 类型. 默认为 null. + /// Gets or sets the component type. Default is null. /// Type? ComponentType { get; set; } /// - /// Gets or sets the custom component parameters. Default is null. + /// 获得/设置 the custom component parameters. 默认为 null. + /// Gets or sets the custom component parameters. Default is null. /// IEnumerable>? ComponentParameters { get; set; } /// - /// Gets or sets whether to show the search bar in the dropdown list. Default is false. + /// 获得/设置 是否 to show the search bar in the dropdown list. 默认为 false. + /// Gets or sets whether to show the search bar in the dropdown list. Default is false. /// bool ShowSearchWhenSelect { get; set; } /// - /// Gets or sets whether to allow fixed search box within dropdown. Default is false. + /// 获得/设置 是否 to allow fixed search box within dropdown. 默认为 false. + /// Gets or sets whether to allow fixed search box within dropdown. Default is false. /// [Obsolete("已弃用,请删除;Deprecated, please delete")] [ExcludeFromCodeCoverage] bool IsFixedSearchWhenSelect { get; set; } /// - /// Gets or sets whether to use Popover to render the dropdown list. Default is false. + /// 获得/设置 是否 to use Popover to render the dropdown list. 默认为 false. + /// Gets or sets whether to use Popover to render the dropdown list. Default is false. /// bool IsPopover { get; set; } /// - /// Gets or sets the custom validation rules. + /// 获得/设置 the custom validation rules. + /// Gets or sets the custom validation rules. /// List? ValidateRules { get; set; } /// - /// Gets the display name of the bound field. + /// 获得 the 显示 name of the bound field. + /// Gets the display name of the bound field. /// string GetDisplayName(); /// - /// Gets the field information of the bound field. + /// 获得 the field information of the bound field. + /// Gets the field information of the bound field. /// string GetFieldName(); /// - /// Gets or sets the order number. + /// 获得/设置 the order number. + /// Gets or sets the order number. /// int Order { get; set; } /// - /// Gets or sets the group name of the current property. + /// 获得/设置 the group name of the current 属性. + /// Gets or sets the group name of the current property. /// string? GroupName { get; set; } /// - /// Gets or sets the group order of the current property. Default is 0. + /// 获得/设置 the group order of the current 属性. 默认为 0. + /// Gets or sets the group order of the current property. Default is 0. /// int GroupOrder { get; set; } /// - /// Gets or sets whether the field is required. Default is null. + /// 获得/设置 是否 the field is required. 默认为 null. + /// Gets or sets whether the field is required. Default is null. /// bool? Required { get; set; } /// - /// Gets or sets the error message when the required field is missing. Default is null. + /// 获得/设置 the error message when the required field is missing. 默认为 null. + /// Gets or sets the error message when the required field is missing. Default is null. /// string? RequiredErrorMessage { get; set; } } diff --git a/src/BootstrapBlazor/Components/EditorForm/IShowLabel.cs b/src/BootstrapBlazor/Components/EditorForm/IShowLabel.cs index d52461451ff..1eb3967aeaa 100644 --- a/src/BootstrapBlazor/Components/EditorForm/IShowLabel.cs +++ b/src/BootstrapBlazor/Components/EditorForm/IShowLabel.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// ShowLabel 接口 +/// ShowLabel 接口 +/// IShowLabel Interface /// public interface IShowLabel { /// - /// 获得/设置 是否显示标签 默认 null + /// 获得/设置 是否显示标签 默认 null + /// Get/Set Whether to Show Label. Default is null /// bool? ShowLabel { get; set; } /// - /// 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null + /// 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null + /// Get/Set Whether to Show Label Tooltip. Default is null /// bool? ShowLabelTooltip { get; set; } } diff --git a/src/BootstrapBlazor/Components/Empty/Empty.razor.cs b/src/BootstrapBlazor/Components/Empty/Empty.razor.cs index b5dcf89f7ce..0a645ced4b6 100644 --- a/src/BootstrapBlazor/Components/Empty/Empty.razor.cs +++ b/src/BootstrapBlazor/Components/Empty/Empty.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// +/// Empty 组件 +/// Empty Component /// public partial class Empty { @@ -17,25 +18,33 @@ public partial class Empty .Build(); /// - /// 获得/设置 图片路径 默认为 null + /// 获得/设置 图片路径 默认为 null + /// Get/Set Image Source. Default is null + /// 10.2.2 /// [Parameter] public string? Image { get; set; } /// - /// 获得/设置 空状态描述 默认为 无数据 + /// 获得/设置 空状态描述 默认为 无数据 + /// Get/Set Description. Default is No Data + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 自定义模板 + /// 获得/设置 自定义模板 + /// Get/Set Custom Template + /// 10.2.2 /// [Parameter] public RenderFragment? Template { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/ErrorLogger/BootstrapBlazorErrorBoundary.cs b/src/BootstrapBlazor/Components/ErrorLogger/BootstrapBlazorErrorBoundary.cs index 767b7ad7803..5a2f77d1d23 100644 --- a/src/BootstrapBlazor/Components/ErrorLogger/BootstrapBlazorErrorBoundary.cs +++ b/src/BootstrapBlazor/Components/ErrorLogger/BootstrapBlazorErrorBoundary.cs @@ -11,7 +11,8 @@ namespace BootstrapBlazor.Components; /// -/// 内部使用 自定义异常组件 +/// 内部使用 自定义异常组件 +/// Internal Use Custom Exception Component /// class BootstrapBlazorErrorBoundary : ErrorBoundaryBase { @@ -32,25 +33,33 @@ class BootstrapBlazorErrorBoundary : ErrorBoundaryBase private NavigationManager? NavigationManager { get; set; } /// - /// 获得/设置 自定义错误处理回调方法 + /// 获得/设置 自定义错误处理回调方法 + /// Get/Set Custom Error Handler + /// 10.2.2 /// [Parameter] public Func? OnErrorHandleAsync { get; set; } /// - /// 获得/设置 是否启用日志记录功能 默认 true 启用 + /// 获得/设置 是否启用日志记录功能 默认 true 启用 + /// Get/Set Whether to Enable Logging Default true + /// 10.2.2 /// [Parameter] public bool EnableILogger { get; set; } = true; /// - /// 获得/设置 是否显示弹窗 默认 true 显示 + /// 获得/设置 是否显示弹窗 默认 true 显示 + /// Get/Set Whether to Show Toast Default true + /// 10.2.2 /// [Parameter] public bool ShowToast { get; set; } = true; /// - /// 获得/设置 Toast 弹窗标题 + /// 获得/设置 Toast 弹窗标题 + /// Get/Set Toast Title + /// 10.2.2 /// [Parameter] [NotNull] @@ -79,6 +88,7 @@ protected override Task OnErrorAsync(Exception exception) protected override void BuildRenderTree(RenderTreeBuilder builder) { // 页面生命周期内异常直接调用这里 + // Exceptions in page lifecycle call here directly var pageException = false; var ex = CurrentException ?? _exception; if (ex != null) @@ -86,17 +96,21 @@ protected override void BuildRenderTree(RenderTreeBuilder builder) pageException = IsPageException(ex); // 重置 CurrentException + // Reset CurrentException ResetException(); // 渲染异常 + // Render Exception var handler = GetLastOrDefaultHandler(); _ = RenderException(ex, handler); } // 判断是否为组件周期内异常 + // Determine if it is a component lifecycle exception if (!pageException) { // 渲染正常内容 + // Render Normal Content builder.AddContent(1, ChildContent); } } @@ -157,16 +171,19 @@ private MarkupString GetErrorContentMarkupString(Exception ex) } /// - /// BootstrapBlazor 组件导致异常渲染方法 + /// BootstrapBlazor 组件导致异常渲染方法 + /// BootstrapBlazor Component Exception Render Method /// /// /// public async Task RenderException(Exception exception, IHandlerException? handler) { // 记录日志 + // Log Error await OnErrorAsync(exception); // 外部调用 + // External Call if (OnErrorHandleAsync != null) { await OnErrorHandleAsync(Logger, exception); @@ -175,11 +192,13 @@ public async Task RenderException(Exception exception, IHandlerException? handle if (handler != null) { // IHandlerException 处理异常逻辑 + // IHandlerException Handle Exception Logic await handler.HandlerExceptionAsync(exception, ExceptionContent); } else { // 显示异常信息 + // Show Exception Info await ShowErrorToast(exception); } } diff --git a/src/BootstrapBlazor/Components/ErrorLogger/ErrorLogger.cs b/src/BootstrapBlazor/Components/ErrorLogger/ErrorLogger.cs index d162f5bfa02..c1fe911226a 100644 --- a/src/BootstrapBlazor/Components/ErrorLogger/ErrorLogger.cs +++ b/src/BootstrapBlazor/Components/ErrorLogger/ErrorLogger.cs @@ -10,7 +10,8 @@ namespace BootstrapBlazor.Components; /// -/// ErrorLogger 全局异常组件 +/// ErrorLogger 全局异常组件 +/// ErrorLogger Global Exception Component /// public class ErrorLogger : ComponentBase, IErrorLogger { @@ -20,50 +21,65 @@ public class ErrorLogger : ComponentBase, IErrorLogger /// /// + /// 10.2.2 /// [Parameter] public bool EnableErrorLogger { get; set; } = true; /// /// + /// 10.2.2 /// [Parameter] public bool EnableILogger { get; set; } = true; /// /// + /// 10.2.2 /// [Parameter] public bool ShowToast { get; set; } = true; /// /// + /// 10.2.2 /// [Parameter] [NotNull] public string? ToastTitle { get; set; } /// - /// 获得/设置 自定义错误处理回调方法 + /// 获得/设置 自定义错误处理回调方法 + /// Get/Set Custom Error Handler + /// 10.2.2 /// [Parameter] public Func? OnErrorHandleAsync { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 异常显示模板 默认 null + /// 获得/设置 异常显示模板 默认 null + /// Get/Set Exception Display Template Default null + /// 10.2.2 /// - /// 用于自定义异常显示 UI + /// + /// 用于自定义异常显示 UI + /// Used to customize exception display UI + /// [Parameter] public RenderFragment? ErrorContent { get; set; } /// - /// Gets or sets the callback function to be invoked during initialization. + /// 获得/设置 the 回调 function to be invoked during initialization. + /// Gets or sets the callback function to be invoked during initialization. + /// 10.2.2 /// [Parameter] public Func? OnInitializedCallback { get; set; } @@ -129,7 +145,8 @@ protected override void BuildRenderTree(RenderTreeBuilder builder) }; /// - /// 由实现 组件实现类调用 + /// 由实现 组件实现类调用 + /// Called by implementing component implementation class /// /// /// diff --git a/src/BootstrapBlazor/Components/ErrorLogger/IErrorLogger.cs b/src/BootstrapBlazor/Components/ErrorLogger/IErrorLogger.cs index 0fe63bf1ed6..fc1737fad90 100644 --- a/src/BootstrapBlazor/Components/ErrorLogger/IErrorLogger.cs +++ b/src/BootstrapBlazor/Components/ErrorLogger/IErrorLogger.cs @@ -6,45 +6,54 @@ namespace BootstrapBlazor.Components; /// -/// IErrorLogger 接口 +/// IErrorLogger 接口 +/// IErrorLogger Interface /// public interface IErrorLogger { /// - /// 获得/设置 是否开启全局异常捕获 默认 true + /// 获得/设置 是否开启全局异常捕获 默认 true + /// Get/Set Whether to Enable Global Exception Capture Default true /// bool EnableErrorLogger { get; set; } /// - /// 获得/设置 是否启用日志记录功能 默认 true 启用 - /// 设置 false 后关闭记录日志功能 + /// 获得/设置 是否启用日志记录功能 默认 true 启用 + /// Get/Set Whether to Enable Logging Default true + /// 设置 false 后关闭记录日志功能 + /// Set false to disable logging /// bool EnableILogger { get; } /// - /// 获得 是否显示 Error 提示弹窗 默认 true + /// 获得 是否显示 Error 提示弹窗 默认 true + /// Get Whether to Show Error Toast Default true /// bool ShowToast { get; } /// - /// 获得 Error Toast 弹窗标题 默认读取资源文件内容 + /// 获得 Error Toast 弹窗标题 默认读取资源文件内容 + /// Get Error Toast Title Default Read Resource File /// string? ToastTitle { get; } /// - /// 获得/设置 自定义 Error 处理方法 默认 null + /// 获得/设置 自定义 Error 处理方法 默认 null + /// Get/Set Custom Error Handler Default null /// /// Task HandlerExceptionAsync(Exception ex); /// - /// 注册方法 + /// 注册方法 + /// Register Method /// /// void Register(IHandlerException component); /// - /// 注销方法 + /// 注销方法 + /// Unregister Method /// /// void UnRegister(IHandlerException component); diff --git a/src/BootstrapBlazor/Components/ErrorLogger/IHandlerException.cs b/src/BootstrapBlazor/Components/ErrorLogger/IHandlerException.cs index a7fd73d7bce..c71a8da5fe6 100644 --- a/src/BootstrapBlazor/Components/ErrorLogger/IHandlerException.cs +++ b/src/BootstrapBlazor/Components/ErrorLogger/IHandlerException.cs @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// IHandlerException 接口 +/// IHandlerException 接口 +/// IHandlerException Interface /// public interface IHandlerException { /// - /// 处理异常方法 + /// 处理异常方法 + /// Handle Exception Method /// /// /// diff --git a/src/BootstrapBlazor/Components/FileIcon/FileIcon.razor.cs b/src/BootstrapBlazor/Components/FileIcon/FileIcon.razor.cs index 60528d51f8d..481f7764d02 100644 --- a/src/BootstrapBlazor/Components/FileIcon/FileIcon.razor.cs +++ b/src/BootstrapBlazor/Components/FileIcon/FileIcon.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Icon 图标组件 +/// Icon 图标组件 +/// File Icon Component /// public partial class FileIcon { @@ -20,26 +21,34 @@ public partial class FileIcon .Build(); /// - /// 获得/设置 文件类型扩展名 + /// 获得/设置 文件类型扩展名 + /// Get/Set File Extension + /// 10.2.2 /// [Parameter] [EditorRequired] public string? Extension { get; set; } /// - /// 获得/设置 背景图模板 默认 null 使用内部内置的空文件 svg 图 + /// 获得/设置 背景图模板 默认 null 使用内部内置的空文件 svg 图 + /// Get/Set Background Template Default null Use Internal Built-in Empty File SVG + /// 10.2.2 /// [Parameter] public RenderFragment? BackgroundTemplate { get; set; } /// - /// 获得/设置 图标类型背景色 默认 Color.Primary + /// 获得/设置 图标类型背景色 默认 Color.Primary + /// Get/Set Icon Background Color Default Color.Primary + /// 10.2.2 /// [Parameter] public Color IconColor { get; set; } = Color.Primary; /// - /// 获得/设置 图标大小 默认 Color.None + /// 获得/设置 图标大小 默认 Color.None + /// Get/Set Icon Size Default Size.None + /// 10.2.2 /// [Parameter] public Size Size { get; set; } diff --git a/src/BootstrapBlazor/Components/Filters/BoolFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/BoolFilter.razor.cs index 4e97b7b7076..d93f9b7394f 100644 --- a/src/BootstrapBlazor/Components/Filters/BoolFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/BoolFilter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// BoolFilter component is used for boolean value filtering in table column. +/// BoolFilter component is used for boolean value filtering in table column. +/// BoolFilter component is used for boolean value filtering in table column. /// public partial class BoolFilter { /// - /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 获得/设置 the filter candidate items. It is recommended to use static 数据 to avoid performance loss. + /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } @@ -19,7 +22,8 @@ public partial class BoolFilter private string _value = ""; /// - /// + /// + /// /// protected override void OnParametersSet() { @@ -34,7 +38,8 @@ protected override void OnParametersSet() } /// - /// + /// + /// /// public override void Reset() { @@ -43,7 +48,8 @@ public override void Reset() } /// - /// + /// + /// /// /// public override FilterKeyValueAction GetFilterConditions() @@ -62,7 +68,8 @@ public override FilterKeyValueAction GetFilterConditions() } /// - /// + /// + /// /// public override async Task SetFilterConditionsAsync(FilterKeyValueAction filter) { diff --git a/src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs index 16d58521418..0fa375385d0 100644 --- a/src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// DateTime filter component +/// DateTime filter component +/// DateTime filter component /// public partial class DateTimeFilter { @@ -20,13 +21,16 @@ public partial class DateTimeFilter .Build(); /// - /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 获得/设置 the filter candidate items. It is recommended to use static 数据 to avoid performance loss. + /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// - /// + /// + /// /// protected override void OnParametersSet() { @@ -44,7 +48,8 @@ protected override void OnParametersSet() } /// - /// + /// + /// /// public override void Reset() { @@ -58,7 +63,8 @@ public override void Reset() } /// - /// + /// + /// /// /// public override FilterKeyValueAction GetFilterConditions() @@ -88,7 +94,8 @@ public override FilterKeyValueAction GetFilterConditions() } /// - /// + /// + /// /// public override async Task SetFilterConditionsAsync(FilterKeyValueAction filter) { diff --git a/src/BootstrapBlazor/Components/Filters/EnumFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/EnumFilter.razor.cs index 0323e86a8f6..248104d6832 100644 --- a/src/BootstrapBlazor/Components/Filters/EnumFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/EnumFilter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,25 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// Enum filter component +/// Enum filter component +/// Enum filter component /// public partial class EnumFilter { /// - /// 内部使用 + /// 内部使用 + /// Internal use /// [NotNull] private Type? EnumType { get; set; } /// - /// 获得/设置 相关枚举类型 + /// 获得/设置 相关枚举类型 + /// Get/Set Related Enum Type + /// 10.2.2 /// [Parameter] [NotNull] public Type? Type { get; set; } /// - /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 获得/设置 the filter candidate items. It is recommended to use static 数据 to avoid performance loss. + /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } diff --git a/src/BootstrapBlazor/Components/Filters/FilterBase.cs b/src/BootstrapBlazor/Components/Filters/FilterBase.cs index 0a9ee142801..4254714298e 100644 --- a/src/BootstrapBlazor/Components/Filters/FilterBase.cs +++ b/src/BootstrapBlazor/Components/Filters/FilterBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,50 +8,61 @@ namespace BootstrapBlazor.Components; /// -/// 过滤器基类 +/// 过滤器基类 +/// Filter Base Class /// public abstract class FilterBase : BootstrapModuleComponentBase, IFilterAction { /// - /// 获得/设置 实例 + /// 获得/设置 实例 + /// Get/Set Instance /// [Inject] [NotNull] protected IStringLocalizer? Localizer { get; set; } /// - /// 获得/设置 相关 Field 字段名称 + /// 获得/设置 相关 Field 字段名称 + /// Get/Set Related Field Name + /// 10.2.2 /// [Parameter] [NotNull] public string? FieldKey { get; set; } /// - /// 获得/设置 是否为 HeaderRow 模式 默认 false + /// 获得/设置 是否为 HeaderRow 模式 默认 false + /// Get/Set Whether is HeaderRow Mode Default false + /// 10.2.2 /// [Parameter] public bool IsHeaderRow { get; set; } /// - /// 获得/设置 条件数量 + /// 获得/设置 条件数量 + /// Get/Set Condition Count + /// 10.2.2 /// [Parameter] public int Count { get; set; } /// - /// 获得/设置 所属 TableFilter 实例 + /// 获得/设置 所属 TableFilter 实例 + /// Get/Set Belonging TableFilter Instance /// [CascadingParameter, NotNull] protected TableColumnFilter? TableColumnFilter { get; set; } /// - /// Gets or sets the instance from cascading parameter. + /// 获得/设置 the 实例 from cascading parameter. + /// Gets or sets the instance from cascading parameter. /// [CascadingParameter] protected FilterContext? FilterContext { get; set; } /// - /// 获得/设置 多个条件逻辑关系符号 + /// 获得/设置 多个条件逻辑关系符号 + /// Get/Set Logical Operator for Multiple Conditions /// protected FilterLogic Logic { get; set; } @@ -84,7 +95,8 @@ protected override void OnParametersSet() } /// - /// 重置按钮回调方法 + /// 重置按钮回调方法 + /// Reset Button Callback Method /// /// protected virtual async Task OnClearFilter() @@ -98,7 +110,8 @@ protected virtual async Task OnClearFilter() } /// - /// 过滤按钮回调方法 + /// 过滤按钮回调方法 + /// Filter Button Callback Method /// /// protected virtual async Task OnFilterAsync() @@ -112,18 +125,21 @@ protected virtual async Task OnFilterAsync() } /// - /// 重置过滤条件方法 + /// 重置过滤条件方法 + /// Reset Filter Conditions Method /// public abstract void Reset(); /// - /// 获得过滤窗口的所有条件方法 + /// 获得过滤窗口的所有条件方法 + /// Get All Conditions Method /// /// public abstract FilterKeyValueAction GetFilterConditions(); /// - /// 设置过滤集合方法 + /// 设置过滤集合方法 + /// Set Filter Collection Method /// /// public virtual Task SetFilterConditionsAsync(FilterKeyValueAction filter) => OnFilterAsync(); diff --git a/src/BootstrapBlazor/Components/Filters/FilterButton.razor.cs b/src/BootstrapBlazor/Components/Filters/FilterButton.razor.cs index 396d0249353..972e1b66a95 100644 --- a/src/BootstrapBlazor/Components/Filters/FilterButton.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/FilterButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// FilterButton 组件 +/// FilterButton 组件 +/// FilterButton Component /// public partial class FilterButton : Dropdown { /// - /// 获得/设置 清除过滤条件时的回调方法 + /// 获得/设置 清除过滤条件时的回调方法 + /// Get/Set Callback Method When Clearing Filter Conditions + /// 10.2.2 /// [Parameter] public Func? OnClearFilter { get; set; } /// - /// 获得/设置 过滤按钮图标 + /// 获得/设置 过滤按钮图标 + /// Get/Set Filter Button Icon + /// 10.2.2 /// [Parameter] public string? FilterIcon { get; set; } /// - /// 获得/设置 重置按钮图标 + /// 获得/设置 重置按钮图标 + /// Get/Set Reset Button Icon + /// 10.2.2 /// [Parameter] public string? ClearIcon { get; set; } diff --git a/src/BootstrapBlazor/Components/Filters/FilterContext.cs b/src/BootstrapBlazor/Components/Filters/FilterContext.cs index eabbe7dba27..29f1b9cb3b9 100644 --- a/src/BootstrapBlazor/Components/Filters/FilterContext.cs +++ b/src/BootstrapBlazor/Components/Filters/FilterContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// FilterContext class +/// FilterContext class +/// FilterContext class /// public class FilterContext { /// - /// Gets or sets whether the filter is header row. Default is false. + /// 获得/设置 是否 the filter is header row. 默认为 false. + /// Gets or sets whether the filter is header row. Default is false. /// public bool IsHeaderRow { get; set; } /// - /// Gets or sets the column field key. Default is null. + /// 获得/设置 the column field key. 默认为 null. + /// Gets or sets the column field key. Default is null. /// public string? FieldKey { get; set; } /// - /// Gets or sets the filter counter. Default is 0. + /// 获得/设置 the filter counter. 默认为 0. + /// Gets or sets the filter counter. Default is 0. /// public int Count { get; set; } } diff --git a/src/BootstrapBlazor/Components/Filters/FilterKeyValueAction.cs b/src/BootstrapBlazor/Components/Filters/FilterKeyValueAction.cs index f5712d4f3d4..b59bfa16b8d 100644 --- a/src/BootstrapBlazor/Components/Filters/FilterKeyValueAction.cs +++ b/src/BootstrapBlazor/Components/Filters/FilterKeyValueAction.cs @@ -8,35 +8,41 @@ namespace BootstrapBlazor.Components; /// -/// Filter 过滤条件项目 属性 为条件表达式,其之间关系由 来决定 +/// Filter 过滤条件项目 属性 为条件表达式,其之间关系由 来决定 +/// Filter Condition Item Property is condition expression, relationship determined by /// [JsonConverter(typeof(JsonFilterKeyValueActionConverter))] public class FilterKeyValueAction { /// - /// 获得/设置 Filter 项字段名称 + /// 获得/设置 Filter 项字段名称 + /// Get/Set Filter Item Field Name /// public string? FieldKey { get; set; } /// - /// 获得/设置 Filter 项字段值 + /// 获得/设置 Filter 项字段值 + /// Get/Set Filter Item Field Value /// public object? FieldValue { get; set; } /// - /// 获得/设置 Filter 项与其他 Filter 逻辑关系 + /// 获得/设置 Filter 项与其他 Filter 逻辑关系 + /// Get/Set Logical Relationship between Filter Item and other Filters /// [JsonConverter(typeof(JsonStringEnumConverter))] public FilterLogic FilterLogic { get; set; } /// - /// 获得/设置 Filter 条件行为 + /// 获得/设置 Filter 条件行为 + /// Get/Set Filter Condition Behavior /// [JsonConverter(typeof(JsonStringEnumConverter))] public FilterAction FilterAction { get; set; } /// - /// 获得/设置 子过滤条件集合 + /// 获得/设置 子过滤条件集合 + /// Get/Set Child Filter Condition Collection /// public List Filters { get; set; } = []; } diff --git a/src/BootstrapBlazor/Components/Filters/FilterLogicItem.razor.cs b/src/BootstrapBlazor/Components/Filters/FilterLogicItem.razor.cs index 90cd4d0729a..e3df2afd460 100644 --- a/src/BootstrapBlazor/Components/Filters/FilterLogicItem.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/FilterLogicItem.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,18 +8,23 @@ namespace BootstrapBlazor.Components; /// -/// FilterLogicItem 组件用于选择过滤条件的逻辑运算符 +/// FilterLogicItem 组件用于选择过滤条件的逻辑运算符 +/// FilterLogicItem Component used to select logical operator for filter conditions /// public partial class FilterLogicItem { /// - /// 获得/设置 逻辑运算符 + /// 获得/设置 逻辑运算符 + /// Get/Set Logical Operator + /// 10.2.2 /// [Parameter] public FilterLogic Logic { get; set; } /// - /// 获得/设置 逻辑运算符改变回调方法 + /// 获得/设置 逻辑运算符改变回调方法 + /// Get/Set Logical Operator Change Callback Method + /// 10.2.2 /// [Parameter] public EventCallback LogicChanged { get; set; } diff --git a/src/BootstrapBlazor/Components/Filters/FilterProvider.razor.cs b/src/BootstrapBlazor/Components/Filters/FilterProvider.razor.cs index 635a720cc45..12924a451dd 100644 --- a/src/BootstrapBlazor/Components/Filters/FilterProvider.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/FilterProvider.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,56 +8,72 @@ namespace BootstrapBlazor.Components; /// -/// FilterProvider component +/// FilterProvider component +/// FilterProvider component /// public partial class FilterProvider { /// - /// 获得/设置 重置按钮文本 + /// 获得/设置 重置按钮文本 + /// Get/Set Reset Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearButtonText { get; set; } /// - /// 获得/设置 过滤按钮文本 + /// 获得/设置 过滤按钮文本 + /// Get/Set Filter Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? FilterButtonText { get; set; } /// - /// 获得/设置 增加过滤条件图标 + /// 获得/设置 增加过滤条件图标 + /// Get/Set Add Filter Condition Icon + /// 10.2.2 /// [Parameter] public string? PlusIcon { get; set; } /// - /// 获得/设置 减少过滤条件图标 + /// 获得/设置 减少过滤条件图标 + /// Get/Set Remove Filter Condition Icon + /// 10.2.2 /// [Parameter] public string? MinusIcon { get; set; } /// - /// Gets or sets whether show the more button. Default is false. + /// 获得/设置 是否 show the more 按钮. 默认为 false. + /// Gets or sets whether show the more button. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowMoreButton { get; set; } /// - /// Gets or sets the filter title. Default is null. + /// 获得/设置 the filter title. 默认为 null. + /// Gets or sets the filter title. Default is null. + /// 10.2.2 /// [Parameter] public string? Title { get; set; } /// - /// Gets or sets the child content. Default is null. + /// 获得/设置 the child 内容. 默认为 null. + /// Gets or sets the child content. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// Gets or sets the instance from cascading parameter. + /// 获得/设置 the 实例 from cascading parameter. + /// Gets or sets the instance from cascading parameter. /// [CascadingParameter] protected TableColumnFilter? TableColumnFilter { get; set; } @@ -71,17 +87,20 @@ public partial class FilterProvider private IIconTheme? IconTheme { get; set; } /// - /// Gets or sets the filter counter. Default is 0. + /// 获得/设置 the filter counter. 默认为 0. + /// Gets or sets the filter counter. Default is 0. /// protected int Count { get; set; } /// - /// Gets or sets the column field key. Default is null. + /// 获得/设置 the column field key. 默认为 null. + /// Gets or sets the column field key. Default is null. /// protected string? FieldKey { get; set; } /// - /// Gets or sets whether the filter is header row. Default is false. + /// 获得/设置 是否 the filter is header row. 默认为 false. + /// Gets or sets whether the filter is header row. Default is false. /// protected bool IsHeaderRow { get; set; } @@ -104,7 +123,8 @@ protected override void OnParametersSet() } /// - /// 点击重置按钮时回调此方法 + /// 点击重置按钮时回调此方法 + /// Callback this method when clicking reset button /// /// private async Task OnClickReset() @@ -118,7 +138,8 @@ private async Task OnClickReset() } /// - /// 点击确认时回调此方法 + /// 点击确认时回调此方法 + /// Callback this method when clicking confirm /// /// protected async Task OnClickConfirm() @@ -130,7 +151,8 @@ protected async Task OnClickConfirm() } /// - /// 点击增加按钮时回调此方法 + /// 点击增加按钮时回调此方法 + /// Callback this method when clicking add button /// /// private void OnClickPlus() @@ -142,7 +164,8 @@ private void OnClickPlus() } /// - /// 点击减少按钮时回调此方法 + /// 点击减少按钮时回调此方法 + /// Callback this method when clicking remove button /// /// private void OnClickMinus() diff --git a/src/BootstrapBlazor/Components/Filters/IFilter.cs b/src/BootstrapBlazor/Components/Filters/IFilter.cs index 6b5057150f0..75d15790417 100644 --- a/src/BootstrapBlazor/Components/Filters/IFilter.cs +++ b/src/BootstrapBlazor/Components/Filters/IFilter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 过滤器接口 +/// 过滤器接口 +/// Filter Interface /// public interface IFilter { /// - /// 获得/设置 本过滤器相关 IFilterAction 实例 + /// 获得/设置 本过滤器相关 IFilterAction 实例 + /// Get/Set Related IFilterAction Instance of this Filter /// [NotNull] IFilterAction? FilterAction { get; set; } diff --git a/src/BootstrapBlazor/Components/Filters/IFilterAction.cs b/src/BootstrapBlazor/Components/Filters/IFilterAction.cs index dcbc9dc137a..78f2e7313f0 100644 --- a/src/BootstrapBlazor/Components/Filters/IFilterAction.cs +++ b/src/BootstrapBlazor/Components/Filters/IFilterAction.cs @@ -6,23 +6,27 @@ namespace BootstrapBlazor.Components; /// -/// IFilterAction 接口 +/// IFilterAction 接口 +/// IFilterAction Interface /// public interface IFilterAction { /// - /// 重置过滤条件方法 + /// 重置过滤条件方法 + /// Reset Filter Conditions Method /// void Reset(); /// - /// 获得 IFilter 实例中的过滤条件集合 + /// 获得 IFilter 实例中的过滤条件集合 + /// Get Filter Condition Collection in IFilter Instance /// /// FilterKeyValueAction GetFilterConditions(); /// - /// Override existing filter conditions + /// Override existing filter conditions + /// Override existing filter conditions /// Task SetFilterConditionsAsync(FilterKeyValueAction conditions); } diff --git a/src/BootstrapBlazor/Components/Filters/LookupFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/LookupFilter.razor.cs index 01160714d76..b43a741495a 100644 --- a/src/BootstrapBlazor/Components/Filters/LookupFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/LookupFilter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Lookup 过滤器 +/// Lookup 过滤器 +/// Lookup Filter /// public partial class LookupFilter { @@ -35,7 +36,7 @@ protected override async Task OnParametersSetAsync() if (service != null) { var items = await _lookup.GetItemsAsync(service, _lookup.LookupServiceKey, _lookup.LookupServiceData); - if(items != null) + if (items != null) { _value = items.FirstOrDefault()?.Value; } diff --git a/src/BootstrapBlazor/Components/Filters/MultiFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/MultiFilter.razor.cs index 6062bc8ed4a..c05c8a4fd40 100644 --- a/src/BootstrapBlazor/Components/Filters/MultiFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/MultiFilter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,48 +6,63 @@ namespace BootstrapBlazor.Components; /// -/// 多选过滤器组件 +/// 多选过滤器组件 +/// Multi-Select Filter Component /// public partial class MultiFilter { /// - /// 获得/设置 搜索栏占位符 默认 nul 使用资源文件中值 + /// 获得/设置 搜索栏占位符 默认 nul 使用资源文件中值 + /// Get/Set Search Placeholder Default null Use Resource File Value + /// 10.2.2 /// [Parameter] public string? SearchPlaceHolderText { get; set; } /// - /// 获得/设置 全选按钮文本 默认 nul 使用资源文件中值 + /// 获得/设置 全选按钮文本 默认 nul 使用资源文件中值 + /// Get/Set Select All Button Text Default null Use Resource File Value + /// 10.2.2 /// [Parameter] public string? SelectAllText { get; set; } /// - /// 获得/设置 是否显示搜索栏 默认 true + /// 获得/设置 是否显示搜索栏 默认 true + /// Get/Set Whether to Show Search Bar Default true + /// 10.2.2 /// [Parameter] public bool ShowSearch { get; set; } = true; /// - /// 获得 过滤项集合回调方法 适合动态给定数据源 + /// 获得 过滤项集合回调方法 适合动态给定数据源 + /// Get Filter Items Callback Method Suitable for Dynamic Data Source + /// 10.2.2 /// [Parameter] public Func>>? OnGetItemsAsync { get; set; } /// - /// 获得 是否每次弹窗时均调用 回调方法,多用于动态填装过滤条件 + /// 获得 是否每次弹窗时均调用 回调方法,多用于动态填装过滤条件 + /// Get Whether to Call Callback Method Every Time Popup, Mostly Used for Dynamic Filling Filter Conditions + /// 10.2.2 /// [Parameter] public bool AlwaysTriggerGetItems { get; set; } /// - /// 获得/设置 Loading 模板 + /// 获得/设置 Loading 模板 + /// Get/Set Loading Template + /// 10.2.2 /// [Parameter] public RenderFragment? LoadingTemplate { get; set; } /// - /// Gets or sets the string comparison option used for filtering operations. Default is + /// 获得/设置 the string comparison option used for filtering operations. 默认为 + /// Gets or sets the string comparison option used for filtering operations. Default is + /// 10.2.2 /// [Parameter] public StringComparison StringComparison { get; set; } = StringComparison.OrdinalIgnoreCase; @@ -57,7 +72,9 @@ public partial class MultiFilter private List? _items; /// - /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 获得/设置 the filter candidate items. It is recommended to use static 数据 to avoid performance loss. + /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } @@ -118,7 +135,8 @@ protected override async Task InvokeInitAsync() } /// - /// JavaScript 回调方法 + /// JavaScript 回调方法 + /// JavaScript Callback Method /// /// [JSInvokable] @@ -180,7 +198,8 @@ private Task OnStateChanged(CheckboxState state, bool val) } /// - /// 过滤内容搜索 + /// 过滤内容搜索 + /// Filter Content Search /// /// /// @@ -205,7 +224,8 @@ private Task OnSearchValueChanged(string? val) private List GetItems() => _items ?? _source ?? []; /// - /// 重置过滤条件方法 + /// 重置过滤条件方法 + /// Reset Filter Conditions Method /// public override void Reset() { @@ -222,7 +242,8 @@ public override void Reset() } /// - /// 生成过滤条件方法 + /// 生成过滤条件方法 + /// Generate Filter Conditions Method /// /// public override FilterKeyValueAction GetFilterConditions() diff --git a/src/BootstrapBlazor/Components/Filters/MultiSelectFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/MultiSelectFilter.razor.cs index 6f96bb7e325..0816cc3cc80 100644 --- a/src/BootstrapBlazor/Components/Filters/MultiSelectFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/MultiSelectFilter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 多项选择下拉框过滤组件 +/// 多项选择下拉框过滤组件 +/// Multi-Select Dropdown Filter Component /// public partial class MultiSelectFilter { @@ -18,7 +19,9 @@ public partial class MultiSelectFilter private FilterAction _action1 = FilterAction.Equal; /// - /// Gets or sets the filter items. + /// 获得/设置 the filter items. + /// Gets or sets the filter items. + /// 10.2.2 /// [Parameter] public List? Items { get; set; } diff --git a/src/BootstrapBlazor/Components/Filters/MultipleFilterBase.cs b/src/BootstrapBlazor/Components/Filters/MultipleFilterBase.cs index 0716fe0dc2a..4fb2ac26953 100644 --- a/src/BootstrapBlazor/Components/Filters/MultipleFilterBase.cs +++ b/src/BootstrapBlazor/Components/Filters/MultipleFilterBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Multiple filter base class +/// Multiple filter base class +/// Multiple filter base class /// [Obsolete("Deprecated. Please use FilterBase class. 已弃用 请使用 FilterBase 类")] [ExcludeFromCodeCoverage] diff --git a/src/BootstrapBlazor/Components/Filters/NotSupportFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/NotSupportFilter.razor.cs index ed55ea50916..691528b2499 100644 --- a/src/BootstrapBlazor/Components/Filters/NotSupportFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/NotSupportFilter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// NotSupportFilter component +/// NotSupportFilter component +/// NotSupportFilter component /// public partial class NotSupportFilter { /// - /// 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 + /// 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 + /// Get/Set Not Supported Filter Type Message Default null Read Resource File Content + /// 10.2.2 /// [Parameter] [NotNull] diff --git a/src/BootstrapBlazor/Components/Filters/NumberFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/NumberFilter.razor.cs index 9b6aa44b51d..6bafa229324 100644 --- a/src/BootstrapBlazor/Components/Filters/NumberFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/NumberFilter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// NumberFilter component +/// NumberFilter component +/// NumberFilter component /// public partial class NumberFilter { @@ -21,13 +22,16 @@ public partial class NumberFilter .Build(); /// - /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 获得/设置 the filter candidate items. It is recommended to use static 数据 to avoid performance loss. + /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// - /// + /// + /// /// protected override void OnParametersSet() { @@ -46,7 +50,8 @@ protected override void OnParametersSet() } /// - /// + /// + /// /// public override void Reset() { @@ -60,7 +65,8 @@ public override void Reset() } /// - /// + /// + /// /// /// public override FilterKeyValueAction GetFilterConditions() @@ -90,7 +96,8 @@ public override FilterKeyValueAction GetFilterConditions() } /// - /// + /// + /// /// public override async Task SetFilterConditionsAsync(FilterKeyValueAction filter) { diff --git a/src/BootstrapBlazor/Components/Filters/SearchFilterAction.cs b/src/BootstrapBlazor/Components/Filters/SearchFilterAction.cs index 64a8e534b97..cebf6679206 100644 --- a/src/BootstrapBlazor/Components/Filters/SearchFilterAction.cs +++ b/src/BootstrapBlazor/Components/Filters/SearchFilterAction.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// IFilterAction 类默认实现类 +/// IFilterAction 类默认实现类 +/// Default Implementation Class of IFilterAction /// /// /// @@ -14,22 +15,26 @@ namespace BootstrapBlazor.Components; public class SearchFilterAction(string name, object? value, FilterAction action = FilterAction.Contains) : IFilterAction { /// - /// 获得/设置 过滤条件名称 + /// 获得/设置 过滤条件名称 + /// Get/Set Filter Condition Name /// public string Name { get; set; } = name; /// - /// 获得/设置 过滤条件值 + /// 获得/设置 过滤条件值 + /// Get/Set Filter Condition Value /// public object? Value { get; set; } = value; /// - /// 获得/设置 过滤条件关系运算符 + /// 获得/设置 过滤条件关系运算符 + /// Get/Set Filter Condition Relation Operator /// public FilterAction Action { get; set; } = action; /// - /// 重置过滤条件方法 + /// 重置过滤条件方法 + /// Reset Filter Conditions Method /// public void Reset() { @@ -37,7 +42,8 @@ public void Reset() } /// - /// 设置过滤条件方法 + /// 设置过滤条件方法 + /// Set Filter Conditions Method /// /// /// @@ -52,7 +58,8 @@ public Task SetFilterConditionsAsync(FilterKeyValueAction filter) } /// - /// 获取所有过滤条件集合 + /// 获取所有过滤条件集合 + /// Get All Filter Conditions Collection /// /// public virtual FilterKeyValueAction GetFilterConditions() => new() diff --git a/src/BootstrapBlazor/Components/Filters/SerializeFilterAction.cs b/src/BootstrapBlazor/Components/Filters/SerializeFilterAction.cs index 25ee96e213a..10024d5bfe4 100644 --- a/src/BootstrapBlazor/Components/Filters/SerializeFilterAction.cs +++ b/src/BootstrapBlazor/Components/Filters/SerializeFilterAction.cs @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 序列化过滤条件类为 序列化使用 +/// 序列化过滤条件类为 序列化使用 +/// Serialize Filter Condition Class for Serialization /// public sealed class SerializeFilterAction : IFilterAction { /// - /// 获得/设置 过滤条件集合 + /// 获得/设置 过滤条件集合 + /// Get/Set Filter Condition Collection /// public FilterKeyValueAction? Filter { get; set; } /// - /// 重置过滤条件方法 + /// 重置过滤条件方法 + /// Reset Filter Conditions Method /// public void Reset() { @@ -24,7 +27,8 @@ public void Reset() } /// - /// 设置过滤条件方法 + /// 设置过滤条件方法 + /// Set Filter Conditions Method /// /// /// @@ -35,7 +39,8 @@ public Task SetFilterConditionsAsync(FilterKeyValueAction filter) } /// - /// 获取所有过滤条件集合 + /// 获取所有过滤条件集合 + /// Get All Filter Conditions Collection /// /// public FilterKeyValueAction GetFilterConditions() => Filter ?? new(); diff --git a/src/BootstrapBlazor/Components/Filters/StringFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/StringFilter.razor.cs index 0d20075f050..bc14c6c4879 100644 --- a/src/BootstrapBlazor/Components/Filters/StringFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/StringFilter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// StringFilter component +/// StringFilter component +/// StringFilter component /// public partial class StringFilter { /// - /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 获得/设置 the filter candidate items. It is recommended to use static 数据 to avoid performance loss. + /// Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } @@ -26,7 +29,8 @@ public partial class StringFilter .Build(); /// - /// + /// + /// /// protected override void OnInitialized() { @@ -36,7 +40,8 @@ protected override void OnInitialized() } /// - /// + /// + /// /// protected override void OnParametersSet() { @@ -52,7 +57,8 @@ protected override void OnParametersSet() } /// - /// + /// + /// /// public override void Reset() { @@ -66,7 +72,8 @@ public override void Reset() } /// - /// + /// + /// /// /// public override FilterKeyValueAction GetFilterConditions() @@ -96,7 +103,8 @@ public override FilterKeyValueAction GetFilterConditions() } /// - /// + /// + /// /// public override async Task SetFilterConditionsAsync(FilterKeyValueAction filter) { diff --git a/src/BootstrapBlazor/Components/Filters/TableColumnFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/TableColumnFilter.razor.cs index 3d5cfe282c0..db92cde309b 100644 --- a/src/BootstrapBlazor/Components/Filters/TableColumnFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/TableColumnFilter.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,24 +8,31 @@ namespace BootstrapBlazor.Components; /// -/// TableFilter component +/// TableFilter component +/// TableFilter component /// public partial class TableColumnFilter : IFilter { /// - /// 获得/设置 是否 active + /// 获得/设置 是否 active + /// Get/Set Whether is active + /// 10.2.2 /// [Parameter] public bool IsActive { get; set; } /// - /// 获得/设置 过滤图标 + /// 获得/设置 过滤图标 + /// Get/Set Filter Icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 + /// 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 + /// Get/Set Not Supported Filter Type Message Default null Read Resource File Content + /// 10.2.2 /// [Parameter] [ExcludeFromCodeCoverage] @@ -33,47 +40,58 @@ public partial class TableColumnFilter : IFilter public string? NotSupportedMessage { get => NotSupportedColumnFilterMessage; set => NotSupportedColumnFilterMessage = value; } /// - /// 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 + /// 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 + /// Get/Set Not Supported Filter Type Message Default null Read Resource File Content + /// 10.2.2 /// [Parameter] public string? NotSupportedColumnFilterMessage { get; set; } /// - /// 获得 相关联 ITableColumn 实例 + /// 获得 相关联 ITableColumn 实例 + /// Get Related ITableColumn Instance + /// 10.2.2 /// [Parameter] [NotNull] public ITableColumn? Column { get; set; } /// - /// 获得/设置 是否为 HeaderRow 模式 默认 false + /// 获得/设置 是否为 HeaderRow 模式 默认 false + /// Get/Set Whether is HeaderRow Mode Default false + /// 10.2.2 /// [Parameter] public bool IsHeaderRow { get; set; } /// - /// 获得/设置 ITable 实例 + /// 获得/设置 ITable 实例 + /// Get/Set ITable Instance + /// 10.2.2 /// [Parameter] [NotNull] public ITable? Table { get; set; } /// - /// 获得 过滤小图标样式 + /// 获得 过滤小图标样式 + /// Get Filter Small Icon Style /// private string? FilterClassString => CssBuilder.Default(Icon) .AddClass("active", IsActive) .Build(); /// - /// 获得 样式 + /// 获得 样式 + /// Get Style /// private string? ClassString => CssBuilder.Default("filter-icon") .AddClassFromAttributes(AdditionalAttributes) .Build(); /// - /// 获得/设置 过滤条件 IFilterAction 接口 + /// 获得/设置 过滤条件 IFilterAction 接口 + /// Get/Set Filter Condition IFilterAction Interface /// [NotNull] public IFilterAction? FilterAction { get; set; } @@ -104,7 +122,8 @@ protected override async Task InvokeInitAsync() } /// - /// Reset filter method + /// Reset filter method + /// Reset filter method /// public async Task Reset() { @@ -113,7 +132,8 @@ public async Task Reset() } /// - /// Filter method + /// Filter method + /// Filter method /// /// public async Task OnFilterAsync() diff --git a/src/BootstrapBlazor/Components/FlipClock/FlipClock.razor.cs b/src/BootstrapBlazor/Components/FlipClock/FlipClock.razor.cs index 39d423353f8..65003caaf28 100644 --- a/src/BootstrapBlazor/Components/FlipClock/FlipClock.razor.cs +++ b/src/BootstrapBlazor/Components/FlipClock/FlipClock.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -7,127 +7,168 @@ namespace BootstrapBlazor.Components; /// -/// FlipClock 组件 +/// FlipClock 组件 +/// FlipClock Component /// public partial class FlipClock { /// - /// 获得/设置 是否显示 Year 默认 false + /// 获得/设置 是否显示 Year 默认 false + /// Get/Set Whether to Show Year Default false + /// 10.2.2 /// [Parameter] public bool ShowYear { get; set; } /// - /// 获得/设置 是否显示 Month 默认 false + /// 获得/设置 是否显示 Month 默认 false + /// Get/Set Whether to Show Month Default false + /// 10.2.2 /// [Parameter] public bool ShowMonth { get; set; } /// - /// 获得/设置 是否显示 Day 默认 false + /// 获得/设置 是否显示 Day 默认 false + /// Get/Set Whether to Show Day Default false + /// 10.2.2 /// [Parameter] public bool ShowDay { get; set; } /// - /// 获得/设置 是否显示 Hour 默认 true + /// 获得/设置 是否显示 Hour 默认 true + /// Get/Set Whether to Show Hour Default true + /// 10.2.2 /// [Parameter] public bool ShowHour { get; set; } = true; /// - /// 获得/设置 是否显示 Minute 默认 true + /// 获得/设置 是否显示 Minute 默认 true + /// Get/Set Whether to Show Minute Default true + /// 10.2.2 /// [Parameter] public bool ShowMinute { get; set; } = true; /// - /// 获得/设置 是否显示 Second 默认 true + /// 获得/设置 是否显示 Second 默认 true + /// Get/Set Whether to Show Second Default true + /// 10.2.2 /// [Parameter] public bool ShowSecond { get; set; } = true; /// - /// 获得/设置 计时结束回调方法 默认 null + /// 获得/设置 计时结束回调方法 默认 null + /// Get/Set Timer Completed Callback Method Default null + /// 10.2.2 /// [Parameter] public Func? OnCompletedAsync { get; set; } /// - /// 获得/设置 显示模式 默认 + /// 获得/设置 显示模式 默认 + /// Get/Set View Mode Default + /// 10.2.2 /// [Parameter] public FlipClockViewMode ViewMode { get; set; } /// - /// 获得/设置 组件高度 默认 null 未设置使用样式默认值 200px; + /// 获得/设置 组件高度 默认 null 未设置使用样式默认值 200px; + /// Get/Set Component Height Default null Use Style Default Value if not set 200px; + /// 10.2.2 /// /// 支持多种单位 200px 200em 200pt 100% 等 [Parameter] public string? Height { get; set; } /// - /// 获得/设置 组件背景色 默认 null 未设置使用样式默认值 radial-gradient(ellipse at center, rgba(150, 150, 150, 1) 0%, rgba(89, 89, 89, 1) 100%); + /// 获得/设置 组件背景色 默认 null 未设置使用样式默认值 radial-gradient(ellipse at center, rgba(150, 150, 150, 1) 0%, rgba(89, 89, 89, 1) 100%); + /// Get/Set Component Background Color Default null Use Style Default Value if not set radial-gradient(ellipse at center, rgba(150, 150, 150, 1) 0%, rgba(89, 89, 89, 1) 100%); + /// 10.2.2 /// [Parameter] public string? BackgroundColor { get; set; } /// - /// 获得/设置 组件字体大小 默认 null 未设置使用样式默认值 80px; + /// 获得/设置 组件字体大小 默认 null 未设置使用样式默认值 80px; + /// Get/Set Component Font Size Default null Use Style Default Value if not set 80px; + /// 10.2.2 /// [Parameter] public string? FontSize { get; set; } /// - /// 获得/设置 组件卡片宽度 默认 null 未设置使用样式默认值 60px; + /// 获得/设置 组件卡片宽度 默认 null 未设置使用样式默认值 60px; + /// Get/Set Component Card Width Default null Use Style Default Value if not set 60px; + /// 10.2.2 /// [Parameter] public string? CardWidth { get; set; } /// - /// 获得/设置 组件卡片高度 默认 null 未设置使用样式默认值 90px; + /// 获得/设置 组件卡片高度 默认 null 未设置使用样式默认值 90px; + /// Get/Set Component Card Height Default null Use Style Default Value if not set 90px; + /// 10.2.2 /// [Parameter] public string? CardHeight { get; set; } /// - /// 获得/设置 组件卡片字体颜色 默认 null 未设置使用样式默认值 #ccc; + /// 获得/设置 组件卡片字体颜色 默认 null 未设置使用样式默认值 #ccc; + /// Get/Set Component Card Font Color Default null Use Style Default Value if not set #ccc; + /// 10.2.2 /// [Parameter] public string? CardColor { get; set; } /// - /// 获得/设置 组件卡片背景颜色 默认 null 未设置使用样式默认值 #333; + /// 获得/设置 组件卡片背景颜色 默认 null 未设置使用样式默认值 #333; + /// Get/Set Component Card Background Color Default null Use Style Default Value if not set #333; + /// 10.2.2 /// [Parameter] public string? CardBackgroundColor { get; set; } /// - /// 获得/设置 组件卡片分割线高度 默认 null 未设置使用样式默认值 1px; + /// 获得/设置 组件卡片分割线高度 默认 null 未设置使用样式默认值 1px; + /// Get/Set Component Card Divider Height Default null Use Style Default Value if not set 1px; + /// 10.2.2 /// [Parameter] public string? CardDividerHeight { get; set; } /// - /// 获得/设置 组件卡片分割线颜色 默认 null 未设置使用样式默认值 rgba(0, 0, 0, .4); + /// 获得/设置 组件卡片分割线颜色 默认 null 未设置使用样式默认值 rgba(0, 0, 0, .4); + /// Get/Set Component Card Divider Color Default null Use Style Default Value if not set rgba(0, 0, 0, .4); + /// 10.2.2 /// [Parameter] public string? CardDividerColor { get; set; } /// - /// 获得/设置 组件卡片间隔 默认 null 未设置使用样式默认值 5; + /// 获得/设置 组件卡片间隔 默认 null 未设置使用样式默认值 5; + /// Get/Set Component Card Margin Default null Use Style Default Value if not set 5; + /// 10.2.2 /// [Parameter] public string? CardMargin { get; set; } /// - /// 获得/设置 组件卡片组间隔 默认 null 未设置使用样式默认值 20; + /// 获得/设置 组件卡片组间隔 默认 null 未设置使用样式默认值 20; + /// Get/Set Component Card Group Margin Default null Use Style Default Value if not set 20; + /// 10.2.2 /// [Parameter] public string? CardGroupMargin { get; set; } /// - /// 获得/设置 倒计时或者计时的开始时间 默认 模式下生效 + /// 获得/设置 倒计时或者计时的开始时间 默认 模式下生效 + /// Get/Set Start Time for Countdown or Count Default Effective in Mode + /// 10.2.2 /// [Parameter] public TimeSpan? StartValue { get; set; } @@ -160,7 +201,8 @@ public partial class FlipClock private double GetTicks() => StartValue?.TotalMilliseconds ?? 0; /// - /// 倒计时结束回调方法由 JSInvoke 调用 + /// 倒计时结束回调方法由 JSInvoke 调用 + /// Countdown Completed Callback Method invoke by JSInvoke /// [JSInvokable] public async Task OnCompleted() diff --git a/src/BootstrapBlazor/Components/Footer/Footer.razor.cs b/src/BootstrapBlazor/Components/Footer/Footer.razor.cs index 83c1ea87581..660d8c63ca5 100644 --- a/src/BootstrapBlazor/Components/Footer/Footer.razor.cs +++ b/src/BootstrapBlazor/Components/Footer/Footer.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Footer 组件 +/// Footer 组件 +/// Footer Component /// public partial class Footer { /// - /// 获得 按钮样式集合 + /// 获得 按钮样式集合 + /// Get Button Style Collection /// /// protected string? ClassName => CssBuilder.Default("footer") @@ -19,25 +21,33 @@ public partial class Footer .Build(); /// - /// 获得/设置 Footer 显示文字 + /// 获得/设置 Footer 显示文字 + /// Get/Set Footer Text + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 Footer 组件中返回顶端按钮控制的滚动条所在组件 设置 为 true 时生效 + /// 获得/设置 Footer 组件中返回顶端按钮控制的滚动条所在组件 设置 为 true 时生效 + /// Get/Set The component where the scrollbar controlled by the back-to-top button in the Footer component is located. Effective when is true + /// 10.2.2 /// [Parameter] public string? Target { get; set; } /// - /// 获得/设置 内容 + /// 获得/设置 内容 + /// Get/Set Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否显示 Goto 小组件 默认 true 显示 + /// 获得/设置 是否显示 Goto 小组件 默认 true 显示 + /// Get/Set Whether to Show Goto Widget Default true + /// 10.2.2 /// [Parameter] public bool ShowGoto { get; set; } = true; diff --git a/src/BootstrapBlazor/Components/FullScreen/FullScreenButton.razor.cs b/src/BootstrapBlazor/Components/FullScreen/FullScreenButton.razor.cs index 525f73589d9..bee58dc2334 100644 --- a/src/BootstrapBlazor/Components/FullScreen/FullScreenButton.razor.cs +++ b/src/BootstrapBlazor/Components/FullScreen/FullScreenButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// FullScreenButton 组件 +/// FullScreenButton 组件 +/// FullScreenButton Component /// public partial class FullScreenButton { /// - /// 获得/设置 全屏图标 默认 fa-solid fa-maximize + /// 获得/设置 全屏图标 默认 fa-solid fa-maximize + /// Get/Set Full Screen Icon Default fa-solid fa-maximize + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 Icon 参数;Deprecated. Please use Icon parameter")] @@ -19,13 +22,17 @@ public partial class FullScreenButton public string? FullScreenIcon { get => FullScreenExitIcon; set => FullScreenExitIcon = value; } /// - /// 获得/设置 退出全屏图标 默认 fa-solid fa-compress + /// 获得/设置 退出全屏图标 默认 fa-solid fa-compress + /// Get/Set Exit Full Screen Icon Default fa-solid fa-compress + /// 10.2.2 /// [Parameter] public string? FullScreenExitIcon { get; set; } /// - /// 获得/设置 全屏元素 Id 默认为 null + /// 获得/设置 全屏元素 Id 默认为 null + /// Get/Set Full Screen Element Id Default null + /// 10.2.2 /// [Parameter] public string? TargetId { get; set; } diff --git a/src/BootstrapBlazor/Components/FullScreen/FullScreenOption.cs b/src/BootstrapBlazor/Components/FullScreen/FullScreenOption.cs index 349ad2cc3aa..1951301a113 100644 --- a/src/BootstrapBlazor/Components/FullScreen/FullScreenOption.cs +++ b/src/BootstrapBlazor/Components/FullScreen/FullScreenOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// FullScreen 配置类 +/// FullScreen 配置类 +/// FullScreen Configuration Class /// public class FullScreenOption { /// - /// 获得/设置 要全屏的 HTML Element 实例 + /// 获得/设置 要全屏的 HTML Element 实例 + /// Get/Set HTML Element Instance to be Full Screen /// public ElementReference Element { get; set; } /// - /// 获得/设置 要全屏的 HTML Element Id + /// 获得/设置 要全屏的 HTML Element Id + /// Get/Set HTML Element Id to be Full Screen /// public string? Id { get; set; } /// - /// 获得/设置 要全屏的 HTML css selector + /// 获得/设置 要全屏的 HTML css selector + /// Get/Set HTML css selector to be Full Screen /// public string? Selector { get; set; } } diff --git a/src/BootstrapBlazor/Components/Geolocation/GeolocationPosition.cs b/src/BootstrapBlazor/Components/Geolocation/GeolocationPosition.cs index 50a61d71607..db7bb2d0387 100644 --- a/src/BootstrapBlazor/Components/Geolocation/GeolocationPosition.cs +++ b/src/BootstrapBlazor/Components/Geolocation/GeolocationPosition.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,74 +6,88 @@ namespace BootstrapBlazor.Components; /// -/// 定位数据类 +/// 定位数据类 +/// Geolocation Data Class /// public class GeolocationPosition { /// - /// 获得/设置 纬度 + /// 获得/设置 纬度 + /// Get/Set Latitude /// /// public decimal Latitude { get; set; } /// - /// 获得/设置 经度 + /// 获得/设置 经度 + /// Get/Set Longitude /// /// public decimal Longitude { get; set; } /// - /// 获得/设置 位置精度 + /// 获得/设置 位置精度 + /// Get/Set Accuracy /// public decimal Accuracy { get; set; } /// - /// 获得/设置 海拔高度单位米 + /// 获得/设置 海拔高度单位米 + /// Get/Set Altitude (meters) /// public decimal Altitude { get; set; } /// - /// 获得/设置 海拔精度 + /// 获得/设置 海拔精度 + /// Get/Set Altitude Accuracy /// public decimal AltitudeAccuracy { get; set; } /// - /// 获得/设置 方向 从正北开始以度计 + /// 获得/设置 方向 从正北开始以度计 + /// Get/Set Heading (degrees relative to true north) /// public decimal Heading { get; set; } /// - /// 获得/设置 速度 以米/每秒计 + /// 获得/设置 速度 以米/每秒计 + /// Get/Set Speed (meters/second) /// public decimal Speed { get; set; } /// - /// 获得/设置 时间戳 + /// 获得/设置 时间戳 + /// Get/Set Timestamp /// public long Timestamp { get; set; } /// - /// 获得/设置 时间 + /// 获得/设置 时间 + /// Get/Set Time /// public DateTime LastUpdateTime { get => UnixTimeStampToDateTime(Timestamp); } /// - /// 获得/设置 移动距离 + /// 获得/设置 移动距离 + /// Get/Set Moving Distance /// public decimal CurrentDistance { get; set; } = 0.0M; /// - /// 获得/设置 总移动距离 + /// 获得/设置 总移动距离 + /// Get/Set Total Moving Distance /// public decimal TotalDistance { get; set; } = 0.0M; /// - /// 获得/设置 最后一次获取到的纬度 + /// 获得/设置 最后一次获取到的纬度 + /// Get/Set Last Acquired Latitude /// public decimal LastLat { get; set; } /// - /// 获得/设置 最后一次获取到的经度 + /// 获得/设置 最后一次获取到的经度 + /// Get/Set Last Acquired Longitude /// public decimal LastLong { get; set; } diff --git a/src/BootstrapBlazor/Components/GoTop/GoTop.razor.cs b/src/BootstrapBlazor/Components/GoTop/GoTop.razor.cs index 971ba4d711a..6876dfafaed 100644 --- a/src/BootstrapBlazor/Components/GoTop/GoTop.razor.cs +++ b/src/BootstrapBlazor/Components/GoTop/GoTop.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,30 +8,39 @@ namespace BootstrapBlazor.Components; /// -/// GoTop 组件 +/// GoTop 组件 +/// GoTop Component /// public partial class GoTop { /// - /// 获得/设置 返回顶端 Icon 属性 + /// 获得/设置 返回顶端 Icon 属性 + /// Get/Set Back to Top Icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 滚动条所在组件 + /// 获得/设置 滚动条所在组件 + /// Get/Set Scroll Container Component + /// 10.2.2 /// [Parameter] public string? Target { get; set; } /// - /// 获得/设置 滚动行为 默认 ScrollIntoViewBehavior.Smooth + /// 获得/设置 滚动行为 默认 ScrollIntoViewBehavior.Smooth + /// Get/Set Scroll Behavior Default ScrollIntoViewBehavior.Smooth + /// 10.2.2 /// [Parameter] public ScrollIntoViewBehavior ScrollBehavior { get; set; } /// - /// 获得/设置 鼠标悬停提示文字信息 + /// 获得/设置 鼠标悬停提示文字信息 + /// Get/Set Tooltip Text + /// 10.2.2 /// [Parameter] [NotNull] diff --git a/src/BootstrapBlazor/Components/GroupBox/GroupBox.razor.cs b/src/BootstrapBlazor/Components/GroupBox/GroupBox.razor.cs index 8ac60088afa..a5fee01513e 100644 --- a/src/BootstrapBlazor/Components/GroupBox/GroupBox.razor.cs +++ b/src/BootstrapBlazor/Components/GroupBox/GroupBox.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// +/// GroupBox 组件 +/// GroupBox Component /// public sealed partial class GroupBox { @@ -15,13 +16,17 @@ public sealed partial class GroupBox .Build(); /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 Title 属性 默认为 null + /// 获得/设置 Title 属性 默认为 null + /// Get/Set Title Property Default null + /// 10.2.2 /// [Parameter] public string? Title { get; set; } diff --git a/src/BootstrapBlazor/Components/Handwritten/Handwritten.razor.cs b/src/BootstrapBlazor/Components/Handwritten/Handwritten.razor.cs index 26d398c2aee..04a934bb84b 100644 --- a/src/BootstrapBlazor/Components/Handwritten/Handwritten.razor.cs +++ b/src/BootstrapBlazor/Components/Handwritten/Handwritten.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,21 +8,26 @@ namespace BootstrapBlazor.Components; /// -/// Handwritten 手写签名 +/// Handwritten 手写签名 +/// Handwritten Signature /// [Obsolete("已弃用,请使用 BootstrapBlazor.SignaturePad 代替;Deprecated, use BootstrapBlazor.SignaturePad instead")] [ExcludeFromCodeCoverage] public partial class Handwritten { /// - /// 清除按钮文本 + /// 清除按钮文本 + /// Clear Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearButtonText { get; set; } /// - /// 保存按钮文本 + /// 保存按钮文本 + /// Save Button Text + /// 10.2.2 /// [Parameter] [NotNull] @@ -33,19 +38,24 @@ public partial class Handwritten private IStringLocalizer? Localizer { get; set; } /// - /// 手写结果回调方法 + /// 手写结果回调方法 + /// Handwritten Result Callback Method + /// 10.2.2 /// [Parameter] public EventCallback HandwrittenBase64 { get; set; } /// - /// 手写签名imgBase64字符串 + /// 手写签名imgBase64字符串 + /// Handwritten Signature imgBase64 String + /// 10.2.2 /// [Parameter] public string? Result { get; set; } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { @@ -61,7 +71,8 @@ protected override void OnInitialized() protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(OnValueChanged)); /// - /// 保存结果 + /// 保存结果 + /// Save Result /// /// /// diff --git a/src/BootstrapBlazor/Components/HtmlTag/Link.razor.cs b/src/BootstrapBlazor/Components/HtmlTag/Link.razor.cs index 5e2cea36217..a3a937b7260 100644 --- a/src/BootstrapBlazor/Components/HtmlTag/Link.razor.cs +++ b/src/BootstrapBlazor/Components/HtmlTag/Link.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,25 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// Link 组件 +/// Link 组件 +/// Link Component /// public partial class Link { /// - /// 获得/设置 href 属性值 + /// 获得/设置 href 属性值 + /// Get/Set href Property Value + /// 10.2.2 /// [Parameter] [EditorRequired] public string? Href { get; set; } /// - /// 获得/设置 Rel 属性值, 默认 stylesheet + /// 获得/设置 Rel 属性值, 默认 stylesheet + /// Get/Set Rel Property Value, Default stylesheet + /// 10.2.2 /// [Parameter] public string? Rel { get; set; } = "stylesheet"; /// - /// 获得/设置 版本号 默认 null 自动生成 + /// 获得/设置 版本号 默认 null 自动生成 + /// Get/Set Version Number Default null Auto Generated + /// 10.2.2 /// [Parameter] public string? Version { get; set; } diff --git a/src/BootstrapBlazor/Components/HtmlTag/Script.razor.cs b/src/BootstrapBlazor/Components/HtmlTag/Script.razor.cs index 725ba2c2073..82986bbb116 100644 --- a/src/BootstrapBlazor/Components/HtmlTag/Script.razor.cs +++ b/src/BootstrapBlazor/Components/HtmlTag/Script.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,19 +6,24 @@ namespace BootstrapBlazor.Components; /// -/// Script 组件 +/// Script 组件 +/// Script Component /// public partial class Script { /// - /// 获得/设置 src 属性值 + /// 获得/设置 src 属性值 + /// Get/Set src Property Value + /// 10.2.2 /// [Parameter] [EditorRequired] public string? Src { get; set; } /// - /// 获得/设置 版本号 默认 null 自动生成 + /// 获得/设置 版本号 默认 null 自动生成 + /// Get/Set Version Number Default null Auto Generated + /// 10.2.2 /// [Parameter] public string? Version { get; set; } diff --git a/src/BootstrapBlazor/Components/IFrame/IFrame.razor.cs b/src/BootstrapBlazor/Components/IFrame/IFrame.razor.cs index bc211014249..52db82ec790 100644 --- a/src/BootstrapBlazor/Components/IFrame/IFrame.razor.cs +++ b/src/BootstrapBlazor/Components/IFrame/IFrame.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,30 +6,39 @@ namespace BootstrapBlazor.Components; /// -/// Frame component encapsulates the Html iframe element +/// Frame component encapsulates the Html iframe element +/// Frame component encapsulates the Html iframe element /// public partial class IFrame { /// - /// Gets or sets the URL of the webpage to be loaded in the Frame + /// 获得/设置 the URL of the webpage to be loaded in the Frame + /// Gets or sets the URL of the webpage to be loaded in the Frame + /// 10.2.2 /// [Parameter] public string? Src { get; set; } /// - /// Gets or sets the data to be passed + /// 获得/设置 the 数据 to be passed + /// Gets or sets the data to be passed + /// 10.2.2 /// [Parameter] public object? Data { get; set; } /// - /// Gets or sets Frame loads the data passed by the page + /// 获得/设置 Frame loads the 数据 passed by the page + /// Gets or sets Frame loads the data passed by the page + /// 10.2.2 /// [Parameter] public Func? OnPostDataAsync { get; set; } /// - /// Gets or sets Callback method after the page is loaded. + /// 获得/设置 Callback method after the page is loaded. + /// Gets or sets Callback method after the page is loaded. + /// 10.2.2 /// [Parameter] public Func? OnReadyAsync { get; set; } @@ -77,14 +86,16 @@ protected override async Task OnAfterRenderAsync(bool firstRender) }); /// - /// Method to push data + /// Method to push 数据 + /// Method to push data /// /// /// public Task PushData(object? data) => InvokeVoidAsync("execute", Id, data); /// - /// Called by JavaScript + /// Called by JavaScript + /// Called by JavaScript /// /// /// @@ -98,7 +109,8 @@ public async Task TriggerPostData(object? data) } /// - /// Called by JavaScript + /// Called by JavaScript + /// Called by JavaScript /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/IPLocator/BaiDuIPLocator.cs b/src/BootstrapBlazor/Components/IPLocator/BaiDuIPLocator.cs index 0cd372b0b5e..87cc564ae9a 100644 --- a/src/BootstrapBlazor/Components/IPLocator/BaiDuIPLocator.cs +++ b/src/BootstrapBlazor/Components/IPLocator/BaiDuIPLocator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,14 +6,16 @@ namespace BootstrapBlazor.Components; /// -/// 百度搜索引擎 IP 定位器 +/// 百度搜索引擎 IP 定位器 +/// Baidu Search Engine IP Locator /// [Obsolete("已弃用,请参考 https://www.blazor.zone/locator")] [ExcludeFromCodeCoverage] public class BaiDuIPLocator : DefaultIPLocator { /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public BaiDuIPLocator() { @@ -21,24 +23,28 @@ public BaiDuIPLocator() } /// - /// 获得/设置 详细地址信息 + /// 获得/设置 详细地址信息 + /// Get/Set Detailed Address Information /// public IEnumerable? Data { get; set; } /// - /// 获得/设置 结果状态返回码 为 0 时通讯正常 + /// 获得/设置 结果状态返回码 为 0 时通讯正常 + /// Get/Set Result Status Return Code. 0 means communication is normal /// public string? Status { get; set; } /// - /// 定位方法 + /// 定位方法 + /// Locate Method /// /// /// public override Task Locate(IPLocatorOption option) => Locate(option); /// - /// ToString 方法 + /// ToString 方法 + /// ToString Method /// /// public override string ToString() @@ -48,14 +54,16 @@ public override string ToString() } /// -/// LocationInfo 结构体 +/// LocationInfo 结构体 +/// LocationInfo Struct /// [Obsolete("已弃用,请参考 https://www.blazor.zone/locator")] [ExcludeFromCodeCoverage] public struct LocationInfo { /// - /// 获得/设置 定位信息 + /// 获得/设置 定位信息 + /// Get/Set Location Information /// public string? Location { get; set; } } diff --git a/src/BootstrapBlazor/Components/IPLocator/DefaultIPLocator.cs b/src/BootstrapBlazor/Components/IPLocator/DefaultIPLocator.cs index 50273718e95..d0845e44e7c 100644 --- a/src/BootstrapBlazor/Components/IPLocator/DefaultIPLocator.cs +++ b/src/BootstrapBlazor/Components/IPLocator/DefaultIPLocator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// 默认定位实现类 +/// 默认定位实现类 +/// Default IP Locator Implementation Class /// [Obsolete("已弃用,请参考 https://www.blazor.zone/locator")] [ExcludeFromCodeCoverage] @@ -23,12 +24,14 @@ public class DefaultIPLocator : IIPLocator public virtual Task Locate(IPLocatorOption option) => Task.FromResult(null); /// - /// 获得/设置 IP定位器请求地址 + /// 获得/设置 IP定位器请求地址 + /// Get/Set IP Locator Request URL /// public string? Url { get; set; } /// - /// 泛型定位方法 + /// 泛型定位方法 + /// Generic Locate Method /// /// /// diff --git a/src/BootstrapBlazor/Components/IPLocator/DefaultIPLocatorProvider.cs b/src/BootstrapBlazor/Components/IPLocator/DefaultIPLocatorProvider.cs index 9c3f9190c62..5417e9cb1bd 100644 --- a/src/BootstrapBlazor/Components/IPLocator/DefaultIPLocatorProvider.cs +++ b/src/BootstrapBlazor/Components/IPLocator/DefaultIPLocatorProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// 默认 IP 地理位置定位器 +/// 默认 IP 地理位置定位器 +/// Default IP Geolocation Provider /// [Obsolete("已弃用,请参考 https://www.blazor.zone/locator")] [ExcludeFromCodeCoverage] @@ -19,7 +20,8 @@ internal class DefaultIPLocatorProvider : IIPLocatorProvider private readonly IServiceProvider _provider; /// - /// 构造函数 + /// 构造函数 + /// Constructor /// /// /// @@ -34,7 +36,8 @@ public DefaultIPLocatorProvider(IServiceProvider provider, IHttpClientFactory fa } /// - /// 定位方法 + /// 定位方法 + /// Locate Method /// /// /// diff --git a/src/BootstrapBlazor/Components/IPLocator/IIPLocator.cs b/src/BootstrapBlazor/Components/IPLocator/IIPLocator.cs index 820f2732433..a99916ac572 100644 --- a/src/BootstrapBlazor/Components/IPLocator/IIPLocator.cs +++ b/src/BootstrapBlazor/Components/IPLocator/IIPLocator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,20 +6,23 @@ namespace BootstrapBlazor.Components; /// -/// IP 地址定位接口 +/// IP 地址定位接口 +/// IP Address Locator Interface /// [Obsolete("已弃用,请参考 https://www.blazor.zone/locator")] public interface IIPLocator { /// - /// 定位方法 + /// 定位方法 + /// Locate Method /// - /// 定位器配置信息 - /// 定位器定位结果 + /// 定位器配置信息locatorconfiginfo + /// 定位器定位结果locator定位result Task Locate(IPLocatorOption option); /// - /// 获得/设置 接口地址 + /// 获得/设置 接口地址 + /// Get/Set Interface URL /// public string? Url { get; set; } } diff --git a/src/BootstrapBlazor/Components/IPLocator/IIPLocatorProvider.cs b/src/BootstrapBlazor/Components/IPLocator/IIPLocatorProvider.cs index 48bc7ca8cdc..0a32e3eea95 100644 --- a/src/BootstrapBlazor/Components/IPLocator/IIPLocatorProvider.cs +++ b/src/BootstrapBlazor/Components/IPLocator/IIPLocatorProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// IP 地址定位服务 +/// IP 地址定位服务 +/// IP Address Locator Service /// [Obsolete("已弃用,请参考 https://www.blazor.zone/locator")] public interface IIPLocatorProvider { /// - /// + /// + /// /// /// /// diff --git a/src/BootstrapBlazor/Components/IPLocator/IPLocatorOption.cs b/src/BootstrapBlazor/Components/IPLocator/IPLocatorOption.cs index 9074ef1da69..ee75713bd7b 100644 --- a/src/BootstrapBlazor/Components/IPLocator/IPLocatorOption.cs +++ b/src/BootstrapBlazor/Components/IPLocator/IPLocatorOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,39 +8,46 @@ namespace BootstrapBlazor.Components; /// -/// IP定位器配置项 +/// IP定位器配置项 +/// IP Locator Options /// [Obsolete("已弃用,请参考 https://www.blazor.zone/locator")] [ExcludeFromCodeCoverage] public class IPLocatorOption { /// - /// 获得/设置 定位器创建方法未设置使用内部定位器 + /// 获得/设置 定位器创建方法未设置使用内部定位器 + /// Get/Set Locator Factory Method. Use internal locator if not set /// public Func? LocatorFactory { get; set; } /// - /// 获得/设置 IP地址请求超时时间 默认为 3000 毫秒 + /// 获得/设置 IP地址请求超时时间 默认为 3000 毫秒 + /// Get/Set IP Address Request Timeout. Default 3000 ms /// public int RequestTimeout { get; set; } = 3000; /// - /// 获得 本机地址列表 + /// 获得 本机地址列表 + /// Get Localhost Address List /// public List Localhosts { get; } = new List(new string[] { "::1", "127.0.0.1" }); /// - /// 获得/设置 IP地址 + /// 获得/设置 IP地址 + /// Get/Set IP Address /// protected internal string? IP { get; set; } /// - /// 获得/设置 HttpClient 实体类 + /// 获得/设置 HttpClient 实体类 + /// Get/Set HttpClient Instance /// protected internal HttpClient? HttpClient { get; set; } /// - /// 获得/设置 ILogger 实体类 + /// 获得/设置 ILogger 实体类 + /// Get/Set ILogger Instance /// protected internal ILogger? Logger { get; set; } } diff --git a/src/BootstrapBlazor/Components/Icon/BootstrapBlazorIcon.razor.cs b/src/BootstrapBlazor/Components/Icon/BootstrapBlazorIcon.razor.cs index 93a2dd59ca1..b0093e6b5e7 100644 --- a/src/BootstrapBlazor/Components/Icon/BootstrapBlazorIcon.razor.cs +++ b/src/BootstrapBlazor/Components/Icon/BootstrapBlazorIcon.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,44 @@ namespace BootstrapBlazor.Components; /// -/// Icon 组件 +/// Icon 组件 +/// Icon Component /// public partial class BootstrapBlazorIcon { /// - /// 获得/设置 图标名称 + /// 获得/设置 图标名称 + /// Get/Set Icon Name + /// 10.2.2 /// - /// 如果是字库图标应该是样式名称如 fa-solid fa-home 如果是 svg sprites 应该为 Id + /// + /// 如果是字库图标应该是样式名称如 fa-solid fa-home 如果是 svg sprites 应该为 Id + /// If it is a font icon, it should be a style name such as fa-solid fa-home. If it is svg sprites, it should be the Id. + /// [Parameter] [NotNull] public string? Name { get; set; } /// - /// 获得/设置 是否为 svg sprites 默认 false + /// 获得/设置 是否为 svg sprites 默认 false + /// Get/Set Whether is svg sprites Default false + /// 10.2.2 /// [Parameter] public bool IsSvgSprites { get; set; } /// - /// 获得/设置 Svg Sprites 路径 + /// 获得/设置 Svg Sprites 路径 + /// Get/Set Svg Sprites Path + /// 10.2.2 /// [Parameter] public string? Url { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Icon/SvgIcon.razor.cs b/src/BootstrapBlazor/Components/Icon/SvgIcon.razor.cs index 3cda33b8baa..52550275328 100644 --- a/src/BootstrapBlazor/Components/Icon/SvgIcon.razor.cs +++ b/src/BootstrapBlazor/Components/Icon/SvgIcon.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,25 +6,29 @@ namespace BootstrapBlazor.Components; /// -/// SvgIcon 组件 +/// SvgIcon 组件 +/// SvgIcon Component /// public partial class SvgIcon { /// - /// 获得/设置 图标名称 + /// 获得/设置 图标名称 + /// Get/Set Icon Name /// [Parameter, NotNull] [EditorRequired] public string? Name { get; set; } /// - /// 获得 图标地址 + /// 获得 图标地址 + /// Get Icon URL /// [Parameter, NotNull] public string? Href { get; set; } /// - /// 获得 样式字符串 + /// 获得 样式字符串 + /// Get Style String /// private string? ClassString => CssBuilder.Default("bb-svg-icon") .AddClass($"bb-svg-icon-{Name}", !string.IsNullOrEmpty(Name)) diff --git a/src/BootstrapBlazor/Components/ImagePreviewer/ImagePreviewer.razor.cs b/src/BootstrapBlazor/Components/ImagePreviewer/ImagePreviewer.razor.cs index 5a6b5af30aa..fe5f86f6343 100644 --- a/src/BootstrapBlazor/Components/ImagePreviewer/ImagePreviewer.razor.cs +++ b/src/BootstrapBlazor/Components/ImagePreviewer/ImagePreviewer.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 图片预览组件 +/// 图片预览组件 +/// Image Previewer Component /// public partial class ImagePreviewer { @@ -27,13 +28,17 @@ public partial class ImagePreviewer .Build(); /// - /// 获得/设置 原生 z-index 属性 默认 2050 + /// 获得/设置 原生 z-index 属性 默认 2050 + /// Get/Set z-index property Default 2050 + /// 10.2.2 /// [Parameter] public int ZIndex { get; set; } = 2050; /// - /// 获得/设置 预览大图链接集合 默认 null + /// 获得/设置 预览大图链接集合 默认 null + /// Get/Set Preview Image List Default null + /// 10.2.2 /// [Parameter] [NotNull] @@ -43,43 +48,57 @@ public partial class ImagePreviewer public List? PreviewList { get; set; } /// - /// 获得/设置 上一张图片 Icon 图标 + /// 获得/设置 上一张图片 Icon 图标 + /// Get/Set Previous Image Icon + /// 10.2.2 /// [Parameter] public string? PreviousIcon { get; set; } /// - /// 获得/设置 下一张图片 Icon 图标 + /// 获得/设置 下一张图片 Icon 图标 + /// Get/Set Next Image Icon + /// 10.2.2 /// [Parameter] public string? NextIcon { get; set; } /// - /// 获得/设置 缩小 Icon 图标 + /// 获得/设置 缩小 Icon 图标 + /// Get/Set Zoom Out Icon + /// 10.2.2 /// [Parameter] public string? MinusIcon { get; set; } /// - /// 获得/设置 方法 Icon 图标 + /// 获得/设置 放大 Icon 图标 + /// Get/Set Zoom In Icon + /// 10.2.2 /// [Parameter] public string? PlusIcon { get; set; } /// - /// 获得/设置 向左旋转 Icon 图标 + /// 获得/设置 向左旋转 Icon 图标 + /// Get/Set Rotate Left Icon + /// 10.2.2 /// [Parameter] public string? RotateLeftIcon { get; set; } /// - /// 获得/设置 向右旋转 Icon 图标 + /// 获得/设置 向右旋转 Icon 图标 + /// Get/Set Rotate Right Icon + /// 10.2.2 /// [Parameter] public string? RotateRightIcon { get; set; } /// - /// 获得/设置 预览缩放速度 默认 null 未设置取 0.015 值 + /// 获得/设置 预览缩放速度 默认 null 未设置取 0.015 值 + /// Get/Set Zoom Speed Default null 0.015 if not set + /// 10.2.2 /// [Parameter] public double? ZoomSpeed { get; set; } @@ -102,7 +121,8 @@ public partial class ImagePreviewer .Build(); /// - /// 显示图片 + /// 显示图片 + /// Show Image /// /// public Task Show(int index = 0) => InvokeVoidAsync("show", Id, index); diff --git a/src/BootstrapBlazor/Components/ImageViewer/ImageViewer.razor.cs b/src/BootstrapBlazor/Components/ImageViewer/ImageViewer.razor.cs index d90dd458fd0..07552a63491 100644 --- a/src/BootstrapBlazor/Components/ImageViewer/ImageViewer.razor.cs +++ b/src/BootstrapBlazor/Components/ImageViewer/ImageViewer.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Image 组件 +/// Image 组件 +/// Image Component /// public partial class ImageViewer { /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get Component Style /// private string? ClassString => CssBuilder.Default("bb-img") .AddClass("is-preview", ShowPreviewList) @@ -24,7 +26,9 @@ public partial class ImageViewer .Build(); /// - /// 获得/设置 图片 Url 默认 null 必填 + /// 获得/设置 图片 Url 默认 null 必填 + /// Get/Set Image Url Default null Required + /// 10.2.2 /// [Parameter] [NotNull] @@ -32,92 +36,125 @@ public partial class ImageViewer public string? Url { get; set; } /// - /// 获得/设置 图片是否异步加载 + /// 获得/设置 图片是否异步加载 + /// Get/Set whether the image is loaded asynchronously + /// 10.2.2 /// [Parameter] public bool IsAsync { get; set; } /// - /// 获得/设置 原生 alt 属性 默认 null 未设置 + /// 获得/设置 原生 alt 属性 默认 null 未设置 + /// Get/Set Native alt Attribute Default null + /// 10.2.2 /// [Parameter] public string? Alt { get; set; } /// - /// 获得/设置 是否显示占位符 适用于大图片加载 默认 false + /// 获得/设置 是否显示占位符 适用于大图片加载 默认 false + /// Get/Set Whether to show placeholder. Suitable for large image loading. Default false + /// 10.2.2 /// [Parameter] public bool ShowPlaceHolder { get; set; } /// - /// 获得/设置 加载失败时是否显示错误占位符 默认 false + /// 获得/设置 加载失败时是否显示错误占位符 默认 false + /// Get/Set Whether to show error placeholder when loading fails. Default false + /// 10.2.2 /// [Parameter] public bool HandleError { get; set; } /// - /// 获得/设置 占位模板 未设置 或者 正在加载时显示 默认 null 未设置 + /// 获得/设置 占位模板 未设置 或者 正在加载时显示 默认 null 未设置 + /// Get/Set Placeholder Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? PlaceHolderTemplate { get; set; } /// - /// 获得/设置 错误模板 默认 null 未设置 + /// 获得/设置 错误模板 默认 null 未设置 + /// Get/Set Error Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? ErrorTemplate { get; set; } /// - /// 获得/设置 原生 object-fit 属性 默认 fill 未设置 + /// 获得/设置 原生 object-fit 属性 默认 fill 未设置 + /// Get/Set Native object-fit Attribute. Default fill + /// 10.2.2 /// [Parameter] public ObjectFitMode FitMode { get; set; } /// - /// 获得/设置 原生 z-index 属性 默认 2050 + /// 获得/设置 原生 z-index 属性 默认 2050 + /// Get/Set Native z-index Attribute. Default 2050 + /// 10.2.2 /// [Parameter] public int ZIndex { get; set; } = 2050; /// - /// 获得/设置 预览大图链接集合 默认 null + /// 获得/设置 预览大图链接集合 默认 null + /// Get/Set Preview Image List Default null + /// 10.2.2 /// [Parameter] public List? PreviewList { get; set; } /// - /// 获得/设置 预览大图当前链接集合点开的索引 默认为 0 + /// 获得/设置 预览大图当前链接集合点开的索引 默认为 0 + /// Get/Set Index of the currently opened link in the preview image list Default 0 + /// 10.2.2 /// [Parameter] public int PreviewIndex { get; set; } = 0; /// - /// 获得/设置 图片加载失败时回调方法 + /// 获得/设置 图片加载失败时回调方法 + /// Get/Set Callback method when image loading fails + /// 10.2.2 /// [Parameter] public Func? OnErrorAsync { get; set; } /// - /// 获得/设置 图片加载成功时回调方法 + /// 获得/设置 图片加载成功时回调方法 + /// Get/Set Callback method when image loading succeeds + /// 10.2.2 /// [Parameter] public Func? OnLoadAsync { get; set; } /// - /// 获得/设置 图片文件图标 + /// 获得/设置 图片文件图标 + /// Get/Set Image File Icon + /// 10.2.2 /// [Parameter] public string? FileIcon { get; set; } /// - /// 获得/设置 是否交叉监听 默认 false + /// 获得/设置 是否交叉监听 默认 false + /// Get/Set Whether Intersection Observer. Default false + /// 10.2.2 /// - /// 不可见时不加载图片,当图片即将可见时才开始加载图片 + /// + /// 不可见时不加载图片,当图片即将可见时才开始加载图片 + /// Images are not loaded when not visible, and start loading when they are about to become visible. + /// [Parameter] public bool IsIntersectionObserver { get; set; } /// - /// 获得/设置 预览缩放速度 默认 null 未设置取 0.015 值 + /// 获得/设置 预览缩放速度 默认 null 未设置取 0.015 值 + /// Get/Set Zoom Speed Default null 0.015 if not set + /// 10.2.2 /// [Parameter] public double? ZoomSpeed { get; set; } diff --git a/src/BootstrapBlazor/Components/Input/BootstrapInput.razor.cs b/src/BootstrapBlazor/Components/Input/BootstrapInput.razor.cs index b9153708ae6..b503f805af1 100644 --- a/src/BootstrapBlazor/Components/Input/BootstrapInput.razor.cs +++ b/src/BootstrapBlazor/Components/Input/BootstrapInput.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapInput 组件 +/// BootstrapInput 组件 +/// BootstrapInput Component /// public partial class BootstrapInput { /// - /// 获得/设置 是否为只读 默认 false + /// 获得/设置 是否为只读 默认 false + /// Get/Set Readonly. Default false + /// 10.2.2 /// [Parameter] public bool Readonly { get; set; } /// - /// 获得/设置 用户删除后是否自动更改为默认值 0 默认 false + /// 获得/设置 用户删除后是否自动更改为默认值 0 默认 false + /// Get/Set Whether to automatically set default value when user deletes. Default false + /// 10.2.2 /// [Parameter] public bool AutoSetDefaultWhenNull { get; set; } /// - /// 获得/设置 是否显示清空小按钮 默认 false + /// 获得/设置 是否显示清空小按钮 默认 false + /// Get/Set Whether to show clear button. Default false + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 IsClearable 参数;Deprecated use the IsClearable parameter")] @@ -31,19 +38,25 @@ public partial class BootstrapInput public bool Clearable { get => IsClearable; set => IsClearable = value; } /// - /// 获得/设置 是否显示清空小按钮 默认 false + /// 获得/设置 是否显示清空小按钮 默认 false + /// Get/Set Whether to show clear button. Default false + /// 10.2.2 /// [Parameter] public bool IsClearable { get; set; } /// - /// 获得/设置 清空文本框时回调方法 默认 null + /// 获得/设置 清空文本框时回调方法 默认 null + /// Get/Set Callback when clearing text box. Default null + /// 10.2.2 /// [Parameter] public Func? OnClear { get; set; } /// - /// 获得/设置 清空小按钮图标 默认 null + /// 获得/设置 清空小按钮图标 默认 null + /// Get/Set Clear button icon. Default null + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 ClearIcon 参数;Deprecated use the ClearIcon parameter")] @@ -51,13 +64,16 @@ public partial class BootstrapInput public string? ClearableIcon { get => ClearIcon; set => ClearIcon = value; } /// - /// 获得/设置 清空小按钮图标 默认 null + /// 获得/设置 清空小按钮图标 默认 null + /// Get/Set Clear button icon. Default null + /// 10.2.2 /// [Parameter] public string? ClearIcon { get; set; } /// - /// 图标主题服务 + /// 图标主题服务 + /// Icon Theme Service /// [Inject] [NotNull] diff --git a/src/BootstrapBlazor/Components/Input/BootstrapInputBase.cs b/src/BootstrapBlazor/Components/Input/BootstrapInputBase.cs index 1b48bf96810..c9caa05c928 100644 --- a/src/BootstrapBlazor/Components/Input/BootstrapInputBase.cs +++ b/src/BootstrapBlazor/Components/Input/BootstrapInputBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// Base class for BootstrapInput components +/// Base class for BootstrapInput components +/// Base class for BootstrapInput components /// [BootstrapModuleAutoLoader("Input/BootstrapInput.razor.js", JSObjectReference = true, AutoInvokeInit = false)] public abstract class BootstrapInputBase : ValidateBase { /// - /// Gets the class attribute value + /// 获得 the class attribute value + /// Gets the class attribute value /// protected virtual string? ClassName => CssBuilder.Default("form-control") .AddClass($"border-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled && !IsValid.HasValue) @@ -20,67 +22,89 @@ public abstract class BootstrapInputBase : ValidateBase .Build(); /// - /// Gets or sets the placeholder attribute value + /// 获得/设置 the placeholder attribute value + /// Gets or sets the placeholder attribute value + /// 10.2.2 /// [Parameter] public string? PlaceHolder { get; set; } /// - /// Gets or sets the callback method for Enter key press, default is null + /// 获得/设置 the 回调方法 for Enter key press, default is null + /// Gets or sets the callback method for Enter key press, default is null + /// 10.2.2 /// [Parameter] public Func? OnEnterAsync { get; set; } /// - /// Gets or sets the callback method for Esc key press, default is null + /// 获得/设置 the 回调方法 for Esc key press, default is null + /// Gets or sets the callback method for Esc key press, default is null + /// 10.2.2 /// [Parameter] public Func? OnEscAsync { get; set; } /// - /// Gets or sets the button color + /// 获得/设置 the 按钮 颜色 + /// Gets or sets the button color + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.None; /// - /// Gets or sets the formatter function + /// 获得/设置 the formatter function + /// Gets or sets the formatter function + /// 10.2.2 /// [Parameter] public Func? Formatter { get; set; } /// - /// Gets or sets the format string, e.g., "yyyy-MM-dd" for date types + /// 获得/设置 the format string, e.g., "yyyy-MM-dd" for date 类型s + /// Gets or sets the format string, e.g., "yyyy-MM-dd" for date types + /// 10.2.2 /// [Parameter] public string? FormatString { get; set; } /// - /// Gets or sets whether to automatically focus, default is false + /// 获得/设置 是否 to automatically focus, default is false + /// Gets or sets whether to automatically focus, default is false + /// 10.2.2 /// [Parameter] public bool IsAutoFocus { get; set; } /// - /// Gets or sets whether to automatically select all text on focus, default is false + /// 获得/设置 是否 to automatically select all text on focus, default is false + /// Gets or sets whether to automatically select all text on focus, default is false + /// 10.2.2 /// [Parameter] public bool IsSelectAllTextOnFocus { get; set; } /// - /// Gets or sets whether to automatically select all text on Enter key press, default is false + /// 获得/设置 是否 to automatically select all text on Enter key press, default is false + /// Gets or sets whether to automatically select all text on Enter key press, default is false + /// 10.2.2 /// [Parameter] public bool IsSelectAllTextOnEnter { get; set; } /// - /// Gets or sets whether to automatically trim whitespace, default is false + /// 获得/设置 是否 to automatically trim whitespace, default is false + /// Gets or sets whether to automatically trim whitespace, default is false + /// 10.2.2 /// [Parameter] public bool IsTrim { get; set; } /// - /// Gets or sets the callback method for blur event, default is null + /// 获得/设置 the 回调方法 for blur event, default is null + /// Gets or sets the callback method for blur event, default is null + /// 10.2.2 /// [Parameter] public Func? OnBlurAsync { get; set; } @@ -89,24 +113,28 @@ public abstract class BootstrapInputBase : ValidateBase private Modal? Modal { get; set; } /// - /// Gets the input type, default is "text" + /// 获得 the input 类型, default is "text" + /// Gets the input type, default is "text" /// protected string Type { get; set; } = "text"; /// - /// Method to focus the element + /// Method to focus the element + /// Method to focus the element /// /// public async Task FocusAsync() => await InvokeVoidAsync("focus", GetInputId()); /// - /// Method to select all text + /// Method to select all text + /// Method to select all text /// /// public async ValueTask SelectAllTextAsync() => await InvokeVoidAsync("select", Id); /// - /// Gets or sets whether to skip JS script registration for Enter/Esc key handling, default is false + /// 获得/设置 是否 to skip JS script registration for Enter/Esc key handling, default is false + /// Gets or sets whether to skip JS script registration for Enter/Esc key handling, default is false /// protected bool SkipRegisterEnterEscJSInvoke { get; set; } @@ -168,12 +196,14 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } /// - /// Gets the input element Id + /// 获得 the input element Id + /// Gets the input element Id /// protected virtual string? GetInputId() => Id; /// - /// Value formatting delegate method + /// Value formatting 委托 method + /// Value formatting delegate method /// /// /// @@ -184,7 +214,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) : base.FormatValueAsString(value)); /// - /// TryParseValueFromString + /// TryParseValueFromString + /// TryParseValueFromString /// /// /// @@ -193,7 +224,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) protected override bool TryParseValueFromString(string value, [MaybeNullWhen(false)] out TValue result, out string? validationErrorMessage) => base.TryParseValueFromString(IsTrim ? value.Trim() : value, out result, out validationErrorMessage); /// - /// OnBlur method + /// OnBlur method + /// OnBlur method /// protected virtual async Task OnBlur() { @@ -204,7 +236,8 @@ protected virtual async Task OnBlur() } /// - /// Client-side EnterCallback method + /// Client-side EnterCallback method + /// Client-side EnterCallback method /// /// [JSInvokable] @@ -217,7 +250,8 @@ public async Task EnterCallback() } /// - /// Client-side EscCallback method + /// Client-side EscCallback method + /// Client-side EscCallback method /// /// [JSInvokable] @@ -230,7 +264,8 @@ public async Task EscCallback() } /// - /// + /// + /// /// /// /// diff --git a/src/BootstrapBlazor/Components/Input/BootstrapInputEventBase.cs b/src/BootstrapBlazor/Components/Input/BootstrapInputEventBase.cs index 3a7ba9ed708..2b0cff01604 100644 --- a/src/BootstrapBlazor/Components/Input/BootstrapInputEventBase.cs +++ b/src/BootstrapBlazor/Components/Input/BootstrapInputEventBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,19 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 输入框基类 +/// 输入框基类 +/// Input Base Class /// public abstract class BootstrapInputEventBase : BootstrapInputBase { /// - /// 获得/设置 是否在文本框输入值时触发 bind-value:event="oninput" 默认 false + /// 获得/设置 是否在文本框输入值时触发 bind-value:event="oninput" 默认 false + /// Get/Set Whether to trigger bind-value:event="oninput" when entering value in text box. Default false + /// 10.2.2 /// - /// 设置 参数后,Formatter 与 FormatString 均失效 + /// + /// 设置 参数后,Formatter 与 FormatString 均失效 + /// After setting the parameter, both Formatter and FormatString become invalid + /// [Parameter] public bool UseInputEvent { get; set; } /// - /// event 字符串 + /// event 字符串 + /// event String /// protected string EventString => UseInputEvent ? "oninput" : "onchange"; } diff --git a/src/BootstrapBlazor/Components/Input/BootstrapInputGroup.razor.cs b/src/BootstrapBlazor/Components/Input/BootstrapInputGroup.razor.cs index e5f177d99e6..3168a0f5d2a 100644 --- a/src/BootstrapBlazor/Components/Input/BootstrapInputGroup.razor.cs +++ b/src/BootstrapBlazor/Components/Input/BootstrapInputGroup.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapInputGroup 组件 +/// BootstrapInputGroup 组件 +/// BootstrapInputGroup Component /// public partial class BootstrapInputGroup { @@ -15,7 +16,9 @@ public partial class BootstrapInputGroup .Build(); /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Input/BootstrapInputGroupIcon.razor.cs b/src/BootstrapBlazor/Components/Input/BootstrapInputGroupIcon.razor.cs index 19798f2b4e0..2dc6f586ed8 100644 --- a/src/BootstrapBlazor/Components/Input/BootstrapInputGroupIcon.razor.cs +++ b/src/BootstrapBlazor/Components/Input/BootstrapInputGroupIcon.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// +/// BootstrapInputGroupIcon 组件 +/// BootstrapInputGroupIcon Component /// public partial class BootstrapInputGroupIcon { @@ -15,7 +16,9 @@ public partial class BootstrapInputGroupIcon .Build(); /// - /// + /// 获得/设置 Icon + /// Get/Set Icon + /// 10.2.2 /// [Parameter] #if NET6_0_OR_GREATER diff --git a/src/BootstrapBlazor/Components/Input/BootstrapInputGroupLabel.cs b/src/BootstrapBlazor/Components/Input/BootstrapInputGroupLabel.cs index 708a4f30cf9..67334a7c542 100644 --- a/src/BootstrapBlazor/Components/Input/BootstrapInputGroupLabel.cs +++ b/src/BootstrapBlazor/Components/Input/BootstrapInputGroupLabel.cs @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapInputGroupLabel 组件 +/// BootstrapInputGroupLabel 组件 +/// BootstrapInputGroupLabel Component /// public sealed class BootstrapInputGroupLabel : DisplayBase { @@ -28,31 +29,41 @@ public sealed class BootstrapInputGroupLabel : DisplayBase private string TagName => IsInputGroupLabel ? "div" : "label"; /// - /// 获得/设置 标签宽度 默认 null 未设置自动适应 + /// 获得/设置 标签宽度 默认 null 未设置自动适应 + /// Get/Set Label Width. Default null (Auto Fit) + /// 10.2.2 /// [Parameter] public int? Width { get; set; } /// - /// 获得/设置 标签对其方式 默认 null 未设置 star 对齐 + /// 获得/设置 标签对其方式 默认 null 未设置 star 对齐 + /// Get/Set Label Alignment. Default null (Start Alignment) + /// 10.2.2 /// [Parameter] public Alignment Alignment { get; set; } /// - /// 获得/设置 是否显示必填项标识 默认 false + /// 获得/设置 是否显示必填项标识 默认 false + /// Get/Set Whether to show required mark. Default false + /// 10.2.2 /// [Parameter] public bool ShowRequiredMark { get; set; } /// - /// Gets or sets the child content. Default is null. + /// 获得/设置 the child 内容. 默认为 null. + /// Gets or sets the child content. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否为 InputGroup 或 TableToolbar 内的标签 默认 null 未设置 + /// 获得/设置 是否为 InputGroup 或 TableToolbar 内的标签 默认 null 未设置 + /// Get/Set Whether it is a label inside InputGroup or TableToolbar. Default null (Not set) + /// 10.2.2 /// [Parameter] public bool? IsGroupLabel { get; set; } diff --git a/src/BootstrapBlazor/Components/Input/BootstrapPassword.cs b/src/BootstrapBlazor/Components/Input/BootstrapPassword.cs index 970259d0363..3956a89edc7 100644 --- a/src/BootstrapBlazor/Components/Input/BootstrapPassword.cs +++ b/src/BootstrapBlazor/Components/Input/BootstrapPassword.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapPassword 组件 +/// BootstrapPassword 组件 +/// BootstrapPassword Component /// public class BootstrapPassword : BootstrapInput { /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { diff --git a/src/BootstrapBlazor/Components/Input/FloatingLabel.razor.cs b/src/BootstrapBlazor/Components/Input/FloatingLabel.razor.cs index b5b43a3837a..639b0547874 100644 --- a/src/BootstrapBlazor/Components/Input/FloatingLabel.razor.cs +++ b/src/BootstrapBlazor/Components/Input/FloatingLabel.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// FloatingLabel 组件 +/// FloatingLabel 组件 +/// FloatingLabel Component /// /// public partial class FloatingLabel @@ -16,7 +17,9 @@ public partial class FloatingLabel .Build(); /// - /// 获得/设置 是否为 GroupBox 样式 默认 false + /// 获得/设置 是否为 GroupBox 样式 默认 false + /// Get/Set Whether it is GroupBox style. Default false + /// 10.2.2 /// [Parameter] public bool IsGroupBox { get; set; } diff --git a/src/BootstrapBlazor/Components/Input/OtpInput.razor.cs b/src/BootstrapBlazor/Components/Input/OtpInput.razor.cs index 26ac362580b..6205b95a991 100644 --- a/src/BootstrapBlazor/Components/Input/OtpInput.razor.cs +++ b/src/BootstrapBlazor/Components/Input/OtpInput.razor.cs @@ -6,31 +6,40 @@ namespace BootstrapBlazor.Components; /// -/// OTP input component +/// OTP input component +/// OTP input component /// [BootstrapModuleAutoLoader("Input/OtpInput.razor.js", JSObjectReference = true)] public partial class OtpInput { /// - /// Gets or sets the length of the OTP input. Default is 6. + /// 获得/设置 the length of the OTP input. 默认为 6. + /// Gets or sets the length of the OTP input. Default is 6. + /// 10.2.2 /// [Parameter] public int Digits { get; set; } = 6; /// - /// Gets or sets whether the OTP input is readonly. Default is false. + /// 获得/设置 是否 the OTP input is readonly. 默认为 false. + /// Gets or sets whether the OTP input is readonly. Default is false. + /// 10.2.2 /// [Parameter] public bool IsReadonly { get; set; } /// - /// Gets or sets the value type of the OTP input. Default is . + /// 获得/设置 the value 类型 of the OTP input. 默认为 . + /// Gets or sets the value type of the OTP input. Default is . + /// 10.2.2 /// [Parameter] public OtpInputType Type { get; set; } /// - /// Gets or sets the placeholder of the OTP input. Default is null. + /// 获得/设置 the placeholder of the OTP input. 默认为 null. + /// Gets or sets the placeholder of the OTP input. Default is null. + /// 10.2.2 /// [Parameter] public string? PlaceHolder { get; set; } @@ -99,7 +108,8 @@ protected override void OnParametersSet() } /// - /// Trigger value changed event callback. Trigger by JavaScript. + /// Trigger value changed event 回调. Trigger by JavaScript. + /// Trigger value changed event callback. Trigger by JavaScript. /// /// /// diff --git a/src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumber.razor.cs b/src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumber.razor.cs index adf18913e06..1480ec16a82 100644 --- a/src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumber.razor.cs +++ b/src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumber.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,13 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// An input component for editing numeric values. -/// Supported numeric types are , , , , , . +/// An input component for editing numeric values. Supported numeric 类型s are , , , , , . +/// An input component for editing numeric values. Supported numeric types are , , , , , . /// public partial class BootstrapInputNumber { /// - /// 获得 按钮样式 + /// 获得 按钮样式 + /// Get Button Style /// protected string? ButtonClassString => CssBuilder.Default("btn") .AddClass("btn-outline-secondary", Color == Color.None) @@ -23,7 +24,8 @@ public partial class BootstrapInputNumber .Build(); /// - /// 获得 文本框样式 + /// 获得 文本框样式 + /// Get Text Box Style /// protected string? InputClassString => CssBuilder.Default("form-control") .AddClass(CssClass).AddClass(ValidCss) @@ -36,49 +38,65 @@ public partial class BootstrapInputNumber private string? StepString { get; set; } /// - /// 获得/设置 数值增加时回调委托 + /// 获得/设置 数值增加时回调委托 + /// Get/Set Callback delegate when value increases + /// 10.2.2 /// [Parameter] public Func? OnIncrement { get; set; } /// - /// 获得/设置 数值减少时回调委托 + /// 获得/设置 数值减少时回调委托 + /// Get/Set Callback delegate when value decreases + /// 10.2.2 /// [Parameter] public Func? OnDecrement { get; set; } /// - /// 获得/设置 最小值 + /// 获得/设置 最小值 + /// Get/Set Minimum Value + /// 10.2.2 /// [Parameter] public string? Min { get; set; } /// - /// 获得/设置 最大值 + /// 获得/设置 最大值 + /// Get/Set Maximum Value + /// 10.2.2 /// [Parameter] public string? Max { get; set; } /// - /// 获得/设置 步长 默认为 null + /// 获得/设置 步长 默认为 null + /// Get/Set Step. Default null + /// 10.2.2 /// [Parameter] public string? Step { get; set; } /// - /// 获得/设置 是否显示加减按钮 + /// 获得/设置 是否显示加减按钮 + /// Get/Set Whether to show increment/decrement buttons + /// 10.2.2 /// [Parameter] public bool ShowButton { get; set; } /// - /// 获得/设置 减小数值图标 + /// 获得/设置 减小数值图标 + /// Get/Set Decrement Icon + /// 10.2.2 /// [Parameter] public string? MinusIcon { get; set; } /// - /// 获得/设置 增加数值图标 + /// 获得/设置 增加数值图标 + /// Get/Set Increment Icon + /// 10.2.2 /// [Parameter] public string? PlusIcon { get; set; } @@ -157,7 +175,8 @@ protected override void OnAfterRender(bool firstRender) protected override string? FormatParsingErrorMessage() => string.Format(CultureInfo.InvariantCulture, ParsingErrorMessage, DisplayText); /// - /// Formats the value as a string. Derived classes can override this to determine the formatting used for . + /// Formats the value as a string. Derived classes can override this to determine the formatting used for . + /// Formats the value as a string. Derived classes can override this to determine the formatting used for . /// /// The value to format. /// A string representation of the value. @@ -170,7 +189,8 @@ protected override void OnAfterRender(bool firstRender) : InternalFormat(value)); /// - /// InternalFormat 方法 + /// InternalFormat 方法 + /// InternalFormat Method /// /// /// @@ -190,7 +210,8 @@ protected override void OnAfterRender(bool firstRender) private string GetStepString() => (string.IsNullOrEmpty(StepString) || StepString.Equals("any", StringComparison.OrdinalIgnoreCase)) ? "1" : StepString; /// - /// 点击减少按钮式时回调此方法 + /// 点击减少按钮式时回调此方法 + /// Callback method when decrement button is clicked /// /// private async Task OnClickDec() @@ -226,7 +247,8 @@ private async Task OnClickDec() } /// - /// 点击增加按钮式时回调此方法 + /// 点击增加按钮式时回调此方法 + /// Callback method when increment button is clicked /// /// private async Task OnClickInc() diff --git a/src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumberBase.cs b/src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumberBase.cs index 7e3fc9f5859..1293d6e9af4 100644 --- a/src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumberBase.cs +++ b/src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumberBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapInputNumber 基类 +/// BootstrapInputNumber 基类 +/// BootstrapInputNumber Base Class /// public class BootstrapInputNumberBase : BootstrapInputEventBase { /// - /// SetParametersAsync 方法 + /// SetParametersAsync 方法 + /// SetParametersAsync Method /// /// /// diff --git a/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserver.razor.cs b/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserver.razor.cs index 2302c3ec051..ba335893976 100644 --- a/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserver.razor.cs +++ b/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserver.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,49 +6,65 @@ namespace BootstrapBlazor.Components; /// -/// 可见检测组件 +/// 可见检测组件 +/// 可见检测component /// public partial class IntersectionObserver { /// - /// 获得/设置 是否使用元素视口作为根元素 默认为 true 使用当前元素作为根元素 - /// The element that is used as the viewport for checking visibility of the target. Must be the ancestor of the target. Defaults to the browser viewport if value is false. Default value is true + /// 获得/设置 是否使用元素视口作为根元素 默认为 true 使用当前元素作为根元素 The element that is used as the viewport for checking visibility of the target. Must be the ancestor of the target. Defaults to the browser viewport if value is false. Default value is true + /// + /// Gets or sets whether使用元素视口作为根元素 Default is为 true 使用当前元素作为根元素 The element that is used as the viewport for checking visibility of the target. Must be the ancestor of the target. Defaults to the browser viewport if value is false. Default value is true + /// + /// 10.2.2 /// [Parameter] public bool UseElementViewport { get; set; } = true; /// - /// Margin around the root. Can have values similar to the CSS margin property, e.g. "10px 20px 30px 40px" (top, right, bottom, left). The values can be percentages. This set of values serves to grow or shrink each side of the root element's bounding box before computing intersections. Defaults to all zeros. + /// Margin around the root. Can have values similar to the CSS margin 属性, e.g. "10px 20px 30px 40px" (top, right, bottom, left). values can be percentages. This set of values serves to grow or shrink each side of the root element's bounding box before computing intersections. 默认s to all zeros. + /// Margin around the root. Can have values similar to the CSS margin property, e.g. "10px 20px 30px 40px" (top, right, bottom, left). The values can be percentages. This set of values serves to grow or shrink each side of the root element's bounding box before computing intersections. Defaults to all zeros. + /// 10.2.2 /// [Parameter] public string? RootMargin { get; set; } /// - /// Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed. If you only want to detect when visibility passes the 50% mark, you can use a value of 0.5. If you want the callback to run every time visibility passes another 25%, you would specify the array [0, 0.25, 0.5, 0.75, 1]. The default is 0 (meaning as soon as even one pixel is visible, the callback will be run). A value of 1.0 means that the threshold isn't considered passed until every pixel is visible. + /// Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's 回调 should be executed. If you only want to detect when visibility passes the 50% mark, you can use a value of 0.5. If you want the 回调 to run every time visibility passes another 25%, you would specify the array [0, 0.25, 0.5, 0.75, 1]. default is 0 (meaning as soon as even one pixel is visible, the 回调 will be run). A value of 1.0 means that the threshold isn't considered passed until every pixel is visible. + /// Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed. If you only want to detect when visibility passes the 50% mark, you can use a value of 0.5. If you want the callback to run every time visibility passes another 25%, you would specify the array [0, 0.25, 0.5, 0.75, 1]. The default is 0 (meaning as soon as even one pixel is visible, the callback will be run). A value of 1.0 means that the threshold isn't considered passed until every pixel is visible. + /// 10.2.2 /// [Parameter] public string? Threshold { get; set; } /// - /// 获得/设置 可见后是否自动取消观察 默认 true 可见后自动取消观察提高性能 + /// 获得/设置 可见后是否自动取消观察 默认 true 可见后自动取消观察提高性能 + /// Gets or sets 可见后whether自动取消观察 Default is true 可见后自动取消观察提高性能 + /// 10.2.2 /// [Parameter] public bool AutoUnobserveWhenIntersection { get; set; } = true; /// - /// 获得/设置 不可见后是否自动取消观察 默认 false 不可见后自动取消观察提高性能 + /// 获得/设置 不可见后是否自动取消观察 默认 false 不可见后自动取消观察提高性能 + /// Gets or sets 不可见后whether自动取消观察 Default is false 不可见后自动取消观察提高性能 + /// 10.2.2 /// [Parameter] public bool AutoUnobserveWhenNotIntersection { get; set; } /// - /// 获得/设置 已经交叉回调方法 + /// 获得/设置 已经交叉回调方法 + /// Gets or sets 已经交叉callback method + /// 10.2.2 /// [Parameter] public Func? OnIntersecting { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Gets or sets 子component + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } @@ -64,9 +80,10 @@ public partial class IntersectionObserver protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, new { UseElementViewport, RootMargin, Threshold, AutoUnobserveWhenIntersection, AutoUnobserveWhenNotIntersection, Callback = nameof(TriggerIntersecting) }); /// - /// 交叉检测回调方法 由 JavaScript 调用 + /// 交叉检测回调方法 由 JavaScript 调用 + /// 交叉检测callback method 由 JavaScript 调用 /// - /// 实例 + /// 实例 instance /// [JSInvokable] public async Task TriggerIntersecting(IntersectionObserverEntry entry) diff --git a/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverEntry.cs b/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverEntry.cs index 97e91e396e2..e1cfd215802 100644 --- a/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverEntry.cs +++ b/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverEntry.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,28 +6,33 @@ namespace BootstrapBlazor.Components; /// -/// 交叉检测项实例类 +/// 交叉检测项实例类 +/// 交叉检测项instance类 /// public class IntersectionObserverEntry { /// - /// 获得/设置 检测项与根元素交叉比率 0 - 1 之间 + /// 获得/设置 检测项与根元素交叉比率 0 - 1 之间 + /// Gets or sets 检测项与根元素交叉比率 0 - 1 之间 /// public float IntersectionRatio { get; set; } /// - /// 获得/设置 是否正在交叉 + /// 获得/设置 是否正在交叉 + /// Gets or sets whether正在交叉 /// public bool IsIntersecting { get; set; } /// - /// 获得/设置 当前项索引 + /// 获得/设置 当前项索引 + /// Gets or sets 当前项index /// public int Index { get; set; } /// - /// 获得/设置 与文档创建时间差 + /// 获得/设置 与文档创建时间差 + /// Gets or sets 与文档创建时间差 /// public double Time { get; set; } } diff --git a/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverItem.razor.cs b/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverItem.razor.cs index 372bff579d4..f79573048e9 100644 --- a/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverItem.razor.cs +++ b/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverItem.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// 检测交叉组件子组件 +/// 检测交叉组件子组件 +/// 检测交叉component子component /// public partial class IntersectionObserverItem { /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Gets or sets 子component + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor.cs b/src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor.cs index 660299ba6d3..eca0e133124 100644 --- a/src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor.cs +++ b/src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,41 +8,54 @@ namespace BootstrapBlazor.Components; /// -/// 加载更多组件 +/// 加载更多组件 +/// 加载更多component /// public partial class LoadMore { /// - /// 获得/设置 触底元素触发 阈值 默认为 1 + /// 获得/设置 触底元素触发 阈值 默认为 1 + /// Gets or sets 触底元素触发 阈值 Default is为 1 + /// 10.2.2 /// [Parameter] public string Threshold { get; set; } = "1"; /// - /// 获得/设置 触底回调方法 为 true 时才触发此回调方法 + /// 获得/设置 触底回调方法 为 true 时才触发此回调方法 + /// Gets or sets 触底callback method 为 true 时才触发此callback method + /// 10.2.2 /// [Parameter] public Func? OnLoadMoreAsync { get; set; } /// - /// 获得/设置 是否可以加载更多数据 默认为 true + /// 获得/设置 是否可以加载更多数据 默认为 true + /// Gets or sets whether可以加载更多data Default is为 true + /// 10.2.2 /// [Parameter] public bool CanLoading { get; set; } = true; /// - /// 获得/设置 加载更多模板 默认 null + /// 获得/设置 加载更多模板 默认 null + /// Gets or sets 加载更多template Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? LoadingTemplate { get; set; } /// - /// 获得/设置 没有更多数据提示信息 默认为 null 读取资源文件中的预设值 + /// 获得/设置 没有更多数据提示信息 默认为 null 读取资源文件中的预设值 + /// Gets or sets 没有更多data提示信息 Default is为 null 读取资源文件中的预设值 + /// 10.2.2 /// [Parameter] public string? NoMoreText { get; set; } /// - /// 获得/设置 没有更多数据时显示的模板 默认为 null + /// 获得/设置 没有更多数据时显示的模板 默认为 null + /// Gets or sets 没有更多data时display的template Default is为 null + /// 10.2.2 /// [Parameter] public RenderFragment? NoMoreTemplate { get; set; } diff --git a/src/BootstrapBlazor/Components/IpAddress/IpAddress.razor.cs b/src/BootstrapBlazor/Components/IpAddress/IpAddress.razor.cs index 14a8c50f01f..ea2ad353f26 100644 --- a/src/BootstrapBlazor/Components/IpAddress/IpAddress.razor.cs +++ b/src/BootstrapBlazor/Components/IpAddress/IpAddress.razor.cs @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapInputTextBase 组件 +/// BootstrapInputTextBase 组件 +/// BootstrapInputTextBase component /// public partial class IpAddress { @@ -19,7 +20,8 @@ public partial class IpAddress private string? Value4 { get; set; } = "0"; /// - /// 获得 class 样式集合 + /// 获得 class 样式集合 + /// Gets class stylecollection /// protected string? ClassName => CssBuilder.Default("bb-ip form-control") .AddClass("disabled", IsDisabled) @@ -113,7 +115,8 @@ private void UpdateValue() } /// - /// 更新 值方法供 JS 调用 + /// 更新 值方法供 JS 调用 + /// 更新 值方法供 JS 调用 /// /// /// diff --git a/src/BootstrapBlazor/Components/Label/BootstrapLabel.razor.cs b/src/BootstrapBlazor/Components/Label/BootstrapLabel.razor.cs index 106a861d93d..55fa45c7785 100644 --- a/src/BootstrapBlazor/Components/Label/BootstrapLabel.razor.cs +++ b/src/BootstrapBlazor/Components/Label/BootstrapLabel.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,25 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapLabel 组件 +/// BootstrapLabel 组件 +/// BootstrapLabel component /// public partial class BootstrapLabel { /// - /// 获得/设置 组件值 显示文本 默认 null + /// 获得/设置 组件值 显示文本 默认 null + /// Gets or sets component值 display文本 Default is null + /// 10.2.2 /// [Parameter] [NotNull] public string? Value { get; set; } /// - /// 获得/设置 是否显示 Tooltip 多用于标签文字过长导致裁减时使用 默认 false 不显示 + /// 获得/设置 是否显示 Tooltip 多用于标签文字过长导致裁减时使用 默认 false 不显示 + /// Gets or sets whetherdisplay Tooltip 多用于标签文字过长导致裁减时使用 Default is false 不display + /// 10.2.2 /// [Parameter] public bool? ShowLabelTooltip { get; set; } /// - /// 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 + /// 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width + /// Gets or sets 标签width Default is null 未Sets使用全局Sets --bb-row-label-width + /// 10.2.2 /// [Parameter] public int? LabelWidth { get; set; } diff --git a/src/BootstrapBlazor/Components/Label/BootstrapLabelSetting.razor.cs b/src/BootstrapBlazor/Components/Label/BootstrapLabelSetting.razor.cs index ac3c1e1682c..073c1fa827b 100644 --- a/src/BootstrapBlazor/Components/Label/BootstrapLabelSetting.razor.cs +++ b/src/BootstrapBlazor/Components/Label/BootstrapLabelSetting.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,23 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapLabelSetting 组件类 +/// BootstrapLabelSetting 组件类 +/// BootstrapLabelSetting component类 /// public partial class BootstrapLabelSetting { /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Gets or sets 子component + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 + /// 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width + /// Gets or sets 标签width Default is null 未Sets使用全局Sets --bb-row-label-width + /// 10.2.2 /// [Parameter] public int? LabelWidth { get; set; } diff --git a/src/BootstrapBlazor/Components/Layout/Layout.razor.cs b/src/BootstrapBlazor/Components/Layout/Layout.razor.cs index 8c9a4aa583e..732624b988e 100644 --- a/src/BootstrapBlazor/Components/Layout/Layout.razor.cs +++ b/src/BootstrapBlazor/Components/Layout/Layout.razor.cs @@ -12,143 +12,188 @@ namespace BootstrapBlazor.Components; /// -/// Layout 组件 +/// Layout 组件 +/// Layout Component /// public partial class Layout : IHandlerException, ITabHeader { private bool IsSmallScreen { get; set; } /// - /// 获得/设置 Tab 标签头文本本地化回调方法 + /// 获得/设置 Tab 标签头文本本地化回调方法 + /// Get/Set Localization callback method for Tab header text + /// 10.2.2 /// [Parameter] public Func? OnTabHeaderTextLocalizer { get; set; } /// - /// Gets or sets the tab style. Default is . + /// 获得/设置 the tab 样式. 默认为 . + /// Gets or sets the tab style. Default is . + /// 10.2.2 /// [Parameter] public TabStyle TabStyle { get; set; } /// - /// Gets or sets whether show the toolbar. Default is false. + /// 获得/设置 是否 show the toolbar. 默认为 false. + /// Gets or sets whether show the toolbar. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowToolbar { get; set; } /// - /// Gets or sets the template of the toolbar button. Default is null. + /// 获得/设置 the 模板 of the toolbar 按钮. 默认为 null. + /// Gets or sets the template of the toolbar button. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? ToolbarTemplate { get; set; } /// - /// Gets or sets whether show the full screen button. Default is true. + /// 获得/设置 是否 show the full screen 按钮. 默认为 true. + /// Gets or sets whether show the full screen button. Default is true. + /// 10.2.2 /// [Parameter] public bool ShowFullscreenToolbarButton { get; set; } = true; /// - /// Gets or sets the full screen toolbar button icon string. Default is null. + /// 获得/设置 the full screen toolbar 按钮 图标 string. 默认为 null. + /// Gets or sets the full screen toolbar button icon string. Default is null. + /// 10.2.2 /// [Parameter] public string? FullscreenToolbarButtonIcon { get; set; } /// - /// Gets or sets the full screen toolbar button tooltip string. Default is null. + /// 获得/设置 the full screen toolbar 按钮 tooltip string. 默认为 null. + /// Gets or sets the full screen toolbar button tooltip string. Default is null. + /// 10.2.2 /// [Parameter] public string? FullscreenToolbarTooltipText { get; set; } /// - /// Gets or sets whether show the full screen button. Default is true. + /// 获得/设置 是否 show the full screen 按钮. 默认为 true. + /// Gets or sets whether show the full screen button. Default is true. + /// 10.2.2 /// [Parameter] public bool ShowRefreshToolbarButton { get; set; } = true; /// - /// Gets or sets the refresh toolbar button icon string. Default is null. + /// 获得/设置 the refresh toolbar 按钮 图标 string. 默认为 null. + /// Gets or sets the refresh toolbar button icon string. Default is null. + /// 10.2.2 /// [Parameter] public string? RefreshToolbarButtonIcon { get; set; } /// - /// Gets or sets the refresh toolbar button tooltip string. Default is null. + /// 获得/设置 the refresh toolbar 按钮 tooltip string. 默认为 null. + /// Gets or sets the refresh toolbar button tooltip string. Default is null. + /// 10.2.2 /// [Parameter] public string? RefreshToolbarTooltipText { get; set; } /// - /// Gets or sets the refresh toolbar button click event callback. Default is null. + /// 获得/设置 the refresh toolbar 按钮 click event 回调. 默认为 null. + /// Gets or sets the refresh toolbar button click event callback. Default is null. + /// 10.2.2 /// [Parameter] public Func? OnToolbarRefreshCallback { get; set; } /// - /// 获得/设置 关闭标签页前回调方法 + /// 获得/设置 关闭标签页前回调方法 + /// Get/Set Callback method before closing tab + /// 10.2.2 /// - /// 返回 false 时不关闭 标签页 + /// + /// 返回 false 时不关闭 标签页 + /// Do not close tab when returning false + /// [Parameter] public Func>? OnCloseTabItemAsync { get; set; } /// - /// 获得/设置 侧边栏状态 + /// 获得/设置 侧边栏状态 + /// Get/Set Sidebar status + /// 10.2.2 /// [Parameter] public bool IsCollapsed { get; set; } /// - /// 获得/设置 侧边栏状态 + /// 获得/设置 侧边栏状态 + /// Get/Set Sidebar status + /// 10.2.2 /// [Parameter] public EventCallback IsCollapsedChanged { get; set; } /// - /// 获得/设置 菜单手风琴效果 + /// 获得/设置 菜单手风琴效果 + /// Get/Set Menu Accordion effect + /// 10.2.2 /// [Parameter] public bool IsAccordion { get; set; } /// - /// 获得/设置 收起展开按钮模板 + /// 获得/设置 收起展开按钮模板 + /// Get/Set Collapse/Expand button template + /// 10.2.2 /// [Parameter] public RenderFragment? CollapseBarTemplate { get; set; } /// - /// 获得/设置 Header 模板 + /// 获得/设置 Header 模板 + /// Get/Set Header Template + /// 10.2.2 /// [Parameter] public RenderFragment? Header { get; set; } /// - /// 获得/设置 Footer 模板 + /// 获得/设置 Footer 模板 + /// Get/Set Footer Template + /// 10.2.2 /// [Parameter] public RenderFragment? Footer { get; set; } /// - /// 获得/设置 MenuBar 图标 + /// 获得/设置 MenuBar 图标 + /// Get/Set MenuBar Icon + /// 10.2.2 /// [Parameter] public string? MenuBarIcon { get; set; } /// - /// 获得/设置 Side 模板 + /// 获得/设置 Side 模板 + /// Get/Set Side Template + /// 10.2.2 /// [Parameter] public RenderFragment? Side { get; set; } /// - /// 获得/设置 是否显示分割栏 默认 false 不显示 - /// 仅在 左右布局时有效 + /// 获得/设置 是否显示分割栏 默认 false 不显示 仅在 左右布局时有效 + /// Get/Set Whether to show split bar. Default false Effective only in Left-Right Layout + /// 10.2.2 /// [Parameter] public bool ShowSplitBar { get; set; } /// - /// 获得/设置 是否显示分割栏 默认 false 不显示 - /// 仅在 左右布局时有效 + /// 获得/设置 是否显示分割栏 默认 false 不显示 仅在 左右布局时有效 + /// Get/Set Whether to show split bar. Default false Effective only in Left-Right Layout /// [Parameter] [ExcludeFromCodeCoverage] @@ -156,226 +201,303 @@ public partial class Layout : IHandlerException, ITabHeader public bool ShowSplitebar { get; set; } /// - /// 获得/设置 侧边栏最小宽度 默认 null 未设置 + /// 获得/设置 侧边栏最小宽度 默认 null 未设置 + /// Get/Set Sidebar minimum width. Default null + /// 10.2.2 /// [Parameter] public int? SidebarMinWidth { get; set; } /// - /// 获得/设置 侧边栏最大宽度 默认 null 未设置 + /// 获得/设置 侧边栏最大宽度 默认 null 未设置 + /// Get/Set Sidebar maximum width. Default null + /// 10.2.2 /// [Parameter] public int? SidebarMaxWidth { get; set; } /// - /// 获得/设置 NotAuthorized 模板 默认 null NET6.0/7.0 有效 + /// 获得/设置 NotAuthorized 模板 默认 null NET6.0/7.0 有效 + /// Get/Set NotAuthorized Template. Default null. Valid in NET6.0/7.0 + /// 10.2.2 /// [Parameter] public RenderFragment? NotAuthorized { get; set; } /// - /// 获得/设置 NotFound 模板 默认 null NET6.0/7.0 有效 + /// 获得/设置 NotFound 模板 默认 null NET6.0/7.0 有效 + /// Get/Set NotFound Template. Default null. Valid in NET6.0/7.0 + /// 10.2.2 /// [Parameter] public RenderFragment? NotFound { get; set; } /// - /// 获得/设置 NotFound 标签文本 默认 null NET6.0/7.0 有效 + /// 获得/设置 NotFound 标签文本 默认 null NET6.0/7.0 有效 + /// Get/Set NotFound Tab Text. Default null. Valid in NET6.0/7.0 + /// 10.2.2 /// [Parameter] [NotNull] public string? NotFoundTabText { get; set; } /// - /// 获得/设置 侧边栏宽度,支持百分比,设置 0 时关闭宽度功能 默认值 300 + /// 获得/设置 侧边栏宽度,支持百分比,设置 0 时关闭宽度功能 默认值 300 + /// Get/Set Sidebar width. Supports percentage. Disable width function when set to 0. Default 300 + /// 10.2.2 /// [Parameter] public string? SideWidth { get; set; } /// - /// 获得/设置 Main 模板 + /// 获得/设置 Main 模板 + /// Get/Set Main Template + /// 10.2.2 /// [Parameter] [NotNull] public RenderFragment? Main { get; set; } /// - /// 获得/设置 侧边栏是否占满整个左侧 默认为 false + /// 获得/设置 侧边栏是否占满整个左侧 默认为 false + /// Get/Set Whether the sidebar fills the entire left side. Default false + /// 10.2.2 /// [Parameter] public bool IsFullSide { get; set; } /// - /// 获得/设置 是否为整页面布局 默认为 false + /// 获得/设置 是否为整页面布局 默认为 false + /// Get/Set Whether it is a full page layout. Default false + /// 10.2.2 /// - /// 为真时增加 is-page 样式 + /// + /// 为真时增加 is-page 样式 + /// Add is-page style when true + /// [Parameter] public bool IsPage { get; set; } /// - /// 获得/设置 侧边栏菜单集合 + /// 获得/设置 侧边栏菜单集合 + /// Get/Set Sidebar Menu Collection + /// 10.2.2 /// [Parameter] public IEnumerable? Menus { get; set; } /// - /// 获得/设置 是否右侧使用 Tab 组件 默认为 false 不使用 + /// 获得/设置 是否右侧使用 Tab 组件 默认为 false 不使用 + /// Get/Set Whether to use Tab component on the right side. Default false + /// 10.2.2 /// [Parameter] public bool UseTabSet { get; set; } /// - /// 获得/设置 是否固定多标签 Header 默认 false + /// 获得/设置 是否固定多标签 Header 默认 false + /// Get/Set Whether to fix multi-tab Header. Default false + /// 10.2.2 /// [Parameter] public bool IsFixedTabHeader { get; set; } /// - /// 获得/设置 是否仅渲染 Active 标签 + /// 获得/设置 是否仅渲染 Active 标签 + /// Get/Set Whether to render only Active Tab + /// 10.2.2 /// [Parameter] public bool IsOnlyRenderActiveTab { get; set; } /// - /// 获得/设置 是否允许拖动标签页 默认 true + /// 获得/设置 是否允许拖动标签页 默认 true + /// Get/Set Whether to allow dragging tabs. Default true + /// 10.2.2 /// [Parameter] public bool AllowDragTab { get; set; } = true; /// - /// 获得/设置 是否固定 Footer 组件 + /// 获得/设置 是否固定 Footer 组件 + /// Get/Set Whether to fix Footer component + /// 10.2.2 /// [Parameter] public bool IsFixedFooter { get; set; } /// - /// 获得/设置 是否固定 Header 组件 + /// 获得/设置 是否固定 Header 组件 + /// Get/Set Whether to fix Header component + /// 10.2.2 /// [Parameter] public bool IsFixedHeader { get; set; } /// - /// 获得/设置 是否显示收缩展开 Bar 默认 false + /// 获得/设置 是否显示收缩展开 Bar 默认 false + /// Get/Set Whether to show Collapse/Expand Bar. Default false + /// 10.2.2 /// [Parameter] public bool ShowCollapseBar { get; set; } /// - /// 获得/设置 是否显示 Footer 模板 默认 false + /// 获得/设置 是否显示 Footer 模板 默认 false + /// Get/Set Whether to show Footer Template. Default false + /// 10.2.2 /// [Parameter] public bool ShowFooter { get; set; } /// - /// 获得/设置 是否显示返回顶端按钮 默认为 false 不显示 + /// 获得/设置 是否显示返回顶端按钮 默认为 false 不显示 + /// Get/Set Whether to show "Back to Top" button. Default false + /// 10.2.2 /// [Parameter] public bool ShowGotoTop { get; set; } /// - /// 获得/设置 点击菜单时回调委托方法 默认为 null + /// 获得/设置 点击菜单时回调委托方法 默认为 null + /// Get/Set Callback delegate method when menu is clicked. Default null + /// 10.2.2 /// [Parameter] public Func? OnClickMenu { get; set; } /// - /// 获得/设置 收缩展开回调委托 + /// 获得/设置 收缩展开回调委托 + /// Get/Set Collapse/Expand Callback Delegate + /// 10.2.2 /// [Parameter] public Func? OnCollapsed { get; set; } /// - /// 获得/设置 默认标签页 关闭所有标签页时自动打开此地址 默认 null 未设置 + /// 获得/设置 默认标签页 关闭所有标签页时自动打开此地址 默认 null 未设置 + /// Get/Set Default Tab. Automatically open this address when closing all tabs. Default null + /// 10.2.2 /// [Parameter] public string TabDefaultUrl { get; set; } = ""; /// - /// 获得/设置 标签是否显示关闭按钮 默认 true + /// 获得/设置 标签是否显示关闭按钮 默认 true + /// Get/Set Whether to show close button on tab. Default true + /// 10.2.2 /// [Parameter] public bool ShowTabItemClose { get; set; } = true; /// - /// 获得/设置 标签是否显示扩展按钮 默认 true + /// 获得/设置 标签是否显示扩展按钮 默认 true + /// Get/Set Whether to show extend buttons on tab. Default true + /// 10.2.2 /// [Parameter] public bool ShowTabExtendButtons { get; set; } = true; /// - /// 获得/设置 点击标签页是否切换地址栏 默认 true + /// 获得/设置 点击标签页是否切换地址栏 默认 true + /// Get/Set Whether to switch address bar when clicking tab. Default true + /// 10.2.2 /// [Parameter] public bool ClickTabToNavigation { get; set; } = true; /// - /// 获得/设置 授权回调方法多用于权限控制 + /// 获得/设置 授权回调方法多用于权限控制 + /// Get/Set Authorization callback method, mostly used for permission control + /// 10.2.2 /// [Parameter] public Func>? OnAuthorizing { get; set; } /// - /// 获得/设置 未授权导航地址 默认为 "/Account/Login" Cookie 模式登录页 + /// 获得/设置 未授权导航地址 默认为 "/Account/Login" Cookie 模式登录页 + /// Get/Set Unauthorized navigation address. Default "/Account/Login" Cookie mode login page + /// 10.2.2 /// [Parameter] public string NotAuthorizeUrl { get; set; } = "/Account/Login"; /// - /// Gets or sets whether enable tab context menu. Default is false. + /// 获得/设置 是否 enable tab context menu. 默认为 false. + /// Gets or sets whether enable tab context menu. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowTabContextMenu { get; set; } /// - /// Gets or sets the template of before tab context menu. Default is null. + /// 获得/设置 the 模板 of before tab context menu. 默认为 null. + /// Gets or sets the template of before tab context menu. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? BeforeTabContextMenuTemplate { get; set; } /// - /// Gets or sets the template of tab context menu. Default is null. + /// 获得/设置 the 模板 of tab context menu. 默认为 null. + /// Gets or sets the template of tab context menu. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? TabContextMenuTemplate { get; set; } /// - /// Gets or sets the icon of tab item context menu refresh button. Default is null. + /// 获得/设置 the 图标 of tab item context menu refresh 按钮. 默认为 null. + /// Gets or sets the icon of tab item context menu refresh button. Default is null. + /// 10.2.2 /// [Parameter] public string? TabContextMenuRefreshIcon { get; set; } /// - /// Gets or sets the icon of tab item context menu close button. Default is null. + /// 获得/设置 the 图标 of tab item context menu close 按钮. 默认为 null. + /// Gets or sets the icon of tab item context menu close button. Default is null. + /// 10.2.2 /// [Parameter] public string? TabContextMenuCloseIcon { get; set; } /// - /// Gets or sets the icon of tab item context menu close other button. Default is null. + /// 获得/设置 the 图标 of tab item context menu close other 按钮. 默认为 null. + /// Gets or sets the icon of tab item context menu close other button. Default is null. + /// 10.2.2 /// [Parameter] public string? TabContextMenuCloseOtherIcon { get; set; } /// - /// Gets or sets the icon of tab item context menu close all button. Default is null. + /// 获得/设置 the 图标 of tab item context menu close all 按钮. 默认为 null. + /// Gets or sets the icon of tab item context menu close all button. Default is null. + /// 10.2.2 /// [Parameter] public string? TabContextMenuCloseAllIcon { get; set; } /// - /// Gets or sets before popup context menu callback. Default is null. + /// 获得/设置 before popup context menu 回调. 默认为 null. + /// Gets or sets before popup context menu callback. Default is null. + /// 10.2.2 /// [Parameter] public Func>? OnBeforeShowContextMenu { get; set; } /// - /// Gets or sets whether show the tab in header. Default is false. + /// 获得/设置 是否 show the tab in header. 默认为 false. + /// Gets or sets whether show the tab in header. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowTabInHeader { get; set; } /// - /// 获得/设置 是否跳过认证逻辑 默认 false + /// 获得/设置 是否跳过认证逻辑 默认 false + /// Get/Set Whether to skip authentication logic. Default false + /// 10.2.2 /// [Parameter] public bool SkipAuthenticate { get; set; } @@ -391,12 +513,14 @@ public partial class Layout : IHandlerException, ITabHeader private bool SubscribedLocationChangedEvent { get; set; } /// - /// 获得/设置 是否已授权 + /// 获得/设置 是否已授权 + /// Get/Set Whether authorized /// private bool _authenticated; /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get Component Style /// private string? ClassString => CssBuilder.Default("layout") .AddClass("has-sidebar", Side != null && IsFullSide) @@ -414,21 +538,24 @@ public partial class Layout : IHandlerException, ITabHeader .Build(); /// - /// 获得 页脚样式 + /// 获得 页脚样式 + /// Get Footer Style /// private string? FooterClassString => CssBuilder.Default("layout-footer") .AddClass("is-fixed", IsFixedFooter) .Build(); /// - /// 获得 页头样式 + /// 获得 页头样式 + /// Get Header Style /// private string? HeaderClassString => CssBuilder.Default("layout-header") .AddClass("is-fixed", IsFixedHeader) .Build(); /// - /// 获得 侧边栏样式 + /// 获得 侧边栏样式 + /// Get Sidebar Style /// private string? SideClassString => CssBuilder.Default("layout-side") .AddClass("is-fixed-header", IsFixedHeader) @@ -436,74 +563,96 @@ public partial class Layout : IHandlerException, ITabHeader .Build(); /// - /// 获得 侧边栏 Style 字符串 + /// 获得 侧边栏 Style 字符串 + /// Get Sidebar Style String /// private string? SideStyleString => CssBuilder.Default() .AddClass($"--bb-layout-sidebar-width: {SideWidth.ConvertToPercentString()}", !string.IsNullOrEmpty(SideWidth) && SideWidth != "0") .Build(); /// - /// 获得/设置 排除地址支持通配符 + /// 获得/设置 排除地址支持通配符 + /// Get/Set Exclude URLs support wildcards + /// 10.2.2 /// [Parameter] public IEnumerable? ExcludeUrls { get; set; } /// - /// 获得/设置 Gets or sets a collection of additional assemblies that should be searched for components that can match URIs. + /// 获得/设置 Gets or sets a collection of additional assemblies that should be searched for components that can match URIs. + /// Get/Set Gets or sets a collection of additional assemblies that should be searched for components that can match URIs. + /// 10.2.2 /// [Parameter] public IEnumerable? AdditionalAssemblies { get; set; } /// - /// 获得/设置 鼠标悬停提示文字信息 + /// 获得/设置 鼠标悬停提示文字信息 + /// Get/Set Tooltip Text + /// 10.2.2 /// [Parameter] public string? TooltipText { get; set; } /// - /// 获得/设置 更新回调方法 默认 null + /// 获得/设置 更新回调方法 默认 null + /// Get/Set Update callback method. Default null + /// 10.2.2 /// [Parameter] public Func? OnUpdateAsync { get; set; } /// - /// 获得/设置 AuthorizeRouteView 参数 + /// 获得/设置 AuthorizeRouteView 参数 + /// Get/Set AuthorizeRouteView Parameter + /// 10.2.2 /// [Parameter] public object? Resource { get; set; } /// - /// 获得/设置 是否开启全局异常捕获 默认 null 使用 设置值 + /// 获得/设置 是否开启全局异常捕获 默认 null 使用 设置值 + /// Get/Set Whether to enable global exception capture. Default null. Use value. + /// 10.2.2 /// [Parameter] public bool? EnableErrorLogger { get; set; } /// - /// 获得/设置 是否记录异常到 默认 null 使用 设置值 + /// 获得/设置 是否记录异常到 默认 null 使用 设置值 + /// Get/Set Whether to log exceptions to . Default null. Use value. + /// 10.2.2 /// [Parameter] public bool? EnableErrorLoggerILogger { get; set; } /// - /// 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 + /// 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 + /// Get/Set Whether to show Error Toast. Default null. Use value. + /// 10.2.2 /// [Parameter] public bool? ShowErrorLoggerToast { get; set; } /// - /// 获得/设置 错误日志 弹窗标题 默认 null + /// 获得/设置 错误日志 弹窗标题 默认 null + /// Get/Set Error Logger Title. Default null. + /// 10.2.2 /// [Parameter] public string? ErrorLoggerToastTitle { get; set; } /// - /// 获得/设置 自定义错误处理回调方法 + /// 获得/设置 自定义错误处理回调方法 + /// Get/Set Custom error handling callback method + /// 10.2.2 /// [Parameter] public Func? OnErrorHandleAsync { get; set; } /// - /// 获得 登录授权信息 + /// 获得 登录授权信息 + /// Get Login Authorization Information /// [CascadingParameter] private Task? AuthenticationStateTask { get; set; } @@ -597,7 +746,8 @@ protected override void OnParametersSet() protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(SetCollapsed)); /// - /// HandlerMain 方法 + /// HandlerMain 方法 + /// HandlerMain Method /// /// protected virtual RenderFragment HandlerMain() => builder => @@ -607,7 +757,8 @@ protected virtual RenderFragment HandlerMain() => builder => }; /// - /// 设置侧边栏收缩方法 客户端监控 window.onResize 事件回调此方法 + /// 设置侧边栏收缩方法 客户端监控 window.onResize 事件回调此方法 + /// Set Sidebar Collapse Method. Client monitors window.onResize event to call this method /// /// [JSInvokable] @@ -617,7 +768,8 @@ public void SetCollapsed(int width) } /// - /// 调用 Update 回调方法 + /// 调用 Update 回调方法 + /// Call Update Callback Method /// /// /// @@ -645,7 +797,8 @@ private void Navigation_LocationChanged(object? sender, LocationChangedEventArgs } /// - /// 点击菜单时回调此方法 + /// 点击菜单时回调此方法 + /// Callback method when menu is clicked /// /// private async Task ClickMenu(MenuItem item) @@ -693,7 +846,8 @@ private Task OnErrorLoggerInitialized(IErrorLogger logger) } /// - /// 上次渲染错误内容 + /// 上次渲染错误内容 + /// Last rendered error content /// private RenderFragment? _errorContent; @@ -722,7 +876,6 @@ private RenderFragment RenderTabHeader() => builder => /// /// /// - /// public void Render(RenderFragment renderFragment) { _layoutHeader?.Render(renderFragment); diff --git a/src/BootstrapBlazor/Components/Layout/LayoutHeader.cs b/src/BootstrapBlazor/Components/Layout/LayoutHeader.cs index d4472166f88..d91757e3b24 100644 --- a/src/BootstrapBlazor/Components/Layout/LayoutHeader.cs +++ b/src/BootstrapBlazor/Components/Layout/LayoutHeader.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -25,7 +25,8 @@ Task IComponent.SetParametersAsync(ParameterView parameters) } /// - /// render tab header method. + /// render tab header method. + /// render tab header method. /// public void Render(RenderFragment renderFragment) { diff --git a/src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.cs b/src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.cs index 3b607fab13b..e9686feda8b 100644 --- a/src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.cs +++ b/src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,25 +6,33 @@ namespace BootstrapBlazor.Components; /// -/// LayoutSidebar 组件 +/// LayoutSplitBar 组件 +/// LayoutSplitBar Component /// public partial class LayoutSplitBar { /// - /// 获得/设置 容器选择器 默认 null 未设置 - /// 组件拖动后设置容器 style="--bb-layout-sidebar-width: 200px;" 用于宽度调整 + /// 获得/设置 容器选择器 默认 null 未设置 + /// Get/Set Container Selector. Default null + /// 组件拖动后设置容器 style="--bb-layout-sidebar-width: 200px;" 用于宽度调整 + /// Set container style="--bb-layout-sidebar-width: 200px;" after dragging component for width adjustment + /// 10.2.2 /// [Parameter] public string? ContainerSelector { get; set; } /// - /// 获得/设置 最小宽度 默认 null 未设置 + /// 获得/设置 最小宽度 默认 null 未设置 + /// Get/Set Minimum Width. Default null + /// 10.2.2 /// [Parameter] public int? Min { get; set; } /// - /// 获得/设置 最大宽度 默认 null 未设置 + /// 获得/设置 最大宽度 默认 null 未设置 + /// Get/Set Maximum Width. Default null + /// 10.2.2 /// [Parameter] public int? Max { get; set; } diff --git a/src/BootstrapBlazor/Components/LazyLoad/LazyLoad.cs b/src/BootstrapBlazor/Components/LazyLoad/LazyLoad.cs index 56d87f29463..b85ce997940 100644 --- a/src/BootstrapBlazor/Components/LazyLoad/LazyLoad.cs +++ b/src/BootstrapBlazor/Components/LazyLoad/LazyLoad.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,25 +8,32 @@ namespace BootstrapBlazor.Components; /// -/// 懒加载组件 +/// 懒加载组件 +/// 懒加载component /// public partial class LazyLoad : ComponentBase { /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Gets or sets 子component + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 组件加载条件回调方法 默认 null 未设置 一旦返回 true 后此回调将不再调用 + /// 获得/设置 组件加载条件回调方法 默认 null 未设置 一旦返回 true 后此回调将不再调用 + /// Gets or sets component加载条件callback method Default is null 未Sets 一旦返回 true 后此回调将不再调用 + /// 10.2.2 /// [Parameter] [NotNull] public Func>? OnLoadConditionCheckAsync { get; set; } /// - /// 获得/设置 首次显示时回调方法 可用于组件初始化数据 仅触发一次 + /// 获得/设置 首次显示时回调方法 可用于组件初始化数据 仅触发一次 + /// Gets or sets 首次display时callback method 可用于component初始化data 仅触发一次 + /// 10.2.2 /// [Parameter] public Func? OnFirstLoadCallbackAsync { get; set; } diff --git a/src/BootstrapBlazor/Components/Light/Light.razor.cs b/src/BootstrapBlazor/Components/Light/Light.razor.cs index f53fd927a57..b1fcfdf332c 100644 --- a/src/BootstrapBlazor/Components/Light/Light.razor.cs +++ b/src/BootstrapBlazor/Components/Light/Light.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 指示灯组件 +/// 指示灯组件 +/// Indicator Light Component /// public partial class Light { /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get Component Style /// protected string? ClassString => CssBuilder.Default("bb-light") .AddClass("is-flat", IsFlat) @@ -22,19 +24,25 @@ public partial class Light .Build(); /// - /// 获得/设置 组件是否闪烁 默认为 false 不闪烁 + /// 获得/设置 组件是否闪烁 默认为 false 不闪烁 + /// Get/Set Whether the component is flashing. Default is false (No flash) + /// 10.2.2 /// [Parameter] public bool IsFlash { get; set; } /// - /// 获得/设置 是否为平面图形 默认 false + /// 获得/设置 是否为平面图形 默认 false + /// Get/Set Whether it is a flat graphic. Default false + /// 10.2.2 /// [Parameter] public bool IsFlat { get; set; } /// - /// 获得/设置 指示灯颜色 默认为 Success 绿色 + /// 获得/设置 指示灯颜色 默认为 Success 绿色 + /// Get/Set Indicator Color. Default Success (Green) + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.Success; diff --git a/src/BootstrapBlazor/Components/ListGroup/ListGroup.razor.cs b/src/BootstrapBlazor/Components/ListGroup/ListGroup.razor.cs index 9c48aeab12c..f38ee4828ce 100644 --- a/src/BootstrapBlazor/Components/ListGroup/ListGroup.razor.cs +++ b/src/BootstrapBlazor/Components/ListGroup/ListGroup.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// ListGroup 组件 +/// ListGroup 组件 +/// ListGroup Component /// public partial class ListGroup { /// - /// 获得/设置 数据源集合 + /// 获得/设置 数据源集合 + /// Get/Set Data source collection + /// 10.2.2 /// [Parameter] [NotNull] @@ -21,37 +24,49 @@ public partial class ListGroup public List? Items { get; set; } /// - /// 获得/设置 Header 模板 默认 null + /// 获得/设置 Header 模板 默认 null + /// Get/Set Header Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 Header 文字 默认 null + /// 获得/设置 Header 文字 默认 null + /// Get/Set Header Text. Default null + /// 10.2.2 /// [Parameter] public string? HeaderText { get; set; } /// - /// 获得/设置 Header 模板 默认 null + /// 获得/设置 Item 模板 默认 null + /// Get/Set Item Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } /// - /// 获得/设置 点击 List 项目回调方法 + /// 获得/设置 点击 List 项目回调方法 + /// Get/Set Callback method when List item is clicked + /// 10.2.2 /// [Parameter] public Func? OnClickItem { get; set; } /// - /// 获得/设置 双击 List 项目回调方法 + /// 获得/设置 双击 List 项目回调方法 + /// Get/Set Callback method when List item is double-clicked + /// 10.2.2 /// [Parameter] public Func? OnDoubleClickItem { get; set; } /// - /// 获得/设置 获得条目显示文本内容回调方法 + /// 获得/设置 获得条目显示文本内容回调方法 + /// Get/Set Callback method to get item display text + /// 10.2.2 /// [Parameter] public Func? GetItemDisplayText { get; set; } diff --git a/src/BootstrapBlazor/Components/ListView/ListView.razor.cs b/src/BootstrapBlazor/Components/ListView/ListView.razor.cs index 3d28bb54603..167f39266d5 100644 --- a/src/BootstrapBlazor/Components/ListView/ListView.razor.cs +++ b/src/BootstrapBlazor/Components/ListView/ListView.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// ListView 组件基类 +/// ListView 组件基类 +/// ListView Component Base /// public partial class ListView : BootstrapComponentBase { @@ -20,50 +21,66 @@ public partial class ListView : BootstrapComponentBase .Build(); /// - /// 获得/设置 CardHeard + /// 获得/设置 CardHeader + /// Get/Set Card Header + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 获得 值 默认 null 使用分组 Key.ToString() 方法获取 + /// 获得/设置 获得 值 默认 null 使用分组 Key.ToString() 方法获取 + /// Get/Set Get value. Default null. Use Group Key.ToString() method to get + /// 10.2.2 /// [Parameter] public Func? GroupHeaderTextCallback { get; set; } /// - /// 获得/设置 组排序回调方法 默认 null 使用内置 + /// 获得/设置 组排序回调方法 默认 null 使用内置 + /// Get/Set Group sort callback method. Default null. Use built-in + /// 10.2.2 /// [Parameter] public Func>, IOrderedEnumerable>>? GroupOrderCallback { get; set; } /// - /// 获得/设置 组内项目排序回调方法 默认 null + /// 获得/设置 组内项目排序回调方法 默认 null + /// Get/Set Group item sort callback method. Default null + /// 10.2.2 /// [Parameter] public Func, IOrderedEnumerable>? GroupItemOrderCallback { get; set; } /// - /// 获得/设置 BodyTemplate + /// 获得/设置 BodyTemplate + /// Get/Set Body Template + /// 10.2.2 /// [Parameter] [EditorRequired] public RenderFragment? BodyTemplate { get; set; } /// - /// 获得/设置 FooterTemplate 默认 null 未设置 设置值后 参数不起作用,请自行实现分页功能 + /// 获得/设置 FooterTemplate 默认 null 未设置 设置值后 参数不起作用,请自行实现分页功能 + /// Get/Set Footer Template. Default null. If set, parameter will not work, please implement pagination manually + /// 10.2.2 /// [Parameter] public RenderFragment? FooterTemplate { get; set; } /// - /// 获得/设置 数据源 + /// 获得/设置 数据源 + /// Get/Set Data Source + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// - /// 获得/设置 是否分页 默认为 false 不分页 设置 时分页功能自动被禁用 + /// 获得/设置 是否分页 默认为 false 不分页 设置 时分页功能自动被禁用 + /// Get/Set Whether to page. Default false. Paging is automatically disabled when is set + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 IsPagination 代替。Deprecated, use IsPagination instead")] @@ -71,95 +88,124 @@ public partial class ListView : BootstrapComponentBase public bool Pageable { get => IsPagination; set => IsPagination = value; } /// - /// 获得/设置 是否分页 默认为 false 不分页 设置 时分页功能自动被禁用 + /// 获得/设置 是否分页 默认为 false 不分页 设置 时分页功能自动被禁用 + /// Get/Set Whether to page. Default false. Paging is automatically disabled when is set + /// 10.2.2 /// [Parameter] public bool IsPagination { get; set; } /// - /// 获得/设置 分组 Lambda 表达式 默认 null + /// 获得/设置 分组 Lambda 表达式 默认 null + /// Get/Set Grouping Lambda Expression. Default null + /// 10.2.2 /// [Parameter] public Func? GroupName { get; set; } /// - /// 获得/设置 是否可折叠 默认 false 需要开启分组设置 + /// 获得/设置 是否可折叠 默认 false 需要开启分组设置 + /// Get/Set Whether it is collapsible. Default false. Need to enable grouping setting + /// 10.2.2 /// [Parameter] public bool Collapsible { get; set; } /// - /// 获得/设置 是否手风琴效果 默认 false 需要开启可收缩设置 + /// 获得/设置 是否手风琴效果 默认 false 需要开启可收缩设置 + /// Get/Set Accordion effect. Default false. Need to enable collapsible setting + /// 10.2.2 /// [Parameter] public bool IsAccordion { get; set; } /// - /// 获得/设置 CollapseItem 展开收缩时回调方法 默认 false 需要开启可收缩设置 + /// 获得/设置 CollapseItem 展开收缩时回调方法 默认 false 需要开启可收缩设置 + /// Get/Set Callback method when CollapseItem is expanded/collapsed. Default false. Need to enable collapsible setting + /// 10.2.2 /// [Parameter] public Func? OnCollapseChanged { get; set; } /// - /// 获得/设置 首次渲染是否收缩回调委托 + /// 获得/设置 首次渲染是否收缩回调委托 + /// Get/Set Callback delegate for whether to collapse on first render + /// 10.2.2 /// [Parameter] public Func? CollapsedGroupCallback { get; set; } /// - /// 异步查询回调方法 + /// 异步查询回调方法 + /// Async query callback method + /// 10.2.2 /// [Parameter] public Func>>? OnQueryAsync { get; set; } /// - /// 获得/设置 ListView组件元素点击时回调委托 + /// 获得/设置 ListView组件元素点击时回调委托 + /// Get/Set Callback delegate when ListView component element is clicked + /// 10.2.2 /// [Parameter] public Func? OnListViewItemClick { get; set; } /// - /// 获得/设置 是否为竖向排列 默认为 false + /// 获得/设置 是否为竖向排列 默认为 false + /// Get/Set Whether to arrange vertically. Default false + /// 10.2.2 /// [Parameter] public bool IsVertical { get; set; } /// - /// 获得/设置 每页数据数量 默认 20 + /// 获得/设置 每页数据数量 默认 20 + /// Get/Set Number of items per page. Default 20 + /// 10.2.2 /// [Parameter] public int PageItems { get; set; } = 20; /// - /// 获得/设置 组件高度 默认 null 未设置高度 如:50% 100px 10rem 10vh 等 + /// 获得/设置 组件高度 默认 null 未设置高度 如:50% 100px 10rem 10vh 等 + /// Get/Set Component height. Default null. Not set. e.g. 50% 100px 10rem 10vh etc. + /// 10.2.2 /// [Parameter] public string? Height { get; set; } /// - /// 获得/设置 无数据时模板 默认 null 未设置 + /// 获得/设置 无数据时模板 默认 null 未设置 + /// Get/Set Template when no data. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? EmptyTemplate { get; set; } /// - /// 获得/设置 无数据时显示文字 默认 null 未设置使用资源文件设置文字 + /// 获得/设置 无数据时显示文字 默认 null 未设置使用资源文件设置文字 + /// Get/Set Text to display when no data. Default null. Use resource file to set text if not set + /// 10.2.2 /// [Parameter] public string? EmptyText { get; set; } /// - /// 获得/设置 当前页码 + /// 获得/设置 当前页码 + /// Get/Set Current Page Index /// private int _pageIndex = 1; /// - /// 获得/设置 数据总条目 + /// 获得/设置 数据总条目 + /// Get/Set Total items /// private int _totalCount; /// - /// 数据集合内部使用 + /// 数据集合内部使用 + /// Data collection internal use /// private List Rows => Items?.ToList() ?? []; @@ -182,13 +228,15 @@ protected override async Task OnParametersSetAsync() private bool IsCollapsed(int index, object? groupKey) => CollapsedGroupCallback?.Invoke(groupKey) ?? index > 0; /// - /// 点击页码调用此方法 + /// 点击页码调用此方法 + /// Call this method when page link is clicked /// /// protected Task OnPageLinkClick(int pageIndex) => QueryAsync(pageIndex, true); /// - /// 查询按钮调用此方法 + /// 查询按钮调用此方法 + /// Call this method when query button is clicked /// /// public async Task QueryAsync(int pageIndex = 1, bool triggerByPagination = false) @@ -199,7 +247,8 @@ public async Task QueryAsync(int pageIndex = 1, bool triggerByPagination = false } /// - /// 调用 OnQuery 回调方法获得数据源 + /// 调用 OnQuery 回调方法获得数据源 + /// Call OnQuery callback method to get data source /// protected async Task QueryData(bool triggerByPagination = false) { @@ -224,7 +273,8 @@ protected async Task QueryData(bool triggerByPagination = false) private int PageCount => (int)Math.Ceiling(_totalCount * 1.0 / PageItems); /// - /// 点击元素事件 + /// 点击元素事件 + /// Click Element Event /// /// /// diff --git a/src/BootstrapBlazor/Components/Logout/Logout.razor.cs b/src/BootstrapBlazor/Components/Logout/Logout.razor.cs index 7c30a4aeb2c..d05a9515633 100644 --- a/src/BootstrapBlazor/Components/Logout/Logout.razor.cs +++ b/src/BootstrapBlazor/Components/Logout/Logout.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// ListView 组件基类 +/// ListView 组件基类 +/// ListView component基类 /// public partial class Logout { @@ -17,61 +18,81 @@ public partial class Logout private IStringLocalizer? Localizer { get; set; } /// - /// 获得/设置 组件当前用户头像 + /// 获得/设置 组件当前用户头像 + /// Gets or sets component当前用户头像 + /// 10.2.2 /// [Parameter] public string? ImageUrl { get; set; } /// - /// 获得/设置 组件当前用户显示名称 + /// 获得/设置 组件当前用户显示名称 + /// Gets or sets component当前用户display名称 + /// 10.2.2 /// [Parameter] public string? DisplayName { get; set; } /// - /// 获得/设置 组件当前用户显示名称前置文本 默认 欢迎 + /// 获得/设置 组件当前用户显示名称前置文本 默认 欢迎 + /// Gets or sets component当前用户display名称前置文本 Default is 欢迎 + /// 10.2.2 /// [Parameter] public string? PrefixDisplayNameText { get; set; } /// - /// 获得/设置 组件当前用户登录账号 + /// 获得/设置 组件当前用户登录账号 + /// Gets or sets component当前用户登录账号 + /// 10.2.2 /// [Parameter] public string? UserName { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Gets or sets 子component + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否显示用户名 默认 true 显示 + /// 获得/设置 是否显示用户名 默认 true 显示 + /// Gets or sets whetherdisplay用户名 Default is true display + /// 10.2.2 /// [Parameter] public bool ShowUserName { get; set; } = true; /// - /// 获得/设置 组件当前用户登录账号前置文本 默认 当前账号 + /// 获得/设置 组件当前用户登录账号前置文本 默认 当前账号 + /// Gets or sets component当前用户登录账号前置文本 Default is 当前账号 + /// 10.2.2 /// [Parameter] public string? PrefixUserNameText { get; set; } /// - /// 获得/设置 组件 HeaderTemplate + /// 获得/设置 组件 HeaderTemplate + /// Gets or sets component HeaderTemplate + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 组件 LinkTemplate + /// 获得/设置 组件 LinkTemplate + /// Gets or sets component LinkTemplate + /// 10.2.2 /// [Parameter] public RenderFragment? LinkTemplate { get; set; } /// - /// Gets or sets the avatar border radius. Default is null. + /// 获得/设置 the avatar border radius. 默认为 null. + /// Gets or sets the avatar border radius. Default is null. + /// 10.2.2 /// [Parameter] public string? AvatarRadius { get; set; } @@ -85,7 +106,8 @@ public partial class Logout .Build(); /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized 方法 /// protected override void OnInitialized() { diff --git a/src/BootstrapBlazor/Components/Logout/LogoutLink.razor.cs b/src/BootstrapBlazor/Components/Logout/LogoutLink.razor.cs index d9222814d95..553ac829a3a 100644 --- a/src/BootstrapBlazor/Components/Logout/LogoutLink.razor.cs +++ b/src/BootstrapBlazor/Components/Logout/LogoutLink.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public partial class LogoutLink { @@ -17,20 +18,26 @@ public partial class LogoutLink private IStringLocalizer? Localizer { get; set; } /// - /// 获得/设置 图标 + /// 获得/设置 图标 + /// Gets or sets icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 按钮文字 + /// 获得/设置 按钮文字 + /// Gets or sets button文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? Text { get; set; } /// - /// 获得/设置 按钮文字 + /// 获得/设置 按钮文字 + /// Gets or sets button文字 + /// 10.2.2 /// [Parameter] [NotNull] diff --git a/src/BootstrapBlazor/Components/Marquee/Marquee.razor.cs b/src/BootstrapBlazor/Components/Marquee/Marquee.razor.cs index 1ba55960fe0..f9c8e689b46 100644 --- a/src/BootstrapBlazor/Components/Marquee/Marquee.razor.cs +++ b/src/BootstrapBlazor/Components/Marquee/Marquee.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,45 +6,61 @@ namespace BootstrapBlazor.Components; /// -/// Marquee 字幕滚动组件 +/// Marquee 字幕滚动组件 +/// Marquee 字幕滚动component /// public partial class Marquee { /// - /// 获得/设置 组件值 显示文本 默认 Empty + /// 获得/设置 组件值 显示文本 默认 Empty + /// Gets or sets component值 display文本 Default is Empty + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 组件值 文本颜色 默认 #000 - /// 支持16进制和颜色名称 + /// 获得/设置 组件值 文本颜色 默认 #000 支持16进制和颜色名称 + /// + /// Gets or sets component值 文本color Default is #000 支持16进制和color名称 + /// + /// 10.2.2 /// [Parameter] public string Color { get; set; } = "#000"; /// - /// 获得/设置 组件值 背景颜色 默认 #fff - /// 支持16进制和颜色名称 + /// 获得/设置 组件值 背景颜色 默认 #fff 支持16进制和颜色名称 + /// + /// Gets or sets component值 背景color Default is #fff 支持16进制和color名称 + /// + /// 10.2.2 /// [Parameter] public string BackgroundColor { get; set; } = "#fff"; /// - /// 获得/设置 组件值 文本大小 默认 72px + /// 获得/设置 组件值 文本大小 默认 72px + /// Gets or sets component值 文本大小 Default is 72px + /// 10.2.2 /// [Parameter] public int FontSize { get; set; } = 72; /// - /// 获得/设置 组件值 动画时间 默认 14s - /// 值越小滚动越快 + /// 获得/设置 组件值 动画时间 默认 14s 值越小滚动越快 + /// + /// Gets or sets component值 动画时间 Default is 14s 值越小滚动越快 + /// + /// 10.2.2 /// [Parameter] public int Duration { get; set; } = 14; /// - /// 获得/设置 组件值 滚动方向 默认 LeftToRight + /// 获得/设置 组件值 滚动方向 默认 LeftToRight + /// Gets or sets component值 滚动方向 Default is LeftToRight + /// 10.2.2 /// [Parameter] public MarqueeDirection Direction { get; set; } diff --git a/src/BootstrapBlazor/Components/Mask/Mask.razor.cs b/src/BootstrapBlazor/Components/Mask/Mask.razor.cs index 2d41b845588..516b800f8d9 100644 --- a/src/BootstrapBlazor/Components/Mask/Mask.razor.cs +++ b/src/BootstrapBlazor/Components/Mask/Mask.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Mask 组件 +/// Mask 组件 +/// Mask Component /// public partial class Mask { diff --git a/src/BootstrapBlazor/Components/Mask/MaskOption.cs b/src/BootstrapBlazor/Components/Mask/MaskOption.cs index bab742d697a..b1201fe713b 100644 --- a/src/BootstrapBlazor/Components/Mask/MaskOption.cs +++ b/src/BootstrapBlazor/Components/Mask/MaskOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,37 +6,44 @@ namespace BootstrapBlazor.Components; /// -/// MaskOption 配置类 +/// MaskOption 配置类 +/// MaskOption Configuration Class /// public class MaskOption { /// - /// 获得/设置 z-index 值 默认 未设置 使用 样式 1050 + /// 获得/设置 z-index 值 默认 未设置 使用 样式 1050 + /// Get/Set z-index value. Default not set. Use style 1050 /// public int? ZIndex { get; set; } /// - /// 获得/设置 opacity 值 默认 未设置 使用 样式 0.5 + /// 获得/设置 opacity 值 默认 未设置 使用 样式 0.5 + /// Get/Set opacity value. Default not set. Use style 0.5 /// public float? Opacity { get; set; } /// - /// 获得/设置 background-color 值 默认 未设置 使用 样式 #000 + /// 获得/设置 background-color 值 默认 未设置 使用 样式 #000 + /// Get/Set background-color value. Default not set. Use style #000 /// public string? BackgroundColor { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content /// public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 遮罩父容器 id 默认 null 未设置 + /// 获得/设置 遮罩父容器 id 默认 null 未设置 + /// Get/Set Mask Parent Container ID. Default null /// public string? ContainerId { get; set; } /// - /// 获得/设置 遮罩父容器选择器 Selector 默认 null 未设置 + /// 获得/设置 遮罩父容器选择器 Selector 默认 null 未设置 + /// Get/Set Mask Parent Container Selector. Default null /// public string? Selector { get; set; } } diff --git a/src/BootstrapBlazor/Components/Mask/MaskService.cs b/src/BootstrapBlazor/Components/Mask/MaskService.cs index 66c10055358..34ab0363474 100644 --- a/src/BootstrapBlazor/Components/Mask/MaskService.cs +++ b/src/BootstrapBlazor/Components/Mask/MaskService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,23 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// MaskService 遮罩服务 +/// MaskService 遮罩服务 +/// MaskService /// public class MaskService : BootstrapServiceBase { /// - /// 显示 Mask 方法 + /// 显示 Mask 方法 + /// Show Mask Method /// - /// 遮罩配置信息实体类 - /// 组件实例 + /// 遮罩配置信息实体类Mask Configuration Information Entity Class + /// 组件实例 Component Instance /// public Task Show(MaskOption option, Mask? mask = null) => Invoke(option, mask); /// - /// 关闭 Mask 方法 + /// 关闭 Mask 方法 + /// Close Mask Method /// - /// 组件实例 - /// 是否关闭所有遮罩 默认 false 仅关闭当前或者指定遮罩 + /// 组件实例 Component Instance + /// 是否关闭所有遮罩 默认 false 仅关闭当前或者指定遮罩Whether to close all masks. Default false. Only close current or specified mask /// public async Task Close(Mask? mask = null, bool all = false) { diff --git a/src/BootstrapBlazor/Components/Menu/Menu.razor.cs b/src/BootstrapBlazor/Components/Menu/Menu.razor.cs index 81ab6c1ef98..607f222c9b0 100644 --- a/src/BootstrapBlazor/Components/Menu/Menu.razor.cs +++ b/src/BootstrapBlazor/Components/Menu/Menu.razor.cs @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Menu 组件基类 +/// Menu 组件基类 +/// Menu Component Base /// public partial class Menu { /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get Component Style /// protected string? ClassString => CssBuilder.Default("menu") .AddClass("is-bottom", IsBottom) @@ -28,77 +30,105 @@ public partial class Menu private string SideMenuId => $"{Id}_sub"; /// - /// 用于提高性能存储当前 active 状态的菜单 + /// 用于提高性能存储当前 active 状态的菜单 + /// Used to improve performance by storing the current active menu /// private MenuItem? ActiveMenu { get; set; } /// - /// 获得/设置 菜单数据集合 + /// 获得/设置 菜单数据集合 + /// Get/Set Menu Data Collection + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 是否为手风琴效果 默认为 false + /// 获得/设置 是否为手风琴效果 默认为 false + /// Get/Set Whether it is accordion effect. Default false + /// 10.2.2 /// - /// 启用此功能时 参数不生效 + /// + /// 启用此功能时 参数不生效 + /// parameter does not take effect when this feature is enabled + /// [Parameter] public bool IsAccordion { get; set; } /// - /// 获得/设置 是否全部展开 默认为 false + /// 获得/设置 是否全部展开 默认为 false + /// Get/Set Whether to expand all. Default false + /// 10.2.2 /// - /// 手风琴效果 时此参数不生效 + /// + /// 手风琴效果 时此参数不生效 + /// This parameter does not take effect when accordion effect is enabled + /// [Parameter] public bool IsExpandAll { get; set; } /// - /// 获得/设置 侧栏是否收起 默认 false 未收起 + /// 获得/设置 侧栏是否收起 默认 false 未收起 + /// Get/Set Whether sidebar is collapsed. Default false (Not collapsed) + /// 10.2.2 /// [Parameter] public bool IsCollapsed { get; set; } /// - /// 获得/设置 侧栏垂直模式 默认 false + /// 获得/设置 侧栏垂直模式 默认 false + /// Get/Set Sidebar vertical mode. Default false + /// 10.2.2 /// /// [Parameter] public bool IsVertical { get; set; } /// - /// 获得/设置 自动滚动到可视区域 默认 true 开启时生效 + /// 获得/设置 自动滚动到可视区域 默认 true 开启时生效 + /// Get/Set Automatically scroll to visible area. Default true. Effective when is enabled + /// 10.2.2 /// /// [Parameter] public bool IsScrollIntoView { get; set; } = true; /// - /// 获得/设置 侧边栏垂直模式在底部 默认 false + /// 获得/设置 侧边栏垂直模式在底部 默认 false + /// Get/Set Sidebar vertical mode at bottom. Default false + /// 10.2.2 /// [Parameter] public bool IsBottom { get; set; } /// - /// 获得/设置 缩进大小 默认为 16 单位 px + /// 获得/设置 缩进大小 默认为 16 单位 px + /// Get/Set Indent size. Default 16px + /// 10.2.2 /// [Parameter] public int IndentSize { get; set; } = 16; /// - /// 获得/设置 是否禁止导航 默认为 false 允许导航 + /// 获得/设置 是否禁止导航 默认为 false 允许导航 + /// Get/Set Whether to disable navigation. Default false (Allow navigation) + /// 10.2.2 /// [Parameter] public bool DisableNavigation { get; set; } /// - /// 获得/设置 菜单项点击回调委托 + /// 获得/设置 菜单项点击回调委托 + /// Get/Set Menu item click callback delegate + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } /// - /// 获得/设置 NavigationManager 实例 + /// 获得/设置 NavigationManager 实例 + /// Get/Set NavigationManager Instance /// [Inject] [NotNull] diff --git a/src/BootstrapBlazor/Components/Menu/MenuItem.cs b/src/BootstrapBlazor/Components/Menu/MenuItem.cs index 8a1e7307c5f..c4c5390b4a2 100644 --- a/src/BootstrapBlazor/Components/Menu/MenuItem.cs +++ b/src/BootstrapBlazor/Components/Menu/MenuItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,51 +8,60 @@ namespace BootstrapBlazor.Components; /// -/// MenuItem 组件 +/// MenuItem 组件 +/// MenuItem Component /// public class MenuItem : NodeItem { /// - /// 获得 父级菜单 + /// 获得 父级菜单 + /// Get Parent Menu /// public MenuItem? Parent { get; set; } /// - /// 获得/设置 组件数据源 + /// 获得/设置 组件数据源 + /// Get/Set Component Data Source /// public IEnumerable Items { get; set; } = Enumerable.Empty(); /// - /// 获得/设置 导航菜单链接地址 + /// 获得/设置 导航菜单链接地址 + /// Get/Set Navigation Menu Link Address /// public string? Url { get; set; } /// - /// 获得/设置 A 标签 target 参数 默认 null + /// 获得/设置 A 标签 target 参数 默认 null + /// Get/Set Anchor target parameter. Default null /// public string? Target { get; set; } /// - /// 获得/设置 匹配方式 默认 NavLinkMatch.Prefix + /// 获得/设置 匹配方式 默认 NavLinkMatch.Prefix + /// Get/Set Match mode. Default NavLinkMatch.Prefix /// public NavLinkMatch Match { get; set; } = NavLinkMatch.Prefix; /// - /// 获得 当前菜单所在层次 从 0 开始 + /// 获得 当前菜单所在层次 从 0 开始 + /// Get Current menu level. Starting from 0 /// public int Indent { get; private set; } /// - /// 默认构造函数 + /// 默认构造函数 + /// Default Constructor /// public MenuItem() { } /// - /// 带参数构造函数 + /// 带参数构造函数 + /// Parameterized Constructor /// - /// 显示文本 - /// 菜单地址 - /// 菜单图标 + /// 显示文本Display Text + /// 菜单地址Menu Url + /// 菜单图标Menu Icon public MenuItem(string text, string? url = null, string? icon = null) { Text = text; @@ -61,7 +70,8 @@ public MenuItem(string text, string? url = null, string? icon = null) } /// - /// 设置当前节点缩进方法 + /// 设置当前节点缩进方法 + /// Set current node indent method /// protected internal virtual void SetIndent() { @@ -72,7 +82,8 @@ protected internal virtual void SetIndent() } /// - /// 设置当前节点父节点展开 + /// 设置当前节点父节点展开 + /// Set current node parent node expand /// protected internal virtual void SetCollapse(bool collapsed) { @@ -85,7 +96,8 @@ protected internal virtual void SetCollapse(bool collapsed) } /// - /// 获得 所有子项集合 + /// 获得 所有子项集合 + /// Get All sub-items collection /// /// public IEnumerable GetAllSubItems() => Items.Concat(GetSubItems(Items)); diff --git a/src/BootstrapBlazor/Components/Menu/MenuLink.razor.cs b/src/BootstrapBlazor/Components/Menu/MenuLink.razor.cs index bd7e45ee1a8..86bb6af90e1 100644 --- a/src/BootstrapBlazor/Components/Menu/MenuLink.razor.cs +++ b/src/BootstrapBlazor/Components/Menu/MenuLink.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// MenuLink 组件内部封装 NavLink 组件 +/// MenuLink 组件内部封装 NavLink 组件 +/// MenuLink Component internally encapsulates NavLink Component /// public sealed partial class MenuLink { @@ -33,14 +34,18 @@ public sealed partial class MenuLink private string? AriaExpandedString => (Parent.IsVertical && !Item.IsCollapsed ? "true" : "false"); /// - /// 获得/设置 MenuItem 实例 不可为空 + /// 获得/设置 MenuItem 实例 不可为空 + /// Get/Set MenuItem Instance. Cannot be null + /// 10.2.2 /// [Parameter] [NotNull] public MenuItem? Item { get; set; } /// - /// 获得/设置 ArrowIcon 图标 + /// 获得/设置 ArrowIcon 图标 + /// Get/Set ArrowIcon Icon + /// 10.2.2 /// [Parameter] public string? ArrowIcon { get; set; } @@ -64,7 +69,8 @@ public sealed partial class MenuLink : null; /// - /// SetParametersAsync 方法 + /// SetParametersAsync 方法 + /// SetParametersAsync Method /// /// /// diff --git a/src/BootstrapBlazor/Components/Menu/SideMenu.razor.cs b/src/BootstrapBlazor/Components/Menu/SideMenu.razor.cs index daf0e0bb2e6..d41dc72933a 100644 --- a/src/BootstrapBlazor/Components/Menu/SideMenu.razor.cs +++ b/src/BootstrapBlazor/Components/Menu/SideMenu.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// SideMenu 组件 +/// SideMenu 组件 +/// SideMenu Component /// public partial class SideMenu { @@ -24,28 +25,36 @@ public partial class SideMenu private string GetTargetId(MenuItem item) => ComponentIdGenerator.Generate(item); /// - /// 获得/设置 菜单数据集合 + /// 获得/设置 菜单数据集合 + /// Get/Set Menu Data Collection + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 组件数据源 + /// 获得/设置 DropdownIcon 图标 + /// Get/Set DropdownIcon Icon + /// 10.2.2 /// [Parameter] [NotNull] public string? DropdownIcon { get; set; } /// - /// 获得/设置 菜单箭头图标 + /// 获得/设置 菜单箭头图标 + /// Get/Set Menu Arrow Icon + /// 10.2.2 /// [Parameter] [NotNull] public string? ArrowIcon { get; set; } /// - /// 获得/设置 菜单项点击回调委托 + /// 获得/设置 菜单项点击回调委托 + /// Get/Set Menu item click callback delegate + /// 10.2.2 /// [Parameter] [NotNull] @@ -69,7 +78,6 @@ public partial class SideMenu /// /// /// - /// protected override void OnInitialized() { base.OnInitialized(); diff --git a/src/BootstrapBlazor/Components/Menu/SubMenu.razor.cs b/src/BootstrapBlazor/Components/Menu/SubMenu.razor.cs index bca0b2b56b2..7bcd5cc16d3 100644 --- a/src/BootstrapBlazor/Components/Menu/SubMenu.razor.cs +++ b/src/BootstrapBlazor/Components/Menu/SubMenu.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public sealed partial class SubMenu { /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get Component Style /// private string? ClassString => CssBuilder.Default("has-leaf nav-link") .AddClass("active", Item.IsActive) @@ -29,26 +31,34 @@ public sealed partial class SubMenu .Build(); /// - /// 获得/设置 组件数据源 + /// 获得/设置 组件数据源 + /// Get/Set Component Data Source + /// 10.2.2 /// [Parameter] [NotNull] public MenuItem? Item { get; set; } /// - /// 获得/设置 组件数据源 + /// 获得/设置 DropdownIcon 图标 + /// Get/Set DropdownIcon Icon + /// 10.2.2 /// [Parameter] public string? DropdownIcon { get; set; } /// - /// 获得/设置 菜单箭头图标 + /// 获得/设置 菜单箭头图标 + /// Get/Set Menu Arrow Icon + /// 10.2.2 /// [Parameter] public string? ArrowIcon { get; set; } /// - /// 获得/设置 菜单项点击回调委托 + /// 获得/设置 菜单项点击回调委托 + /// Get/Set Menu item click callback delegate + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } @@ -62,7 +72,8 @@ public sealed partial class SubMenu private IStringLocalizer? Localizer { get; set; } /// - /// 获得 样式字符串 + /// 获得 样式字符串 + /// Get Style String /// /// /// @@ -72,7 +83,8 @@ public sealed partial class SubMenu .Build(); /// - /// SetParametersAsync 方法 + /// SetParametersAsync 方法 + /// SetParametersAsync Method /// /// /// diff --git a/src/BootstrapBlazor/Components/Menu/TopMenu.razor.cs b/src/BootstrapBlazor/Components/Menu/TopMenu.razor.cs index f3b04541036..8f0e7f2d698 100644 --- a/src/BootstrapBlazor/Components/Menu/TopMenu.razor.cs +++ b/src/BootstrapBlazor/Components/Menu/TopMenu.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// 顶栏菜单 +/// 顶栏菜单 +/// Top Menu /// public partial class TopMenu { @@ -24,28 +25,36 @@ public partial class TopMenu .Build(); /// - /// 获得/设置 组件数据源 + /// 获得/设置 DropdownIcon 图标 + /// Get/Set DropdownIcon Icon + /// 10.2.2 /// [Parameter] [NotNull] public string? DropdownIcon { get; set; } /// - /// 获得/设置 菜单箭头图标 + /// 获得/设置 菜单箭头图标 + /// Get/Set Menu Arrow Icon + /// 10.2.2 /// [Parameter] [NotNull] public string? ArrowIcon { get; set; } /// - /// 获得/设置 菜单数据集合 + /// 获得/设置 菜单数据集合 + /// Get/Set Menu Data Collection + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 菜单项点击回调委托 + /// 获得/设置 菜单项点击回调委托 + /// Get/Set Menu item click callback delegate + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } @@ -63,7 +72,8 @@ public partial class TopMenu private IIconTheme? IconTheme { get; set; } /// - /// SetParametersAsync 方法 + /// SetParametersAsync 方法 + /// SetParametersAsync Method /// /// /// diff --git a/src/BootstrapBlazor/Components/Message/Message.razor.cs b/src/BootstrapBlazor/Components/Message/Message.razor.cs index f53d450ed36..c76342a8b66 100644 --- a/src/BootstrapBlazor/Components/Message/Message.razor.cs +++ b/src/BootstrapBlazor/Components/Message/Message.razor.cs @@ -6,19 +6,22 @@ namespace BootstrapBlazor.Components; /// -/// Message 组件 +/// Message 组件 +/// Message Component /// public partial class Message { /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get Component Style /// private string? ClassString => CssBuilder.Default("message") .AddClass("is-bottom", Placement != Placement.Top) .Build(); /// - /// 获得 Toast 组件样式设置 + /// 获得 Toast 组件样式设置 + /// Get Toast Component Style Settings /// private string? StyleName => CssBuilder.Default() .AddClass("top: 1rem;", Placement != Placement.Bottom) @@ -32,13 +35,16 @@ public partial class Message : _messages; /// - /// 获得/设置 显示位置 默认为 Top + /// 获得/设置 显示位置 默认为 Top + /// Get/Set Display placement. Default Top + /// 10.2.2 /// [Parameter] public Placement Placement { get; set; } = Placement.Top; /// - /// ToastServices 服务实例 + /// ToastServices 服务实例 + /// MessageService Service Instance /// [Inject] [NotNull] @@ -94,7 +100,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } /// - /// 设置 容器位置方法 + /// 设置 容器位置方法 + /// Set Container Placement Method /// /// public void SetPlacement(Placement placement) @@ -119,7 +126,8 @@ private async Task Show(MessageOption option) } /// - /// 清除 Message 方法 由 JSInvoke 触发 + /// 清除 Message 方法 由 JSInvoke 触发 + /// Clear Message Method. Triggered by JSInvoke /// [JSInvokable] public void Clear(string id) @@ -134,7 +142,8 @@ public void Clear(string id) } /// - /// OnDismiss 回调方法 由 JSInvoke 触发 + /// OnDismiss 回调方法 由 JSInvoke 触发 + /// OnDismiss Callback Method. Triggered by JSInvoke /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/Message/MessageOption.cs b/src/BootstrapBlazor/Components/Message/MessageOption.cs index e6d54f2d669..332b8d0b6ee 100644 --- a/src/BootstrapBlazor/Components/Message/MessageOption.cs +++ b/src/BootstrapBlazor/Components/Message/MessageOption.cs @@ -6,62 +6,74 @@ namespace BootstrapBlazor.Components; /// -/// Message 组件配置类 +/// Message 组件配置类 +/// Message Component Configuration Class /// public class MessageOption : PopupOptionBase { /// - /// 获得/设置 颜色 默认 Primary + /// 获得/设置 颜色 默认 Primary + /// Get/Set Color. Default Primary /// public Color Color { get; set; } = Color.Primary; /// - /// 获得/设置 是否显示关闭按钮 默认 false + /// 获得/设置 是否显示关闭按钮 默认 false + /// Get/Set Whether to show dismiss button. Default false /// public bool ShowDismiss { get; set; } /// - /// 获得/设置 显示图标 默认 null + /// 获得/设置 显示图标 默认 null + /// Get/Set Display Icon. Default null /// public string? Icon { get; set; } /// - /// 获得/设置 是否显示左侧 Bar 默认 false + /// 获得/设置 是否显示左侧 Bar 默认 false + /// Get/Set Whether to show left Bar. Default false /// public bool ShowBar { get; set; } /// - /// 获得/设置 是否显示边框 默认 false 不显示 + /// 获得/设置 是否显示边框 默认 false 不显示 + /// Get/Set Whether to show border. Default false (Not shown) /// public bool ShowBorder { get; set; } /// - /// 获得/设置 是否显示阴影 默认 false 不显示 + /// 获得/设置 是否显示阴影 默认 false 不显示 + /// Get/Set Whether to show shadow. Default false (Not shown) /// public bool ShowShadow { get; set; } /// - /// 获得/设置 关闭当前 MessageItem 回调委托 默认 null + /// 获得/设置 关闭当前 MessageItem 回调委托 默认 null + /// Get/Set Callback delegate for closing current MessageItem. Default null /// public Func? OnDismiss { get; set; } /// - /// 获得/设置 内容模板 默认 null 设置此参数后 将失效 + /// 获得/设置 内容模板 默认 null 设置此参数后 将失效 + /// Get/Set Content Template. Default null. will be invalid if this parameter is set /// public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 消息显示模式,默认为 + /// 获得/设置 消息显示模式,默认为 + /// Get/Set Message show mode. Default /// public MessageShowMode ShowMode { get; set; } = MessageShowMode.Multiple; /// - /// 获得/设置 附加 style 字符串到 元素上 + /// 获得/设置 附加 style 字符串到 元素上 + /// Get/Set Attach style string to element /// public string? StyleString { get; set; } /// - /// 获得/设置 附加 class 字符串到 元素上 + /// 获得/设置 附加 class 字符串到 元素上 + /// Get/Set Attach class string to element /// public string? ClassString { get; set; } } diff --git a/src/BootstrapBlazor/Components/Message/MessageService.cs b/src/BootstrapBlazor/Components/Message/MessageService.cs index 663ff3e9062..7bd587200a4 100644 --- a/src/BootstrapBlazor/Components/Message/MessageService.cs +++ b/src/BootstrapBlazor/Components/Message/MessageService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// MessageService 消息弹窗服务 +/// MessageService 消息弹窗服务 +/// MessageService Message Popup Service /// /// public class MessageService(IOptionsMonitor option) : BootstrapServiceBase @@ -14,10 +15,11 @@ public class MessageService(IOptionsMonitor option) : Bo private BootstrapBlazorOptions Options { get; } = option.CurrentValue; /// - /// Show 方法 + /// Show 方法 + /// Show Method /// /// - /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件 + /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件Specify popup component. Default null. Use component built-in popup component public async Task Show(MessageOption option, Message? message = null) { if (!option.ForceDelay) diff --git a/src/BootstrapBlazor/Components/Modal/Modal.razor.cs b/src/BootstrapBlazor/Components/Modal/Modal.razor.cs index ddd35097035..b7fd0fddd24 100644 --- a/src/BootstrapBlazor/Components/Modal/Modal.razor.cs +++ b/src/BootstrapBlazor/Components/Modal/Modal.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// Modal component +/// Modal component +/// Modal component /// public partial class Modal { @@ -17,7 +18,8 @@ public partial class Modal private IOptionsMonitor? Options { get; set; } /// - /// Gets the style string + /// 获得 the 样式 string + /// Gets the style string /// private string? ClassString => CssBuilder.Default("modal") .AddClass("fade", Options.CurrentValue.GetIsFadeValue(IsFade)) @@ -25,56 +27,72 @@ public partial class Modal .Build(); /// - /// Gets the collection of ModalDialog + /// 获得 the 集合 of ModalDialog + /// Gets the collection of ModalDialog /// protected List Dialogs { get; } = new(8); private readonly ConcurrentDictionary> _shownCallbackCache = []; /// - /// Gets or sets whether to close the popup in the background, default is false + /// 获得/设置 是否 to close the popup in the background, default is false + /// Gets or sets whether to close the popup in the background, default is false + /// 10.2.2 /// [Parameter] public bool IsBackdrop { get; set; } /// - /// Gets or sets whether to enable keyboard support, default is true to respond to the ESC key + /// 获得/设置 是否 to enable keyboard support, default is true to respond to the ESC key + /// Gets or sets whether to enable keyboard support, default is true to respond to the ESC key + /// 10.2.2 /// [Parameter] public bool IsKeyboard { get; set; } = true; /// - /// Gets or sets whether to enable fade in and out animation, default is null + /// 获得/设置 是否 to enable fade in and out animation, default is null + /// Gets or sets whether to enable fade in and out animation, default is null + /// 10.2.2 /// [Parameter] public bool? IsFade { get; set; } /// - /// Gets or sets the child component + /// 获得/设置 the child component + /// Gets or sets the child component + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// Gets or sets the callback method when the component has finished rendering + /// 获得/设置 the 回调方法 when the component has finished rendering + /// Gets or sets the callback method when the component has finished rendering + /// 10.2.2 /// [Parameter] public Func? FirstAfterRenderCallbackAsync { get; set; } /// - /// Gets or sets the callback method when the popup is shown + /// 获得/设置 the 回调方法 when the popup is shown + /// Gets or sets the callback method when the popup is shown + /// 10.2.2 /// [Parameter] public Func? OnShownAsync { get; set; } /// - /// Gets or sets the callback delegate when the popup is closed + /// 获得/设置 the 回调 委托 when the popup is closed + /// Gets or sets the callback delegate when the popup is closed + /// 10.2.2 /// [Parameter] public Func? OnCloseAsync { get; set; } /// - /// Gets the background close popup setting + /// 获得 the background close popup setting + /// Gets the background close popup setting /// private string? Backdrop => IsBackdrop ? null : "static"; @@ -102,7 +120,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(ShownCallback), nameof(CloseCallback)); /// - /// Method to add a dialog + /// Method to add a dialog + /// Method to add a dialog /// /// internal void AddDialog(ModalDialog dialog) @@ -112,7 +131,8 @@ internal void AddDialog(ModalDialog dialog) } /// - /// Method to remove a dialog + /// Method to remove a dialog + /// Method to remove a dialog /// /// internal void RemoveDialog(ModalDialog dialog) @@ -136,7 +156,8 @@ private void ResetShownDialog(ModalDialog dialog) } /// - /// Callback method when the popup has been shown, called by JSInvoke + /// Callback method when the popup has been shown, called by JSInvoke + /// Callback method when the popup has been shown, called by JSInvoke /// /// [JSInvokable] @@ -154,7 +175,8 @@ public async Task ShownCallback() } /// - /// Callback method when the popup has been closed, called by JSInvoke + /// Callback method when the popup has been closed, called by JSInvoke + /// Callback method when the popup has been closed, called by JSInvoke /// /// [JSInvokable] @@ -180,7 +202,8 @@ public async Task CloseCallback() } /// - /// Method to toggle the popup state + /// Method to toggle the popup state + /// Method to toggle the popup state /// public async Task Toggle() { @@ -189,7 +212,8 @@ public async Task Toggle() } /// - /// Method to show the popup + /// Method to show the popup + /// Method to show the popup /// /// public async Task Show() @@ -199,13 +223,15 @@ public async Task Show() } /// - /// Method to close the current popup + /// Method to close the current popup + /// Method to close the current popup /// /// public Task Close() => InvokeVoidAsync("execute", Id, "hide"); /// - /// Method to set the header text + /// Method to set the header text + /// Method to set the header text /// /// public void SetHeaderText(string text) @@ -215,7 +241,8 @@ public void SetHeaderText(string text) } /// - /// Registers a callback method to be called after the popup is shown, equivalent to setting the OnShownAsync parameter + /// Registers a 回调方法 to be called after the popup is shown, equivalent to setting the OnShownAsync parameter + /// Registers a callback method to be called after the popup is shown, equivalent to setting the OnShownAsync parameter /// /// Component /// Callback method @@ -225,7 +252,8 @@ public void RegisterShownCallback(IComponent component, Func value) } /// - /// Unregisters the callback method to be called after the popup is shown + /// Unregisters the 回调方法 to be called after the popup is shown + /// Unregisters the callback method to be called after the popup is shown /// /// Component public void UnRegisterShownCallback(IComponent component) diff --git a/src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs b/src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs index ea16c5d5324..9465ebee86a 100644 --- a/src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs +++ b/src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs @@ -8,14 +8,16 @@ namespace BootstrapBlazor.Components; /// -/// ModalDialog 组件 +/// ModalDialog 组件 +/// ModalDialog Component /// public partial class ModalDialog : IHandlerException { private string MaximizeAriaLabel => MaximizeStatus ? "maximize" : "restore"; /// - /// 获得 弹窗组件样式 + /// 获得 弹窗组件样式 + /// Get Popup Component Style /// private string? ClassName => CssBuilder.Default("modal-dialog") .AddClass("modal-dialog-centered", IsCentered && !IsDraggable) @@ -31,243 +33,326 @@ public partial class ModalDialog : IHandlerException .Build(); /// - /// 获得/设置 是否显示对话框 + /// 获得/设置 是否显示对话框 + /// Get/Set Whether to show dialog /// internal bool IsShown { get; set; } /// - /// 获得/设置 弹窗标题 + /// 获得/设置 弹窗标题 + /// Get/Set Popup Title + /// 10.2.2 /// [Parameter] public string? Title { get; set; } /// - /// 获得/设置 弹窗自定义样式 + /// 获得/设置 弹窗自定义样式 + /// Get/Set Popup Custom Style + /// 10.2.2 /// [Parameter] public string? Class { get; set; } /// - /// 获得/设置 是否可以 Resize 弹窗 默认 false + /// 获得/设置 是否可以 Resize 弹窗 默认 false + /// Get/Set Whether popup can be resized. Default false + /// 10.2.2 /// [Parameter] public bool ShowResize { get; set; } /// - /// 获得/设置 弹窗大小 默认为 + /// 获得/设置 弹窗大小 默认为 + /// Get/Set Popup Size. Default + /// 10.2.2 /// [Parameter] public Size Size { get; set; } = Size.ExtraExtraLarge; /// - /// 获得/设置 弹窗大小 默认为 + /// 获得/设置 弹窗大小 默认为 + /// Get/Set Popup Full Screen Size. Default + /// 10.2.2 /// - /// 为保证功能正常,设置值后 均不可用 + /// + /// 为保证功能正常,设置值后 均不可用 + /// To ensure proper function, are disabled after setting this value + /// [Parameter] public FullScreenSize FullScreenSize { get; set; } /// - /// 获得/设置 是否垂直居中 默认为 true + /// 获得/设置 是否垂直居中 默认为 true + /// Get/Set Whether to center vertically. Default true + /// 10.2.2 /// [Parameter] public bool IsCentered { get; set; } = true; /// - /// 获得/设置 是否弹窗正文超长时滚动 默认为 false + /// 获得/设置 是否弹窗正文超长时滚动 默认为 false + /// Get/Set Whether to scroll when popup body is too long. Default false + /// 10.2.2 /// [Parameter] public bool IsScrolling { get; set; } /// - /// Gets or sets whether to hide the previous dialog when opening a new one, default is false + /// 获得/设置 是否 to hide the previous dialog when opening a new one, default is false + /// Gets or sets whether to hide the previous dialog when opening a new one, default is false + /// 10.2.2 /// [Parameter] public bool IsHidePreviousDialog { get; set; } /// - /// 获得/设置 是否可以拖拽弹窗 默认 false 不可以拖动 + /// 获得/设置 是否可以拖拽弹窗 默认 false 不可以拖动 + /// Get/Set Whether popup can be dragged. Default false + /// 10.2.2 /// [Parameter] public bool IsDraggable { get; set; } /// - /// 获得/设置 是否显示最大化按钮 默认为 false + /// 获得/设置 是否显示最大化按钮 默认为 false + /// Get/Set Whether to show maximize button. Default false + /// 10.2.2 /// - /// 为保证功能正常,设置值为 true 后 均不可用 + /// + /// 为保证功能正常,设置值为 true 后 均不可用 + /// To ensure proper function, are disabled after setting this value to true + /// [Parameter] public bool ShowMaximizeButton { get; set; } /// - /// 获得/设置 是否显示关闭按钮 默认为 true 显示 + /// 获得/设置 是否显示关闭按钮 默认为 true 显示 + /// Get/Set Whether to show close button. Default true (Show) + /// 10.2.2 /// [Parameter] public bool ShowCloseButton { get; set; } = true; /// - /// 获得/设置 是否显示保存按钮 默认为 false 不显示 + /// 获得/设置 是否显示保存按钮 默认为 false 不显示 + /// Get/Set Whether to show save button. Default false (Not shown) + /// 10.2.2 /// [Parameter] public bool ShowSaveButton { get; set; } /// - /// 获得/设置 是否显示打印按钮 默认为 false 不显示 + /// 获得/设置 是否显示打印按钮 默认为 false 不显示 + /// Get/Set Whether to show print button. Default false (Not shown) + /// 10.2.2 /// [Parameter] public bool ShowPrintButton { get; set; } /// - /// 获得/设置 Header 中是否显示打印按钮 默认 false 不显示 + /// 获得/设置 Header 中是否显示打印按钮 默认 false 不显示 + /// Get/Set Whether to show print button in Header. Default false (Not shown) + /// 10.2.2 /// [Parameter] public bool ShowPrintButtonInHeader { get; set; } /// - /// 获得/设置 Header 中打印按钮显示文字 默认为资源文件中 打印 + /// 获得/设置 Header 中打印按钮显示文字 默认为资源文件中 打印 + /// Get/Set Print button text in Header. Default from resource file "Print" + /// 10.2.2 /// [Parameter] public string? PrintButtonText { get; set; } /// - /// 获得/设置 打印按钮图标 未设置 取当前图标主题下打印图标 + /// 获得/设置 打印按钮图标 未设置 取当前图标主题下打印图标 + /// Get/Set Print button icon. If not set, use print icon from current icon theme + /// 10.2.2 /// [Parameter] public string? PrintButtonIcon { get; set; } /// - /// 获得/设置 打印按钮颜色 默认 Color.Primary + /// 获得/设置 打印按钮颜色 默认 Color.Primary + /// Get/Set Print button color. Default Color.Primary + /// 10.2.2 /// [Parameter] public Color PrintButtonColor { get; set; } = Color.Primary; /// - /// 获得/设置 是否显示导出 Pdf 按钮 默认为 false 不显示 + /// 获得/设置 是否显示导出 Pdf 按钮 默认为 false 不显示 + /// Get/Set Whether to show Export PDF button. Default false (Not shown) + /// 10.2.2 /// [Parameter] public bool ShowExportPdfButton { get; set; } /// - /// 获得/设置 Header 中是否显示导出 Pdf 按钮 默认 false 不显示 + /// 获得/设置 Header 中是否显示导出 Pdf 按钮 默认 false 不显示 + /// Get/Set Whether to show Export PDF button in Header. Default false (Not shown) + /// 10.2.2 /// [Parameter] public bool ShowExportPdfButtonInHeader { get; set; } /// - /// 获得/设置 导出 Pdf 按钮配置项 + /// 获得/设置 导出 Pdf 按钮配置项 + /// Get/Set Export PDF button options + /// 10.2.2 /// [Parameter] [NotNull] public ExportPdfButtonOptions? ExportPdfButtonOptions { get; set; } /// - /// 获得/设置 是否显示 Header 关闭按钮 + /// 获得/设置 是否显示 Header 关闭按钮 + /// Get/Set Whether to show Header Close Button + /// 10.2.2 /// [Parameter] public bool ShowHeaderCloseButton { get; set; } = true; /// - /// 获得/设置 是否显示 Header 默认为 true + /// 获得/设置 是否显示 Header 默认为 true + /// Get/Set Whether to show Header. Default true + /// 10.2.2 /// [Parameter] public bool ShowHeader { get; set; } = true; /// - /// 获得/设置 是否显示 Footer 默认为 true + /// 获得/设置 是否显示 Footer 默认为 true + /// Get/Set Whether to show Footer. Default true + /// 10.2.2 /// [Parameter] public bool ShowFooter { get; set; } = true; /// - /// 获得/设置 弹窗内容相关数据 多用于传值 + /// 获得/设置 弹窗内容相关数据 多用于传值 + /// Get/Set Data related to popup content. Often used for passing values + /// 10.2.2 /// [Parameter] public object? BodyContext { get; set; } /// - /// 获得/设置 Header 中按钮模板 + /// 获得/设置 Header 中按钮模板 + /// Get/Set Button template in Header + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderToolbarTemplate { get; set; } /// - /// 获得/设置 ModalBody 组件 + /// 获得/设置 ModalBody 组件 + /// Get/Set ModalBody Component + /// 10.2.2 /// [Parameter] public RenderFragment? BodyTemplate { get; set; } /// - /// 获得/设置 ModalFooter 组件 + /// 获得/设置 ModalFooter 组件 + /// Get/Set ModalFooter Component + /// 10.2.2 /// [Parameter] public RenderFragment? FooterTemplate { get; set; } /// - /// Gets or sets the footer content template. Default is null. + /// 获得/设置 the footer 内容 模板. 默认为 null. + /// Gets or sets the footer content template. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? FooterContentTemplate { get; set; } /// - /// 获得/设置 ModalHeader 组件 + /// 获得/设置 ModalHeader 组件 + /// Get/Set ModalHeader Component + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 保存按钮回调委托 返回 true 并且设置 true 时自动关闭弹窗 + /// 获得/设置 保存按钮回调委托 返回 true 并且设置 true 时自动关闭弹窗 + /// Get/Set Save button callback delegate. Returns true and automatically closes popup if is true + /// 10.2.2 /// [Parameter] public Func>? OnSaveAsync { get; set; } /// - /// 获得/设置 保存成功后是否自动关闭弹窗 默认 true 自动关闭 + /// 获得/设置 保存成功后是否自动关闭弹窗 默认 true 自动关闭 + /// Get/Set Whether to automatically close popup after successful save. Default true + /// 10.2.2 /// [Parameter] public bool IsAutoCloseAfterSave { get; set; } = true; /// - /// 获得/设置 关闭按钮显示文字 资源文件设置为 关闭 + /// 获得/设置 关闭按钮显示文字 资源文件设置为 关闭 + /// Get/Set Close button text. Resource file set to Close + /// 10.2.2 /// [Parameter] [NotNull] public string? CloseButtonText { get; set; } /// - /// 获得/设置 关闭按钮显示图标 未设置时 使用 fa-solid fa-fw fa-xmark + /// 获得/设置 关闭按钮显示图标 未设置时 使用 fa-solid fa-fw fa-xmark + /// Get/Set Close button icon. Use fa-solid fa-fw fa-xmark if not set + /// 10.2.2 /// [Parameter] [NotNull] public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 保存按钮显示文字 资源文件设置为 保存 + /// 获得/设置 保存按钮显示文字 资源文件设置为 保存 + /// Get/Set Save button text. Resource file set to Save + /// 10.2.2 /// [Parameter] [NotNull] public string? SaveButtonText { get; set; } /// - /// 获得/设置 保存按钮显示图标 未设置时 使用主题图标 + /// 获得/设置 保存按钮显示图标 未设置时 使用主题图标 + /// Get/Set Save button icon. Use theme icon if not set + /// 10.2.2 /// [Parameter] [NotNull] public string? SaveButtonIcon { get; set; } /// - /// 获得/设置 最大化按钮图标 + /// 获得/设置 最大化按钮图标 + /// Get/Set Maximize button icon + /// 10.2.2 /// [Parameter] [NotNull] public string? MaximizeWindowIcon { get; set; } /// - /// 获得/设置 恢复按钮图标 + /// 获得/设置 恢复按钮图标 + /// Get/Set Restore button icon + /// 10.2.2 /// [Parameter] [NotNull] public string? RestoreWindowIcon { get; set; } /// - /// 获得/设置 保存按钮图标 + /// 获得/设置 保存按钮图标 + /// Get/Set Save button icon + /// 10.2.2 /// [Parameter] [NotNull] @@ -276,19 +361,24 @@ public partial class ModalDialog : IHandlerException public string? SaveIcon { get => SaveButtonIcon; set => SaveButtonIcon = value; } /// - /// 获得/设置 模态弹窗任务 实例 默认 null + /// 获得/设置 模态弹窗任务 实例 默认 null + /// Get/Set Modal Popup Task Instance. Default null + /// 10.2.2 /// [Parameter] public TaskCompletionSource? ResultTask { get; set; } /// - /// 获得/设置 获得模态弹窗方法 默认 null + /// 获得/设置 获得模态弹窗方法 默认 null + /// Get/Set Get Modal Popup Method. Default null + /// 10.2.2 /// [Parameter] public Func? GetResultDialog { get; set; } /// - /// 获得/设置 弹窗容器实例 + /// 获得/设置 弹窗容器实例 + /// Get/Set Popup Container Instance /// [CascadingParameter] [NotNull] @@ -309,7 +399,8 @@ public partial class ModalDialog : IHandlerException private bool _firstRender = true; /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { @@ -320,7 +411,8 @@ protected override void OnInitialized() } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet Method /// protected override void OnParametersSet() { @@ -373,7 +465,8 @@ protected override void OnAfterRender(bool firstRender) } /// - /// 设置 Header 文字方法 + /// 设置 Header 文字方法 + /// Set Header Text Method /// /// public void SetHeaderText(string text) @@ -444,7 +537,8 @@ private RenderFragment RenderBodyTemplate() => builder => }; /// - /// 上次渲染错误内容 + /// 上次渲染错误内容 + /// Last rendered error content /// protected RenderFragment? _errorContent; @@ -461,7 +555,8 @@ public virtual Task HandlerExceptionAsync(Exception ex, RenderFragment - /// Dispose 方法 + /// Dispose 方法 + /// Dispose Method /// /// protected override async ValueTask DisposeAsync(bool disposing) diff --git a/src/BootstrapBlazor/Components/Nav/Nav.razor.cs b/src/BootstrapBlazor/Components/Nav/Nav.razor.cs index 1f75b1952e9..070dec7907c 100644 --- a/src/BootstrapBlazor/Components/Nav/Nav.razor.cs +++ b/src/BootstrapBlazor/Components/Nav/Nav.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// NavMenu 组件基类 +/// NavMenu 组件基类 +/// NavMenu Component Base Class /// public partial class Nav { /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get Component Style /// protected string? ClassString => CssBuilder.Default("nav") .AddClass("justify-content-center", Alignment == Alignment.Center && !IsVertical) @@ -27,50 +29,65 @@ public partial class Nav .Build(); /// - /// 获得/设置 组件数据源 + /// 获得/设置 组件数据源 + /// Get/Set Component Data Source + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 组件对齐方式 + /// 获得/设置 组件对齐方式 + /// Get/Set Component Alignment + /// 10.2.2 /// [Parameter] public Alignment Alignment { get; set; } = Alignment.Left; /// - /// 获得/设置 是否垂直分布 + /// 获得/设置 是否垂直分布 + /// Get/Set Whether to distribute vertically + /// 10.2.2 /// [Parameter] public bool IsVertical { get; set; } /// - /// 获得/设置 是否为胶囊 + /// 获得/设置 是否为胶囊 + /// Get/Set Whether it is pills + /// 10.2.2 /// [Parameter] public bool IsPills { get; set; } /// - /// 获得/设置 是否填充 + /// 获得/设置 是否填充 + /// Get/Set Whether to fill + /// 10.2.2 /// [Parameter] public bool IsFill { get; set; } /// - /// 获得/设置 是否等宽 + /// 获得/设置 是否等宽 + /// Get/Set Whether to be equal width + /// 10.2.2 /// [Parameter] public bool IsJustified { get; set; } /// - /// 获得/设置 组件内容 + /// 获得/设置 组件内容 + /// Get/Set Component Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet Method /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Navbar/Navbar.razor.cs b/src/BootstrapBlazor/Components/Navbar/Navbar.razor.cs index ba60ee368a7..a7595bc8264 100644 --- a/src/BootstrapBlazor/Components/Navbar/Navbar.razor.cs +++ b/src/BootstrapBlazor/Components/Navbar/Navbar.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,30 +6,38 @@ namespace BootstrapBlazor.Components; /// -/// Navbar 组件 +/// Navbar 组件 +/// Navbar component /// public partial class Navbar { /// - /// 获得/设置 组件大小 默认 + /// 获得/设置 组件大小 默认 + /// Gets or sets component大小 Default is + /// 10.2.2 /// [Parameter] public Size Size { get; set; } = Size.Medium; /// - /// 获得/设置 背景色样式名称 默认 null 未设置 + /// 获得/设置 背景色样式名称 默认 null 未设置 + /// Gets or sets 背景色style名称 Default is null 未Sets + /// 10.2.2 /// [Parameter] public string? BackgroundColorCssClass { get; set; } /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Gets componentstyle /// private string? ClassString => CssBuilder.Default("navbar") .AddClass($"navbar-expand", Size == Size.None) diff --git a/src/BootstrapBlazor/Components/Navbar/NavbarBrand.razor.cs b/src/BootstrapBlazor/Components/Navbar/NavbarBrand.razor.cs index 8428b8f2242..90f82c835fe 100644 --- a/src/BootstrapBlazor/Components/Navbar/NavbarBrand.razor.cs +++ b/src/BootstrapBlazor/Components/Navbar/NavbarBrand.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// NavBrand 组件 +/// NavBrand 组件 +/// NavBrand component /// public partial class NavbarBrand { /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Navbar/NavbarCollapse.razor.cs b/src/BootstrapBlazor/Components/Navbar/NavbarCollapse.razor.cs index 09d37d38d3e..9c32bf6a0d1 100644 --- a/src/BootstrapBlazor/Components/Navbar/NavbarCollapse.razor.cs +++ b/src/BootstrapBlazor/Components/Navbar/NavbarCollapse.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// NavbarCollapse 组件用于在导航栏中适配响应式布局 +/// NavbarCollapse 组件用于在导航栏中适配响应式布局 +/// NavbarCollapse component用于在导航栏中适配响应式布局 /// public partial class NavbarCollapse { /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Navbar/NavbarDropdown.razor.cs b/src/BootstrapBlazor/Components/Navbar/NavbarDropdown.razor.cs index 70f6880167d..7b0d2b79ae2 100644 --- a/src/BootstrapBlazor/Components/Navbar/NavbarDropdown.razor.cs +++ b/src/BootstrapBlazor/Components/Navbar/NavbarDropdown.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,30 +6,39 @@ namespace BootstrapBlazor.Components; /// -/// NavbarDropdown 组件用于在导航栏中创建下拉菜单 +/// NavbarDropdown 组件用于在导航栏中创建下拉菜单 +/// NavbarDropdown component用于在导航栏中创建下拉菜单 /// public partial class NavbarDropdown { /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 Dropdown 菜单标题文本 + /// 获得/设置 Dropdown 菜单标题文本 + /// Gets or sets Dropdown 菜单标题文本 + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 获取菜单对齐方式 默认 none 未设置 + /// 获得/设置 获取菜单对齐方式 默认 none 未设置 + /// Gets or sets 获取菜单对齐方式 Default is none 未Sets + /// 10.2.2 /// [Parameter] public Alignment MenuAlignment { get; set; } /// - /// 获得/设置 下拉选项方向 默认 Dropdown 向下 + /// 获得/设置 下拉选项方向 默认 Dropdown 向下 + /// Gets or sets 下拉选项方向 Default is Dropdown 向下 + /// 10.2.2 /// [Parameter] public Direction Direction { get; set; } @@ -40,7 +49,8 @@ public partial class NavbarDropdown .Build(); /// - /// 菜单对齐方式样式 + /// 菜单对齐方式样式 + /// 菜单对齐方式style /// private string? MenuAlignmentClass => CssBuilder.Default("dropdown-menu shadow") .AddClass($"dropdown-menu-{MenuAlignment.ToDescriptionString()}", MenuAlignment == Alignment.Right) diff --git a/src/BootstrapBlazor/Components/Navbar/NavbarDropdownItem.razor.cs b/src/BootstrapBlazor/Components/Navbar/NavbarDropdownItem.razor.cs index 61eb0944fac..455b246bb9a 100644 --- a/src/BootstrapBlazor/Components/Navbar/NavbarDropdownItem.razor.cs +++ b/src/BootstrapBlazor/Components/Navbar/NavbarDropdownItem.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// NavbarDropdownItem 组件用于在导航栏下拉菜单中创建菜单项 +/// NavbarDropdownItem 组件用于在导航栏下拉菜单中创建菜单项 +/// NavbarDropdownItem component用于在导航栏下拉菜单中创建菜单项 /// public partial class NavbarDropdownItem { /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 菜单项文本 + /// 获得/设置 菜单项文本 + /// Gets or sets 菜单项文本 + /// 10.2.2 /// [Parameter] public string? Url { get; set; } /// - /// 获得/设置 A 标签 target 参数 默认 null + /// 获得/设置 A 标签 target 参数 默认 null + /// Gets or sets A 标签 target 参数 Default is null + /// 10.2.2 /// [Parameter] public string? Target { get; set; } diff --git a/src/BootstrapBlazor/Components/Navbar/NavbarGroup.razor.cs b/src/BootstrapBlazor/Components/Navbar/NavbarGroup.razor.cs index d7aed1dcb44..1713af7d305 100644 --- a/src/BootstrapBlazor/Components/Navbar/NavbarGroup.razor.cs +++ b/src/BootstrapBlazor/Components/Navbar/NavbarGroup.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// NavbarGroup 组件用于在导航栏中分组 +/// NavbarGroup 组件用于在导航栏中分组 +/// NavbarGroup component用于在导航栏中分组 /// public partial class NavbarGroup { /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否启用滚动 + /// 获得/设置 是否启用滚动 + /// Gets or sets whether启用滚动 + /// 10.2.2 /// [Parameter] public bool IsScrolling { get; set; } /// - /// 获得/设置 高度值 默认 200px; + /// 获得/设置 高度值 默认 200px; + /// Gets or sets height值 Default is 200px; + /// 10.2.2 /// [Parameter] public string? Height { get; set; } @@ -39,7 +46,8 @@ public partial class NavbarGroup .Build(); /// - /// + /// + /// /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Navbar/NavbarItem.razor.cs b/src/BootstrapBlazor/Components/Navbar/NavbarItem.razor.cs index 102f34842e4..dd4e9d990bc 100644 --- a/src/BootstrapBlazor/Components/Navbar/NavbarItem.razor.cs +++ b/src/BootstrapBlazor/Components/Navbar/NavbarItem.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// NavbarItem 组件用于在导航栏中添加子组件 +/// NavbarItem 组件用于在导航栏中添加子组件 +/// NavbarItem component用于在导航栏中添加子component /// public partial class NavbarItem { /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Navbar/NavbarLink.razor.cs b/src/BootstrapBlazor/Components/Navbar/NavbarLink.razor.cs index ac5415f82d7..3337b5db80b 100644 --- a/src/BootstrapBlazor/Components/Navbar/NavbarLink.razor.cs +++ b/src/BootstrapBlazor/Components/Navbar/NavbarLink.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,30 +6,39 @@ namespace BootstrapBlazor.Components; /// -/// NavbarLink 组件用于在导航栏中添加链接 +/// NavbarLink 组件用于在导航栏中添加链接 +/// NavbarLink component用于在导航栏中添加链接 /// public partial class NavbarLink { /// - /// 获得/设置 Url 默认为 # + /// 获得/设置 Url 默认为 # + /// Gets or sets Url Default is为 # + /// 10.2.2 /// [Parameter] public string? Url { get; set; } /// - /// 获得/设置 A 标签 target 参数 默认 null + /// 获得/设置 A 标签 target 参数 默认 null + /// Gets or sets A 标签 target 参数 Default is null + /// 10.2.2 /// [Parameter] public string? Target { get; set; } /// - /// 获得/设置 显示图片地址 默认为 null + /// 获得/设置 显示图片地址 默认为 null + /// Gets or sets display图片地址 Default is为 null + /// 10.2.2 /// [Parameter] public string? ImageUrl { get; set; } /// - /// The css class of img element default value null + /// css class of img element default value null + /// The css class of img element default value null + /// 10.2.2 /// [Parameter] public string? ImageCss { get; set; } diff --git a/src/BootstrapBlazor/Components/Navbar/NavbarToggleButton.razor.cs b/src/BootstrapBlazor/Components/Navbar/NavbarToggleButton.razor.cs index 155ee401c80..01c7f99260c 100644 --- a/src/BootstrapBlazor/Components/Navbar/NavbarToggleButton.razor.cs +++ b/src/BootstrapBlazor/Components/Navbar/NavbarToggleButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,23 @@ namespace BootstrapBlazor.Components; /// -/// NavbarToggleButton 组件 +/// NavbarToggleButton 组件 +/// NavbarToggleButton component /// public partial class NavbarToggleButton { /// - /// 获得/设置 联动组件选择器 默认 null + /// 获得/设置 联动组件选择器 默认 null + /// Gets or sets 联动component选择器 Default is null + /// 10.2.2 /// [Parameter] public string? Target { get; set; } /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorIndicator.razor.cs b/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorIndicator.razor.cs index c94c56ba802..4c3ee9ef39e 100644 --- a/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorIndicator.razor.cs +++ b/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorIndicator.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// Represents a network monitor indicator with customizable tooltip settings. +/// Represents a network monitor indicator with customizable tooltip settings. +/// Represents a network monitor indicator with customizable tooltip settings. /// /// This component allows you to configure the text, placement, and trigger behavior of a tooltip that /// appears when interacting with the network monitor indicator. The tooltip can be customized to provide additional @@ -16,19 +17,25 @@ namespace BootstrapBlazor.Components; public partial class NetworkMonitorIndicator : IDisposable { /// - /// 获得/设置 Popover 弹窗标题 默认为 null + /// 获得/设置 Popover 弹窗标题 默认为 null + /// Gets or sets Popover 弹窗标题 Default is为 null + /// 10.2.2 /// [Parameter] public string? Title { get; set; } /// - /// 获得/设置 Popover 显示位置 默认为 Top + /// 获得/设置 Popover 显示位置 默认为 Top + /// Gets or sets Popover display位置 Default is为 Top + /// 10.2.2 /// [Parameter] public Placement PopoverPlacement { get; set; } = Placement.Top; /// - /// 获得/设置 Popover 触发方式 默认为 hover focus + /// 获得/设置 Popover 触发方式 默认为 hover focus + /// Gets or sets Popover 触发方式 Default is为 hover focus + /// 10.2.2 /// [Parameter] [NotNull] @@ -53,7 +60,8 @@ public partial class NetworkMonitorIndicator : IDisposable .Build(); /// - /// + /// + /// /// protected override async Task OnInitializedAsync() { @@ -63,7 +71,8 @@ protected override async Task OnInitializedAsync() } /// - /// + /// + /// /// protected override void OnParametersSet() { @@ -92,9 +101,9 @@ private void Dispose(bool disposing) } /// - /// + /// + /// /// - /// public void Dispose() { Dispose(true); diff --git a/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorState.cs b/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorState.cs index 5ec0f5d3427..7e342749046 100644 --- a/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorState.cs +++ b/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorState.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 网络状态信息类 +/// 网络状态信息类 +/// 网络状态信息类 /// public class NetworkMonitorState { /// - /// Gets or sets the current network type + /// 获得/设置 the current network 类型 + /// Gets or sets the current network type /// public string? NetworkType { get; set; } /// - /// Gets or sets the downlink speed in megabits per second (Mbps). + /// 获得/设置 the downlink speed in megabits per second (Mbps). + /// Gets or sets the downlink speed in megabits per second (Mbps). /// public double? Downlink { get; set; } /// - /// Gets or sets the round-trip time (RTT) in milliseconds. + /// 获得/设置 the round-trip time (RTT) in milliseconds. + /// Gets or sets the round-trip time (RTT) in milliseconds. /// public int RTT { get; set; } } diff --git a/src/BootstrapBlazor/Components/Notification/NotificationItem.cs b/src/BootstrapBlazor/Components/Notification/NotificationItem.cs index 246ad2a8f47..8cd0c2436b1 100644 --- a/src/BootstrapBlazor/Components/Notification/NotificationItem.cs +++ b/src/BootstrapBlazor/Components/Notification/NotificationItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,42 +8,50 @@ namespace BootstrapBlazor.Components; /// -/// 通知信息类 +/// 通知信息类 +/// 通知信息类 /// public class NotificationItem { /// - /// 获得/设置 消息键值 未赋值时系统自动生成 + /// 获得/设置 消息键值 未赋值时系统自动生成 + /// Gets or sets 消息键值 未赋值时系统自动生成 /// public string? Id { get; set; } /// - /// 获得/设置 标题 + /// 获得/设置 标题 + /// Gets or sets 标题 /// public string? Title { get; set; } /// - /// 获得/设置 信息 + /// 获得/设置 信息 + /// Gets or sets 信息 /// public string? Message { get; set; } /// - /// 获得/设置 图标 + /// 获得/设置 图标 + /// Gets or sets icon /// public string? Icon { get; set; } /// - /// 获得/设置 静默 + /// 获得/设置 静默 + /// Gets or sets 静默 /// public bool Silent { get; set; } /// - /// 获得/设置 通知触发时要播放的音频文件的 URL + /// 获得/设置 通知触发时要播放的音频文件的 URL + /// Gets or sets 通知触发时要播放的音频文件的 URL /// public string? Sound { get; set; } /// - /// 获得/设置 通知点击后的回调 + /// 获得/设置 通知点击后的回调 + /// Gets or sets 通知点击后的回调 /// /// 点击通知后自动关闭 [JsonIgnore] diff --git a/src/BootstrapBlazor/Components/Pagination/GotoNavigator.razor.cs b/src/BootstrapBlazor/Components/Pagination/GotoNavigator.razor.cs index 580a701994a..124b1281297 100644 --- a/src/BootstrapBlazor/Components/Pagination/GotoNavigator.razor.cs +++ b/src/BootstrapBlazor/Components/Pagination/GotoNavigator.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,24 +8,31 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public partial class GotoNavigator { /// - /// 获得/设置 跳转页码 默认 null + /// 获得/设置 跳转页码 默认 null + /// Get/Set Navigation Index. Default null + /// 10.2.2 /// [Parameter] public int Index { get; set; } /// - /// 获得/设置 跳转文本 默认 null + /// 获得/设置 跳转文本 默认 null + /// Get/Set Goto Text. Default null + /// 10.2.2 /// [Parameter] public string? GotoText { get; set; } /// - /// 获得/设置 导航回调方法 默认 null + /// 获得/设置 导航回调方法 默认 null + /// Get/Set Navigation Callback. Default null + /// 10.2.2 /// [Parameter] public Func? OnNavigation { get; set; } diff --git a/src/BootstrapBlazor/Components/Pagination/Pagination.razor.cs b/src/BootstrapBlazor/Components/Pagination/Pagination.razor.cs index 5c39edf6a28..fe38dc8653e 100644 --- a/src/BootstrapBlazor/Components/Pagination/Pagination.razor.cs +++ b/src/BootstrapBlazor/Components/Pagination/Pagination.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,77 +8,97 @@ namespace BootstrapBlazor.Components; /// -/// Pagination 组件 +/// Pagination 组件 +/// Pagination Component /// public partial class Pagination { /// - /// 获得/设置 页码总数 + /// 获得/设置 页码总数 + /// Get/Set Total Page Count /// protected int InternalPageCount => Math.Max(1, PageCount); /// - /// 获得 组件 样式 + /// 获得 组件 样式 + /// Get Component Style /// protected string? ClassString => CssBuilder.Default("nav nav-pages") .AddClassFromAttributes(AdditionalAttributes) .Build(); /// - /// 获得 组件 样式 + /// 获得 组件 样式 + /// Get Component Style /// protected string? PaginationClassString => CssBuilder.Default("pagination") .AddClass($"justify-content-{Alignment.ToDescriptionString()}", Alignment != Alignment.None) .Build(); /// - /// 获得/设置 开始页码 + /// 获得/设置 开始页码 + /// Get/Set Start Page Index /// protected int StartPageIndex => Math.Max(2, Math.Min(InternalPageCount - MaxPageLinkCount, InternalPageIndex - MaxPageLinkCount / 2)); /// - /// 获得/设置 结束页码 + /// 获得/设置 结束页码 + /// Get/Set End Page Index /// protected int EndPageIndex => Math.Min(InternalPageCount - 1, StartPageIndex + MaxPageLinkCount - 1); /// - /// 获得/设置 对齐方式 默认 Alignment.Right + /// 获得/设置 对齐方式 默认 Alignment.Right + /// Get/Set Alignment. Default Alignment.Right + /// 10.2.2 /// [Parameter] public Alignment Alignment { get; set; } = Alignment.Right; /// - /// 获得/设置 上一页图标 + /// 获得/设置 上一页图标 + /// Get/Set Previous Page Icon + /// 10.2.2 /// [Parameter] public string? PrevPageIcon { get; set; } /// - /// 获得/设置 上一页图标 + /// 获得/设置 上一页图标 + /// Get/Set Previous Page Icon + /// 10.2.2 /// [Parameter] public string? PrevEllipsisPageIcon { get; set; } /// - /// 获得/设置 下一页图标 + /// 获得/设置 下一页图标 + /// Get/Set Next Page Icon + /// 10.2.2 /// [Parameter] public string? NextPageIcon { get; set; } /// - /// 获得/设置 上一页图标 + /// 获得/设置 上一页图标 + /// Get/Set Previous Page Icon + /// 10.2.2 /// [Parameter] public string? NextEllipsisPageIcon { get; set; } /// - /// 获得/设置 当前页码 + /// 获得/设置 当前页码 + /// Get/Set Current Page Index + /// 10.2.2 /// [Parameter] public int PageIndex { get; set; } = 1; /// - /// 获得/设置 页码总数 + /// 获得/设置 页码总数 + /// Get/Set Total Page Count + /// 10.2.2 /// [Parameter] #if NET6_0_OR_GREATER @@ -87,13 +107,17 @@ public partial class Pagination public int PageCount { get; set; } /// - /// 获得/设置 Page up/down 页码数量 默认 5 + /// 获得/设置 Page up/down 页码数量 默认 5 + /// Get/Set Page up/down link count. Default 5 + /// 10.2.2 /// [Parameter] public int MaxPageLinkCount { get; set; } = 5; /// - /// 点击页码时回调方法 参数是当前页码 + /// 点击页码时回调方法 参数是当前页码 + /// Callback method when page link is clicked. Parameter is current page index + /// 10.2.2 /// [Parameter] public Func? OnPageLinkClick { get; set; } @@ -103,38 +127,50 @@ public partial class Pagination private IStringLocalizer? Localizer { get; set; } /// - /// 获得/设置 显示分页信息文字 默认为 null + /// 获得/设置 显示分页信息文字 默认为 null + /// Get/Set Pagination Info Text. Default null + /// 10.2.2 /// [Parameter] [NotNull] public string? PageInfoText { get; set; } /// - /// 获得/设置 Goto 导航模板 默认 null + /// 获得/设置 Goto 导航模板 默认 null + /// Get/Set Goto Navigation Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? GotoTemplate { get; set; } /// - /// 获得/设置 是否显示 Goto 跳转导航器 默认 false + /// 获得/设置 是否显示 Goto 跳转导航器 默认 false + /// Get/Set Whether to show Goto Navigator. Default false + /// 10.2.2 /// [Parameter] public bool ShowGotoNavigator { get; set; } /// - /// 获得/设置 Goto 导航标签显示文字 默认 导航到/Goto + /// 获得/设置 Goto 导航标签显示文字 默认 导航到/Goto + /// Get/Set Goto Navigator Label Text. Default Goto + /// 10.2.2 /// [Parameter] public string? GotoNavigatorLabelText { get; set; } /// - /// 获得/设置 是否显示 分页信息 默认 true + /// 获得/设置 是否显示 分页信息 默认 true + /// Get/Set Whether to show Page Info. Default true + /// 10.2.2 /// [Parameter] public bool ShowPageInfo { get; set; } = true; /// - /// 获得/设置 分页信息模板 默认 null + /// 获得/设置 分页信息模板 默认 null + /// Get/Set Page Info Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? PageInfoTemplate { get; set; } @@ -175,7 +211,8 @@ private async Task OnGoto(int index) } /// - /// 上一页方法 + /// 上一页方法 + /// Move Previous Method /// protected async Task MovePrev(int index) { @@ -188,7 +225,8 @@ protected async Task MovePrev(int index) } /// - /// 下一页方法 + /// 下一页方法 + /// Move Next Method /// protected async Task MoveNext(int index) { @@ -201,7 +239,8 @@ protected async Task MoveNext(int index) } /// - /// 点击页码时回调方法 + /// 点击页码时回调方法 + /// Callback method when page link is clicked /// /// protected async Task OnPageItemClick(int pageIndex) diff --git a/src/BootstrapBlazor/Components/Pagination/PaginationItem.razor.cs b/src/BootstrapBlazor/Components/Pagination/PaginationItem.razor.cs index 728121dcf45..ce250bad657 100644 --- a/src/BootstrapBlazor/Components/Pagination/PaginationItem.razor.cs +++ b/src/BootstrapBlazor/Components/Pagination/PaginationItem.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,36 +6,47 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public partial class PaginationItem { /// - /// 点击页码时回调方法 参数是当前页码 + /// 点击页码时回调方法 参数是当前页码 + /// Callback method when page link is clicked. Parameter is current page index + /// 10.2.2 /// [Parameter] public EventCallback OnClick { get; set; } /// - /// 获得/设置 当前页码 + /// 获得/设置 当前页码 + /// Get/Set Current Page Index + /// 10.2.2 /// [Parameter] public int Index { get; set; } /// - /// 获得/设置 是否激活 默认 false + /// 获得/设置 是否激活 默认 false + /// Get/Set Whether active. Default false + /// 10.2.2 /// [Parameter] public bool IsActive { get; set; } /// - /// 获得/设置 是否禁用 默认 false + /// 获得/设置 是否禁用 默认 false + /// Get/Set Whether disabled. Default false + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// 子组件 + /// 子组件 + /// Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Popover/Popover.razor.cs b/src/BootstrapBlazor/Components/Popover/Popover.razor.cs index 32cdc4d947c..02e57c101d3 100644 --- a/src/BootstrapBlazor/Components/Popover/Popover.razor.cs +++ b/src/BootstrapBlazor/Components/Popover/Popover.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// Popover 弹出窗组件 +/// Popover 弹出窗组件 +/// Popover Component /// public partial class Popover { /// - /// 获得/设置 显示文字,复杂内容可通过 自定义 + /// 获得/设置 显示文字,复杂内容可通过 自定义 + /// Get/Set Display text. Complex content can be customized via + /// 10.2.2 /// [Parameter] public string? Content { get; set; } /// - /// 获得/设置 是否显示阴影 默认 true + /// 获得/设置 是否显示阴影 默认 true + /// Get/Set Whether to show shadow. Default true + /// 10.2.2 /// [Parameter] public bool ShowShadow { get; set; } = true; /// - /// 获得/设置 内容模板 默认 null 设置值后 参数失效 + /// 获得/设置 内容模板 默认 null 设置值后 参数失效 + /// Get/Set Content Template. Default null. parameter is invalid if set + /// 10.2.2 /// [Parameter] public RenderFragment? Template { get; set; } diff --git a/src/BootstrapBlazor/Components/Popover/PopupOptionBase.cs b/src/BootstrapBlazor/Components/Popover/PopupOptionBase.cs index 95605c17679..099bcc99e2e 100644 --- a/src/BootstrapBlazor/Components/Popover/PopupOptionBase.cs +++ b/src/BootstrapBlazor/Components/Popover/PopupOptionBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,28 +6,34 @@ namespace BootstrapBlazor.Components; /// -/// 弹窗类配置项基类 +/// 弹窗类配置项基类 +/// Popup Configuration Base Class /// public abstract class PopupOptionBase { /// - /// 获得/设置 Toast Body 子组件 + /// 获得/设置 Toast Body 子组件 + /// Get/Set Toast Body Child Component /// public string? Content { get; set; } /// - /// 获得/设置 是否自动隐藏 默认 true 自动关闭 默认 true + /// 获得/设置 是否自动隐藏 默认 true 自动关闭 默认 true + /// Get/Set Whether to auto hide. Default true /// public bool IsAutoHide { get; set; } = true; /// - /// 获得/设置 自动隐藏时间间隔 单位毫秒 默认 4000 可通过全局配置进行统一更改 + /// 获得/设置 自动隐藏时间间隔 单位毫秒 默认 4000 可通过全局配置进行统一更改 + /// Get/Set Auto hide interval in milliseconds. Default 4000. Can be configured globally /// public int Delay { get; set; } = 4000; /// - /// 获得/设置 是否强制使用本实例的延时时间,防止值被全局配置覆盖 默认 false - /// 组件使用 值进行自动关闭,可通过 类相关参数进行全局设置延时关闭时间,可通过本参数强制使用 + /// 获得/设置 是否强制使用本实例的延时时间,防止值被全局配置覆盖 默认 false + /// Get/Set Whether to force use the delay time of this instance to prevent the value from being overwritten by global configuration. Default false + /// 组件使用 值进行自动关闭,可通过 类相关参数进行全局设置延时关闭时间,可通过本参数强制使用 + /// Component uses value for automatic closing, global setting of delay closing time can be done through related parameters of class, this parameter can force usage of value /// public bool ForceDelay { get; set; } } diff --git a/src/BootstrapBlazor/Components/Print/PrintButton.razor.cs b/src/BootstrapBlazor/Components/Print/PrintButton.razor.cs index f7538556fa0..e51b553bf6e 100644 --- a/src/BootstrapBlazor/Components/Print/PrintButton.razor.cs +++ b/src/BootstrapBlazor/Components/Print/PrintButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,15 @@ namespace BootstrapBlazor.Components; /// -/// PrintButton 打印按钮 +/// PrintButton 打印按钮 +/// PrintButton Component /// public partial class PrintButton { /// - /// 获得/设置 预览模板地址 默认为空 + /// 获得/设置 预览模板地址 默认为空 + /// Get/Set Preview template URL. Default empty + /// 10.2.2 /// [Parameter] public string? PreviewUrl { get; set; } diff --git a/src/BootstrapBlazor/Components/Progress/Progress.razor.cs b/src/BootstrapBlazor/Components/Progress/Progress.razor.cs index cbc06713e40..7945458ffd0 100644 --- a/src/BootstrapBlazor/Components/Progress/Progress.razor.cs +++ b/src/BootstrapBlazor/Components/Progress/Progress.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,63 +8,82 @@ namespace BootstrapBlazor.Components; /// -/// Progress 组件 +/// Progress 组件 +/// Progress Component /// public partial class Progress { /// - /// 获得/设置 控件高度 默认 null 未设置 + /// 获得/设置 控件高度 默认 null 未设置 + /// Get/Set Control Height. Default null + /// 10.2.2 /// [Parameter] public int? Height { get; set; } /// - /// 获得/设置 颜色 默认为 Color.Primary + /// 获得/设置 颜色 默认为 Color.Primary + /// Get/Set Color. Default Color.Primary + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.Primary; /// - /// 获得/设置 是否显示进度条值 默认 false + /// 获得/设置 是否显示进度条值 默认 false + /// Get/Set Whether to show progress value. Default false + /// 10.2.2 /// /// [Parameter] public bool IsShowValue { get; set; } /// - /// 获得/设置 是否显示为条纹 默认 false + /// 获得/设置 是否显示为条纹 默认 false + /// Get/Set Whether to show striped. Default false + /// 10.2.2 /// /// [Parameter] public bool IsStriped { get; set; } /// - /// 获得/设置 是否动画 默认 false + /// 获得/设置 是否动画 默认 false + /// Get/Set Whether to show animated. Default false + /// 10.2.2 /// /// [Parameter] public bool IsAnimated { get; set; } /// - /// 获得/设置 组件进度值 + /// 获得/设置 组件进度值 + /// Get/Set Progress Value + /// 10.2.2 /// [Parameter] public double Value { get; set; } /// - /// 获得/设置 进度值修约小数位数, 默认 0 (即保留为整数) + /// 获得/设置 进度值修约小数位数, 默认 0 (即保留为整数) + /// Get/Set Rounding decimal places. Default 0 (Keep integer) + /// 10.2.2 /// [Parameter] public int Round { get; set; } /// - /// 获得/设置 保留小数点模式 默认为 AwayFromZero + /// 获得/设置 保留小数点模式 默认为 AwayFromZero + /// Get/Set Rounding mode. Default AwayFromZero + /// 10.2.2 /// [Parameter] public MidpointRounding MidpointRounding { get; set; } = MidpointRounding.AwayFromZero; /// - /// 获得/设置 进度标签文本 + /// 获得/设置 进度标签文本 + /// Get/Set Progress Label Text + /// 10.2.2 /// [Parameter] public string? Text { get; set; } @@ -74,7 +93,8 @@ public partial class Progress .Build(); /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Style Collection /// /// private string? ClassName => CssBuilder.Default("progress-bar") @@ -84,14 +104,16 @@ public partial class Progress .Build(); /// - /// 获得 Style 集合 + /// 获得 Style 集合 + /// Get Style Collection /// private string? StyleName => CssBuilder.Default() .AddClass($"width: {InternalValue.ToString(CultureInfo.InvariantCulture)}%;") .Build(); /// - /// 获得 ProgressStyle 集合 + /// 获得 ProgressStyle 集合 + /// Get ProgressStyle Collection /// private string? ProgressStyle => CssBuilder.Default() .AddClass($"height: {Height}px;", Height.HasValue) @@ -100,12 +122,14 @@ public partial class Progress private double InternalValue => Round == 0 ? Value : Math.Round(Value, Round, MidpointRounding); /// - /// 获得 当前值百分比标签文字 + /// 获得 当前值百分比标签文字 + /// Get Current Value Percentage Label Text /// private string? ValueLabelString => IsShowValue ? string.IsNullOrEmpty(Text) ? $"{InternalValue}%" : Text : null; /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet Method /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/QueryBuilder/GroupFilterKeyValueAction.cs b/src/BootstrapBlazor/Components/QueryBuilder/GroupFilterKeyValueAction.cs index c2e2c49f1ec..6500ddeafc2 100644 --- a/src/BootstrapBlazor/Components/QueryBuilder/GroupFilterKeyValueAction.cs +++ b/src/BootstrapBlazor/Components/QueryBuilder/GroupFilterKeyValueAction.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/QueryBuilder/QueryBuilder.razor.cs b/src/BootstrapBlazor/Components/QueryBuilder/QueryBuilder.razor.cs index a146fe68437..cb683c3ee1f 100644 --- a/src/BootstrapBlazor/Components/QueryBuilder/QueryBuilder.razor.cs +++ b/src/BootstrapBlazor/Components/QueryBuilder/QueryBuilder.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// QueryBuilder 组件 +/// QueryBuilder 组件 +/// QueryBuilder Component /// #if NET6_0_OR_GREATER [CascadingTypeParameter(nameof(TModel))] @@ -20,7 +21,9 @@ namespace BootstrapBlazor.Components; .Build(); /// - /// 获得/设置 过滤模型 实例值 + /// 获得/设置 过滤模型 实例值 + /// Get/Set Filter Model Value + /// 10.2.2 /// [Parameter] [NotNull] @@ -28,61 +31,81 @@ namespace BootstrapBlazor.Components; public FilterKeyValueAction? Value { get; set; } /// - /// 获得/设置 Filter 回调方法 支持双向绑定 + /// 获得/设置 Filter 回调方法 支持双向绑定 + /// Get/Set Filter Callback Method. Supports Two-way Binding + /// 10.2.2 /// [Parameter] public EventCallback ValueChanged { get; set; } /// - /// 获得/设置 逻辑运算符 + /// 获得/设置 逻辑运算符 + /// Get/Set Logic Operator + /// 10.2.2 /// [Parameter] public FilterLogic Logic { get; set; } /// - /// 获得/设置 模板 + /// 获得/设置 模板 + /// Get/Set Template + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否显示 Header 区域 默认 true 显示 + /// 获得/设置 是否显示 Header 区域 默认 true 显示 + /// Get/Set Whether to show Header area. Default true + /// 10.2.2 /// [Parameter] public bool ShowHeader { get; set; } = true; /// - /// 获得/设置 Header 模板 默认 null + /// 获得/设置 Header 模板 默认 null + /// Get/Set Header Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 增加过滤条件图标 + /// 获得/设置 增加过滤条件图标 + /// Get/Set Add Filter Condition Icon + /// 10.2.2 /// [Parameter] public string? PlusIcon { get; set; } /// - /// 获得/设置 移除过滤条件图标 + /// 获得/设置 移除过滤条件图标 + /// Get/Set Remove Filter Condition Icon + /// 10.2.2 /// [Parameter] public string? RemoveIcon { get; set; } /// - /// 获得/设置 减少过滤条件图标 + /// 获得/设置 减少过滤条件图标 + /// Get/Set Reduce Filter Condition Icon + /// 10.2.2 /// [Parameter] public string? MinusIcon { get; set; } /// - /// 获得/设置 组合过滤条件文本 + /// 获得/设置 组合过滤条件文本 + /// Get/Set Group Filter Condition Text + /// 10.2.2 /// [Parameter] public string? GroupText { get; set; } /// - /// 获得/设置 过滤条件文本 + /// 获得/设置 过滤条件文本 + /// Get/Set Filter Condition Text + /// 10.2.2 /// [Parameter] public string? ItemText { get; set; } diff --git a/src/BootstrapBlazor/Components/QueryBuilder/QueryColumn.cs b/src/BootstrapBlazor/Components/QueryBuilder/QueryColumn.cs index 5599005afc0..33422812243 100644 --- a/src/BootstrapBlazor/Components/QueryBuilder/QueryColumn.cs +++ b/src/BootstrapBlazor/Components/QueryBuilder/QueryColumn.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,30 +9,39 @@ namespace BootstrapBlazor.Components; /// -/// QueryColumn 组件 +/// QueryColumn 组件 +/// QueryColumn Component /// public class QueryColumn : QueryGroup { /// - /// 获得/设置 条件字段名称 + /// 获得/设置 条件字段名称 + /// Get/Set Condition Field Name + /// 10.2.2 /// [Parameter] public TType? Field { get; set; } /// - /// 获得/设置 FieldExpression 表达式 + /// 获得/设置 FieldExpression 表达式 + /// Get/Set FieldExpression + /// 10.2.2 /// [Parameter] public Expression>? FieldExpression { get; set; } /// - /// 获得/设置 条件操作符号 + /// 获得/设置 条件操作符号 + /// Get/Set Condition Operator + /// 10.2.2 /// [Parameter] public FilterAction Operator { get; set; } /// - /// 获得/设置 条件值 + /// 获得/设置 条件值 + /// Get/Set Condition Value + /// 10.2.2 /// [Parameter] public object? Value { get; set; } diff --git a/src/BootstrapBlazor/Components/QueryBuilder/QueryGroup.razor.cs b/src/BootstrapBlazor/Components/QueryBuilder/QueryGroup.razor.cs index 74cbf011e9d..60af5e4f643 100644 --- a/src/BootstrapBlazor/Components/QueryBuilder/QueryGroup.razor.cs +++ b/src/BootstrapBlazor/Components/QueryBuilder/QueryGroup.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,30 +6,37 @@ namespace BootstrapBlazor.Components; /// -/// QueryGroup 组件 +/// QueryGroup 组件 +/// QueryGroup Component /// public partial class QueryGroup : IDisposable { /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 逻辑运算符 + /// 获得/设置 逻辑运算符 + /// Get/Set Logic Operator + /// 10.2.2 /// [Parameter] public FilterLogic Logic { get; set; } /// - /// 过滤条件集合 + /// 过滤条件集合 + /// Filter collection /// [CascadingParameter] protected List? Filters { get; set; } /// - /// 过滤条件集合 + /// 过滤条件集合 + /// Filter collection /// protected FilterKeyValueAction _filter = new(); @@ -54,7 +61,8 @@ protected override void OnParametersSet() } /// - /// 释放资源 + /// 释放资源 + /// Dispose /// /// protected virtual void Dispose(bool disposing) @@ -66,7 +74,8 @@ protected virtual void Dispose(bool disposing) } /// - /// 释放资源 + /// 释放资源 + /// Dispose /// public void Dispose() { diff --git a/src/BootstrapBlazor/Components/Radio/Radio.razor.cs b/src/BootstrapBlazor/Components/Radio/Radio.razor.cs index e461776a61f..e76e4343f01 100644 --- a/src/BootstrapBlazor/Components/Radio/Radio.razor.cs +++ b/src/BootstrapBlazor/Components/Radio/Radio.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,19 +6,24 @@ namespace BootstrapBlazor.Components; /// -/// Radio 单选框组件 +/// Radio 单选框组件 +/// Radio Component /// [JSModuleNotInherited] public partial class Radio : Checkbox { /// - /// 获得/设置 点击回调方法 + /// 获得/设置 点击回调方法 + /// Get/Set Click Callback Method + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } /// - /// 获得/设置 Radio 组名称一般来讲需要设置 默认为 null 未设置 + /// 获得/设置 Radio 组名称一般来讲需要设置 默认为 null 未设置 + /// Get/Set Radio Group Name. Default null + /// 10.2.2 /// [Parameter] [EditorRequired] diff --git a/src/BootstrapBlazor/Components/Radio/RadioList.razor.cs b/src/BootstrapBlazor/Components/Radio/RadioList.razor.cs index 64e726a47fa..0cea5891d6a 100644 --- a/src/BootstrapBlazor/Components/Radio/RadioList.razor.cs +++ b/src/BootstrapBlazor/Components/Radio/RadioList.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,25 +8,32 @@ namespace BootstrapBlazor.Components; /// -/// 单选框组合组件 +/// 单选框组合组件 +/// RadioList Component /// public partial class RadioList { /// - /// 获得/设置 值为可为空枚举类型时是否自动添加空值 默认 false 自定义空值显示文本请参考 + /// 获得/设置 值为可为空枚举类型时是否自动添加空值 默认 false 自定义空值显示文本请参考 + /// Get/Set Whether to auto add null value when value is nullable enum. Default false. Custom null value display text, please refer to + /// 10.2.2 /// [Parameter] public bool IsAutoAddNullItem { get; set; } /// - /// 获得/设置 空值项显示文字 默认为 "" 是否自动添加空值请参考 + /// 获得/设置 空值项显示文字 默认为 "" 是否自动添加空值请参考 + /// Get/Set Null item display text. Default "". Whether to auto add null value, please refer to + /// 10.2.2 /// [Parameter] [NotNull] public string? NullItemText { get; set; } /// - /// 获得/设置 未设置选中项时是否自动选择第一项 默认 true + /// 获得/设置 未设置选中项时是否自动选择第一项 默认 true + /// Get/Set Whether to auto select first item when no item is selected. Default true + /// 10.2.2 /// [Parameter] public bool AutoSelectFirstWhenValueIsNull { get; set; } = true; @@ -105,19 +112,22 @@ protected override bool TryParseValueFromString(string value, [MaybeNullWhen(fal } /// - /// + /// + /// /// /// /// protected override void ProcessGenericItems(Type typeValue, IEnumerable? list) { } /// - /// + /// + /// /// protected override void EnsureParameterValid() { } /// - /// 点击选择框方法 + /// 点击选择框方法 + /// Click Checkbox Method /// private async Task OnClick(SelectedItem item) { diff --git a/src/BootstrapBlazor/Components/Radio/RadioListGeneric.razor.cs b/src/BootstrapBlazor/Components/Radio/RadioListGeneric.razor.cs index 833d8ddc863..80c97b593cc 100644 --- a/src/BootstrapBlazor/Components/Radio/RadioListGeneric.razor.cs +++ b/src/BootstrapBlazor/Components/Radio/RadioListGeneric.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,82 +6,107 @@ namespace BootstrapBlazor.Components; /// -/// 单选框组合组件 +/// 单选框组合组件 +/// RadioListGeneric Component /// public partial class RadioListGeneric : IModelEqualityComparer { /// - /// 获得/设置 值为可为空枚举类型时是否自动添加空值 默认 false 自定义空值显示文本请参考 + /// 获得/设置 值为可为空枚举类型时是否自动添加空值 默认 false 自定义空值显示文本请参考 + /// Get/Set Whether to auto add null value when value is nullable enum. Default false. Custom null value display text, please refer to + /// 10.2.2 /// [Parameter] public bool IsAutoAddNullItem { get; set; } /// - /// 获得/设置 空值项显示文字 默认为 "" 是否自动添加空值请参考 + /// 获得/设置 空值项显示文字 默认为 "" 是否自动添加空值请参考 + /// Get/Set Null item display text. Default "". Whether to auto add null value, please refer to + /// 10.2.2 /// [Parameter] [NotNull] public string? NullItemText { get; set; } /// - /// 获得/设置 项模板 + /// 获得/设置 项模板 + /// Get/Set Item Template + /// 10.2.2 /// [Parameter] public RenderFragment>? ItemTemplate { get; set; } /// - /// 获得/设置 是否为按钮样式 默认 false + /// 获得/设置 是否为按钮样式 默认 false + /// Get/Set Whether to be button style. Default false + /// 10.2.2 /// [Parameter] public bool IsButton { get; set; } /// - /// 获得/设置 是否显示边框 默认为 true + /// 获得/设置 是否显示边框 默认为 true + /// Get/Set Whether to show border. Default true + /// 10.2.2 /// [Parameter] public bool ShowBorder { get; set; } = true; /// - /// 获得/设置 是否为竖向排列 默认为 false + /// 获得/设置 是否为竖向排列 默认为 false + /// Get/Set Whether to be vertical layout. Default false + /// 10.2.2 /// [Parameter] public bool IsVertical { get; set; } /// - /// 获得/设置 按钮颜色 默认为 None 未设置 + /// 获得/设置 按钮颜色 默认为 None 未设置 + /// Get/Set Button Color. Default None + /// 10.2.2 /// [Parameter] public Color Color { get; set; } /// - /// 获得/设置 数据源 + /// 获得/设置 数据源 + /// Get/Set Items + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable>? Items { get; set; } /// - /// 获得/设置 SelectedItemChanged 方法 + /// 获得/设置 SelectedItemChanged 方法 + /// Get/Set OnSelectedChanged Method + /// 10.2.2 /// [Parameter] public Func? OnSelectedChanged { get; set; } /// - /// 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 + /// 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键
+ /// Get/Set Data primary key identification attribute. Default
Used to identify data primary key attribute, if model does not set primary key, you can use parameter to customize judgment
Data model supports composite primary keys
+ /// 10.2.2 ///
[Parameter] [NotNull] public Type? CustomKeyAttribute { get; set; } = typeof(KeyAttribute); /// - /// 获得/设置 比较数据是否相同回调方法 默认为 null - /// 提供此回调方法时忽略 属性 + /// 获得/设置 比较数据是否相同回调方法 默认为 null + /// Get/Set Callback method for comparing whether data is the same. Default null + /// 提供此回调方法时忽略 属性 + /// Ignore property when providing this callback method + /// 10.2.2 /// [Parameter] public Func? ModelEqualityComparer { get; set; } /// - /// 获得 当前选项是否被禁用 + /// 获得 当前选项是否被禁用 + /// Get Whether current option is disabled /// /// /// @@ -137,7 +162,8 @@ protected override void OnParametersSet() } /// - /// 点击选择框方法 + /// 点击选择框方法 + /// Click Checkbox Method /// private async Task OnClick(SelectedItem item) { diff --git a/src/BootstrapBlazor/Components/Rate/Rate.razor.cs b/src/BootstrapBlazor/Components/Rate/Rate.razor.cs index 35d21a045cb..5fe1a9aad5a 100644 --- a/src/BootstrapBlazor/Components/Rate/Rate.razor.cs +++ b/src/BootstrapBlazor/Components/Rate/Rate.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Rate 组件 +/// Rate 组件 +/// Rate Component /// public partial class Rate { /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Style Collection /// private string? ClassString => CssBuilder.Default("rate") .AddClass("text-nowrap", !IsWrap) @@ -25,7 +27,8 @@ public partial class Rate .Build(); /// - /// 判断是否显示部分星级 + /// 判断是否显示部分星级 + /// Determine whether to show partial stars /// /// /// @@ -36,71 +39,93 @@ public partial class Rate private string GetWidthStyle(int i) => $"width: {Math.Round(Value + 1 - i, 2) * 100}%;"; /// - /// 获得/设置 选中图标 + /// 获得/设置 选中图标 + /// Get/Set Checked Icon + /// 10.2.2 /// [Parameter] [NotNull] public string? StarIcon { get; set; } /// - /// 获得/设置 未选中图标 + /// 获得/设置 未选中图标 + /// Get/Set Unchecked Icon + /// 10.2.2 /// [Parameter] [NotNull] public string? UnStarIcon { get; set; } /// - /// 获得/设置 组件值 + /// 获得/设置 组件值 + /// Get/Set Value + /// 10.2.2 /// [Parameter] public double Value { get; set; } /// - /// 获得/设置 是否禁用 默认为 false + /// 获得/设置 是否禁用 默认为 false + /// Get/Set Whether disabled. Default false + /// 10.2.2 /// /// 禁用模式下图标颜色为灰色,不可点击 [Parameter] public bool IsDisable { get; set; } /// - /// 获得/设置 是否只读 默认为 false + /// 获得/设置 是否只读 默认为 false + /// Get/Set Whether readonly. Default false + /// 10.2.2 /// /// 只读情况下图标为彩色,仅不可点击 [Parameter] public bool IsReadonly { get; set; } /// - /// 获得/设置 是否禁止换行 默认为 true + /// 获得/设置 是否禁止换行 默认为 true + /// Get/Set Whether to disable wrap. Default true + /// 10.2.2 /// [Parameter] public bool IsWrap { get; set; } /// - /// 获得/设置 是否显示 Value 默认为 false + /// 获得/设置 是否显示 Value 默认为 false + /// Get/Set Whether to show Value. Default false + /// 10.2.2 /// [Parameter] public bool ShowValue { get; set; } /// - /// 获得/设置 子项模板 + /// 获得/设置 子项模板 + /// Get/Set Item Template + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } /// - /// 获得/设置 组件值变化时回调委托 + /// 获得/设置 组件值变化时回调委托 + /// Get/Set Value Changed Callback Delegate + /// 10.2.2 /// [Parameter] public EventCallback ValueChanged { get; set; } /// - /// 获得/设置 组件值变化时回调委托 + /// 获得/设置 组件值变化时回调委托 + /// Get/Set Value Changed Callback Delegate + /// 10.2.2 /// [Parameter] public Func? OnValueChanged { get; set; } /// - /// 获得/设置 最大值 默认 5 + /// 获得/设置 最大值 默认 5 + /// Get/Set Max Value. Default 5 + /// 10.2.2 /// [Parameter] public int Max { get; set; } = 5; diff --git a/src/BootstrapBlazor/Components/Reconnector/IReconnector.cs b/src/BootstrapBlazor/Components/Reconnector/IReconnector.cs index f098c408578..e9fc7df04df 100644 --- a/src/BootstrapBlazor/Components/Reconnector/IReconnector.cs +++ b/src/BootstrapBlazor/Components/Reconnector/IReconnector.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// IReconnector 接口 +/// IReconnector 接口 +/// IReconnector Interface /// public interface IReconnector { /// - /// 获得/设置 正在尝试重试连接对话框的模板 + /// 获得/设置 正在尝试重试连接对话框的模板 + /// Get/Set Reconnecting Template /// RenderFragment? ReconnectingTemplate { get; set; } /// - /// 获得/设置 连接失败对话框的模板 + /// 获得/设置 连接失败对话框的模板 + /// Get/Set Reconnect Failed Template /// RenderFragment? ReconnectFailedTemplate { get; set; } /// - /// 获得/设置 连接被拒绝对话框的模板 + /// 获得/设置 连接被拒绝对话框的模板 + /// Get/Set Reconnect Rejected Template /// RenderFragment? ReconnectRejectedTemplate { get; set; } } diff --git a/src/BootstrapBlazor/Components/Reconnector/IReconnectorProvider.cs b/src/BootstrapBlazor/Components/Reconnector/IReconnectorProvider.cs index b955687513e..5e86b31bfd2 100644 --- a/src/BootstrapBlazor/Components/Reconnector/IReconnectorProvider.cs +++ b/src/BootstrapBlazor/Components/Reconnector/IReconnectorProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// IContentSubscriber 接口 +/// IContentSubscriber 接口 +/// IContentSubscriber Interface /// internal interface IReconnectorProvider { /// - /// 注册回调方法 + /// 注册回调方法 + /// Register Callback Method /// /// void Register(Action action); /// - /// 内容变化通知方法 + /// 内容变化通知方法 + /// Notify Content Changed Method /// /// void NotifyContentChanged(IReconnector content); diff --git a/src/BootstrapBlazor/Components/Reconnector/Reconnector.cs b/src/BootstrapBlazor/Components/Reconnector/Reconnector.cs index fade9e48c2e..1b09b2ac0b7 100644 --- a/src/BootstrapBlazor/Components/Reconnector/Reconnector.cs +++ b/src/BootstrapBlazor/Components/Reconnector/Reconnector.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// Reconnector 组件 +/// Reconnector 组件 +/// Reconnector Component /// public class Reconnector : ComponentBase, IReconnector { /// - /// 获得/设置 正在尝试重试连接对话框的模板 + /// 获得/设置 正在尝试重试连接对话框的模板 + /// Get/Set Reconnecting Template + /// 10.2.2 /// [Parameter] public RenderFragment? ReconnectingTemplate { get; set; } /// - /// 获得/设置 连接失败对话框的模板 + /// 获得/设置 连接失败对话框的模板 + /// Get/Set Reconnect Failed Template + /// 10.2.2 /// [Parameter] public RenderFragment? ReconnectFailedTemplate { get; set; } /// - /// 获得/设置 连接被拒绝对话框的模板 + /// 获得/设置 连接被拒绝对话框的模板 + /// Get/Set Reconnect Rejected Template + /// 10.2.2 /// [Parameter] public RenderFragment? ReconnectRejectedTemplate { get; set; } @@ -33,7 +40,8 @@ public class Reconnector : ComponentBase, IReconnector private IReconnectorProvider? Provider { get; set; } /// - /// OnAfterRender 方法 + /// OnAfterRender 方法 + /// OnAfterRender Method /// /// protected override void OnAfterRender(bool firstRender) diff --git a/src/BootstrapBlazor/Components/Reconnector/ReconnectorContent.razor.cs b/src/BootstrapBlazor/Components/Reconnector/ReconnectorContent.razor.cs index 37276230478..0b267d35c8b 100644 --- a/src/BootstrapBlazor/Components/Reconnector/ReconnectorContent.razor.cs +++ b/src/BootstrapBlazor/Components/Reconnector/ReconnectorContent.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,36 +6,47 @@ namespace BootstrapBlazor.Components; /// -/// ReconnectorContent 组件 +/// ReconnectorContent 组件 +/// ReconnectorContent Component /// public partial class ReconnectorContent { /// - /// 获得/设置 ReconnectingTemplate 模板 + /// 获得/设置 ReconnectingTemplate 模板 + /// Get/Set ReconnectingTemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ReconnectingTemplate { get; set; } /// - /// 获得/设置 ReconnectFailedTemplate 模板 + /// 获得/设置 ReconnectFailedTemplate 模板 + /// Get/Set ReconnectFailedTemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ReconnectFailedTemplate { get; set; } /// - /// 获得/设置 ReconnectRejectedTemplate 模板 + /// 获得/设置 ReconnectRejectedTemplate 模板 + /// Get/Set ReconnectRejectedTemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ReconnectRejectedTemplate { get; set; } /// - /// 获得/设置 是否自动尝试重连 默认 true + /// 获得/设置 是否自动尝试重连 默认 true + /// Get/Set Whether to auto reconnect. Default true + /// 10.2.2 /// [Parameter] public bool AutoReconnect { get; set; } = true; /// - /// 获得/设置 自动重连间隔 默认 5000 毫秒 最小值为 1000 毫秒 + /// 获得/设置 自动重连间隔 默认 5000 毫秒 最小值为 1000 毫秒 + /// Get/Set Auto reconnect interval. Default 5000ms. Min 1000ms + /// 10.2.2 /// [Parameter] public int ReconnectInterval { get; set; } = 5000; @@ -45,7 +56,8 @@ public partial class ReconnectorContent private IReconnectorProvider? Provider { get; set; } /// - /// SetParametersAsync 方法 + /// SetParametersAsync 方法 + /// SetParametersAsync Method /// /// /// @@ -68,7 +80,8 @@ protected override async Task InvokeInitAsync() } /// - /// ContentChanged 方法 + /// ContentChanged 方法 + /// ContentChanged Method /// /// /// diff --git a/src/BootstrapBlazor/Components/Reconnector/ReconnectorOutlet.cs b/src/BootstrapBlazor/Components/Reconnector/ReconnectorOutlet.cs index 8b78ac9290f..b6924a9c4e7 100644 --- a/src/BootstrapBlazor/Components/Reconnector/ReconnectorOutlet.cs +++ b/src/BootstrapBlazor/Components/Reconnector/ReconnectorOutlet.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,24 +8,30 @@ namespace Microsoft.AspNetCore.Components.Web; /// -/// ReconnectorOutlet 组件 +/// ReconnectorOutlet 组件 +/// ReconnectorOutlet Component /// public class ReconnectorOutlet : ComponentBase { /// - /// 获得/设置 是否自动尝试重连 默认 true + /// 获得/设置 是否自动尝试重连 默认 true + /// Get/Set Whether to auto reconnect. Default true + /// 10.2.2 /// [Parameter] public bool AutoReconnect { get; set; } = true; /// - /// 获得/设置 自动重连间隔 默认 5000 毫秒 最小值为 1000 毫秒 + /// 获得/设置 自动重连间隔 默认 5000 毫秒 最小值为 1000 毫秒 + /// Get/Set Auto reconnect interval. Default 5000ms. Min 1000ms + /// 10.2.2 /// [Parameter] public int ReconnectInterval { get; set; } = 5000; /// - /// BuildRenderTree 方法 + /// BuildRenderTree 方法 + /// BuildRenderTree Method /// /// protected override void BuildRenderTree(RenderTreeBuilder builder) diff --git a/src/BootstrapBlazor/Components/Reconnector/ReconnectorProvider.cs b/src/BootstrapBlazor/Components/Reconnector/ReconnectorProvider.cs index 707b4da31b1..9de9c4c6df5 100644 --- a/src/BootstrapBlazor/Components/Reconnector/ReconnectorProvider.cs +++ b/src/BootstrapBlazor/Components/Reconnector/ReconnectorProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Redirect/Redirect.cs b/src/BootstrapBlazor/Components/Redirect/Redirect.cs index 9c095e07068..dc96b8aa6b4 100644 --- a/src/BootstrapBlazor/Components/Redirect/Redirect.cs +++ b/src/BootstrapBlazor/Components/Redirect/Redirect.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// +/// Redirect 组件 +/// Redirect Component /// public class Redirect : ComponentBase { @@ -15,20 +16,28 @@ public class Redirect : ComponentBase private NavigationManager? Navigation { get; set; } /// - /// 获得/设置 登录地址 默认 Account/Login + /// 获得/设置 登录地址 默认 Account/Login + /// Get/Set Login URL. Default Account/Login + /// 10.2.2 /// [Parameter] public string Url { get; set; } = "Account/Login"; /// - /// 获得/设置 是否强制导航 默认 true + /// 获得/设置 是否强制导航 默认 true + /// Get/Set Whether to force load. Default true + /// 10.2.2 /// - /// 设置 false 时适用 SPA 程序不会强制页面重新加载 + /// + /// 设置 false 时适用 SPA 程序不会强制页面重新加载 + /// Applicable to SPA programs when set to false, will not force page reload + /// [Parameter] public bool ForceLoad { get; set; } = true; /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { diff --git a/src/BootstrapBlazor/Components/Repeater/Repeater.razor.cs b/src/BootstrapBlazor/Components/Repeater/Repeater.razor.cs index dd7cfda937c..b32e0fc5c1e 100644 --- a/src/BootstrapBlazor/Components/Repeater/Repeater.razor.cs +++ b/src/BootstrapBlazor/Components/Repeater/Repeater.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// Repeat 组件 +/// Repeat 组件 +/// Repeater Component /// /// public partial class Repeater @@ -18,49 +19,65 @@ public partial class Repeater .Build(); /// - /// 获得/设置 数据源 + /// 获得/设置 数据源 + /// Get/Set Items + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// - /// 获得/设置 是否显示正在加载信息 默认 true 显示 + /// 获得/设置 是否显示正在加载信息 默认 true 显示 + /// Get/Set Whether to show loading info. Default true + /// 10.2.2 /// [Parameter] public bool ShowLoading { get; set; } = true; /// - /// 获得/设置 正在加载模板 + /// 获得/设置 正在加载模板 + /// Get/Set Loading Template + /// 10.2.2 /// [Parameter] public RenderFragment? LoadingTemplate { get; set; } /// - /// 获得/设置 是否显示无数据信息 默认 true 显示 + /// 获得/设置 是否显示无数据信息 默认 true 显示 + /// Get/Set Whether to show empty info. Default true + /// 10.2.2 /// [Parameter] public bool ShowEmpty { get; set; } = true; /// - /// 获得/设置 无数据时提示信息 默认 null + /// 获得/设置 无数据时提示信息 默认 null + /// Get/Set Empty Text. Default null + /// 10.2.2 /// [Parameter] public string? EmptyText { get; set; } /// - /// 获得/设置 正在加载模板 + /// 获得/设置 正在加载模板 + /// Get/Set Empty Template + /// 10.2.2 /// [Parameter] public RenderFragment? EmptyTemplate { get; set; } /// - /// 获得/设置 容器模板 + /// 获得/设置 容器模板 + /// Get/Set Container Template + /// 10.2.2 /// [Parameter] public RenderFragment? ContainerTemplate { get; set; } /// - /// 获得/设置 模板 + /// 获得/设置 模板 + /// Get/Set Item Template + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } diff --git a/src/BootstrapBlazor/Components/Responsive/Responsive.cs b/src/BootstrapBlazor/Components/Responsive/Responsive.cs index aed09863130..6b416141cd9 100644 --- a/src/BootstrapBlazor/Components/Responsive/Responsive.cs +++ b/src/BootstrapBlazor/Components/Responsive/Responsive.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,16 @@ namespace BootstrapBlazor.Components; /// -/// 响应监听 组件 +/// 响应监听 组件 +/// Responsive Component /// [BootstrapModuleAutoLoader(ModuleName = "responsive", JSObjectReference = true)] public class Responsive : BootstrapModuleComponentBase { /// - /// 获得/设置 浏览器断点阈值改变时触发 默认 null + /// 获得/设置 浏览器断点阈值改变时触发 默认 null + /// Get/Set Trigger when browser breakpoint threshold changes. Default null + /// 10.2.2 /// [Parameter] public Func? OnBreakPointChanged { get; set; } @@ -26,7 +29,8 @@ public class Responsive : BootstrapModuleComponentBase protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(OnResize)); /// - /// JSInvoke 回调方法 + /// JSInvoke 回调方法 + /// JSInvoke Callback Method /// /// /// diff --git a/src/BootstrapBlazor/Components/RibbonTab/RibbonTab.razor.cs b/src/BootstrapBlazor/Components/RibbonTab/RibbonTab.razor.cs index 22290c01e53..3e78a11722c 100644 --- a/src/BootstrapBlazor/Components/RibbonTab/RibbonTab.razor.cs +++ b/src/BootstrapBlazor/Components/RibbonTab/RibbonTab.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,60 +6,79 @@ namespace BootstrapBlazor.Components; /// -/// RibbonTab 组件 +/// RibbonTab 组件 +/// RibbonTab Component /// public partial class RibbonTab { /// - /// 获得/设置 是否显示悬浮小箭头 默认 false 不显示 + /// 获得/设置 是否显示悬浮小箭头 默认 false 不显示 + /// Get/Set Whether to show float button. Default false + /// 10.2.2 /// [Parameter] public bool ShowFloatButton { get; set; } /// - /// 获得/设置 组件是否悬浮状态改变时回调方法 默认 null + /// 获得/设置 组件是否悬浮状态改变时回调方法 默认 null + /// Get/Set Callback method when float state changes. Default null + /// 10.2.2 /// [Parameter] public Func? OnFloatChanged { get; set; } /// - /// 获得/设置 选项卡向上箭头图标 + /// 获得/设置 选项卡向上箭头图标 + /// Get/Set Tab Arrow Up Icon + /// 10.2.2 /// [Parameter] public string? RibbonArrowUpIcon { get; set; } /// - /// 获得/设置 选项卡向下箭头图标 + /// 获得/设置 选项卡向下箭头图标 + /// Get/Set Tab Arrow Down Icon + /// 10.2.2 /// [Parameter] public string? RibbonArrowDownIcon { get; set; } /// - /// 获得/设置 选项卡可固定图标 + /// 获得/设置 选项卡可固定图标 + /// Get/Set Tab Pin Icon + /// 10.2.2 /// [Parameter] public string? RibbonArrowPinIcon { get; set; } /// - /// 获得/设置 是否开启 Url 锚点 + /// 获得/设置 是否开启 Url 锚点 + /// Get/Set Whether to enable Url Anchor + /// 10.2.2 /// [Parameter] public bool IsSupportAnchor { get; set; } /// - /// 编码锚点回调方法 第一参数是当前地址 Url 第二个参数是当前选项 Text 属性 返回值为地址全路径 + /// 编码锚点回调方法 第一参数是当前地址 Url 第二个参数是当前选项 Text 属性 返回值为地址全路径 + /// Encode Anchor Callback Method. First param is current Url, second param is current item Text property. Return value is full path + /// 10.2.2 /// [Parameter] public Func? EncodeAnchorCallback { get; set; } /// - /// 解码锚点回调方法 + /// 解码锚点回调方法 + /// Decode Anchor Callback Method + /// 10.2.2 /// [Parameter] public Func? DecodeAnchorCallback { get; set; } /// - /// 获得/设置 数据源 + /// 获得/设置 数据源 + /// Get/Set Items + /// 10.2.2 /// [Parameter] [NotNull] @@ -69,31 +88,41 @@ public partial class RibbonTab public IEnumerable? Items { get; set; } /// - /// 获得/设置 点击命令按钮回调方法 + /// 获得/设置 点击命令按钮回调方法 + /// Get/Set Click Command Button Callback Method + /// 10.2.2 /// [Parameter] public Func? OnItemClickAsync { get; set; } /// - /// 获得/设置 点击标签 Menu 回调方法 + /// 获得/设置 点击标签 Menu 回调方法 + /// Get/Set Click Tab Menu Callback Method + /// 10.2.2 /// [Parameter] public Func? OnMenuClickAsync { get; set; } /// - /// 获得/设置 右侧按钮模板 + /// 获得/设置 右侧按钮模板 + /// Get/Set Right Buttons Template + /// 10.2.2 /// [Parameter] public RenderFragment? RightButtonsTemplate { get; set; } /// - /// 获得/设置 内容模板 + /// 获得/设置 内容模板 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否为带边框卡片样式 默认 true + /// 获得/设置 是否为带边框卡片样式 默认 true + /// Get/Set Whether to have border. Default true + /// 10.2.2 /// [Parameter] public bool IsBorder { get; set; } = true; @@ -112,13 +141,15 @@ public partial class RibbonTab protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(SetExpand)); /// - /// SetExpand 方法 + /// SetExpand 方法 + /// SetExpand Method /// [JSInvokable] public void SetExpand() => _header.SetExpand(); /// - /// 重新渲染组件 + /// 重新渲染组件 + /// Render Component /// public void Render() => _header.Render(); } diff --git a/src/BootstrapBlazor/Components/RibbonTab/RibbonTabHeader.razor.cs b/src/BootstrapBlazor/Components/RibbonTab/RibbonTabHeader.razor.cs index 0b017e3f3d6..1f413a7d9a8 100644 --- a/src/BootstrapBlazor/Components/RibbonTab/RibbonTabHeader.razor.cs +++ b/src/BootstrapBlazor/Components/RibbonTab/RibbonTabHeader.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,15 @@ namespace BootstrapBlazor.Components; /// -/// Header 组件 +/// Header 组件 +/// Header Component /// public partial class RibbonTabHeader { /// - /// 获得/设置 数据源 + /// 获得/设置 数据源 + /// Get/Set Items + /// 10.2.2 /// [Parameter] [NotNull] @@ -21,67 +24,89 @@ public partial class RibbonTabHeader public IEnumerable? Items { get; set; } /// - /// 获得/设置 是否显示悬浮小箭头 默认 false 不显示 + /// 获得/设置 是否显示悬浮小箭头 默认 false 不显示 + /// Get/Set Whether to show float button. Default false + /// 10.2.2 /// [Parameter] public bool ShowFloatButton { get; set; } /// - /// 获得/设置 是否开启 Url 锚点 + /// 获得/设置 是否开启 Url 锚点 + /// Get/Set Whether to enable Url Anchor + /// 10.2.2 /// [Parameter] public bool IsSupportAnchor { get; set; } /// - /// 获得/设置 点击命令按钮回调方法 + /// 获得/设置 点击命令按钮回调方法 + /// Get/Set Click Command Button Callback Method + /// 10.2.2 /// [Parameter] public Func? OnItemClickAsync { get; set; } /// - /// 获得/设置 点击标签 Menu 回调方法 + /// 获得/设置 点击标签 Menu 回调方法 + /// Get/Set Click Tab Menu Callback Method + /// 10.2.2 /// [Parameter] public Func? OnMenuClickAsync { get; set; } /// - /// 编码锚点回调方法 第一参数是当前地址 Url 第二个参数是当前选项 Text 属性 返回值为地址全路径 + /// 编码锚点回调方法 第一参数是当前地址 Url 第二个参数是当前选项 Text 属性 返回值为地址全路径 + /// Encode Anchor Callback Method. First param is current Url, second param is current item Text property. Return value is full path + /// 10.2.2 /// [Parameter] public Func? EncodeAnchorCallback { get; set; } /// - /// 解码锚点回调方法 + /// 解码锚点回调方法 + /// Decode Anchor Callback Method + /// 10.2.2 /// [Parameter] public Func? DecodeAnchorCallback { get; set; } /// - /// 获得/设置 组件是否悬浮状态改变时回调方法 默认 null + /// 获得/设置 组件是否悬浮状态改变时回调方法 默认 null + /// Get/Set Callback method when float state changes. Default null + /// 10.2.2 /// [Parameter] public Func? OnFloatChanged { get; set; } /// - /// 获得/设置 选项卡向上箭头图标 + /// 获得/设置 选项卡向上箭头图标 + /// Get/Set Tab Arrow Up Icon + /// 10.2.2 /// [Parameter] public string? RibbonArrowUpIcon { get; set; } /// - /// 获得/设置 选项卡向下箭头图标 + /// 获得/设置 选项卡向下箭头图标 + /// Get/Set Tab Arrow Down Icon + /// 10.2.2 /// [Parameter] public string? RibbonArrowDownIcon { get; set; } /// - /// 获得/设置 选项卡可固定图标 + /// 获得/设置 选项卡可固定图标 + /// Get/Set Tab Pin Icon + /// 10.2.2 /// [Parameter] public string? RibbonArrowPinIcon { get; set; } /// - /// 获得/设置 右侧按钮模板 + /// 获得/设置 右侧按钮模板 + /// Get/Set Right Buttons Template + /// 10.2.2 /// [Parameter] public RenderFragment? RightButtonsTemplate { get; set; } @@ -208,7 +233,8 @@ private async Task OnToggleFloat() private static RenderFragment? RenderTemplate(RibbonTabItem item) => item.Component?.Render() ?? item.Template; /// - /// SetExpand 方法 + /// SetExpand 方法 + /// SetExpand Method /// public void SetExpand() { @@ -217,7 +243,8 @@ public void SetExpand() } /// - /// 重新渲染组件 + /// 重新渲染组件 + /// Render Component /// public void Render() => StateHasChanged(); } diff --git a/src/BootstrapBlazor/Components/RibbonTab/RibbonTabItem.cs b/src/BootstrapBlazor/Components/RibbonTab/RibbonTabItem.cs index 06a23d52c83..1a57b077554 100644 --- a/src/BootstrapBlazor/Components/RibbonTab/RibbonTabItem.cs +++ b/src/BootstrapBlazor/Components/RibbonTab/RibbonTabItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,99 +6,118 @@ namespace BootstrapBlazor.Components; /// -/// RibbonTabItem 实体类 +/// RibbonTabItem 实体类 +/// RibbonTabItem Entity /// public class RibbonTabItem { /// - /// 获得/设置 当前节点 Id 默认为 null + /// 获得/设置 当前节点 Id 默认为 null + /// Get/Set Node Id. Default null /// /// 一般配合数据库使用 public string? Id { get; set; } /// - /// 获得/设置 父级节点 Id 默认为 null + /// 获得/设置 父级节点 Id 默认为 null + /// Get/Set Parent Node Id. Default null /// /// 一般配合数据库使用 public string? ParentId { get; set; } /// - /// 获得 父级菜单 默认为 null + /// 获得 父级菜单 默认为 null + /// Get Parent Menu. Default null /// public RibbonTabItem? Parent { get; set; } /// - /// 获得/设置 导航菜单链接地址 + /// 获得/设置 导航菜单链接地址 + /// Get/Set Navigation URL /// public string? Url { get; set; } /// - /// 获得/设置 A 标签 target 参数 默认 null + /// 获得/设置 A 标签 target 参数 默认 null + /// Get/Set Target parameter for A tag. Default null /// public string? Target { get; set; } /// - /// 获得/设置 图片路径 + /// 获得/设置 图片路径 + /// Get/Set Image URL /// public string? ImageUrl { get; set; } /// - /// 获得/设置 分组名称 + /// 获得/设置 分组名称 + /// Get/Set Group Name /// public string? GroupName { get; set; } /// - /// 获得/设置 按钮标识 + /// 获得/设置 按钮标识 + /// Get/Set Button Identifier /// public string? Command { get; set; } /// - /// 获得/设置 显示文字 + /// 获得/设置 显示文字 + /// Get/Set Display Text /// public string? Text { get; set; } /// - /// 获得/设置 图标 + /// 获得/设置 图标 + /// Get/Set Icon /// public string? Icon { get; set; } /// - /// 获得/设置 自定义样式名 + /// 获得/设置 自定义样式名 + /// Get/Set Custom CSS Class /// public string? CssClass { get; set; } /// - /// 获得/设置 是否收缩 默认 true 收缩 + /// 获得/设置 是否收缩 默认 true 收缩 + /// Get/Set Whether collapsed. Default true /// public bool IsCollapsed { get; set; } = true; /// - /// 获得/设置 是否被禁用 默认 false + /// 获得/设置 是否被禁用 默认 false + /// Get/Set Whether disabled. Default false /// public bool IsDisabled { get; set; } /// - /// 获得/设置 是否为默认按钮 默认 false + /// 获得/设置 是否为默认按钮 默认 false + /// Get/Set Whether Default Button. Default false /// public bool IsDefault { get; set; } /// - /// 获得/设置 是否选中当前节点 默认 false + /// 获得/设置 是否选中当前节点 默认 false + /// Get/Set Whether current node is selected. Default false /// public bool IsActive { get; set; } /// - /// 获得/设置 组件数据源 + /// 获得/设置 组件数据源 + /// Get/Set Component Items /// public List Items { get; } = []; /// - /// 获得/设置 子组件模板 默认为 null + /// 获得/设置 子组件模板 默认为 null + /// Get/Set Child Template. Default null /// public RenderFragment? Template { get; set; } /// - /// 获得/设置 动态组件实例 + /// 获得/设置 动态组件实例 + /// Get/Set Dynamic Component Instance /// public BootstrapDynamicComponent? Component { get; set; } } diff --git a/src/BootstrapBlazor/Components/Row/Row.razor.cs b/src/BootstrapBlazor/Components/Row/Row.razor.cs index 78b8b4e9810..a8949309566 100644 --- a/src/BootstrapBlazor/Components/Row/Row.razor.cs +++ b/src/BootstrapBlazor/Components/Row/Row.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,30 +6,39 @@ namespace BootstrapBlazor.Components; /// -/// Row 组件 +/// Row 组件 +/// Row Component /// public partial class Row { /// - /// 获得/设置 设置一行显示多少个子组件 + /// 获得/设置 设置一行显示多少个子组件 + /// Get/Set Items per row + /// 10.2.2 /// [Parameter] public ItemsPerRow ItemsPerRow { get; set; } /// - /// 获得/设置 设置行格式 默认 Row 布局 + /// 获得/设置 设置行格式 默认 Row 布局 + /// Get/Set Row Type. Default Row Layout + /// 10.2.2 /// [Parameter] public RowType RowType { get; set; } /// - /// 获得/设置 子 Row 跨父 Row 列数 默认为 null + /// 获得/设置 子 Row 跨父 Row 列数 默认为 null + /// Get/Set Child Row span parent Row columns. Default null + /// 10.2.2 /// [Parameter] public int? ColSpan { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Scroll/Scroll.razor.cs b/src/BootstrapBlazor/Components/Scroll/Scroll.razor.cs index c460d02ca27..ce35b4d5e94 100644 --- a/src/BootstrapBlazor/Components/Scroll/Scroll.razor.cs +++ b/src/BootstrapBlazor/Components/Scroll/Scroll.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Scroll 组件 +/// Scroll 组件 +/// Scroll Component /// public partial class Scroll { @@ -27,31 +28,41 @@ public partial class Scroll private int ActualScrollHoverWidth => ScrollHoverWidth ?? Options.CurrentValue.ScrollOptions.ScrollHoverWidth; /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 组件高度 + /// 获得/设置 组件高度 + /// Get/Set Height + /// 10.2.2 /// [Parameter] public string? Height { get; set; } /// - /// 获得/设置 组件宽度 + /// 获得/设置 组件宽度 + /// Get/Set Width + /// 10.2.2 /// [Parameter] public string? Width { get; set; } /// - /// 获得/设置 滚动条宽度 默认 null 未设置使用 配置类中的 + /// 获得/设置 滚动条宽度 默认 null 未设置使用 配置类中的 + /// Get/Set Scroll Width. Default null. Use in config class if not set + /// 10.2.2 /// [Parameter] public int? ScrollWidth { get; set; } /// - /// 获得/设置 滚动条 hover 状态下宽度 默认 null 未设置使用 配置类中的 + /// 获得/设置 滚动条 hover 状态下宽度 默认 null 未设置使用 配置类中的 + /// Get/Set Scroll Hover Width. Default null. Use in config class if not set + /// 10.2.2 /// [Parameter] public int? ScrollHoverWidth { get; set; } @@ -61,7 +72,8 @@ public partial class Scroll private IOptionsMonitor? Options { get; set; } /// - /// 滚动到底部 + /// 滚动到底部 + /// Scroll To Bottom /// public Task ScrollToBottom() => InvokeVoidAsync("scrollToBottom", Id); } diff --git a/src/BootstrapBlazor/Components/Search/Search.razor.cs b/src/BootstrapBlazor/Components/Search/Search.razor.cs index 20b63387430..d6cb9790b84 100644 --- a/src/BootstrapBlazor/Components/Search/Search.razor.cs +++ b/src/BootstrapBlazor/Components/Search/Search.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,103 +8,136 @@ namespace BootstrapBlazor.Components; /// -/// Search component +/// Search component +/// Search component /// public partial class Search { /// - /// Gets or sets the icon template. Default is null if not set. + /// 获得/设置 the 图标 模板. 默认为 null if not set. + /// Gets or sets the icon template. Default is null if not set. + /// 10.2.2 /// [Parameter] public RenderFragment>? IconTemplate { get; set; } /// - /// Gets or sets whether to show the clear button. Default is false. + /// 获得/设置 是否 to show the clear 按钮. 默认为 false. + /// Gets or sets whether to show the clear button. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowClearButton { get; set; } /// - /// Gets or sets the icon of clear button. Default is null. + /// 获得/设置 the 图标 of clear 按钮. 默认为 null. + /// Gets or sets the icon of clear button. Default is null. + /// 10.2.2 /// [Parameter] public string? ClearButtonIcon { get; set; } /// - /// Gets or sets the text of clear button. Default is null. + /// 获得/设置 the text of clear 按钮. 默认为 null. + /// Gets or sets the text of clear button. Default is null. + /// 10.2.2 /// [Parameter] public string? ClearButtonText { get; set; } /// - /// Gets or sets the color of clear button. Default is . + /// 获得/设置 the 颜色 of clear 按钮. 默认为 . + /// Gets or sets the color of clear button. Default is . + /// 10.2.2 /// [Parameter] public Color ClearButtonColor { get; set; } = Color.Primary; /// - /// Gets or sets whether to show the search button. Default is true. + /// 获得/设置 是否 to show the search 按钮. 默认为 true. + /// Gets or sets whether to show the search button. Default is true. + /// 10.2.2 /// [Parameter] public bool ShowSearchButton { get; set; } = true; /// - /// Gets or sets the search button color. Default is . + /// 获得/设置 the search 按钮 颜色. 默认为 . + /// Gets or sets the search button color. Default is . + /// 10.2.2 /// [Parameter] public Color SearchButtonColor { get; set; } = Color.Primary; /// - /// Gets or sets the search button icon. Default is null. + /// 获得/设置 the search 按钮 图标. 默认为 null. + /// Gets or sets the search button icon. Default is null. + /// 10.2.2 /// [Parameter] public string? SearchButtonIcon { get; set; } /// - /// Gets or sets the loading icon for the search button. Default is null. + /// 获得/设置 the loading 图标 for the search 按钮. 默认为 null. + /// Gets or sets the loading icon for the search button. Default is null. + /// 10.2.2 /// [Parameter] public string? SearchButtonLoadingIcon { get; set; } /// - /// Gets or sets the search button text. Default is null. + /// 获得/设置 the search 按钮 text. 默认为 null. + /// Gets or sets the search button text. Default is null. + /// 10.2.2 /// [Parameter] [NotNull] public string? SearchButtonText { get; set; } /// - /// Gets or sets the button template. Default is null. + /// 获得/设置 the 按钮 模板. 默认为 null. + /// Gets or sets the button template. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment>? ButtonTemplate { get; set; } /// - /// Gets or sets the prefix button template. Default is null. + /// 获得/设置 the prefix 按钮 模板. 默认为 null. + /// Gets or sets the prefix button template. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment>? PrefixButtonTemplate { get; set; } /// - /// Gets or sets whether to show the prefix icon. Default is false. + /// 获得/设置 是否 to show the prefix 图标. 默认为 false. + /// Gets or sets whether to show the prefix icon. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowPrefixIcon { get; set; } /// - /// Gets or sets the prefix icon. Default is null. + /// 获得/设置 the prefix 图标. 默认为 null. + /// Gets or sets the prefix icon. Default is null. + /// 10.2.2 /// [Parameter] public string? PrefixIcon { get; set; } /// - /// Gets or sets the prefix icon template. Default is null. + /// 获得/设置 the prefix 图标 模板. 默认为 null. + /// Gets or sets the prefix icon template. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment>? PrefixIconTemplate { get; set; } /// - /// Gets or sets whether to automatically clear the search box after searching. Deprecated. + /// 获得/设置 是否 to automatically clear the search box after searching. Deprecated. + /// Gets or sets whether to automatically clear the search box after searching. Deprecated. + /// 10.2.2 /// [Parameter] [Obsolete("Deprecated. Just delete it.")] @@ -112,26 +145,34 @@ public partial class Search public bool IsAutoClearAfterSearch { get; set; } /// - /// Gets or sets whether the search is triggered by input. Default is true. If false, the search button must be clicked to trigger. + /// 获得/设置 是否 the search is triggered by input. 默认为 true. If false, the search 按钮 must be clicked to trigger. + /// Gets or sets whether the search is triggered by input. Default is true. If false, the search button must be clicked to trigger. + /// 10.2.2 /// [Parameter] public bool IsTriggerSearchByInput { get; set; } = true; /// - /// Gets or sets the callback delegate when the search button is clicked. + /// 获得/设置 the 回调 委托 when the search 按钮 is clicked. + /// Gets or sets the callback delegate when the search button is clicked. + /// 10.2.2 /// [Parameter] public Func>>? OnSearch { get; set; } /// - /// Gets or sets the callback method to get display text. Default is null, using ToString() method. + /// 获得/设置 the 回调方法 to get 显示 text. 默认为 null, using ToString() method. + /// Gets or sets the callback method to get display text. Default is null, using ToString() method. + /// 10.2.2 /// [Parameter] [NotNull] public Func? OnGetDisplayText { get; set; } /// - /// Gets or sets the event callback when the clear button is clicked. Default is null. + /// 获得/设置 the event 回调 when the clear 按钮 is clicked. 默认为 null. + /// Gets or sets the event callback when the clear button is clicked. Default is null. + /// 10.2.2 /// [Parameter] [Obsolete("已取消 合并到 OnSearch 方法中; Deprecated. Merged into the OnSearch method")] @@ -191,7 +232,8 @@ protected override void OnParametersSet() NoDataTip ??= Localizer[nameof(NoDataTip)]; _filterItems ??= []; - // 这里应该获得初始值 + // 这里应该获得初始值 + // Should get initial value here _displayText = GetDisplayText(Value); if (Debounce == 0) @@ -226,7 +268,8 @@ private async Task OnSearchClick() private async Task OnClearClick() { - // 使用脚本更新 input 值 + // 使用脚本更新 input 值 + // Update input value using script await InvokeVoidAsync("setValue", Id, ""); _displayText = null; @@ -248,7 +291,8 @@ private async Task OnClickItem(TValue val) CurrentValue = val; _displayText = GetDisplayText(val); - // 使用脚本更新 input 值 + // 使用脚本更新 input 值 + // Update input value using script await InvokeVoidAsync("setValue", Id, _displayText); if (OnSelectedItemChanged != null) @@ -263,7 +307,8 @@ private async Task OnClickItem(TValue val) } /// - /// TriggerFilter method called by Javascript. + /// TriggerFilter method called by Javascript. + /// TriggerFilter method called by Javascript. /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/Search/SearchContext.cs b/src/BootstrapBlazor/Components/Search/SearchContext.cs index 993fc929820..bf02c3651b7 100644 --- a/src/BootstrapBlazor/Components/Search/SearchContext.cs +++ b/src/BootstrapBlazor/Components/Search/SearchContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 搜索组件上下文类 +/// 搜索组件上下文类 +/// Search Component Context Class /// public class SearchContext(Search search, Func onSearchAsync, Func onClearAsync) { /// - /// 获得/设置 搜索组件实例 + /// 获得/设置 搜索组件实例 + /// Get/Set Search Component Instance /// public Search Search { get; } = search; /// - /// 获得/设置 清空按钮回调方法 + /// 获得/设置 清空按钮回调方法 + /// Get/Set Clear Button Callback Method /// public Func OnClearAsync { get; } = onClearAsync; /// - /// 获得/设置 搜索按钮回调方法 + /// 获得/设置 搜索按钮回调方法 + /// Get/Set Search Button Callback Method /// public Func OnSearchAsync { get; } = onSearchAsync; } diff --git a/src/BootstrapBlazor/Components/Segmented/Segmented.razor.cs b/src/BootstrapBlazor/Components/Segmented/Segmented.razor.cs index 772ba4aa3c3..f0c12b5475a 100644 --- a/src/BootstrapBlazor/Components/Segmented/Segmented.razor.cs +++ b/src/BootstrapBlazor/Components/Segmented/Segmented.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Segmented 组件 +/// Segmented 组件 +/// Segmented Component /// #if NET6_0_OR_GREATER [CascadingTypeParameter(nameof(TValue))] @@ -28,64 +29,84 @@ public partial class Segmented private SegmentedOption? CurrentItem { get; set; } /// - /// 获得/设置 选项集合 默认 null + /// 获得/设置 选项集合 默认 null + /// Get/Set Items. Default null + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable>? Items { get; set; } /// - /// 获得/设置 选中值 默认 null + /// 获得/设置 选中值 默认 null + /// Get/Set Value. Default null + /// 10.2.2 /// [Parameter] [NotNull] public TValue? Value { get; set; } /// - /// 获得/设置 选中值回调委托 默认 null + /// 获得/设置 选中值回调委托 默认 null + /// Get/Set Value Changed Callback Delegate. Default null + /// 10.2.2 /// [Parameter] public EventCallback ValueChanged { get; set; } /// - /// 获得/设置 选中值改变后回调委托方法 默认 null + /// 获得/设置 选中值改变后回调委托方法 默认 null + /// Get/Set Value Changed Callback Method. Default null + /// 10.2.2 /// [Parameter] public Func? OnValueChanged { get; set; } /// - /// 获得/设置 是否禁用 默认 false + /// 获得/设置 是否禁用 默认 false + /// Get/Set Whether disabled. Default false + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// 获得/设置 是否充满父元素 默认 false + /// 获得/设置 是否充满父元素 默认 false + /// Get/Set Whether is block. Default false + /// 10.2.2 /// [Parameter] public bool IsBlock { get; set; } /// - /// 获得/设置 是否自动显示 Tooltip 默认 false + /// 获得/设置 是否自动显示 Tooltip 默认 false + /// Get/Set Whether to show tooltip. Default false + /// 10.2.2 /// [Parameter] public bool ShowTooltip { get; set; } /// - /// 获得/设置 组件内容 + /// 获得/设置 组件内容 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 组件大小 默认值 + /// 获得/设置 组件大小 默认值 + /// Get/Set Size. Default + /// 10.2.2 /// [Parameter] [NotNull] public Size Size { get; set; } /// - /// 获得/设置 候选项模板 默认 null + /// 获得/设置 候选项模板 默认 null + /// Get/Set Item Template. Default null + /// 10.2.2 /// [Parameter] [NotNull] @@ -126,7 +147,8 @@ private IEnumerable> GetItems() private IEnumerable> _options => _items.Concat(Items); /// - /// 点击 SegmentItem 节点 JavaScript 回调触发 + /// 点击 SegmentItem 节点 JavaScript 回调触发 + /// JavaScript Callback Triggered when SegmentItem Node Clicked /// /// /// diff --git a/src/BootstrapBlazor/Components/Segmented/SegmentedItem.cs b/src/BootstrapBlazor/Components/Segmented/SegmentedItem.cs index 7e4b189da63..79c97cdda19 100644 --- a/src/BootstrapBlazor/Components/Segmented/SegmentedItem.cs +++ b/src/BootstrapBlazor/Components/Segmented/SegmentedItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,42 +6,55 @@ namespace BootstrapBlazor.Components; /// -/// SegmentedItem 组件 +/// SegmentedItem 组件 +/// SegmentedItem Component /// public class SegmentedItem : ComponentBase, IDisposable { /// - /// 组件内容 + /// 组件内容 + /// Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否禁用 默认 false + /// 获得/设置 是否禁用 默认 false + /// Get/Set Whether disabled. Default false + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// 获得/设置 是否选中 默认 false + /// 获得/设置 是否选中 默认 false + /// Get/Set Whether active. Default false + /// 10.2.2 /// [Parameter] public bool IsActive { get; set; } /// - /// 获得/设置 图标 默认 null + /// 获得/设置 图标 默认 null + /// Get/Set Icon. Default null + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 文字 默认 null + /// 获得/设置 文字 默认 null + /// Get/Set Text. Default null + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 组件值 默认 null + /// 获得/设置 组件值 默认 null + /// Get/Set Value. Default null + /// 10.2.2 /// [Parameter] public TValue? Value { get; set; } @@ -71,7 +84,8 @@ protected override void OnInitialized() } /// - /// 资源销毁方法 + /// 资源销毁方法 + /// Dispose Method /// /// protected virtual void Dispose(bool disposing) @@ -83,7 +97,8 @@ protected virtual void Dispose(bool disposing) } /// - /// 资源销毁方法 + /// 资源销毁方法 + /// Dispose Method /// /// public void Dispose() diff --git a/src/BootstrapBlazor/Components/Segmented/SegmentedOption.cs b/src/BootstrapBlazor/Components/Segmented/SegmentedOption.cs index 7480b13cd5e..58c9dd02cfd 100644 --- a/src/BootstrapBlazor/Components/Segmented/SegmentedOption.cs +++ b/src/BootstrapBlazor/Components/Segmented/SegmentedOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,37 +6,44 @@ namespace BootstrapBlazor.Components; /// -/// SegmentedOption 类 +/// SegmentedOption 类 +/// SegmentedOption Class /// public class SegmentedOption { /// - /// 获得/设置 显示名称 + /// 获得/设置 显示名称 + /// Get/Set Display Text /// public string? Text { get; set; } /// - /// 获得/设置 选项值 + /// 获得/设置 选项值 + /// Get/Set Value /// public TValue? Value { get; set; } /// - /// 获得/设置 是否选中 + /// 获得/设置 是否选中 + /// Get/Set Whether Active /// public bool Active { get; set; } /// - /// 获得/设置 是否禁用 默认 false + /// 获得/设置 是否禁用 默认 false + /// Get/Set Whether disabled. Default false /// public bool IsDisabled { get; set; } /// - /// 获得/设置 图标 + /// 获得/设置 图标 + /// Get/Set Icon /// public string? Icon { get; set; } /// - /// 组件内容 + /// 组件内容 + /// Child Content /// public RenderFragment? ChildContent { get; set; } } diff --git a/src/BootstrapBlazor/Components/Select/ISelect.cs b/src/BootstrapBlazor/Components/Select/ISelect.cs index b32b198d922..a2726c11415 100644 --- a/src/BootstrapBlazor/Components/Select/ISelect.cs +++ b/src/BootstrapBlazor/Components/Select/ISelect.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// ISelect 接口 +/// ISelect 接口 +/// ISelect Interface /// public interface ISelect { /// - /// 增加 SelectedItem 项方法 + /// 增加 SelectedItem 项方法 + /// Add SelectedItem Method /// /// void Add(SelectedItem item); diff --git a/src/BootstrapBlazor/Components/Select/ISelectObjectContext.cs b/src/BootstrapBlazor/Components/Select/ISelectObjectContext.cs index d7f5dd03934..66d50ccba4b 100644 --- a/src/BootstrapBlazor/Components/Select/ISelectObjectContext.cs +++ b/src/BootstrapBlazor/Components/Select/ISelectObjectContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,28 @@ namespace BootstrapBlazor.Components; /// -/// SelectObject 上下文 +/// SelectObject 上下文 +/// SelectObject Context /// public interface ISelectObjectContext { /// - /// 获得/设置 SelectObject 组件实例对象引用 + /// 获得/设置 SelectObject 组件实例对象引用 + /// Get/Set SelectObject Component Instance /// [NotNull] SelectObject? Component { get; set; } /// - /// 设置组件当前值方法 + /// 设置组件当前值方法 + /// Set Component Current Value Method /// /// void SetValue(TItem value); /// - /// 关闭当前弹窗方法 + /// 关闭当前弹窗方法 + /// Close Current Popover Method /// /// Task CloseAsync(); diff --git a/src/BootstrapBlazor/Components/Select/InternalSelectObjectContext.cs b/src/BootstrapBlazor/Components/Select/InternalSelectObjectContext.cs index a1295886360..fd8e59e502b 100644 --- a/src/BootstrapBlazor/Components/Select/InternalSelectObjectContext.cs +++ b/src/BootstrapBlazor/Components/Select/InternalSelectObjectContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -17,7 +17,6 @@ internal class InternalSelectObjectContext : ISelectObjectContext /// /// /// - /// public Task CloseAsync() => Component.CloseAsync(); /// diff --git a/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs b/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs index 8dffed288bd..b3a7ea0a4dd 100644 --- a/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs +++ b/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,7 +10,8 @@ namespace BootstrapBlazor.Components; /// -/// MultiSelect component +/// MultiSelect component +/// MultiSelect component /// public partial class MultiSelect { @@ -45,121 +46,160 @@ public partial class MultiSelect .Build(); /// - /// 获得/设置 显示部分模板 默认 null + /// 获得/设置 显示部分模板 默认 null + /// Get/Set Display Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment>? DisplayTemplate { get; set; } /// - /// 获得/设置 是否显示关闭按钮 默认为 true 显示 + /// 获得/设置 是否显示关闭按钮 默认为 true 显示 + /// Get/Set Whether to show close button. Default true + /// 10.2.2 /// [Parameter] public bool ShowCloseButton { get; set; } = true; /// - /// 获得/设置 关闭按钮图标 默认为 null + /// 获得/设置 关闭按钮图标 默认为 null + /// Get/Set Close Button Icon. Default null + /// 10.2.2 /// [Parameter] public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 是否显示功能按钮 默认为 false 不显示 + /// 获得/设置 是否显示功能按钮 默认为 false 不显示 + /// Get/Set Whether to show toolbar. Default false + /// 10.2.2 /// [Parameter] public bool ShowToolbar { get; set; } /// - /// 获得/设置 是否显示默认功能按钮 默认为 true 显示 + /// 获得/设置 是否显示默认功能按钮 默认为 true 显示 + /// Get/Set Whether to show default buttons. Default true + /// 10.2.2 /// [Parameter] public bool ShowDefaultButtons { get; set; } = true; /// - /// 获得/设置 是否固定高度 默认 false + /// 获得/设置 是否固定高度 默认 false + /// Get/Set Whether fixed height. Default false + /// 10.2.2 /// [Parameter] public bool IsFixedHeight { get; set; } /// - /// 获得/设置 是否为单行模式 默认 false + /// 获得/设置 是否为单行模式 默认 false + /// Get/Set Whether single line mode. Default false + /// 10.2.2 /// [Parameter] public bool IsSingleLine { get; set; } /// - /// 获得/设置 编辑模式下输入选项更新后回调方法 默认 null - /// 返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 + /// 获得/设置 编辑模式下输入选项更新后回调方法 默认 null + /// Get/Set Callback method after input option updated in edit mode. Default null + /// 返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 + /// Return instance to take effect, return null to discard, recommend prompt in callback method + /// 10.2.2 /// /// Effective when is set. [Parameter] public Func>? OnEditCallback { get; set; } /// - /// 获得/设置 编辑提交按键 默认 Enter + /// 获得/设置 编辑提交按键 默认 Enter + /// Get/Set Edit Submit Key. Default Enter + /// 10.2.2 /// [Parameter] public EditSubmitKey EditSubmitKey { get; set; } /// - /// 获得/设置 扩展按钮模板 + /// 获得/设置 扩展按钮模板 + /// Get/Set Extension Button Template + /// 10.2.2 /// [Parameter] public RenderFragment? ButtonTemplate { get; set; } /// - /// 获得/设置 选中项集合发生改变时回调委托方法 + /// 获得/设置 选中项集合发生改变时回调委托方法 + /// Get/Set Selected Items Changed Callback Method + /// 10.2.2 /// [Parameter] public Func, Task>? OnSelectedItemsChanged { get; set; } /// - /// Gets or sets the default virtualize items text. + /// 获得/设置 the default virtualize items text. + /// Gets or sets the default virtualize items text. + /// 10.2.2 /// [Parameter] public string? DefaultVirtualizeItemText { get; set; } /// - /// 获得/设置 全选按钮显示文本 + /// 获得/设置 全选按钮显示文本 + /// Get/Set Select All Text + /// 10.2.2 /// [Parameter] [NotNull] public string? SelectAllText { get; set; } /// - /// 获得/设置 全选按钮显示文本 + /// 获得/设置 全选按钮显示文本 + /// Get/Set Reverse Select Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ReverseSelectText { get; set; } /// - /// 获得/设置 全选按钮显示文本 + /// 获得/设置 全选按钮显示文本 + /// Get/Set Clear Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearText { get; set; } /// - /// 获得/设置 选项最大数 默认为 0 不限制 + /// 获得/设置 选项最大数 默认为 0 不限制 + /// Get/Set Max items. Default 0 (unlimited) + /// 10.2.2 /// [Parameter] public int Max { get; set; } /// - /// 获得/设置 设置最大值时错误消息文字 + /// 获得/设置 设置最大值时错误消息文字 + /// Get/Set Max Error Message + /// 10.2.2 /// [Parameter] [NotNull] public string? MaxErrorMessage { get; set; } /// - /// 获得/设置 选项最小数 默认为 0 不限制 + /// 获得/设置 选项最小数 默认为 0 不限制 + /// Get/Set Min items. Default 0 (unlimited) + /// 10.2.2 /// [Parameter] public int Min { get; set; } /// - /// 获得/设置 设置最小值时错误消息文字 + /// 获得/设置 设置最小值时错误消息文字 + /// Get/Set Min Error Message + /// 10.2.2 /// [Parameter] [NotNull] @@ -197,7 +237,8 @@ protected override void OnParametersSet() _itemsCache = null; - // 通过 Value 对集合进行赋值 + // 通过 Value 对集合进行赋值 + // Assign collection by Value var _currentValue = CurrentValueAsString; if (_lastSelectedValueString != _currentValue) { @@ -268,8 +309,10 @@ private List GetItemsByVirtualize() private async ValueTask> LoadItems(ItemsProviderRequest request) { - // 有搜索条件时使用原生请求数量 - // 有总数时请求剩余数量 + // 有搜索条件时使用原生请求数量 + // Use original request count when there is search condition + // 有总数时请求剩余数量 + // Request remaining count when there is total count var count = !string.IsNullOrEmpty(SearchText) ? request.Count : GetCountByTotal(); var data = await OnQueryAsync(new() { StartIndex = request.StartIndex, Count = count, SearchText = SearchText }); @@ -324,7 +367,8 @@ protected override List GetRowsByItems() } /// - /// 客户端回车回调方法 + /// 客户端回车回调方法 + /// Client-side Enter Callback Method /// /// /// @@ -340,7 +384,8 @@ public async Task ConfirmSelectedItem(int index) } /// - /// 切换当前选项方法 + /// 切换当前选项方法 + /// Toggle Current Option Method /// /// [JSInvokable] @@ -363,13 +408,15 @@ public async Task ToggleRow(string val) } _isToggle = true; - // 更新选中值 + // 更新选中值 + // Update selected value await SetValue(); } } /// - /// 客户端编辑提交数据回调方法 + /// 客户端编辑提交数据回调方法 + /// Client-side Edit Submit Data Callback Method /// /// /// @@ -392,7 +439,8 @@ public async Task TriggerEditTag(string val) { SelectedItems.Add(ret); } - // 更新选中值 + // 更新选中值 + // Update selected value _isToggle = true; await SetValue(); } @@ -476,7 +524,8 @@ private async Task SetValue() } /// - /// 清除选择项方法 + /// 清除选择项方法 + /// Clear Items Method /// /// public async Task Clear() @@ -486,7 +535,8 @@ public async Task Clear() } /// - /// 全选选择项方法 + /// 全选选择项方法 + /// Select All Items Method /// /// public async Task SelectAll() @@ -497,7 +547,8 @@ public async Task SelectAll() } /// - /// 翻转选择项方法 + /// 翻转选择项方法 + /// Invert Selection Method /// /// public async Task InvertSelect() @@ -548,7 +599,8 @@ private bool CheckCanEdit() } /// - /// 客户端检查完成时调用此方法 + /// 客户端检查完成时调用此方法 + /// Called when client-side validation is completed /// /// protected override void OnValidate(bool? valid) @@ -563,8 +615,10 @@ private void ResetItems() { if (Items == null) { - // 判断 IEnumerable 泛型 T 是否为 Enum - // 特别注意 string 是 IEnumerable 的实例 + // 判断 IEnumerable<T> 泛型 T 是否为 Enum + // Determine if generic T of IEnumerable<T> is Enum + // 特别注意 string 是 IEnumerable 的实例 + // Note that string is an instance of IEnumerable var type = typeof(TValue); Type? innerType; if (type.IsGenericType && type.IsAssignableTo(typeof(IEnumerable))) diff --git a/src/BootstrapBlazor/Components/Select/PopoverSelectBase.cs b/src/BootstrapBlazor/Components/Select/PopoverSelectBase.cs index fd6b47cb99f..eb3737c768d 100644 --- a/src/BootstrapBlazor/Components/Select/PopoverSelectBase.cs +++ b/src/BootstrapBlazor/Components/Select/PopoverSelectBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,37 +6,45 @@ namespace BootstrapBlazor.Components; /// -/// PopoverSelectBase 基类 +/// PopoverSelectBase 基类 +/// PopoverSelectBase Base Class /// /// public abstract class PopoverSelectBase : PopoverDropdownBase { /// - /// 获得/设置 是否使用 Popover 渲染下拉框 默认 false + /// 获得/设置 是否使用 Popover 渲染下拉框 默认 false + /// Get/Set Whether to use Popover to render dropdown. Default false + /// 10.2.2 /// [Parameter] public bool IsPopover { get; set; } /// - /// 获得/设置 弹窗偏移量 默认 [0, 10] + /// 获得/设置 弹窗偏移量 默认 [0, 10] + /// Get/Set Popover Offset. Default [0, 10] + /// 10.2.2 /// [Parameter] public string? Offset { get; set; } /// - /// 配置类实例 + /// 配置类实例 + /// Config Instance /// [Inject] [NotNull] protected IOptions? BootstrapBlazorOptions { get; set; } /// - /// data-bs-toggle 值 + /// data-bs-toggle 值 + /// data-bs-toggle Value /// protected string? ToggleString => IsPopover ? Constants.DropdownToggleString : "dropdown"; /// - /// 偏移量字符串 + /// 偏移量字符串 + /// Offset String /// protected string? OffsetString => IsPopover ? null : Offset; diff --git a/src/BootstrapBlazor/Components/Select/Select.razor.cs b/src/BootstrapBlazor/Components/Select/Select.razor.cs index f279c6dcac1..ff3acac1b90 100644 --- a/src/BootstrapBlazor/Components/Select/Select.razor.cs +++ b/src/BootstrapBlazor/Components/Select/Select.razor.cs @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// Select component +/// Select component +/// Select component /// /// public partial class Select : ISelect, ILookup @@ -27,8 +28,9 @@ public partial class Select : ISelect, ILookup private ILookupService? InjectLookupService { get; set; } /// - /// 获得/设置 值为 null 时是否使用第一个选项或者标记为 active 的候选项作为默认值 - /// Gets or sets a value indicating Whether to use the first option or the candidate marked as active as the default value when the value is null + /// 获得/设置 值为 null 时是否使用第一个选项或者标记为 active 的候选项作为默认值 + /// Gets or sets a value indicating Whether to use the first option or the candidate marked as active as the default value when the value is null + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 IsUseDefaultItemWhenValueIsNull 参数代替;Deprecated, use the IsUseDefaultItemWhenValueIsNull parameter instead")] @@ -40,113 +42,143 @@ public bool IsUseActiveWhenValueIsNull } /// - /// 获得/设置 值为 null 时是否使用第一个选项或者标记为 active 的候选项作为默认值 - /// Gets or sets a value indicating Whether to use the first option or the candidate marked as active as the default value when the value is null + /// 获得/设置 值为 null 时是否使用第一个选项或者标记为 active 的候选项作为默认值 + /// Gets or sets a value indicating Whether to use the first option or the candidate marked as active as the default value when the value is null + /// 10.2.2 /// [Parameter] public bool IsUseDefaultItemWhenValueIsNull { get; set; } /// - /// Gets or sets the display template. Default is null. + /// 获得/设置 the 显示 模板. 默认为 null. + /// Gets or sets the display template. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? DisplayTemplate { get; set; } /// - /// Gets or sets the callback method when the input value changes. Default is null. + /// 获得/设置 the 回调方法 when the input value changes. 默认为 null. + /// Gets or sets the callback method when the input value changes. Default is null. + /// 10.2.2 /// /// Effective when is set. [Parameter] public Func? OnInputChangedCallback { get; set; } /// - /// Gets or sets the options template for static data. + /// 获得/设置 the options 模板 for static 数据. + /// Gets or sets the options template for static data. + /// 10.2.2 /// [Parameter] public RenderFragment? Options { get; set; } /// - /// Gets or sets whether to disable the OnSelectedItemChanged callback method on first render. Default is false. + /// 获得/设置 是否 to disable the OnSelectedItemChanged 回调方法 on first render. 默认为 false. + /// Gets or sets whether to disable the OnSelectedItemChanged callback method on first render. Default is false. + /// 10.2.2 /// [Parameter] public bool DisableItemChangedWhenFirstRender { get; set; } /// - /// 获取/设置 选中项改变前的回调方法。返回 true 则改变选中项的值;否则选中项的值不变。 - /// Gets or sets the callback method before the selected item changes. Returns true to change the selected item value; otherwise, the selected item value does not change. + /// 获取/设置 选中项改变前的回调方法。返回 true 则改变选中项的值;否则选中项的值不变。 + /// Gets or sets the callback method before the selected item changes. Returns true to change the selected item value; otherwise, the selected item value does not change. + /// 10.2.2 /// [Parameter] public Func>? OnBeforeSelectedItemChange { get; set; } /// - /// Gets or sets whether to show the Swal confirmation popup. Default is false. - /// 获得/设置 是否显示 Swal 确认弹窗 默认值 为 false + /// 获得/设置 是否显示 Swal 确认弹窗 默认值 为 false + /// Gets or sets whether to show the Swal confirmation popup. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowSwal { get; set; } /// - /// Gets or sets the callback method when the selected item changes. + /// 获得/设置 the 回调方法 when the selected item changes. + /// Gets or sets the callback method when the selected item changes. + /// 10.2.2 /// [Parameter] public Func? OnSelectedItemChanged { get; set; } /// - /// Gets or sets the Swal category. Default is Question. + /// 获得/设置 the Swal category. 默认为 Question. + /// Gets or sets the Swal category. Default is Question. + /// 10.2.2 /// [Parameter] public SwalCategory SwalCategory { get; set; } = SwalCategory.Question; /// - /// Gets or sets the Swal title. Default is null. + /// 获得/设置 the Swal title. 默认为 null. + /// Gets or sets the Swal title. Default is null. + /// 10.2.2 /// [Parameter] public string? SwalTitle { get; set; } /// - /// Gets or sets the Swal content. Default is null. + /// 获得/设置 the Swal 内容. 默认为 null. + /// Gets or sets the Swal content. Default is null. + /// 10.2.2 /// [Parameter] public string? SwalContent { get; set; } /// - /// Gets or sets the Swal footer. Default is null. + /// 获得/设置 the Swal footer. 默认为 null. + /// Gets or sets the Swal footer. Default is null. + /// 10.2.2 /// [Parameter] public string? SwalFooter { get; set; } /// /// + /// 10.2.2 /// [Parameter] public ILookupService? LookupService { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? LookupServiceKey { get; set; } /// /// + /// 10.2.2 /// [Parameter] public object? LookupServiceData { get; set; } /// - /// Gets or sets the default text for virtualized items. Default is null. + /// 获得/设置 the default text for virtualized items. 默认为 null. + /// Gets or sets the default text for virtualized items. Default is null. + /// 10.2.2 /// [Parameter] public string? DefaultVirtualizeItemText { get; set; } /// - /// Gets or sets whether auto clear the search text when dropdown closed. + /// 获得/设置 是否 auto clear the search text when dropdown closed. + /// Gets or sets whether auto clear the search text when dropdown closed. + /// 10.2.2 /// [Parameter] public bool IsAutoClearSearchTextWhenCollapsed { get; set; } /// - /// Gets or sets the dropdown collapsed callback method. + /// 获得/设置 the dropdown collapsed 回调方法. + /// Gets or sets the dropdown collapsed callback method. + /// 10.2.2 /// [Parameter] public Func? OnCollapsed { get; set; } @@ -232,7 +264,8 @@ protected override async Task OnParametersSetAsync() Items ??= await this.GetItemsAsync(InjectLookupService, LookupServiceKey, LookupServiceData) ?? []; - // 内置对枚举类型的支持 + // 内置对枚举类型的支持 + // Built-in support for enum types if (!Items.Any() && ValueType.IsEnum()) { var item = NullableUnderlyingType == null ? "" : PlaceHolder; @@ -249,8 +282,10 @@ protected override async Task OnParametersSetAsync() private async ValueTask> LoadItems(ItemsProviderRequest request) { - // 有搜索条件时使用原生请求数量 - // 有总数时请求剩余数量 + // 有搜索条件时使用原生请求数量 + // Use original request count when there is search condition + // 有总数时请求剩余数量 + // Request remaining count when there is total count var count = !string.IsNullOrEmpty(SearchText) ? request.Count : GetCountByTotal(); var data = await OnQueryAsync(new() { StartIndex = request.StartIndex, Count = count, SearchText = SearchText }); @@ -306,7 +341,8 @@ private bool TryParseSelectItem(string value, [MaybeNullWhen(false)] out TValue }); /// - /// Trigger event callback method. called by JavaScript. + /// Trigger event 回调方法. called by JavaScript. + /// Trigger event callback method. called by JavaScript. /// /// [JSInvokable] @@ -341,7 +377,8 @@ protected override List GetRowsByItems() } /// - /// Confirms the selected item. + /// Confirms the selected item. + /// Confirms the selected item. /// /// The index of the selected item. /// A task that represents the asynchronous operation. @@ -356,7 +393,8 @@ public async Task ConfirmSelectedItem(int index) } /// - /// Handles the click event for a dropdown item. + /// Handles the click event for a dropdown item. + /// Handles the click event for a dropdown item. /// /// The selected item. /// A task that represents the asynchronous operation. @@ -364,13 +402,15 @@ private async Task OnClickItem(SelectedItem item) { var ret = true; - // 自定义回调方法 OnBeforeSelectedItemChange 返回 false 时不修改选中项 + // 自定义回调方法 OnBeforeSelectedItemChange 返回 false 时不修改选中项 + // Do not modify the selected item when the custom callback method OnBeforeSelectedItemChange returns false if (OnBeforeSelectedItemChange != null) { ret = await OnBeforeSelectedItemChange(item); } - // 如果 ShowSwal 为 true 且 则显示 Swal 确认弹窗,通过确认弹窗返回值决定是否修改选中项 + // 如果 ShowSwal 为 true 且 则显示 Swal 确认弹窗,通过确认弹窗返回值决定是否修改选中项 + // If ShowSwal is true, show the Swal confirmation popup and decide whether to modify the selected item based on the confirmation popup return value if (ret && ShowSwal) { var option = new SwalOption() @@ -387,7 +427,8 @@ private async Task OnClickItem(SelectedItem item) ret = await SwalService.ShowModal(option); } - // 如果 ret 为 true 则修改选中项 + // 如果 ret 为 true 则修改选中项 + // If ret is true, modify the selected item if (ret) { _defaultVirtualizedItemText = item.Text; @@ -438,7 +479,8 @@ private async Task OnChange(ChangeEventArgs args) { if (args.Value is string v) { - // Items 中没有时插入一个 SelectedItem + // Items 中没有时插入一个 SelectedItem + // Insert a SelectedItem when it is not in Items var item = Items.FirstOrDefault(i => i.Text == v); if (item == null) diff --git a/src/BootstrapBlazor/Components/Select/SelectBase.cs b/src/BootstrapBlazor/Components/Select/SelectBase.cs index 8e7b0862f32..00022dfe333 100644 --- a/src/BootstrapBlazor/Components/Select/SelectBase.cs +++ b/src/BootstrapBlazor/Components/Select/SelectBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,139 +6,178 @@ namespace BootstrapBlazor.Components; /// -/// SelectBase component base class +/// SelectBase component base class +/// SelectBase component base class /// /// The type of the value. public abstract class SelectBase : PopoverSelectBase { /// - /// Gets or sets the color. The default is (no color). + /// 获得/设置 the 颜色. default is (no 颜色). + /// Gets or sets the color. The default is (no color). + /// 10.2.2 /// [Parameter] public Color Color { get; set; } /// - /// Gets or sets a value indicating whether to show the search box. The default is false. + /// 获得/设置 a value indicating 是否 to show the search box. default is false. + /// Gets or sets a value indicating whether to show the search box. The default is false. + /// 10.2.2 /// [Parameter] public bool ShowSearch { get; set; } /// - /// Gets or sets the search icon. + /// 获得/设置 the search 图标. + /// Gets or sets the search icon. + /// 10.2.2 /// [Parameter] public string? SearchIcon { get; set; } /// - /// Gets or sets the search loading icon. + /// 获得/设置 the search loading 图标. + /// Gets or sets the search loading icon. + /// 10.2.2 /// [Parameter] public string? SearchLoadingIcon { get; set; } /// - /// Gets or sets the search text. + /// 获得/设置 the search text. + /// Gets or sets the search text. /// [NotNull] protected string? SearchText { get; set; } /// - /// Gets or sets the text to display when no search results are found. + /// 获得/设置 the text to 显示 when no search results are found. + /// Gets or sets the text to display when no search results are found. + /// 10.2.2 /// [Parameter] public string? NoSearchDataText { get; set; } /// - /// Gets or sets the dropdown icon. The default is "fa-solid fa-angle-up". + /// 获得/设置 the dropdown 图标. default is "fa-solid fa-angle-up". + /// Gets or sets the dropdown icon. The default is "fa-solid fa-angle-up". + /// 10.2.2 /// [Parameter] [NotNull] public string? DropdownIcon { get; set; } /// - /// Gets or sets a value indicating whether the content is a . The default is false. + /// 获得/设置 a value indicating 是否 the 内容 is a . default is false. + /// Gets or sets a value indicating whether the content is a . The default is false. + /// 10.2.2 /// [Parameter] public bool IsMarkupString { get; set; } /// - /// Gets or sets the string comparison rule. The default is . + /// 获得/设置 the string comparison rule. default is . + /// Gets or sets the string comparison rule. The default is . + /// 10.2.2 /// [Parameter] public StringComparison StringComparison { get; set; } = StringComparison.OrdinalIgnoreCase; /// - /// Gets or sets the group item template. + /// 获得/设置 the group item 模板. + /// Gets or sets the group item template. + /// 10.2.2 /// [Parameter] public RenderFragment? GroupItemTemplate { get; set; } /// - /// Gets or sets the scroll behavior. The default is . + /// 获得/设置 the scroll behavior. default is . + /// Gets or sets the scroll behavior. The default is . + /// 10.2.2 /// [Parameter] public ScrollIntoViewBehavior ScrollIntoViewBehavior { get; set; } = ScrollIntoViewBehavior.Smooth; /// - /// Gets or sets the service instance. + /// 获得/设置 the service 实例. + /// Gets or sets the service instance. /// [Inject] [NotNull] protected IIconTheme? IconTheme { get; set; } /// - /// Gets or sets the placeholder text. + /// 获得/设置 the placeholder text. + /// Gets or sets the placeholder text. + /// 10.2.2 /// [Parameter] public string? PlaceHolder { get; set; } /// - /// Gets or sets whether virtual scrolling is enabled. Default is false. + /// 获得/设置 是否 virtual scrolling is enabled. 默认为 false. + /// Gets or sets whether virtual scrolling is enabled. Default is false. + /// 10.2.2 /// [Parameter] public bool IsVirtualize { get; set; } /// - /// Gets or sets the row height for virtual scrolling. Default is 33. + /// 获得/设置 the row 高度 for virtual scrolling. 默认为 33. + /// Gets or sets the row height for virtual scrolling. Default is 33. + /// 10.2.2 /// /// Effective when is set to true. [Parameter] public float RowHeight { get; set; } = 33f; /// - /// Gets or sets the overscan count for virtual scrolling. Default is 4. + /// 获得/设置 the overscan count for virtual scrolling. 默认为 4. + /// Gets or sets the overscan count for virtual scrolling. Default is 4. + /// 10.2.2 /// /// Effective when is set to true. [Parameter] public int OverscanCount { get; set; } = 4; /// - /// Gets or sets the callback method when the clear button is clicked. Default is null. + /// 获得/设置 the 回调方法 when the clear 按钮 is clicked. 默认为 null. + /// Gets or sets the callback method when the clear button is clicked. Default is null. + /// 10.2.2 /// [Parameter] public Func? OnClearAsync { get; set; } /// - /// Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up. + /// 获得/设置 the right-side clear 图标. 默认为 fa-solid fa-angle-up. + /// Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up. + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearIcon { get; set; } /// - /// Gets or sets whether the select component is clearable. Default is false. + /// 获得/设置 是否 the select component is clearable. 默认为 false. + /// Gets or sets whether the select component is clearable. Default is false. + /// 10.2.2 /// [Parameter] public bool IsClearable { get; set; } /// - /// Gets the search icon string with default "icon search-icon" class. + /// 获得 the search 图标 string with default "图标 search-图标" class. + /// Gets the search icon string with default "icon search-icon" class. /// protected string? SearchIconString => CssBuilder.Default("icon search-icon") .AddClass(SearchIcon) .Build(); /// - /// Gets the custom class string. + /// 获得 the custom class string. + /// Gets the custom class string. /// protected override string? CustomClassString => CssBuilder.Default() .AddClass("select", IsPopover) @@ -146,7 +185,8 @@ public abstract class SelectBase : PopoverSelectBase .Build(); /// - /// Gets the append class string. + /// 获得 the append class string. + /// Gets the append class string. /// protected string? AppendClassString => CssBuilder.Default("form-select-append") .AddClass($"text-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled && !IsValid.HasValue) @@ -155,7 +195,8 @@ public abstract class SelectBase : PopoverSelectBase .Build(); /// - /// Gets the clear icon class string. + /// 获得 the clear 图标 class string. + /// Gets the clear icon class string. /// protected string? ClearClassString => CssBuilder.Default("clear-icon") .AddClass($"text-{Color.ToDescriptionString()}", Color != Color.None) @@ -164,7 +205,8 @@ public abstract class SelectBase : PopoverSelectBase .Build(); /// - /// Gets the SearchLoadingIcon icon class string. + /// 获得 the SearchLoadingIcon 图标 class string. + /// Gets the SearchLoadingIcon icon class string. /// protected string? SearchLoadingIconString => CssBuilder.Default("icon searching-icon") .AddClass(SearchLoadingIcon) @@ -182,13 +224,15 @@ protected override void OnParametersSet() } /// - /// Shows the dropdown. + /// Shows the dropdown. + /// Shows the dropdown. /// /// A representing the asynchronous operation. public Task Show() => InvokeVoidAsync("show", Id); /// - /// Hides the dropdown. + /// Hides the dropdown. + /// Hides the dropdown. /// /// A representing the asynchronous operation. public Task Hide() => InvokeVoidAsync("hide", Id); @@ -196,18 +240,21 @@ protected override void OnParametersSet() private bool IsNullable() => !ValueType.IsValueType || NullableUnderlyingType != null; /// - /// Gets whether show the clear button. + /// 获得 是否 show the clear 按钮. + /// Gets whether show the clear button. /// /// protected bool GetClearable() => IsClearable && !IsDisabled && IsNullable(); /// - /// Clears the search text. + /// Clears the search text. + /// Clears the search text. /// public void ClearSearchText() => SearchText = null; /// - /// Clears the selected value. + /// Clears the selected value. + /// Clears the selected value. /// /// protected virtual async Task OnClearValue() diff --git a/src/BootstrapBlazor/Components/Select/SelectObject.razor.cs b/src/BootstrapBlazor/Components/Select/SelectObject.razor.cs index aacd1640c87..97f65473311 100644 --- a/src/BootstrapBlazor/Components/Select/SelectObject.razor.cs +++ b/src/BootstrapBlazor/Components/Select/SelectObject.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,31 +8,40 @@ namespace BootstrapBlazor.Components; /// -/// Select 组件实现类 +/// Select 组件实现类 +/// Select Component Implementation Class /// [CascadingTypeParameter(nameof(TItem))] public partial class SelectObject { /// - /// 获得/设置 颜色 默认 Color.None 无设置 + /// 获得/设置 颜色 默认 Color.None 无设置 + /// Get/Set Color. Default Color.None + /// 10.2.2 /// [Parameter] public Color Color { get; set; } /// - /// 获得/设置 是否显示组件右侧扩展箭头 默认 true 显示 + /// 获得/设置 是否显示组件右侧扩展箭头 默认 true 显示 + /// Get/Set Whether to show the component right extension arrow. Default true + /// 10.2.2 /// [Parameter] public bool ShowAppendArrow { get; set; } = true; /// - /// 获得/设置 弹窗最小宽度 默认为 null 未设置使用样式中的默认值 + /// 获得/设置 弹窗最小宽度 默认为 null 未设置使用样式中的默认值 + /// Get/Set Dropdown Min Width. Default null (use style default) + /// 10.2.2 /// [Parameter] public int? DropdownMinWidth { get; set; } /// - /// 获得 显示文字回调方法 默认 null + /// 获得 显示文字回调方法 默认 null + /// Get Display Text Callback Method. Default null + /// 10.2.2 /// [Parameter] [NotNull] @@ -40,27 +49,35 @@ public partial class SelectObject public Func? GetTextCallback { get; set; } /// - /// 获得/设置 右侧下拉箭头图标 默认 fa-solid fa-angle-up + /// 获得/设置 右侧下拉箭头图标 默认 fa-solid fa-angle-up + /// Get/Set Dropdown Icon. Default fa-solid fa-angle-up + /// 10.2.2 /// [Parameter] [NotNull] public string? DropdownIcon { get; set; } /// - /// 获得/设置 是否可清除 默认 false + /// 获得/设置 是否可清除 默认 false + /// Get/Set Whether clearable. Default false + /// 10.2.2 /// [Parameter] public bool IsClearable { get; set; } /// - /// 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up + /// 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up + /// Get/Set Clear Icon. Default fa-solid fa-angle-up + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearIcon { get; set; } /// - /// 获得/设置 下拉列表内容模板 + /// 获得/设置 下拉列表内容模板 + /// Get/Set Dropdown Content Template + /// 10.2.2 /// [Parameter] [NotNull] @@ -68,14 +85,16 @@ public partial class SelectObject public RenderFragment>? ChildContent { get; set; } /// - /// 获得/设置 IIconTheme 服务实例 + /// 获得/设置 IIconTheme 服务实例 + /// Get/Set IIconTheme Service Instance /// [Inject] [NotNull] protected IIconTheme? IconTheme { get; set; } /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Class Name /// private string? ClassName => CssBuilder.Default("select select-object dropdown") .AddClass("disabled", IsDisabled) @@ -84,7 +103,8 @@ public partial class SelectObject .Build(); /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Input Class Name /// private string? InputClassName => CssBuilder.Default("form-select form-control") .AddClass($"border-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled && !IsValid.HasValue) @@ -95,7 +115,8 @@ public partial class SelectObject .Build(); /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Append Class Name /// private string? AppendClassString => CssBuilder.Default("form-select-append") .AddClass($"text-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled && !IsValid.HasValue) @@ -110,25 +131,33 @@ public partial class SelectObject .Build(); /// - /// 获得 PlaceHolder 属性 + /// 获得 PlaceHolder 属性 + /// Get PlaceHolder Attribute + /// 10.2.2 /// [Parameter] public string? PlaceHolder { get; set; } /// - /// 获得/设置 弹窗高度 默认 486px; + /// 获得/设置 弹窗高度 默认 486px; + /// Get/Set Dropdown Height. Default 486px + /// 10.2.2 /// [Parameter] public int Height { get; set; } = 486; /// - /// 获得/设置 Value 显示模板 默认 null + /// 获得/设置 Value 显示模板 默认 null + /// Get/Set Value Display Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? Template { get; set; } /// - /// 获得/设置 清除文本内容 OnClear 回调方法 默认 null + /// 获得/设置 清除文本内容 OnClear 回调方法 默认 null + /// Get/Set OnClear Callback Method. Default null + /// 10.2.2 /// [Parameter] public Func? OnClearAsync { get; set; } @@ -138,13 +167,15 @@ public partial class SelectObject private IStringLocalizer>? Localizer { get; set; } /// - /// 获得 input 组件 Id 方法 + /// 获得 input 组件 Id 方法 + /// Get input Component Id Method /// /// protected override string? RetrieveId() => InputId; /// - /// 获得/设置 内部 Input 组件 Id + /// 获得/设置 内部 Input 组件 Id + /// Get/Set Internal Input Component Id /// private string InputId => $"{Id}_input"; @@ -164,7 +195,8 @@ protected override void OnInitialized() } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet Method /// protected override void OnParametersSet() { @@ -183,13 +215,15 @@ protected override void OnParametersSet() private bool GetClearable() => IsClearable && !IsDisabled; /// - /// 获得 Text 显示文字 + /// 获得 Text 显示文字 + /// Get Display Text /// /// private string? GetText() => GetTextCallback(Value); /// - /// 关闭当前弹窗方法 + /// 关闭当前弹窗方法 + /// Close Current Dropdown Method /// /// public Task CloseAsync() => InvokeVoidAsync("close", Id); diff --git a/src/BootstrapBlazor/Components/Select/SelectOption.cs b/src/BootstrapBlazor/Components/Select/SelectOption.cs index 5e4180a1bbc..2f6eae192e5 100644 --- a/src/BootstrapBlazor/Components/Select/SelectOption.cs +++ b/src/BootstrapBlazor/Components/Select/SelectOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,36 +6,47 @@ namespace BootstrapBlazor.Components; /// -/// SelectOption component +/// SelectOption component +/// SelectOption component /// public class SelectOption : ComponentBase { /// - /// Gets or sets the display name. + /// 获得/设置 the 显示 name. + /// Gets or sets the display name. + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// Gets or sets the option value. + /// 获得/设置 the option value. + /// Gets or sets the option value. + /// 10.2.2 /// [Parameter] public string? Value { get; set; } /// - /// Gets or sets a value indicating whether the option is selected. Default is false. + /// 获得/设置 a value indicating 是否 the option is selected. 默认为 false. + /// Gets or sets a value indicating whether the option is selected. Default is false. + /// 10.2.2 /// [Parameter] public bool Active { get; set; } /// - /// Gets or sets a value indicating whether the option is disabled. Default is false. + /// 获得/设置 a value indicating 是否 the option is disabled. 默认为 false. + /// Gets or sets a value indicating whether the option is disabled. Default is false. + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// Gets or sets the group name. + /// 获得/设置 the group name. + /// Gets or sets the group name. + /// 10.2.2 /// [Parameter] public string? GroupName { get; set; } @@ -54,7 +65,8 @@ protected override void OnInitialized() } /// - /// Converts the current instance to a . + /// Converts the current 实例 to a . + /// Converts the current instance to a . /// /// A instance. private SelectedItem ToSelectedItem() => new() diff --git a/src/BootstrapBlazor/Components/Select/SelectTable.razor.cs b/src/BootstrapBlazor/Components/Select/SelectTable.razor.cs index 34c140880df..eb1b7d905fc 100644 --- a/src/BootstrapBlazor/Components/Select/SelectTable.razor.cs +++ b/src/BootstrapBlazor/Components/Select/SelectTable.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,20 +8,25 @@ namespace BootstrapBlazor.Components; /// -/// 下拉表格组件实现类 +/// 下拉表格组件实现类 +/// SelectTable Component Implementation Class /// /// [CascadingTypeParameter(nameof(TItem))] public partial class SelectTable : IColumnCollection where TItem : class, new() { /// - /// 获得/设置 TableHeader 实例 + /// 获得/设置 TableHeader 实例 + /// Get/Set TableHeader Instance + /// 10.2.2 /// [Parameter] public RenderFragment? TableColumns { get; set; } /// - /// 异步查询回调方法 + /// 异步查询回调方法 + /// Async Query Callback Method + /// 10.2.2 /// [Parameter] [EditorRequired] @@ -29,25 +34,33 @@ namespace BootstrapBlazor.Components; public Func>>? OnQueryAsync { get; set; } /// - /// 获得/设置 颜色 默认 Color.None 无设置 + /// 获得/设置 颜色 默认 Color.None 无设置 + /// Get/Set Color. Default Color.None + /// 10.2.2 /// [Parameter] public Color Color { get; set; } /// - /// 获得/设置 是否显示组件右侧扩展箭头 默认 true 显示 + /// 获得/设置 是否显示组件右侧扩展箭头 默认 true 显示 + /// Get/Set Whether to show the component right extension arrow. Default true + /// 10.2.2 /// [Parameter] public bool ShowAppendArrow { get; set; } = true; /// - /// 获得/设置 弹窗表格最小宽度 默认为 null 未设置使用样式中的默认值 + /// 获得/设置 弹窗表格最小宽度 默认为 null 未设置使用样式中的默认值 + /// Get/Set Dropdown Table Min Width. Default null (use style default) + /// 10.2.2 /// [Parameter] public int? TableMinWidth { get; set; } /// - /// 获得 显示文字回调方法 默认 null + /// 获得 显示文字回调方法 默认 null + /// Get Display Text Callback Method. Default null + /// 10.2.2 /// [Parameter] [NotNull] @@ -55,44 +68,55 @@ namespace BootstrapBlazor.Components; public Func? GetTextCallback { get; set; } /// - /// 获得/设置 右侧下拉箭头图标 默认 fa-solid fa-angle-up + /// 获得/设置 右侧下拉箭头图标 默认 fa-solid fa-angle-up + /// Get/Set Dropdown Icon. Default fa-solid fa-angle-up + /// 10.2.2 /// [Parameter] [NotNull] public string? DropdownIcon { get; set; } /// - /// 获得/设置 是否可清除 默认 false + /// 获得/设置 是否可清除 默认 false + /// Get/Set Whether clearable. Default false + /// 10.2.2 /// [Parameter] public bool IsClearable { get; set; } /// - /// 获得/设置 是否显示无数据空记录 默认 false 不显示 + /// 获得/设置 是否显示无数据空记录 默认 false 不显示 + /// Get/Set Whether to show empty record when no data. Default false + /// 10.2.2 /// [Parameter] public bool ShowEmpty { get; set; } /// - /// 获得/设置 无数据时显示模板 默认 null + /// 获得/设置 无数据时显示模板 默认 null + /// Get/Set Empty Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? EmptyTemplate { get; set; } /// - /// 获得/设置 IIconTheme 服务实例 + /// 获得/设置 IIconTheme 服务实例 + /// Get/Set IIconTheme Service Instance /// [Inject] [NotNull] protected IIconTheme? IconTheme { get; set; } /// - /// 获得表格列集合 + /// 获得表格列集合 + /// Get Table Column Collection /// public List Columns { get; } = []; /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Class Name /// private string? ClassName => CssBuilder.Default("select select-table dropdown") .AddClass("disabled", IsDisabled) @@ -101,7 +125,8 @@ namespace BootstrapBlazor.Components; .Build(); /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Input Class Name /// private string? InputClassName => CssBuilder.Default("form-select form-control") .AddClass($"border-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled && !IsValid.HasValue) @@ -112,7 +137,8 @@ namespace BootstrapBlazor.Components; .Build(); /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Append Class Name /// private string? AppendClassString => CssBuilder.Default("form-select-append") .AddClass($"text-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled && !IsValid.HasValue) @@ -123,87 +149,115 @@ namespace BootstrapBlazor.Components; private bool GetClearable() => IsClearable && !IsDisabled; /// - /// 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up + /// 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up + /// Get/Set Clear Icon. Default fa-solid fa-angle-up + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearIcon { get; set; } /// - /// 获得 PlaceHolder 属性 + /// 获得 PlaceHolder 属性 + /// Get PlaceHolder Attribute + /// 10.2.2 /// [Parameter] public string? PlaceHolder { get; set; } /// - /// 获得/设置 表格高度 默认 486px + /// 获得/设置 表格高度 默认 486px + /// Get/Set Table Height. Default 486px + /// 10.2.2 /// [Parameter] public int Height { get; set; } = 486; /// - /// 获得/设置 Value 显示模板 默认 null + /// 获得/设置 Value 显示模板 默认 null + /// Get/Set Value Display Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? Template { get; set; } /// - /// 获得/设置 是否显示搜索框 默认为 false 不显示搜索框 + /// 获得/设置 是否显示搜索框 默认为 false 不显示搜索框 + /// Get/Set Whether to show search box. Default false + /// 10.2.2 /// [Parameter] public bool ShowSearch { get; set; } /// - /// 获得/设置 SearchTemplate 实例 + /// 获得/设置 SearchTemplate 实例 + /// Get/Set SearchTemplate Instance + /// 10.2.2 /// [Parameter] public RenderFragment? SearchTemplate { get; set; } /// - /// 获得/设置 是否收缩顶部搜索框 默认为 false 不收缩搜索框 是否显示搜索框请设置 值 Top + /// 获得/设置 是否收缩顶部搜索框 默认为 false 不收缩搜索框 是否显示搜索框请设置 值 Top + /// Get/Set Whether to collapse top search box. Default false. Please set to Top if show search box + /// 10.2.2 /// [Parameter] public bool CollapsedTopSearch { get; set; } /// - /// 获得/设置 SearchModel 实例 + /// 获得/设置 SearchModel 实例 + /// Get/Set SearchModel Instance + /// 10.2.2 /// [Parameter] public TItem SearchModel { get; set; } = new TItem(); /// - /// 获得/设置 自定义搜索模型 + /// 获得/设置 自定义搜索模型 + /// Get/Set Custom Search Model + /// 10.2.2 /// [Parameter] public ITableSearchModel? CustomerSearchModel { get; set; } /// - /// 获得/设置 自定义搜索模型模板 + /// 获得/设置 自定义搜索模型模板 + /// Get/Set Custom Search Model Template + /// 10.2.2 /// [Parameter] public RenderFragment? CustomerSearchTemplate { get; set; } /// - /// 获得/设置 是否分页 默认为 false + /// 获得/设置 是否分页 默认为 false + /// Get/Set Whether pagination. Default false + /// 10.2.2 /// [Parameter] public bool IsPagination { get; set; } /// - /// 获得/设置 每页显示数据数量的外部数据源 + /// 获得/设置 每页显示数据数量的外部数据源 + /// Get/Set PageItems Source + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? PageItemsSource { get; set; } /// - /// 获得/设置 是否自动生成列信息 默认为 false + /// 获得/设置 是否自动生成列信息 默认为 false + /// Get/Set Whether to auto generate columns. Default false + /// 10.2.2 /// [Parameter] public bool AutoGenerateColumns { get; set; } /// - /// 获得/设置 清除文本内容 OnClear 回调方法 默认 null + /// 获得/设置 清除文本内容 OnClear 回调方法 默认 null + /// Get/Set OnClear Callback Method. Default null + /// 10.2.2 /// [Parameter] public Func? OnClearAsync { get; set; } @@ -213,13 +267,15 @@ namespace BootstrapBlazor.Components; private IStringLocalizer>? Localizer { get; set; } /// - /// 获得 input 组件 Id 方法 + /// 获得 input 组件 Id 方法 + /// Get input Component Id Method /// /// protected override string? RetrieveId() => InputId; /// - /// 获得/设置 内部 Input 组件 Id + /// 获得/设置 内部 Input 组件 Id + /// Get/Set Internal Input Component Id /// private string InputId => $"{Id}_input"; @@ -244,7 +300,8 @@ protected override void OnInitialized() } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet Method /// protected override void OnParametersSet() { @@ -266,7 +323,8 @@ protected override void OnParametersSet() } /// - /// 获得 Text 显示文字 + /// 获得 Text 显示文字 + /// Get Display Text /// /// private string? GetText() => Value == default ? null : GetTextCallback(Value); @@ -288,7 +346,8 @@ private async Task OnClearValue() } /// - /// 查询方法 + /// 查询方法 + /// Query Method /// /// public Task QueryAsync() => _table.QueryAsync(); diff --git a/src/BootstrapBlazor/Components/Select/SelectTree.razor.cs b/src/BootstrapBlazor/Components/Select/SelectTree.razor.cs index 208d3aa036f..1d6791de0d2 100644 --- a/src/BootstrapBlazor/Components/Select/SelectTree.razor.cs +++ b/src/BootstrapBlazor/Components/Select/SelectTree.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,20 +8,23 @@ namespace BootstrapBlazor.Components; /// -/// Select 组件实现类 +/// Select 组件实现类 +/// Select Component Implementation Class /// /// public partial class SelectTree : IModelEqualityComparer { /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Class Name /// private string? ClassName => CssBuilder.Default("select dropdown select-tree") .AddClassFromAttributes(AdditionalAttributes) .Build(); /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Input Class Name /// private string? InputClassName => CssBuilder.Default("form-select form-control") .AddClass($"border-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled && !IsValid.HasValue) @@ -31,7 +34,8 @@ public partial class SelectTree : IModelEqualityComparer .Build(); /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Append Class Name /// private string? AppendClassName => CssBuilder.Default("form-select-append") .AddClass($"text-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled && !IsValid.HasValue) @@ -40,31 +44,41 @@ public partial class SelectTree : IModelEqualityComparer .Build(); /// - /// 获得/设置 颜色 默认 Color.None 无设置 + /// 获得/设置 颜色 默认 Color.None 无设置 + /// Get/Set Color. Default Color.None + /// 10.2.2 /// [Parameter] public Color Color { get; set; } /// - /// 获得 PlaceHolder 属性 + /// 获得 PlaceHolder 属性 + /// Get PlaceHolder Attribute + /// 10.2.2 /// [Parameter] public string? PlaceHolder { get; set; } /// - /// Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. + /// 获得/设置 是否 nodes can be expanded or collapsed when the component is disabled. 默认为 false. + /// Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. + /// 10.2.2 /// [Parameter] public bool CanExpandWhenDisabled { get; set; } = false; /// - /// 获得/设置 字符串比较规则 默认 StringComparison.OrdinalIgnoreCase 大小写不敏感 + /// 获得/设置 字符串比较规则 默认 StringComparison.OrdinalIgnoreCase 大小写不敏感 + /// Get/Set String Comparison. Default StringComparison.OrdinalIgnoreCase + /// 10.2.2 /// [Parameter] public StringComparison StringComparison { get; set; } = StringComparison.OrdinalIgnoreCase; /// - /// 获得/设置 带层次数据集合 + /// 获得/设置 带层次数据集合 + /// Get/Set Hierarchical Data Collection + /// 10.2.2 /// [Parameter] [NotNull] @@ -72,13 +86,17 @@ public partial class SelectTree : IModelEqualityComparer public List>? Items { get; set; } /// - /// SelectedItemChanged 回调方法 + /// SelectedItemChanged 回调方法 + /// SelectedItemChanged Callback Method + /// 10.2.2 /// [Parameter] public Func? OnSelectedItemChanged { get; set; } /// - /// 获得/设置 点击节点获取子数据集合回调方法 + /// 获得/设置 点击节点获取子数据集合回调方法 + /// Get/Set OnExpandNodeAsync Callback Method + /// 10.2.2 /// [Parameter] [NotNull] @@ -86,32 +104,42 @@ public partial class SelectTree : IModelEqualityComparer /// /// + /// 10.2.2 /// [Parameter] public Type CustomKeyAttribute { get; set; } = typeof(KeyAttribute); /// - /// 获得/设置 比较数据是否相同回调方法 默认为 null + /// 获得/设置 比较数据是否相同回调方法 默认为 null + /// Get/Set Model Equality Comparer. Default null + /// 提供此回调方法时忽略 属性 + /// Ignore when providing this callback + /// 10.2.2 /// - /// 提供此回调方法时忽略 属性 [Parameter] [NotNull] public Func? ModelEqualityComparer { get; set; } /// - /// 获得/设置 是否显示 Icon 图标 默认 false 不显示 + /// 获得/设置 是否显示 Icon 图标 默认 false 不显示 + /// Get/Set Whether to show Icon. Default false + /// 10.2.2 /// [Parameter] public bool ShowIcon { get; set; } /// - /// 获得/设置 下拉箭头 Icon 图标 + /// 获得/设置 下拉箭头 Icon 图标 + /// Get/Set Dropdown Icon + /// 10.2.2 /// [Parameter] public string? DropdownIcon { get; set; } /// - /// 获得/设置 是否可编辑 默认 false + /// 获得/设置 是否可编辑 默认 false + /// Get/Set Whether editable. Default false + /// 10.2.2 /// [Parameter] [ExcludeFromCodeCoverage] @@ -119,19 +147,25 @@ public partial class SelectTree : IModelEqualityComparer public bool IsEdit { get => IsEditable; set => IsEditable = value; } /// - /// 获得/设置 是否可编辑 默认 false + /// 获得/设置 是否可编辑 默认 false + /// Get/Set Whether editable. Default false + /// 10.2.2 /// [Parameter] public bool IsEditable { get; set; } /// - /// 获得/设置 是否显示搜索栏 默认 false 不显示 + /// 获得/设置 是否显示搜索栏 默认 false 不显示 + /// Get/Set Whether to show search box. Default false + /// 10.2.2 /// [Parameter] public bool ShowSearch { get; set; } /// - /// 获得/设置 是否固定搜索栏 默认 false 不固定 + /// 获得/设置 是否固定搜索栏 默认 false 不固定 + /// Get/Set Whether fixed search box. Default false + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请删除;Deprecated, please delete")] @@ -139,7 +173,9 @@ public partial class SelectTree : IModelEqualityComparer public bool IsFixedSearch { get; set; } /// - /// 获得/设置 是否显示重置搜索栏按钮 默认 true 显示 + /// 获得/设置 是否显示重置搜索栏按钮 默认 true 显示 + /// Get/Set Whether to show reset search button. Default true + /// 10.2.2 /// [Parameter] public bool ShowResetSearchButton { get; set; } = true; @@ -153,13 +189,15 @@ public partial class SelectTree : IModelEqualityComparer private IIconTheme? IconTheme { get; set; } /// - /// 获得 input 组件 Id 方法 + /// 获得 input 组件 Id 方法 + /// Get input Component Id Method /// /// protected override string? RetrieveId() => InputId; /// - /// 获得/设置 Select 内部 Input 组件 Id + /// 获得/设置 Select 内部 Input 组件 Id + /// Get/Set Select Internal Input Component Id /// private string? InputId => $"{Id}_input"; @@ -179,7 +217,8 @@ protected override void OnInitialized() { base.OnInitialized(); - // 处理 Required 标签 + // 处理 Required 标签 + // Process Required Tag AddRequiredValidator(); } @@ -205,12 +244,14 @@ protected override async Task OnParametersSetAsync() if (Value == null) { - // 组件未赋值 Value 通过 IsActive 设置默认值 + // 组件未赋值 Value 通过 IsActive 设置默认值 + // Value is not set, set default value by IsActive await TriggerItemChanged(s => s.IsActive); } else { - // 组件已赋值 Value 通过 Value 设置默认值 + // 组件已赋值 Value 通过 Value 设置默认值 + // Value is set, set default value by Value await TriggerItemChanged(s => Equals(s.Value, Value)); } } @@ -235,7 +276,8 @@ private void OnChange(ChangeEventArgs args) { CurrentValueAsString = v; - // 选中节点更改为当前值 + // 选中节点更改为当前值 + // Selected node changed to current value _tv.SetActiveItem(Value); } } @@ -265,7 +307,8 @@ private List> GetExpandedItems() } /// - /// 下拉框选项点击时调用此方法 + /// 下拉框选项点击时调用此方法 + /// Called when dropdown option is clicked /// private async Task OnItemClick(TreeViewItem item) { @@ -277,7 +320,8 @@ private async Task OnItemClick(TreeViewItem item) } /// - /// 选中项更改处理方法 + /// 选中项更改处理方法 + /// Selected Item Changed Method /// /// private async Task ItemChanged(TreeViewItem item) @@ -285,7 +329,8 @@ private async Task ItemChanged(TreeViewItem item) _selectedItem = item; CurrentValue = item.Value; - // 触发 SelectedItemChanged 事件 + // 触发 SelectedItemChanged 事件 + // Trigger SelectedItemChanged Event if (OnSelectedItemChanged != null) { await OnSelectedItemChanged.Invoke(CurrentValue); @@ -293,7 +338,8 @@ private async Task ItemChanged(TreeViewItem item) } /// - /// 比较数据是否相同 + /// 比较数据是否相同 + /// Compare Data Equality /// /// /// diff --git a/src/BootstrapBlazor/Components/Select/SimpleSelectBase.cs b/src/BootstrapBlazor/Components/Select/SimpleSelectBase.cs index dcb18cb6e64..c592d162e29 100644 --- a/src/BootstrapBlazor/Components/Select/SimpleSelectBase.cs +++ b/src/BootstrapBlazor/Components/Select/SimpleSelectBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,61 +8,76 @@ namespace BootstrapBlazor.Components; /// -/// SimpleSelectBase component base class +/// SimpleSelectBase component base class +/// SimpleSelectBase component base class /// /// public abstract class SimpleSelectBase : SelectBase { /// - /// Gets virtualize component instance + /// 获得 virtualize component 实例 + /// Gets virtualize component instance /// [NotNull] protected Virtualize? _virtualizeElement = default; /// - /// Gets or sets the last selected value string. + /// 获得/设置 the last selected value string. + /// Gets or sets the last selected value string. /// protected string _lastSelectedValueString = string.Empty; /// - /// Gets or sets the items. + /// 获得/设置 the items. + /// Gets or sets the items. + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// Gets or sets the callback method for loading virtualized items. + /// 获得/设置 the 回调方法 for loading virtualized items. + /// Gets or sets the callback method for loading virtualized items. + /// 10.2.2 /// [Parameter] [NotNull] public Func>>? OnQueryAsync { get; set; } /// - /// Gets or sets the callback method when the search text changes. + /// 获得/设置 the 回调方法 when the search text changes. + /// Gets or sets the callback method when the search text changes. + /// 10.2.2 /// [Parameter] public Func>? OnSearchTextChanged { get; set; } /// - /// Gets or sets whether the select component is editable. Default is false. + /// 获得/设置 是否 the select component is editable. 默认为 false. + /// Gets or sets whether the select component is editable. Default is false. + /// 10.2.2 /// [Parameter] public bool IsEditable { get; set; } /// - /// Gets or sets the item template. + /// 获得/设置 the item 模板. + /// Gets or sets the item template. + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } /// - /// Gets or sets the selected items cache. + /// 获得/设置 the selected items cache. + /// Gets or sets the selected items cache. /// protected List? _itemsCache; /// - /// Gets the dropdown menu rows. + /// 获得 the dropdown menu rows. + /// Gets the dropdown menu rows. /// protected List Rows { @@ -74,7 +89,8 @@ protected List Rows } /// - /// Gets the rows by Items. + /// 获得 the rows by Items. + /// Gets the rows by Items. /// /// protected abstract List GetRowsByItems(); @@ -86,7 +102,8 @@ private List GetRowsBySearch() } /// - /// Filter the items by search text. + /// Filter the items by search text. + /// Filter the items by search text. /// /// /// @@ -95,7 +112,8 @@ protected IEnumerable FilterBySearchText(IEnumerable : source.Where(i => i.Text.Contains(SearchText, StringComparison)); /// - /// Triggers the search callback method. + /// Triggers the search 回调方法. + /// Triggers the search callback method. /// /// The search text. /// A task that represents the asynchronous operation. @@ -109,20 +127,23 @@ public async Task TriggerOnSearch(string searchText) } /// - /// Refreshes the virtualize component. + /// Refreshes the virtualize component. + /// Refreshes the virtualize component. /// /// protected async Task RefreshVirtualizeElement() { if (IsVirtualize && OnQueryAsync != null) { - // 通过 ItemProvider 提供数据 + // 通过 ItemProvider 提供数据 + // Data provided by ItemProvider await _virtualizeElement.RefreshDataAsync(); } } /// - /// Clears the selected value. + /// Clears the selected value. + /// Clears the selected value. /// /// protected override async Task OnClearValue() diff --git a/src/BootstrapBlazor/Components/Select/VirtualizeQueryOption.cs b/src/BootstrapBlazor/Components/Select/VirtualizeQueryOption.cs index 6e99078fbd0..fb6dd26c330 100644 --- a/src/BootstrapBlazor/Components/Select/VirtualizeQueryOption.cs +++ b/src/BootstrapBlazor/Components/Select/VirtualizeQueryOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// Select 组件虚拟滚动参数类 +/// Select 组件虚拟滚动参数类 +/// Select Component Virtual Scroll Option Class /// public class VirtualizeQueryOption { /// - /// 请求记录开始索引 + /// 请求记录开始索引 + /// Request Start Index /// public int StartIndex { get; set; } /// - /// 请求记录总数 + /// 请求记录总数 + /// Request Total Count /// public int Count { get; set; } /// - /// Select 组件搜索文本 + /// Select 组件搜索文本 + /// Select Component Search Text /// public string? SearchText { get; set; } } diff --git a/src/BootstrapBlazor/Components/SelectGeneric/ISelectGeneric.cs b/src/BootstrapBlazor/Components/SelectGeneric/ISelectGeneric.cs index de6d9af06ca..e629a6efa51 100644 --- a/src/BootstrapBlazor/Components/SelectGeneric/ISelectGeneric.cs +++ b/src/BootstrapBlazor/Components/SelectGeneric/ISelectGeneric.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// ISelect 接口 +/// ISelect 接口 +/// ISelect Interface /// public interface ISelectGeneric { /// - /// 增加 SelectedItem 项方法 + /// 增加 SelectedItem 项方法 + /// Add SelectedItem Method /// /// void Add(SelectedItem item); diff --git a/src/BootstrapBlazor/Components/SelectGeneric/MultiSelectGeneric.razor.cs b/src/BootstrapBlazor/Components/SelectGeneric/MultiSelectGeneric.razor.cs index 3760f39491b..8252bc9f0f1 100644 --- a/src/BootstrapBlazor/Components/SelectGeneric/MultiSelectGeneric.razor.cs +++ b/src/BootstrapBlazor/Components/SelectGeneric/MultiSelectGeneric.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// MultiSelectGeneric component +/// MultiSelectGeneric component +/// MultiSelectGeneric component /// [ExcludeFromCodeCoverage] public partial class MultiSelectGeneric : IModelEqualityComparer @@ -43,155 +44,205 @@ public partial class MultiSelectGeneric : IModelEqualityComparer .Build(); /// - /// 获得/设置 显示部分模板 默认 null + /// 获得/设置 显示部分模板 默认 null + /// Get/Set Display Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment>>? DisplayTemplate { get; set; } /// - /// 获得/设置 是否显示关闭按钮 默认为 true 显示 + /// 获得/设置 是否显示关闭按钮 默认为 true 显示 + /// Get/Set Whether to show close button. Default true + /// 10.2.2 /// [Parameter] public bool ShowCloseButton { get; set; } = true; /// - /// 获得/设置 关闭按钮图标 默认为 null + /// 获得/设置 关闭按钮图标 默认为 null + /// Get/Set Close button icon. Default null + /// 10.2.2 /// [Parameter] public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 是否显示功能按钮 默认为 false 不显示 + /// 获得/设置 是否显示功能按钮 默认为 false 不显示 + /// Get/Set Whether to show toolbar. Default false + /// 10.2.2 /// [Parameter] public bool ShowToolbar { get; set; } /// - /// 获得/设置 是否显示默认功能按钮 默认为 true 显示 + /// 获得/设置 是否显示默认功能按钮 默认为 true 显示 + /// Get/Set Whether to show default buttons. Default true + /// 10.2.2 /// [Parameter] public bool ShowDefaultButtons { get; set; } = true; /// - /// 获得/设置 是否固定高度 默认 false + /// 获得/设置 是否固定高度 默认 false + /// Get/Set Whether fixed height. Default false + /// 10.2.2 /// [Parameter] public bool IsFixedHeight { get; set; } /// - /// 获得/设置 是否为单行模式 默认 false + /// 获得/设置 是否为单行模式 默认 false + /// Get/Set Whether single line mode. Default false + /// 10.2.2 /// [Parameter] public bool IsSingleLine { get; set; } /// - /// 获得/设置 编辑模式下输入选项更新后回调方法 默认 null - /// 返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 + /// 获得/设置 编辑模式下输入选项更新后回调方法 默认 null + /// Get/Set Callback method when input option is updated in edit mode. Default null + /// 返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 + /// Return instance to take effect, return null to discard, it is recommended to prompt in the callback method + /// 10.2.2 /// /// Effective when is set. [Parameter] public Func>? OnEditCallback { get; set; } /// - /// 获得/设置 编辑提交按键 默认 Enter + /// 获得/设置 编辑提交按键 默认 Enter + /// Get/Set Edit Submit Key. Default Enter + /// 10.2.2 /// [Parameter] public EditSubmitKey EditSubmitKey { get; set; } /// - /// 获得/设置 扩展按钮模板 + /// 获得/设置 扩展按钮模板 + /// Get/Set Button Template + /// 10.2.2 /// [Parameter] public RenderFragment? ButtonTemplate { get; set; } /// - /// 获得/设置 选中项集合发生改变时回调委托方法 + /// 获得/设置 选中项集合发生改变时回调委托方法 + /// Callback method when selected items collection changes + /// 10.2.2 /// [Parameter] public Func>, Task>? OnSelectedItemsChanged { get; set; } /// - /// Gets or sets the default virtualize items text. + /// 获得/设置 the default virtualize items text. + /// Gets or sets the default virtualize items text. + /// 10.2.2 /// [Parameter] public string? DefaultVirtualizeItemText { get; set; } /// - /// 获得/设置 全选按钮显示文本 + /// 获得/设置 全选按钮显示文本 + /// Get/Set Select All Text + /// 10.2.2 /// [Parameter] [NotNull] public string? SelectAllText { get; set; } /// - /// 获得/设置 全选按钮显示文本 + /// 获得/设置 全选按钮显示文本 + /// Get/Set Reverse Select Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ReverseSelectText { get; set; } /// - /// 获得/设置 全选按钮显示文本 + /// 获得/设置 全选按钮显示文本 + /// Get/Set Clear Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ClearText { get; set; } /// - /// 获得/设置 选项最大数 默认为 0 不限制 + /// 获得/设置 选项最大数 默认为 0 不限制 + /// Get/Set Max items. Default 0 (no limit) + /// 10.2.2 /// [Parameter] public int Max { get; set; } /// - /// 获得/设置 设置最大值时错误消息文字 + /// 获得/设置 设置最大值时错误消息文字 + /// Get/Set Error message when max value is set + /// 10.2.2 /// [Parameter] [NotNull] public string? MaxErrorMessage { get; set; } /// - /// 获得/设置 选项最小数 默认为 0 不限制 + /// 获得/设置 选项最小数 默认为 0 不限制 + /// Get/Set Min items. Default 0 (no limit) + /// 10.2.2 /// [Parameter] public int Min { get; set; } /// - /// 获得/设置 设置最小值时错误消息文字 + /// 获得/设置 设置最小值时错误消息文字 + /// Get/Set Error message when min value is set + /// 10.2.2 /// [Parameter] [NotNull] public string? MinErrorMessage { get; set; } /// - /// Gets or sets the items. + /// 获得/设置 the items. + /// Gets or sets the items. + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable>? Items { get; set; } /// - /// Gets or sets the callback method for loading virtualized items. + /// 获得/设置 the 回调方法 for loading virtualized items. + /// Gets or sets the callback method for loading virtualized items. + /// 10.2.2 /// [Parameter] [NotNull] public Func>>>? OnQueryAsync { get; set; } /// - /// Gets or sets the callback method when the search text changes. + /// 获得/设置 the 回调方法 when the search text changes. + /// Gets or sets the callback method when the search text changes. + /// 10.2.2 /// [Parameter] public Func>>? OnSearchTextChanged { get; set; } /// - /// Gets or sets the item template. + /// 获得/设置 the item 模板. + /// Gets or sets the item template. + /// 10.2.2 /// [Parameter] public RenderFragment>? ItemTemplate { get; set; } /// - /// 获得/设置 比较数据是否相同回调方法 默认为 null - /// 提供此回调方法时忽略 属性 + /// 获得/设置 比较数据是否相同回调方法 默认为 null + /// Get/Set Value Equality Comparer. Default null + /// 提供此回调方法时忽略 属性 + /// Ignore when providing this callback + /// 10.2.2 /// [Parameter] public Func? ValueEqualityComparer { get; set; } @@ -203,7 +254,9 @@ public partial class MultiSelectGeneric : IModelEqualityComparer } /// - /// 获得/设置 数据主键标识标签 默认为 用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断数据模型支持联合主键 + /// 获得/设置 数据主键标识标签 默认为 用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断数据模型支持联合主键 + /// Get/Set Identifier tag for data primary key. Default is . Used to determine date primary key tag. If the model does not set a primary key, you can use the parameter to customize the judgment of the data model supporting joint primary keys + /// 10.2.2 /// [Parameter] [NotNull] @@ -272,7 +325,8 @@ protected override void OnAfterRender(bool firstRender) }); /// - /// Triggers the search callback method. + /// Triggers the search 回调方法. + /// Triggers the search callback method. /// /// The search text. /// A task that represents the asynchronous operation. @@ -286,21 +340,26 @@ public async Task TriggerOnSearch(string searchText) } /// - /// Refreshes the virtualize component. + /// Refreshes the virtualize component. + /// Refreshes the virtualize component. /// /// private async Task RefreshVirtualizeElement() { if (IsVirtualize && OnQueryAsync != null) { - // 通过 ItemProvider 提供数据 + // 通过 ItemProvider 提供数据 + // Data provided by ItemProvider await _virtualizeElement.RefreshDataAsync(); } } private List>? _itemsCache; /// - /// Gets the dropdown menu rows. + /// 获得 the dropdown menu rows. + /// + /// Gets the dropdown menu rows. + /// /// private List> Rows { @@ -328,8 +387,10 @@ private IEnumerable> FilterBySearchText(IEnumerable>> LoadItems(ItemsProviderRequest request) { - // 有搜索条件时使用原生请求数量 - // 有总数时请求剩余数量 + // 有搜索条件时使用原生请求数量 + // Use original request count when there is search condition + // 有总数时请求剩余数量 + // Request remaining count when there is total count var count = !string.IsNullOrEmpty(SearchText) ? request.Count : GetCountByTotal(); var data = await OnQueryAsync(new() { StartIndex = request.StartIndex, Count = count, SearchText = SearchText }); @@ -375,7 +436,8 @@ private List> GetRowsByItems() } /// - /// 客户端回车回调方法 + /// 客户端回车回调方法 + /// Client Enter Callback Method /// /// /// @@ -391,7 +453,8 @@ public async Task ConfirmSelectedItem(int index) } /// - /// 切换当前选项方法 + /// 切换当前选项方法 + /// Toggle Current Option Method /// /// [JSInvokable] @@ -409,7 +472,8 @@ private async Task ToggleRow(SelectedItem item) SelectedItems.Remove(item); _isToggle = true; - // 更新选中值 + // 更新选中值 + // Update selected value await SetValue(); } @@ -432,7 +496,8 @@ private async Task ToggleItem(SelectedItem val) } _isToggle = true; - // 更新选中值 + // 更新选中值 + // Update selected value await SetValue(); } @@ -487,7 +552,8 @@ private async Task SetValue() } /// - /// 清除选择项方法 + /// 清除选择项方法 + /// Clear Selected Items Method /// /// public async Task Clear() @@ -497,7 +563,8 @@ public async Task Clear() } /// - /// 全选选择项方法 + /// 全选选择项方法 + /// Select All Items Method /// /// public async Task SelectAll() @@ -508,7 +575,8 @@ public async Task SelectAll() } /// - /// 翻转选择项方法 + /// 翻转选择项方法 + /// Invert Selection Method /// /// public async Task InvertSelect() @@ -544,7 +612,8 @@ private bool CheckCanSelect(SelectedItem item) } /// - /// 客户端检查完成时调用此方法 + /// 客户端检查完成时调用此方法 + /// Client Validation Completed Callback Method /// /// protected override void OnValidate(bool? valid) diff --git a/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs b/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs index 6a8fceb85d9..40e12f3f315 100644 --- a/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs +++ b/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// Select 泛型组件实现类 +/// Select 泛型组件实现类 +/// Select Generic Component Implementation Class /// /// [CascadingTypeParameter(nameof(TValue))] @@ -20,7 +21,8 @@ public partial class SelectGeneric : ISelectGeneric, IModelEqual private SwalService? SwalService { get; set; } /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Class Name /// private string? ClassString => CssBuilder.Default("select dropdown") .AddClass("is-clearable", IsClearable) @@ -28,7 +30,8 @@ public partial class SelectGeneric : ISelectGeneric, IModelEqual .Build(); /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Input Class Name /// private string? InputClassString => CssBuilder.Default("form-select form-control") .AddClass($"border-{Color.ToDescriptionString()}", Color != Color.None && !IsDisabled && !IsValid.HasValue) @@ -38,7 +41,8 @@ public partial class SelectGeneric : ISelectGeneric, IModelEqual .Build(); /// - /// 设置当前项是否 Active 方法 + /// 设置当前项是否 Active 方法 + /// Set Current Item Active Method /// /// /// @@ -50,53 +54,71 @@ public partial class SelectGeneric : ISelectGeneric, IModelEqual private readonly List> _children = []; /// - /// 获得/设置 搜索文本发生变化时回调此方法 + /// 获得/设置 搜索文本发生变化时回调此方法 + /// Callback method when search text changes + /// 10.2.2 /// [Parameter] public Func>>? OnSearchTextChanged { get; set; } /// - /// 获得/设置 是否可编辑 默认 false + /// 获得/设置 是否可编辑 默认 false + /// Get/Set Whether editable. Default false + /// 10.2.2 /// [Parameter] public bool IsEditable { get; set; } /// - /// 获得/设置 选项输入更新后回调方法 默认 null + /// 获得/设置 选项输入更新后回调方法 默认 null + /// Callback method after option input update. Default null + /// 10.2.2 /// /// 设置 后生效 [Parameter] public Func? OnInputChangedCallback { get; set; } /// - /// 获得/设置 选项输入更新后转换为 Value 回调方法 默认 null - /// 返回值为 null 时放弃操作 + /// 获得/设置 选项输入更新后转换为 Value 回调方法 默认 null + /// Callback method to convert option input update to Value. Default null + /// 返回值为 null 时放弃操作 + /// Discard operation when return value is null + /// 10.2.2 /// /// 设置 后生效 [Parameter] public Func>? TextConvertToValueCallback { get; set; } /// - /// 获得/设置 选项模板支持静态数据 + /// 获得/设置 选项模板支持静态数据 + /// Get/Set Option template supports static data + /// 10.2.2 /// [Parameter] public RenderFragment? Options { get; set; } /// - /// 获得/设置 显示部分模板 默认 null + /// 获得/设置 显示部分模板 默认 null + /// Get/Set Display Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment?>? DisplayTemplate { get; set; } /// - /// 获得/设置 禁止首次加载时触发 OnSelectedItemChanged 回调方法 默认 false + /// 获得/设置 禁止首次加载时触发 OnSelectedItemChanged 回调方法 默认 false + /// Get/Set Disable triggering OnSelectedItemChanged callback on first load. Default false + /// 10.2.2 /// [Parameter] public bool DisableItemChangedWhenFirstRender { get; set; } /// - /// 获得/设置 比较数据是否相同回调方法 默认为 null - /// 提供此回调方法时忽略 属性 + /// 获得/设置 比较数据是否相同回调方法 默认为 null + /// Get/Set Value Equality Comparer. Default null + /// 提供此回调方法时忽略 属性 + /// Ignore when providing this callback + /// 10.2.2 /// [Parameter] public Func? ValueEqualityComparer { get; set; } @@ -108,7 +130,9 @@ public partial class SelectGeneric : ISelectGeneric, IModelEqual } /// - /// 获得/设置 数据主键标识标签 默认为 用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断数据模型支持联合主键 + /// 获得/设置 数据主键标识标签 默认为 用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断数据模型支持联合主键 + /// Get/Set Identifier tag for data primary key. Default is . Used to determine date primary key tag. If the model does not set a primary key, you can use the parameter to customize the judgment of the data model supporting joint primary keys + /// 10.2.2 /// [Parameter] [NotNull] @@ -118,50 +142,66 @@ public partial class SelectGeneric : ISelectGeneric, IModelEqual private Virtualize>? VirtualizeElement { get; set; } /// - /// 获得/设置 绑定数据集 + /// 获得/设置 绑定数据集 + /// Get/Set Bound Dataset + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable>? Items { get; set; } /// - /// 获得/设置 选项模板 + /// 获得/设置 选项模板 + /// Get/Set Item Template + /// 10.2.2 /// [Parameter] public RenderFragment>? ItemTemplate { get; set; } /// - /// 获得/设置 下拉框项目改变前回调委托方法 返回 true 时选项值改变,否则选项值不变 + /// 获得/设置 下拉框项目改变前回调委托方法 返回 true 时选项值改变,否则选项值不变 + /// Get/Set Callback delegate before dropdown item changes. Return true to change option value, otherwise value remains unchanged + /// 10.2.2 /// [Parameter] public Func, Task>? OnBeforeSelectedItemChange { get; set; } /// - /// SelectedItemChanged 回调方法 + /// SelectedItemChanged 回调方法 + /// SelectedItemChanged Callback Method + /// 10.2.2 /// [Parameter] public Func, Task>? OnSelectedItemChanged { get; set; } /// - /// 获得/设置 Swal 图标 默认 Question + /// 获得/设置 Swal 图标 默认 Question + /// Get/Set Swal Icon. Default Question + /// 10.2.2 /// [Parameter] public SwalCategory SwalCategory { get; set; } = SwalCategory.Question; /// - /// 获得/设置 Swal 标题 默认 null + /// 获得/设置 Swal 标题 默认 null + /// Get/Set Swal Title. Default null + /// 10.2.2 /// [Parameter] public string? SwalTitle { get; set; } /// - /// 获得/设置 Swal 内容 默认 null + /// 获得/设置 Swal 内容 默认 null + /// Get/Set Swal Content. Default null + /// 10.2.2 /// [Parameter] public string? SwalContent { get; set; } /// - /// 获得/设置 Footer 默认 null + /// 获得/设置 Footer 默认 null + /// Get/Set Footer. Default null + /// 10.2.2 /// [Parameter] public string? SwalFooter { get; set; } @@ -171,13 +211,15 @@ public partial class SelectGeneric : ISelectGeneric, IModelEqual private IStringLocalizer>? Localizer { get; set; } /// - /// 获得 input 组件 Id 方法 + /// 获得 input 组件 Id 方法 + /// Get input Component Id Method /// /// protected override string? RetrieveId() => InputId; /// - /// 获得/设置 Select 内部 Input 组件 Id + /// 获得/设置 Select 内部 Input 组件 Id + /// Get/Set Select Internal Input Component Id /// private string? InputId => $"{Id}_input"; @@ -192,7 +234,8 @@ public partial class SelectGeneric : ISelectGeneric, IModelEqual private string? ScrollIntoViewBehaviorString => ScrollIntoViewBehavior == ScrollIntoViewBehavior.Smooth ? null : ScrollIntoViewBehavior.ToDescriptionString(); /// - /// 当前选择项实例 + /// 当前选择项实例 + /// Current Selected Item Instance /// private SelectedItem? SelectedItem { get; set; } @@ -278,7 +321,8 @@ protected override void OnParametersSet() DropdownIcon ??= IconTheme.GetIconByKey(ComponentIcons.SelectDropdownIcon); ClearIcon ??= IconTheme.GetIconByKey(ComponentIcons.SelectClearIcon); - // 内置对枚举类型的支持 + // 内置对枚举类型的支持 + // Built-in support for enum types if (!Items.Any() && ValueType.IsEnum()) { var item = NullableUnderlyingType == null ? "" : PlaceHolder; @@ -305,14 +349,17 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } /// - /// 获得/设置 数据总条目 + /// 获得/设置 数据总条目 + /// Get/Set Total Count /// private int TotalCount { get; set; } private List> GetVirtualItems() => [.. FilterBySearchText(GetRowsByItems())]; /// - /// 虚拟滚动数据加载回调方法 + /// 虚拟滚动数据加载回调方法 + /// Virtual Scroll Data Load Callback Method + /// 10.2.2 /// [Parameter] [NotNull] @@ -320,8 +367,10 @@ protected override async Task OnAfterRenderAsync(bool firstRender) private async ValueTask>> LoadItems(ItemsProviderRequest request) { - // 有搜索条件时使用原生请求数量 - // 有总数时请求剩余数量 + // 有搜索条件时使用原生请求数量 + // Use original request count when there is search condition + // 有总数时请求剩余数量 + // Request remaining count when there is total count var count = !string.IsNullOrEmpty(SearchText) ? request.Count : GetCountByTotal(); var data = await OnQueryAsync(new() { StartIndex = request.StartIndex, Count = count, SearchText = SearchText }); @@ -337,7 +386,8 @@ private async Task RefreshVirtualizeElement() { if (IsVirtualize && OnQueryAsync != null) { - // 通过 ItemProvider 提供数据 + // 通过 ItemProvider 提供数据 + // Data provided by ItemProvider await VirtualizeElement.RefreshDataAsync(); } } @@ -349,7 +399,8 @@ private async Task RefreshVirtualizeElement() protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, new { ConfirmMethodCallback = nameof(ConfirmSelectedItem), SearchMethodCallback = nameof(TriggerOnSearch) }); /// - /// 客户端回车回调方法 + /// 客户端回车回调方法 + /// Client Enter Callback Method /// /// /// @@ -364,7 +415,8 @@ public async Task ConfirmSelectedItem(int index) } /// - /// 客户端搜索栏回调方法 + /// 客户端搜索栏回调方法 + /// Client Search Bar Callback Method /// /// /// @@ -378,7 +430,8 @@ public async Task TriggerOnSearch(string searchText) } /// - /// 下拉框选项点击时调用此方法 + /// 下拉框选项点击时调用此方法 + /// Called when dropdown option is clicked /// private async Task OnClickItem(SelectedItem item) { @@ -388,7 +441,8 @@ private async Task OnClickItem(SelectedItem item) ret = await OnBeforeSelectedItemChange(item); if (ret) { - // 返回 True 弹窗提示 + // 返回 True 弹窗提示 + // Return True to show popup var option = new SwalOption() { Category = SwalCategory, @@ -404,7 +458,8 @@ private async Task OnClickItem(SelectedItem item) } else { - // 返回 False 直接运行 + // 返回 False 直接运行 + // Return False to run directly ret = true; } } @@ -423,7 +478,8 @@ private async Task SelectedItemChanged(SelectedItem item) CurrentValue = item.Value; - // 触发 SelectedItemChanged 事件 + // 触发 SelectedItemChanged 事件 + // Trigger SelectedItemChanged Event if (OnSelectedItemChanged != null) { await OnSelectedItemChanged(SelectedItem); @@ -444,10 +500,11 @@ private async Task ValueTypeChanged(SelectedItem item) item.Active = true; SelectedItem = item; - // 触发 StateHasChanged + // 触发 StateHasChanged + // Trigger StateHasChanged CurrentValue = item.Value; - - // 触发 SelectedItemChanged 事件 + // 触发 SelectedItemChanged 事件 + // Trigger SelectedItemChanged Event if (OnSelectedItemChanged != null) { await OnSelectedItemChanged(SelectedItem); @@ -456,7 +513,8 @@ private async Task ValueTypeChanged(SelectedItem item) } /// - /// 添加静态下拉项方法 + /// 添加静态下拉项方法 + /// Add Static Dropdown Item Method /// /// public void Add(SelectedItem item) => _children.Add(item); @@ -486,7 +544,8 @@ private async Task OnChange(ChangeEventArgs args) { if (args.Value is string v) { - // Items 中没有时插入一个 SelectedItem + // Items 中没有时插入一个 SelectedItem + // Insert a SelectedItem when it is not in Items var item = Items.FirstOrDefault(i => i.Text == v); if (item == null) @@ -499,12 +558,14 @@ private async Task OnChange(ChangeEventArgs args) if (val is not null) { - // 返回值时,由外部更新 Items 参数 + // 返回值时,由外部更新 Items 参数 + // Return value, update Items parameter externally CurrentValue = val; } else { - // 返回空值时恢复上次选中值 + // 返回空值时恢复上次选中值 + // Return empty value, restore last selected value await InvokeVoidAsync("resetValue", InputId, SelectedRow?.Text); } } diff --git a/src/BootstrapBlazor/Components/SelectGeneric/SelectOptionGeneric.cs b/src/BootstrapBlazor/Components/SelectGeneric/SelectOptionGeneric.cs index 13a097848cd..6cbebd3df76 100644 --- a/src/BootstrapBlazor/Components/SelectGeneric/SelectOptionGeneric.cs +++ b/src/BootstrapBlazor/Components/SelectGeneric/SelectOptionGeneric.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,48 +6,61 @@ namespace BootstrapBlazor.Components; /// -/// SelectOptionPro 组件 +/// SelectOptionPro 组件 +/// SelectOptionPro Component /// public class SelectOptionGeneric : ComponentBase { /// - /// 获得/设置 显示名称 + /// 获得/设置 显示名称 + /// Get/Set Display Name + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 选项值 + /// 获得/设置 选项值 + /// Get/Set Option Value + /// 10.2.2 /// [Parameter] public TValue? Value { get; set; } /// - /// 获得/设置 是否选中 默认 false + /// 获得/设置 是否选中 默认 false + /// Get/Set Whether selected. Default false + /// 10.2.2 /// [Parameter] public bool Active { get; set; } /// - /// 获得/设置 是否禁用 默认 false + /// 获得/设置 是否禁用 默认 false + /// Get/Set Whether disabled. Default false + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// 获得/设置 分组名称 + /// 获得/设置 分组名称 + /// Get/Set Group Name + /// 10.2.2 /// [Parameter] public string? GroupName { get; set; } /// - /// 父组件通过级联参数获得 + /// 父组件通过级联参数获得 + /// Parent component obtained through cascading parameter /// [CascadingParameter] private ISelectGeneric? Container { get; set; } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { diff --git a/src/BootstrapBlazor/Components/Skeleton/SkeletonAvatar.razor.cs b/src/BootstrapBlazor/Components/Skeleton/SkeletonAvatar.razor.cs index a7eaed5b367..42c082fee4c 100644 --- a/src/BootstrapBlazor/Components/Skeleton/SkeletonAvatar.razor.cs +++ b/src/BootstrapBlazor/Components/Skeleton/SkeletonAvatar.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// +/// SkeletonAvatar 组件 +/// SkeletonAvatar Component /// public sealed partial class SkeletonAvatar { @@ -15,7 +16,9 @@ public sealed partial class SkeletonAvatar .Build(); /// - /// 获得/设置 是否为圆形 默认为 false + /// 获得/设置 是否为圆形 默认为 false + /// Get/Set Whether circle. Default false + /// 10.2.2 /// [Parameter] public bool Circle { get; set; } diff --git a/src/BootstrapBlazor/Components/Skeleton/SkeletonBase.cs b/src/BootstrapBlazor/Components/Skeleton/SkeletonBase.cs index 0a5a5bc8440..c1c2db94307 100644 --- a/src/BootstrapBlazor/Components/Skeleton/SkeletonBase.cs +++ b/src/BootstrapBlazor/Components/Skeleton/SkeletonBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,30 @@ namespace BootstrapBlazor.Components; /// -/// 骨架屏组件基类 +/// 骨架屏组件基类 +/// Skeleton Base Component /// public abstract class SkeletonBase : BootstrapComponentBase { /// - /// 获得/设置 是否圆角 默认为 true + /// 获得/设置 是否圆角 默认为 true + /// Get/Set Whether round. Default true + /// 10.2.2 /// [Parameter] public bool Round { get; set; } = true; /// - /// 获得/设置 是否显示动画 默认为 true + /// 获得/设置 是否显示动画 默认为 true + /// Get/Set Whether active. Default true + /// 10.2.2 /// [Parameter] public bool Active { get; set; } = true; /// - /// 获得 样式 + /// 获得 样式 + /// Get Class Name /// protected string? ClassString => CssBuilder.Default("skeleton-content") .AddClass("active", Active) diff --git a/src/BootstrapBlazor/Components/Skeleton/SkeletonTable.razor.cs b/src/BootstrapBlazor/Components/Skeleton/SkeletonTable.razor.cs index c15cad68cc3..b3fb67e2dc1 100644 --- a/src/BootstrapBlazor/Components/Skeleton/SkeletonTable.razor.cs +++ b/src/BootstrapBlazor/Components/Skeleton/SkeletonTable.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// 表格骨架屏组件 +/// 表格骨架屏组件 +/// SkeletonTable Component /// public partial class SkeletonTable { /// - /// 获得/设置 行数 默认 7 行 + /// 获得/设置 行数 默认 7 行 + /// Get/Set Rows. Default 7 + /// 10.2.2 /// [Parameter] public int Rows { get; set; } = 7; /// - /// 获得/设置 行数 默认 3 列 + /// 获得/设置 行数 默认 3 列 + /// Get/Set Columns. Default 3 + /// 10.2.2 /// [Parameter] public int Columns { get; set; } = 3; /// - /// 获得/设置 是否显示工具栏 + /// 获得/设置 是否显示工具栏 + /// Get/Set Whether to show toolbar + /// 10.2.2 /// [Parameter] public bool ShowToolbar { get; set; } = true; diff --git a/src/BootstrapBlazor/Components/Skeleton/SkeletonTree.razor.cs b/src/BootstrapBlazor/Components/Skeleton/SkeletonTree.razor.cs index a1addaf1754..9e104181bb7 100644 --- a/src/BootstrapBlazor/Components/Skeleton/SkeletonTree.razor.cs +++ b/src/BootstrapBlazor/Components/Skeleton/SkeletonTree.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 树状组件骨架屏组件 +/// 树状组件骨架屏组件 +/// SkeletonTree Component /// public partial class SkeletonTree { @@ -16,7 +17,9 @@ public partial class SkeletonTree .Build(); /// - /// 获得/设置 Loading 图标 + /// 获得/设置 Loading 图标 + /// Get/Set Loading Icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } diff --git a/src/BootstrapBlazor/Components/Slider/Slider.razor.cs b/src/BootstrapBlazor/Components/Slider/Slider.razor.cs index 203969ee879..e7d31657500 100644 --- a/src/BootstrapBlazor/Components/Slider/Slider.razor.cs +++ b/src/BootstrapBlazor/Components/Slider/Slider.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,33 +6,41 @@ namespace BootstrapBlazor.Components; /// -/// Range 组件 +/// Range 组件 +/// Slider Component /// public partial class Slider { /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Class Name /// private string? ClassString => CssBuilder.Default("form-range") .AddClassFromAttributes(AdditionalAttributes) .Build(); /// - /// 获得/设置 最小值 默认为 null 未设置 + /// 获得/设置 最小值 默认为 null 未设置 + /// Get/Set Min Value. Default null + /// 10.2.2 /// [Parameter] [NotNull] public TValue? Min { get; set; } /// - /// 获得/设置 最大值 默认为 null 未设置 + /// 获得/设置 最大值 默认为 null 未设置 + /// Get/Set Max Value. Default null + /// 10.2.2 /// [Parameter] [NotNull] public TValue? Max { get; set; } /// - /// 获得/设置 步长 默认为 null 未设置 + /// 获得/设置 步长 默认为 null 未设置 + /// Get/Set Step. Default null + /// 10.2.2 /// [Parameter] [NotNull] diff --git a/src/BootstrapBlazor/Components/SortableList/ISortableList.cs b/src/BootstrapBlazor/Components/SortableList/ISortableList.cs index a0331049674..3fa9e666139 100644 --- a/src/BootstrapBlazor/Components/SortableList/ISortableList.cs +++ b/src/BootstrapBlazor/Components/SortableList/ISortableList.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// SortableList 组件接口 +/// SortableList 组件接口 +/// SortableList Component Interface /// public interface ISortableList { diff --git a/src/BootstrapBlazor/Components/Speech/IRecognizerProvider.cs b/src/BootstrapBlazor/Components/Speech/IRecognizerProvider.cs index 7173fe86b48..0ee936a0139 100644 --- a/src/BootstrapBlazor/Components/Speech/IRecognizerProvider.cs +++ b/src/BootstrapBlazor/Components/Speech/IRecognizerProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// ISpeechService 服务接口定义 +/// ISpeechService 服务接口定义 +/// ISpeechService Interface Definition /// public interface IRecognizerProvider { /// - /// 识别语音回调方法 + /// 识别语音回调方法 + /// Recognize Speech Callback Method /// /// Task InvokeAsync(RecognizerOption option); diff --git a/src/BootstrapBlazor/Components/Speech/ISynthesizerProvider.cs b/src/BootstrapBlazor/Components/Speech/ISynthesizerProvider.cs index 32fad8a68c8..6aea41adf74 100644 --- a/src/BootstrapBlazor/Components/Speech/ISynthesizerProvider.cs +++ b/src/BootstrapBlazor/Components/Speech/ISynthesizerProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// ISynthesizerProvider 语音合成接口 +/// ISynthesizerProvider 语音合成接口 +/// ISynthesizerProvider Speech Synthesis Interface /// public interface ISynthesizerProvider { /// - /// 语音合成回调方法 + /// 语音合成回调方法 + /// Speech Synthesis Callback Method /// /// Task InvokeAsync(SynthesizerOption option); diff --git a/src/BootstrapBlazor/Components/Speech/RecognizerOption.cs b/src/BootstrapBlazor/Components/Speech/RecognizerOption.cs index f461eec13f5..6b011f70aa8 100644 --- a/src/BootstrapBlazor/Components/Speech/RecognizerOption.cs +++ b/src/BootstrapBlazor/Components/Speech/RecognizerOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,38 @@ namespace BootstrapBlazor.Components; /// -/// 语音识别配置类 +/// 语音识别配置类 +/// Speech Recognition Option Class /// public class RecognizerOption { /// - /// 获得/设置 语音识别指令名称 默认 null + /// 获得/设置 语音识别指令名称 默认 null + /// Get/Set Speech Recognition Command Name. Default null /// public string? MethodName { get; set; } /// - /// 获得/设置 回调方法 默认 null + /// 获得/设置 回调方法 默认 null + /// Get/Set Callback Method. Default null /// public Func? Callback { get; set; } /// - /// 获得/设置 识别语音文化 默认 zh-CN + /// 获得/设置 识别语音文化 默认 zh-CN + /// Get/Set Speech Recognition Culture. Default zh-CN /// public string SpeechRecognitionLanguage { get; set; } = "zh-CN"; /// - /// 获得/设置 结果文化 默认 zh-CN + /// 获得/设置 结果文化 默认 zh-CN + /// Get/Set Result Culture. Default zh-CN /// public string TargetLanguage { get; set; } = "zh-CN"; /// - /// 获得/设置 自动识别时间 默认 5000 设置 0 时禁用需要手动关闭 + /// 获得/设置 自动识别时间 默认 5000 设置 0 时禁用需要手动关闭 + /// Get/Set Auto Recognition Time. Default 5000. Set 0 to disable and need to close manually /// public int AutoRecoginzerElapsedMilliseconds { get; set; } = 5000; } diff --git a/src/BootstrapBlazor/Components/Speech/RecognizerService.cs b/src/BootstrapBlazor/Components/Speech/RecognizerService.cs index 34bd97b2c67..7eb49056c5d 100644 --- a/src/BootstrapBlazor/Components/Speech/RecognizerService.cs +++ b/src/BootstrapBlazor/Components/Speech/RecognizerService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 语音识别服务 +/// 语音识别服务 +/// Speech Recognition Service /// public class RecognizerService(IRecognizerProvider provider) { /// - /// 语音识别回调方法 + /// 语音识别回调方法 + /// Speech Recognition Callback Method /// /// /// diff --git a/src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs b/src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs index 6b650ec930b..24d40678b1f 100644 --- a/src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs +++ b/src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,30 +6,39 @@ namespace BootstrapBlazor.Components; /// -/// 语音识别波形图组件 +/// 语音识别波形图组件 +/// Speech Recognition Waveform Component /// public partial class SpeechWave : IDisposable { /// - /// 获得/设置 是否显示波形图 默认 false + /// 获得/设置 是否显示波形图 默认 false + /// Get/Set Whether to show waveform. Default false + /// 10.2.2 /// [Parameter] public bool Show { get; set; } /// - /// 获得/设置 是否显示已用时长 默认 true + /// 获得/设置 是否显示已用时长 默认 true + /// Get/Set Whether to show used time. Default true + /// 10.2.2 /// [Parameter] public bool ShowUsedTime { get; set; } = true; /// - /// 获得/设置 倒计时结束时回调委托 + /// 获得/设置 倒计时结束时回调委托 + /// Get/Set Callback delegate when countdown ends + /// 10.2.2 /// [Parameter] public Func? OnTimeout { get; set; } /// - /// 获得/设置 总时长 默认 60 000 毫秒 + /// 获得/设置 总时长 默认 60 000 毫秒 + /// Get/Set Total Time. Default 60000 ms + /// 10.2.2 /// [Parameter] public int TotalTime { get; set; } = 60 * 1000; @@ -119,7 +128,8 @@ private void Stop() } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose 方法 /// /// protected virtual void Dispose(bool disposing) @@ -131,7 +141,8 @@ protected virtual void Dispose(bool disposing) } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose 方法 /// /// public void Dispose() diff --git a/src/BootstrapBlazor/Components/Speech/SynthesizerOption.cs b/src/BootstrapBlazor/Components/Speech/SynthesizerOption.cs index ab1bc055c26..d8b906a205b 100644 --- a/src/BootstrapBlazor/Components/Speech/SynthesizerOption.cs +++ b/src/BootstrapBlazor/Components/Speech/SynthesizerOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,38 @@ namespace BootstrapBlazor.Components; /// -/// 语音合成配置类 +/// 语音合成配置类 +/// Speech Synthesis Option Class /// public class SynthesizerOption { /// - /// 获得/设置 语音识别指令名称 默认 null + /// 获得/设置 语音识别指令名称 默认 null + /// Get/Set Speech Recognition Command Name. Default null /// public string? MethodName { get; set; } /// - /// 获得/设置 语音合成文本内容 默认 null + /// 获得/设置 语音合成文本内容 默认 null + /// Get/Set Speech Synthesis Text Content. Default null /// public string? Text { get; set; } /// - /// 获得/设置 回调方法 默认 null + /// 获得/设置 回调方法 默认 null + /// Get/Set Callback Method. Default null /// public Func? Callback { get; set; } /// - /// 获得/设置 识别语音文化 默认 zh-CN + /// 获得/设置 识别语音文化 默认 zh-CN + /// Get/Set Speech Synthesis Culture. Default zh-CN /// public string SpeechSynthesisLanguage { get; set; } = "zh-CN"; /// - /// 获得/设置 结果文化 默认 zh-CN + /// 获得/设置 结果文化 默认 zh-CN + /// Get/Set Result Culture. Default zh-CN /// public string SpeechSynthesisVoiceName { get; set; } = "zh-CN-XiaoxiaoNeural"; } diff --git a/src/BootstrapBlazor/Components/Speech/SynthesizerService.cs b/src/BootstrapBlazor/Components/Speech/SynthesizerService.cs index 0b33eff87dc..1bfbda69527 100644 --- a/src/BootstrapBlazor/Components/Speech/SynthesizerService.cs +++ b/src/BootstrapBlazor/Components/Speech/SynthesizerService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// 语音合成服务 +/// 语音合成服务 +/// Speech Synthesis Service /// /// public class SynthesizerService(ISynthesizerProvider provider) { /// - /// 语音合成回调方法 + /// 语音合成回调方法 + /// Speech Synthesis Callback Method /// /// /// diff --git a/src/BootstrapBlazor/Components/Spinner/Spinner.razor.cs b/src/BootstrapBlazor/Components/Spinner/Spinner.razor.cs index f0337f89e75..dcd04454f73 100644 --- a/src/BootstrapBlazor/Components/Spinner/Spinner.razor.cs +++ b/src/BootstrapBlazor/Components/Spinner/Spinner.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Spinner 组件基类 +/// Spinner 组件基类 +/// Spinner Component /// public partial class Spinner { /// - /// 获取Spinner样式 + /// 获取Spinner样式 + /// Get Spinner Class Name /// protected string? ClassString => CssBuilder.Default("spinner") .AddClass($"spinner-{SpinnerType.ToDescriptionString()}") @@ -21,19 +23,25 @@ public partial class Spinner .Build(); /// - /// 获得/设置 Spinner 颜色 默认 None 无设置 + /// 获得/设置 Spinner 颜色 默认 None 无设置 + /// Get/Set Spinner Color. Default None + /// 10.2.2 /// [Parameter] public Color Color { get; set; } /// - /// 获得 / 设置 Spinner 大小 默认 None 无设置 + /// 获得 / 设置 Spinner 大小 默认 None 无设置 + /// Get/Set Spinner Size. Default None + /// 10.2.2 /// [Parameter] public Size Size { get; set; } /// - /// 获得/设置 Spinner 类型 默认为 Border + /// 获得/设置 Spinner 类型 默认为 Border + /// Get/Set Spinner Type. Default Border + /// 10.2.2 /// [Parameter] public SpinnerType SpinnerType { get; set; } diff --git a/src/BootstrapBlazor/Components/Split/Split.razor.cs b/src/BootstrapBlazor/Components/Split/Split.razor.cs index bbb9a263971..a3de2cea6db 100644 --- a/src/BootstrapBlazor/Components/Split/Split.razor.cs +++ b/src/BootstrapBlazor/Components/Split/Split.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,66 +6,87 @@ namespace BootstrapBlazor.Components; /// -/// Split 组件 +/// Split 组件 +/// Split Component /// public sealed partial class Split { /// - /// 获取 是否开启折叠功能 默认 false + /// 获取 是否开启折叠功能 默认 false + /// Get/Set Whether to enable collapsible function. Default false + /// 10.2.2 /// [Parameter] public bool IsCollapsible { get; set; } /// - /// 获取 是否显示拖动条 默认 true + /// 获取 是否显示拖动条 默认 true + /// Get/Set Whether to show drag bar. Default true + /// 10.2.2 /// [Parameter] public bool ShowBarHandle { get; set; } = true; /// - /// 获得/设置 开启 后,恢复时是否保持原始大小 默认 true + /// 获得/设置 开启 后,恢复时是否保持原始大小 默认 true + /// Get/Set Whether to keep original size when restoring after enabling . Default true + /// 10.2.2 /// [Parameter] public bool IsKeepOriginalSize { get; set; } = true; /// - /// 获得/设置 是否垂直分割 + /// 获得/设置 是否垂直分割 + /// Get/Set Whether vertical split + /// 10.2.2 /// [Parameter] public bool IsVertical { get; set; } /// - /// 获得/设置 第一个窗格初始化位置占比 默认为 50% + /// 获得/设置 第一个窗格初始化位置占比 默认为 50% + /// Get/Set First panel initial position ratio. Default 50% + /// 10.2.2 /// [Parameter] public string Basis { get; set; } = "50%"; /// - /// 获得/设置 第一个窗格模板 + /// 获得/设置 第一个窗格模板 + /// Get/Set First Panel Template + /// 10.2.2 /// [Parameter] public RenderFragment? FirstPaneTemplate { get; set; } /// - /// 获得/设置 第一个窗格模板 支持任意单位如 10px 20% 5em 1rem 未提供单位时默认为 px + /// 获得/设置 第一个窗格最小宽度 支持任意单位如 10px 20% 5em 1rem 未提供单位时默认为 px + /// Get/Set First Panel Minimum Size. Supports any unit e.g. 10px 20% 5em 1rem. Default unit is px + /// 10.2.2 /// [Parameter] public string? FirstPaneMinimumSize { get; set; } /// - /// 获得/设置 第二个窗格模板 支持任意单位如 10px 20% 5em 1rem 未提供单位时默认为 px + /// 获得/设置 第二个窗格模板 + /// Get/Set Second Panel Template + /// 10.2.2 /// [Parameter] public RenderFragment? SecondPaneTemplate { get; set; } /// - /// 获得/设置 第一个窗格模板 + /// 获得/设置 第二个窗格最小宽度 + /// Get/Set Second Panel Minimum Size + /// 10.2.2 /// [Parameter] public string? SecondPaneMinimumSize { get; set; } /// - /// 获得/设置 窗格折叠时回调方法 参数 bool 值为 true 是表示已折叠 值为 false 表示第二个已折叠 + /// 获得/设置 窗格折叠时回调方法 参数 bool 值为 true 是表示已折叠 值为 false 表示第二个已折叠 + /// Get/Set Callback method when panel is collapsed. parameter bool value true means collapsed, false means second panel collapsed + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 OnResizedAsync 回调方法 Deprecated. Please use OnResizedAsync")] @@ -73,13 +94,16 @@ public sealed partial class Split public Func? OnCollapsedAsync { get; set; } /// - /// 获得/设置 窗格尺寸改变时回调方法 可参阅 + /// 获得/设置 窗格尺寸改变时回调方法 可参阅 + /// Get/Set Callback method when panel size changes. Refer to + /// 10.2.2 /// [Parameter] public Func? OnResizedAsync { get; set; } /// - /// 获得 组件样式 + /// 获得 组件样式 + /// Get Component Class Name /// private string? ClassString => CssBuilder.Default("split") .AddClass("is-vertical", IsVertical) @@ -87,7 +111,8 @@ public sealed partial class Split .Build(); /// - /// 获得 第一个窗格 Style + /// 获得 第一个窗格 Style + /// Get First Panel Style /// private string? StyleString => CssBuilder.Default() .AddClass($"flex-basis: {Basis.ConvertToPercentString()};") @@ -125,14 +150,16 @@ protected override async Task OnAfterRenderAsync(bool firstRender) }); /// - /// 设置左侧窗格宽度 + /// 设置左侧窗格宽度 + /// Set Left Panel Width /// - /// 可以是百分比或者其他单位 + /// 可以是百分比或者其他单位可以是百分比或者其他单位 /// public Task SetLeftWidth(string leftWidth) => InvokeVoidAsync("setLeft", Id, leftWidth); /// - /// 窗格折叠时回调方法 由 JavaScript 调用 + /// 窗格折叠时回调方法 由 JavaScript 调用 + /// Callback method when panel collapsed. Called by JavaScript /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/Split/SplitterResizedEventArgs.cs b/src/BootstrapBlazor/Components/Split/SplitterResizedEventArgs.cs index 18abaa3eafc..642a2c3cad2 100644 --- a/src/BootstrapBlazor/Components/Split/SplitterResizedEventArgs.cs +++ b/src/BootstrapBlazor/Components/Split/SplitterResizedEventArgs.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// SplitterResizedEventArgs 类 +/// SplitterResizedEventArgs 类 +/// SplitterResizedEventArgs Class /// public class SplitterResizedEventArgs(string left) { /// - /// Gets the size of panel 1 (top/left) after a resize operation. + /// 获得 the size of panel 1 (top/left) after a resize operation. + /// Gets the size of panel 1 (top/left) after a resize operation. /// public string FirstPanelSize => left; /// - /// 获得 组件第一个面板是否折叠 + /// 获得 组件第一个面板是否折叠 + /// Get Whether the first panel of the component is collapsed /// public bool IsCollapsed => left == "0%"; /// - /// 获得 组件第一个面板是否展开 + /// 获得 组件第一个面板是否展开 + /// Get Whether the first panel of the component is expanded /// public bool IsExpanded => left == "100%"; } diff --git a/src/BootstrapBlazor/Components/Stack/Stack.razor.cs b/src/BootstrapBlazor/Components/Stack/Stack.razor.cs index cb8de178a3e..8abb4f95424 100644 --- a/src/BootstrapBlazor/Components/Stack/Stack.razor.cs +++ b/src/BootstrapBlazor/Components/Stack/Stack.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// +/// Stack 组件 +/// Stack Component /// public partial class Stack { @@ -30,37 +31,49 @@ public partial class Stack .Build(); /// - /// 获得/设置 内容 + /// 获得/设置 内容 + /// Get/Set Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否为行布局 默认 false + /// 获得/设置 是否为行布局 默认 false + /// Get/Set Is Row Layout. Default false + /// 10.2.2 /// [Parameter] public bool IsRow { get; set; } /// - /// 获得/设置 是否反向布局 默认 false + /// 获得/设置 是否反向布局 默认 false + /// Get/Set Is Reverse Layout. Default false + /// 10.2.2 /// [Parameter] public bool IsReverse { get; set; } /// - /// 获得/设置 是否允许折行 默认 false + /// 获得/设置 是否允许折行 默认 false + /// Get/Set Is Wrap. Default false + /// 10.2.2 /// [Parameter] public bool IsWrap { get; set; } /// - /// 获得/设置 垂直布局模式 默认 StackAlignItems.Stretch + /// 获得/设置 垂直布局模式 默认 StackAlignItems.Stretch + /// Get/Set Align Items. Default StackAlignItems.Stretch + /// 10.2.2 /// [Parameter] public StackAlignItems AlignItems { get; set; } /// - /// 获得/设置 水平布局调整 默认 StackJustifyContent.Start + /// 获得/设置 水平布局调整 默认 StackJustifyContent.Start + /// Get/Set Justify Content. Default StackJustifyContent.Start + /// 10.2.2 /// [Parameter] public StackJustifyContent Justify { get; set; } @@ -68,7 +81,8 @@ public partial class Stack private readonly List _items = []; /// - /// 添加子项 + /// 添加子项 + /// Add Item /// public void AddItem(StackItem item) { @@ -76,7 +90,8 @@ public void AddItem(StackItem item) } /// - /// 移除子项 + /// 移除子项 + /// Remove Item /// /// public void RemoveItem(StackItem item) diff --git a/src/BootstrapBlazor/Components/Stack/StackItem.cs b/src/BootstrapBlazor/Components/Stack/StackItem.cs index f3a9c6f1c5d..c50d15a456f 100644 --- a/src/BootstrapBlazor/Components/Stack/StackItem.cs +++ b/src/BootstrapBlazor/Components/Stack/StackItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// Stack Item 组件 +/// Stack Item 组件 +/// Stack Item Component /// public class StackItem : BootstrapComponentBase, IDisposable { @@ -16,19 +17,25 @@ public class StackItem : BootstrapComponentBase, IDisposable private Stack? Stack { get; set; } /// - /// 获得/设置 内容 + /// 获得/设置 内容 + /// Get/Set Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否自动充满 默认 false + /// 获得/设置 是否自动充满 默认 false + /// Get/Set Is Fill. Default false + /// 10.2.2 /// [Parameter] public bool IsFill { get; set; } /// - /// 获得/设置 垂直布局模式 默认 StackAlignItems.Stretch + /// 获得/设置 垂直布局模式 默认 StackAlignItems.Stretch + /// Get/Set Align Self. Default StackAlignItems.Stretch + /// 10.2.2 /// [Parameter] public StackAlignItems AlignSelf { get; set; } @@ -56,7 +63,8 @@ protected override void BuildRenderTree(RenderTreeBuilder builder) } /// - /// 销毁资源 + /// 销毁资源 + /// Dispose /// /// protected virtual void Dispose(bool disposing) @@ -68,7 +76,8 @@ protected virtual void Dispose(bool disposing) } /// - /// 销毁资源 + /// 销毁资源 + /// Dispose /// /// public void Dispose() diff --git a/src/BootstrapBlazor/Components/Step/Step.razor.cs b/src/BootstrapBlazor/Components/Step/Step.razor.cs index f2e804b278e..9702fedcbc6 100644 --- a/src/BootstrapBlazor/Components/Step/Step.razor.cs +++ b/src/BootstrapBlazor/Components/Step/Step.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,43 +6,56 @@ namespace BootstrapBlazor.Components; /// -/// Step 组件类 +/// Step 组件类 +/// Step Component Class /// public partial class Step { /// - /// 获得/设置 步骤集合 + /// 获得/设置 步骤集合 + /// Get/Set Items + /// 10.2.2 /// [Parameter] [NotNull] public List? Items { get; set; } /// - /// 获得/设置 是否垂直渲染 默认 false 水平渲染 + /// 获得/设置 是否垂直渲染 默认 false 水平渲染 + /// Get/Set Is Vertical. Default false (Horizontal) + /// 10.2.2 /// [Parameter] public bool IsVertical { get; set; } /// - /// 获得/设置 当前步骤索引 默认 0 + /// 获得/设置 当前步骤索引 默认 0 + /// Get/Set Current Step Index. Default 0 + /// 10.2.2 /// [Parameter] public int StepIndex { get; set; } /// - /// 获得/设置 组件内容实例 + /// 获得/设置 组件内容实例 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 步骤全部完成时模板 默认 null + /// 获得/设置 步骤全部完成时模板 默认 null + /// Get/Set Finished Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? FinishedTemplate { get; set; } /// - /// 获得/设置 步骤全部完成时回调方法 + /// 获得/设置 步骤全部完成时回调方法 + /// Get/Set Callback method when all steps are finished + /// 10.2.2 /// [Parameter] public Func? OnFinishedCallback { get; set; } @@ -54,12 +67,14 @@ public partial class Step private int _currentStepIndex; /// - /// 获得当前步骤索引(只读) + /// 获得当前步骤索引(只读) + /// Get Current Step Index (Read-only) /// public int CurrentStepIndex => _currentStepIndex; /// - /// 获得 组件样式字符串 + /// 获得 组件样式字符串 + /// Get Component Class String /// private string? ClassString => CssBuilder.Default("step") .AddClass("step-vertical", IsVertical) @@ -121,7 +136,8 @@ protected override void OnParametersSet() } /// - /// 移动到上一步方法 返回当前 StepIndex 值 + /// 移动到上一步方法 返回当前 StepIndex 值 + /// Move to previous step method. Return current StepIndex /// public int Prev() { @@ -131,7 +147,8 @@ public int Prev() } /// - /// 移动到下一步方法 返回当前 StepIndex 值 + /// 移动到下一步方法 返回当前 StepIndex 值 + /// Move to next step method. Return current StepIndex /// public async Task Next() { @@ -145,7 +162,8 @@ public async Task Next() } /// - /// 重置步骤方法 + /// 重置步骤方法 + /// Reset Step Method /// public void Reset() { @@ -154,7 +172,8 @@ public void Reset() } /// - /// 添加步骤到组件中 + /// 添加步骤到组件中 + /// Add step to component /// /// public void Add(StepOption option) @@ -163,7 +182,8 @@ public void Add(StepOption option) } /// - /// 插入步骤到组件中 + /// 插入步骤到组件中 + /// Insert step to component /// /// /// @@ -173,7 +193,8 @@ public void Insert(int index, StepOption option) } /// - /// 从组件中移除步骤 + /// 从组件中移除步骤 + /// Remove step from component /// /// public void Remove(StepOption option) diff --git a/src/BootstrapBlazor/Components/Step/StepItem.cs b/src/BootstrapBlazor/Components/Step/StepItem.cs index 42f9525dc03..2dd6fadd3d5 100644 --- a/src/BootstrapBlazor/Components/Step/StepItem.cs +++ b/src/BootstrapBlazor/Components/Step/StepItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,60 +6,78 @@ namespace BootstrapBlazor.Components; /// -/// StepItem 组件 +/// StepItem 组件 +/// StepItem Component /// public class StepItem : ComponentBase, IDisposable { /// - /// 获得/设置 步骤显示文字 + /// 获得/设置 步骤显示文字 + /// Get/Set Text + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 步骤显示文字 + /// 获得/设置 步骤显示文字 + /// Get/Set Title + /// 10.2.2 /// [Parameter] public string? Title { get; set; } /// - /// 获得/设置 步骤显示图标 + /// 获得/设置 步骤显示图标 + /// Get/Set Icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// 获得/设置 步骤完成显示图标 + /// 获得/设置 步骤完成显示图标 + /// Get/Set Finished Icon + /// 10.2.2 /// [Parameter] public string? FinishedIcon { get; set; } /// - /// 获得/设置 描述信息 + /// 获得/设置 描述信息 + /// Get/Set Description + /// 10.2.2 /// [Parameter] public string? Description { get; set; } /// - /// 获得/设置 Header 模板 + /// 获得/设置 Header 模板 + /// Get/Set Header Template + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 Title 模板 + /// 获得/设置 Title 模板 + /// Get/Set Title Template + /// 10.2.2 /// [Parameter] public RenderFragment? TitleTemplate { get; set; } /// - /// 获得/设置 组件内容实例 + /// 获得/设置 组件内容实例 + /// Get/Set Child Content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 父级组件 Step 实例 + /// 获得/设置 父级组件 Step 实例 + /// Get/Set Parent Step Component Instance /// [CascadingParameter] private Step? Step { get; set; } @@ -94,7 +112,8 @@ protected override void OnParametersSet() } /// - /// 销毁方法 + /// 销毁方法 + /// Dispose Method /// /// protected virtual void Dispose(bool disposing) diff --git a/src/BootstrapBlazor/Components/Step/StepOption.cs b/src/BootstrapBlazor/Components/Step/StepOption.cs index 3a55e0e6f82..c02945f9914 100644 --- a/src/BootstrapBlazor/Components/Step/StepOption.cs +++ b/src/BootstrapBlazor/Components/Step/StepOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,47 +6,56 @@ namespace BootstrapBlazor.Components; /// -/// Step 组件项类 +/// Step 组件项类 +/// Step Component Option Class /// public class StepOption { /// - /// 获得/设置 步骤显示文字 + /// 获得/设置 步骤显示文字 + /// Get/Set Text /// public string? Text { get; set; } /// - /// 获得/设置 步骤显示图标 + /// 获得/设置 步骤显示图标 + /// Get/Set Icon /// public string? Icon { get; set; } /// - /// 获得/设置 步骤完成显示图标 + /// 获得/设置 步骤完成显示图标 + /// Get/Set Finished Icon /// public string? FinishedIcon { get; set; } /// - /// 获得/设置 步骤显示标题 + /// 获得/设置 步骤显示标题 + /// Get/Set Title /// public string? Title { get; set; } /// - /// 获得/设置 描述信息 + /// 获得/设置 描述信息 + /// Get/Set Description /// public string? Description { get; set; } /// - /// 获得/设置 Header 模板 + /// 获得/设置 Header 模板 + /// Get/Set Header Template /// public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 Title 模板 + /// 获得/设置 Title 模板 + /// Get/Set Title Template /// public RenderFragment? TitleTemplate { get; set; } /// - /// 获得/设置 每个 step 内容模板 + /// 获得/设置 每个 step 内容模板 + /// Get/Set Template /// public RenderFragment? Template { get; set; } } diff --git a/src/BootstrapBlazor/Components/SweetAlert/SwalOption.cs b/src/BootstrapBlazor/Components/SweetAlert/SwalOption.cs index a129390dd23..f265c39f140 100644 --- a/src/BootstrapBlazor/Components/SweetAlert/SwalOption.cs +++ b/src/BootstrapBlazor/Components/SweetAlert/SwalOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,103 +6,123 @@ namespace BootstrapBlazor.Components; /// -/// SweetAlert Option 配置类 +/// SweetAlert Option 配置类 +/// SweetAlert Option Configuration Class /// public class SwalOption : PopupOptionBase { /// - /// 获得/设置 相关弹窗实例 + /// 获得/设置 相关弹窗实例 + /// Get/Set Modal Instance /// internal Modal? Modal { get; set; } /// - /// 获得/设置 模态弹窗任务上下文 + /// 获得/设置 模态弹窗任务上下文 + /// Get/Set Modal Task Context /// [NotNull] internal SweetContext? ConfirmContext { get; set; } /// - /// 获得/设置 是否为确认弹窗模式 此属性给模态弹窗时使用 默认为 false + /// 获得/设置 是否为确认弹窗模式 此属性给模态弹窗时使用 默认为 false + /// Get/Set Whether is confirm dialog mode. Used for modal dialog. Default false /// public bool IsConfirm { get; set; } /// - /// 获得/设置 提示类型 默认为 Success + /// 获得/设置 提示类型 默认为 Success + /// Get/Set Category. Default Success /// public SwalCategory Category { get; set; } /// - /// 获得/设置 弹窗标题 + /// 获得/设置 弹窗标题 + /// Get/Set Title /// public string? Title { get; set; } /// - /// 获得/设置 ModalBody 组件 + /// 获得/设置 ModalBody 组件 + /// Get/Set ModalBody Component /// public RenderFragment? BodyTemplate { get; set; } /// - /// 获得/设置 Footer 组件 + /// 获得/设置 Footer 组件 + /// Get/Set Footer Component /// public RenderFragment? FooterTemplate { get; set; } /// - /// 获得/设置 是否显示关闭按钮 默认为 true 显示 + /// 获得/设置 是否显示关闭按钮 默认为 true 显示 + /// Get/Set Whether to show close button. Default true /// public bool ShowClose { get; set; } = true; /// - /// 获得/设置 是否显示 Footer 默认 false 不显示 + /// 获得/设置 是否显示 Footer 默认 false 不显示 + /// Get/Set Whether to show footer. Default false /// public bool ShowFooter { get; set; } /// - /// 获得/设置 按钮模板 + /// 获得/设置 按钮模板 + /// Get/Set Button Template /// public RenderFragment? ButtonTemplate { get; set; } /// - /// 获得/设置 关闭按钮图标 默认 fa-solid fa-xmark + /// 获得/设置 关闭按钮图标 默认 fa-solid fa-xmark + /// Get/Set Close Button Icon. Default fa-solid fa-xmark /// public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 确认按钮图标 默认 fa-solid fa-check + /// 获得/设置 确认按钮图标 默认 fa-solid fa-check + /// Get/Set Confirm Button Icon. Default fa-solid fa-check /// public string? ConfirmButtonIcon { get; set; } /// - /// 获得/设置 关闭按钮文字 默认为 关闭 + /// 获得/设置 关闭按钮文字 默认为 关闭 + /// Get/Set Close Button Text. Default Close /// public string? CloseButtonText { get; set; } /// - /// 获得/设置 确认按钮文字 默认为 确认 + /// 获得/设置 确认按钮文字 默认为 确认 + /// Get/Set Confirm Button Text. Default Confirm /// public string? ConfirmButtonText { get; set; } /// - /// 获得/设置 取消按钮文字 默认为 取消 + /// 获得/设置 取消按钮文字 默认为 取消 + /// Get/Set Cancel Button Text. Default Cancel /// public string? CancelButtonText { get; set; } /// - /// 获得/设置 弹窗自定义样式 + /// 获得/设置 弹窗自定义样式 + /// Get/Set Custom Class /// public string? Class { get; set; } /// - /// 获得/设置 关闭弹窗回调方法 + /// 获得/设置 关闭弹窗回调方法 + /// Get/Set Callback method when closing /// public Func? OnCloseAsync { get; set; } /// - /// 获得/设置 点击 Confirm 按钮回调方法 用于模态对话框 + /// 获得/设置 点击 Confirm 按钮回调方法 用于模态对话框 + /// Get/Set Callback method when clicking Confirm button. Used for modal dialog /// public Func? OnConfirmAsync { get; set; } /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public SwalOption() { @@ -110,7 +130,8 @@ public SwalOption() } /// - /// 将参数转换为组件属性方法 + /// 将参数转换为组件属性方法 + /// Convert parameters to component attributes method /// /// public Dictionary ToAttributes() @@ -138,9 +159,13 @@ public Dictionary ToAttributes() } /// - /// 关闭弹窗方法 + /// 关闭弹窗方法 + /// Close Dialog Method /// - /// 模态弹窗返回值 默认为 true + /// + /// 模态弹窗返回值 默认为 true + /// Modal dialog return value. Default true + /// public async Task CloseAsync(bool returnValue = true) { if (Modal != null) diff --git a/src/BootstrapBlazor/Components/SweetAlert/SwalService.cs b/src/BootstrapBlazor/Components/SweetAlert/SwalService.cs index f1ef9f802bb..0b354b5ec0d 100644 --- a/src/BootstrapBlazor/Components/SweetAlert/SwalService.cs +++ b/src/BootstrapBlazor/Components/SweetAlert/SwalService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,15 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// SweetAlert 弹窗服务 +/// SweetAlert 弹窗服务 +/// SweetAlert Service /// public class SwalService(IOptionsMonitor options) : BootstrapServiceBase { /// - /// Show 方法 + /// Show 方法 + /// Show Method /// - /// 实例 - /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件 + /// Instance + /// + /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件 + /// Specify Swal component. Default null to use built-in Swal component + /// public async Task Show(SwalOption option, SweetAlert? swal = null) { if (!option.ForceDelay && options.CurrentValue.SwalDelay > 0) diff --git a/src/BootstrapBlazor/Components/SweetAlert/SweetAlert.razor.cs b/src/BootstrapBlazor/Components/SweetAlert/SweetAlert.razor.cs index e97264f477f..e3bb1a03aaf 100644 --- a/src/BootstrapBlazor/Components/SweetAlert/SweetAlert.razor.cs +++ b/src/BootstrapBlazor/Components/SweetAlert/SweetAlert.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// SweetAlert component +/// SweetAlert component +/// SweetAlert component /// public partial class SweetAlert : IAsyncDisposable { /// - /// Gets or sets the Modal container component instance + /// 获得/设置 the Modal container component 实例 + /// Gets or sets the Modal container component instance /// [NotNull] private Modal? ModalContainer { get; set; } /// - /// Gets or sets the DialogServices service instance + /// 获得/设置 the DialogServices service 实例 + /// Gets or sets the DialogServices service instance /// [Inject] [NotNull] @@ -151,7 +154,8 @@ private RenderFragment RenderDialog() => builder => private bool disposed; /// - /// Dispose method + /// Dispose method + /// Dispose method /// /// protected virtual async ValueTask DisposeAsync(bool disposing) diff --git a/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs b/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs index 28350025b94..bd394bd2e75 100644 --- a/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs +++ b/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// +/// SweetAlertBody 组件 +/// SweetAlertBody Component /// public partial class SweetAlertBody { @@ -19,102 +20,134 @@ public partial class SweetAlertBody private IStringLocalizer? Localizer { get; set; } /// - /// 获得/设置 关闭按钮文字 默认为 关闭 + /// 获得/设置 关闭按钮文字 默认为 关闭 + /// Get/Set Close Button Text. Default Close + /// 10.2.2 /// [Parameter] [NotNull] public string? CloseButtonText { get; set; } /// - /// 获得/设置 确认按钮文字 默认为 确认 + /// 获得/设置 确认按钮文字 默认为 确认 + /// Get/Set Confirm Button Text. Default Confirm + /// 10.2.2 /// [Parameter] [NotNull] public string? ConfirmButtonText { get; set; } /// - /// 获得/设置 取消按钮文字 默认为 取消 + /// 获得/设置 取消按钮文字 默认为 取消 + /// Get/Set Cancel Button Text. Default Cancel + /// 10.2.2 /// [Parameter] [NotNull] public string? CancelButtonText { get; set; } /// - /// 获得/设置 弹窗类别默认为 Success + /// 获得/设置 弹窗类别默认为 Success + /// Get/Set Category. Default Success + /// 10.2.2 /// [Parameter] public SwalCategory Category { get; set; } /// - /// 获得/设置 显示标题 + /// 获得/设置 显示标题 + /// Get/Set Title + /// 10.2.2 /// [Parameter] public string? Title { get; set; } /// - /// 获得/设置 显示内容 + /// 获得/设置 显示内容 + /// Get/Set Content + /// 10.2.2 /// [Parameter] public string? Content { get; set; } /// - /// 获得/设置 是否显示关闭按钮 默认 true 显示 + /// 获得/设置 是否显示关闭按钮 默认 true 显示 + /// Get/Set Whether to show close button. Default true + /// 10.2.2 /// [Parameter] public bool ShowClose { get; set; } = true; /// - /// 获得/设置 是否显示 Footer 默认 false 不显示 + /// 获得/设置 是否显示 Footer 默认 false 不显示 + /// Get/Set Whether to show footer. Default false + /// 10.2.2 /// [Parameter] public bool ShowFooter { get; set; } /// - /// 获得/设置 是否为确认弹窗模式 默认为 false + /// 获得/设置 是否为确认弹窗模式 默认为 false + /// Get/Set Whether is confirm dialog mode. Default false + /// 10.2.2 /// [Parameter] public bool IsConfirm { get; set; } /// - /// 获得/设置 关闭按钮图标 + /// 获得/设置 关闭按钮图标 + /// Get/Set Close Button Icon + /// 10.2.2 /// [Parameter] [NotNull] public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 确认按钮图标 + /// 获得/设置 确认按钮图标 + /// Get/Set Confirm Button Icon + /// 10.2.2 /// [Parameter] [NotNull] public string? ConfirmButtonIcon { get; set; } /// - /// 获得/设置 关闭按钮回调方法 + /// 获得/设置 关闭按钮回调方法 + /// Get/Set Close Callback Method + /// 10.2.2 /// [Parameter] public Func? OnCloseAsync { get; set; } /// - /// 获得/设置 确认按钮回调方法 + /// 获得/设置 确认按钮回调方法 + /// Get/Set Confirm Callback Method + /// 10.2.2 /// [Parameter] public Func? OnConfirmAsync { get; set; } /// - /// 获得/设置 显示内容模板 + /// 获得/设置 显示内容模板 + /// Get/Set Body Template + /// 10.2.2 /// [Parameter] public RenderFragment? BodyTemplate { get; set; } /// - /// 获得/设置 Footer 模板 + /// 获得/设置 Footer 模板 + /// Get/Set Footer Template + /// 10.2.2 /// [Parameter] public RenderFragment? FooterTemplate { get; set; } /// - /// 获得/设置 按钮模板 + /// 获得/设置 按钮模板 + /// Get/Set Button Template + /// 10.2.2 /// [Parameter] public RenderFragment? ButtonTemplate { get; set; } diff --git a/src/BootstrapBlazor/Components/SweetAlert/SweetContext.cs b/src/BootstrapBlazor/Components/SweetAlert/SweetContext.cs index 03f58f8647a..ece2b7a1606 100644 --- a/src/BootstrapBlazor/Components/SweetAlert/SweetContext.cs +++ b/src/BootstrapBlazor/Components/SweetAlert/SweetContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; internal class SweetContext { /// - /// 获得/设置 弹窗返回值 + /// 获得/设置 弹窗返回值 + /// Get/Set Dialog Return Value /// public bool Value { get; set; } /// - /// 获得/设置 弹窗任务上下文 + /// 获得/设置 弹窗任务上下文 + /// Get/Set Dialog Task Context /// [NotNull] public TaskCompletionSource? ConfirmTask { get; init; } diff --git a/src/BootstrapBlazor/Components/Switch/NullSwitch.razor.cs b/src/BootstrapBlazor/Components/Switch/NullSwitch.razor.cs index 91e563602fa..31a1957b2d0 100644 --- a/src/BootstrapBlazor/Components/Switch/NullSwitch.razor.cs +++ b/src/BootstrapBlazor/Components/Switch/NullSwitch.razor.cs @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// 可为空布尔值组件 +/// 可为空布尔值组件 +/// Nullable Boolean Component /// public partial class NullSwitch { /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Get Class Name /// private string? ClassName => CssBuilder.Default("switch") .AddClass("is-checked", ComponentValue) @@ -39,12 +41,14 @@ public partial class NullSwitch } /// - /// 获得 显示文字 + /// 获得 显示文字 + /// Get Text /// private string? Text => ComponentValue ? OnText : OffText; /// - /// 获得 组件最小宽度 + /// 获得 组件最小宽度 + /// Get Component Minimum Width /// private string? SwitchStyleName => CssBuilder.Default() .AddClass($"min-width: {Width}px;", Width > 0) @@ -52,7 +56,8 @@ public partial class NullSwitch .Build(); /// - /// 获得 Style 集合 + /// 获得 Style 集合 + /// Get Style Name /// protected override string? StyleName => CssBuilder.Default() .AddClass($"width: {Width}px;", Width > 0) @@ -60,45 +65,59 @@ public partial class NullSwitch .Build(); /// - /// 获得/设置 开颜色 + /// 获得/设置 开颜色 + /// Get/Set On Color + /// 10.2.2 /// [Parameter] public Color OnColor { get; set; } = Color.Success; /// - /// 获得/设置 关颜色 + /// 获得/设置 关颜色 + /// Get/Set Off Color + /// 10.2.2 /// [Parameter] public Color OffColor { get; set; } /// - /// 获得/设置 组件宽度 默认 40 + /// 获得/设置 组件宽度 默认 40 + /// Get/Set Component Width. Default 40 + /// 10.2.2 /// [Parameter] public override int Width { get; set; } = 40; /// - /// 获得/设置 控件高度默认 20px + /// 获得/设置 控件高度默认 20px + /// Get/Set Component Height. Default 20px + /// 10.2.2 /// [Parameter] public int Height { get; set; } = 20; /// - /// 获得/设置 组件 On 时内置显示文本 + /// 获得/设置 组件 On 时内置显示文本 + /// Get/Set On Inner Text + /// 10.2.2 /// [Parameter] [NotNull] public string? OnInnerText { get; set; } /// - /// 获得/设置 组件 Off 时内置显示文本 + /// 获得/设置 组件 Off 时内置显示文本 + /// Get/Set Off Inner Text + /// 10.2.2 /// [Parameter] [NotNull] public string? OffInnerText { get; set; } /// - /// 获得/设置 是否显示内置文字 默认 false 显示 + /// 获得/设置 是否显示内置文字 默认 false 显示 + /// Get/Set Whether to show inner text. Default false + /// 10.2.2 /// [Parameter] public bool ShowInnerText { get; set; } @@ -108,18 +127,22 @@ public partial class NullSwitch private IStringLocalizer? Localizer { get; set; } /// - /// 获得/设置 绑定值为空时的默认值 默认为 false + /// 获得/设置 绑定值为空时的默认值 默认为 false + /// Get/Set Default value when null. Default false + /// 10.2.2 /// [Parameter] public bool DefaultValueWhenNull { get; set; } /// - /// 获得/设置 组件 Value 值 + /// 获得/设置 组件 Value 值 + /// Get/Set Component Value /// protected bool ComponentValue => Value ?? DefaultValueWhenNull; /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { @@ -130,7 +153,8 @@ protected override void OnInitialized() } /// - /// 点击控件时触发此方法 + /// 点击控件时触发此方法 + /// Method triggered when clicking the control /// private async Task OnClick() { diff --git a/src/BootstrapBlazor/Components/Switch/Switch.razor.cs b/src/BootstrapBlazor/Components/Switch/Switch.razor.cs index 4c35cad94c3..7028feb8002 100644 --- a/src/BootstrapBlazor/Components/Switch/Switch.razor.cs +++ b/src/BootstrapBlazor/Components/Switch/Switch.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// +/// Switch 组件 +/// Switch Component /// public partial class Switch { @@ -37,12 +38,14 @@ public partial class Switch } /// - /// 获得 显示文字 + /// 获得 显示文字 + /// Get Text /// private string? Text => Value ? OnText : OffText; /// - /// 获得 组件最小宽度 + /// 获得 组件最小宽度 + /// Get Component Minimum Width /// private string? SwitchStyleName => CssBuilder.Default() .AddClass($"min-width: {Width}px;", Width > 0) @@ -50,7 +53,8 @@ public partial class Switch .Build(); /// - /// 获得 Style 集合 + /// 获得 Style 集合 + /// Get Style Name /// protected override string? StyleName => CssBuilder.Default() .AddClass($"width: {Width}px;", Width > 0) @@ -58,45 +62,59 @@ public partial class Switch .Build(); /// - /// 获得/设置 开颜色 + /// 获得/设置 开颜色 + /// Get/Set On Color + /// 10.2.2 /// [Parameter] public Color OnColor { get; set; } = Color.Success; /// - /// 获得/设置 关颜色 + /// 获得/设置 关颜色 + /// Get/Set Off Color + /// 10.2.2 /// [Parameter] public Color OffColor { get; set; } /// - /// 获得/设置 组件宽度 默认 40 + /// 获得/设置 组件宽度 默认 40 + /// Get/Set Component Width. Default 40 + /// 10.2.2 /// [Parameter] public override int Width { get; set; } = 40; /// - /// 获得/设置 控件高度默认 20px + /// 获得/设置 控件高度默认 20px + /// Get/Set Component Height. Default 20px + /// 10.2.2 /// [Parameter] public int Height { get; set; } = 20; /// - /// 获得/设置 组件 On 时内置显示文本 + /// 获得/设置 组件 On 时内置显示文本 + /// Get/Set On Inner Text + /// 10.2.2 /// [Parameter] [NotNull] public string? OnInnerText { get; set; } /// - /// 获得/设置 组件 Off 时内置显示文本 + /// 获得/设置 组件 Off 时内置显示文本 + /// Get/Set Off Inner Text + /// 10.2.2 /// [Parameter] [NotNull] public string? OffInnerText { get; set; } /// - /// 获得/设置 是否显示内置文字 默认 false 显示 + /// 获得/设置 是否显示内置文字 默认 false 显示 + /// Get/Set Whether to show inner text. Default false + /// 10.2.2 /// [Parameter] public bool ShowInnerText { get; set; } @@ -106,7 +124,8 @@ public partial class Switch private IStringLocalizer? Localizer { get; set; } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized Method /// protected override void OnInitialized() { @@ -117,7 +136,8 @@ protected override void OnInitialized() } /// - /// 点击控件时触发此方法 + /// 点击控件时触发此方法 + /// Method triggered when clicking the control /// private async Task OnClick() { diff --git a/src/BootstrapBlazor/Components/Tab/BootstrapBlazorAuthorizeView.cs b/src/BootstrapBlazor/Components/Tab/BootstrapBlazorAuthorizeView.cs index 7d5b5c7c6ac..90c8cbf3b52 100644 --- a/src/BootstrapBlazor/Components/Tab/BootstrapBlazorAuthorizeView.cs +++ b/src/BootstrapBlazor/Components/Tab/BootstrapBlazorAuthorizeView.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -11,31 +11,40 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapBlazorAuthorizeView component +/// BootstrapBlazorAuthorizeView component +/// BootstrapBlazorAuthorizeView component /// public class BootstrapBlazorAuthorizeView : ComponentBase { /// - /// Gets or sets the type associated with the route. default is null + /// 获得/设置 the 类型 associated with the route. default is null + /// Gets or sets the type associated with the route. default is null + /// 10.2.2 /// [Parameter] [NotNull] public Type? Type { get; set; } /// - /// Gets or sets the parameters associated with the route. default is null + /// 获得/设置 the parameters associated with the route. default is null + /// Gets or sets the parameters associated with the route. default is null + /// 10.2.2 /// [Parameter] public IReadOnlyDictionary? Parameters { get; set; } /// - /// Gets or sets the template to display when the user is not authorized. default is null + /// 获得/设置 the 模板 to 显示 when the user is not authorized. default is null + /// Gets or sets the template to display when the user is not authorized. default is null + /// 10.2.2 /// [Parameter] public RenderFragment? NotAuthorized { get; set; } /// - /// Gets or sets the resource to which access is being controlled. default is null + /// 获得/设置 the resource to which access is being controlled. default is null + /// Gets or sets the resource to which access is being controlled. default is null + /// 10.2.2 /// [Parameter] public object? Resource { get; set; } diff --git a/src/BootstrapBlazor/Components/Tab/ITabHeader.cs b/src/BootstrapBlazor/Components/Tab/ITabHeader.cs index d5814d662fa..d87150bd459 100644 --- a/src/BootstrapBlazor/Components/Tab/ITabHeader.cs +++ b/src/BootstrapBlazor/Components/Tab/ITabHeader.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// ITabHeader interface +/// ITabHeader interface +/// ITabHeader interface /// public interface ITabHeader { /// - /// Render method + /// Render method + /// Render method /// /// void Render(RenderFragment renderFragment); /// - /// Get the id of the tab header + /// Get the id of the tab header + /// Get the id of the tab header /// /// string GetId(); diff --git a/src/BootstrapBlazor/Components/Tab/Route/RouteConstraint.cs b/src/BootstrapBlazor/Components/Tab/Route/RouteConstraint.cs index 6839828c4cc..66f1f21869b 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/RouteConstraint.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/RouteConstraint.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Tab/Route/RouteContext.cs b/src/BootstrapBlazor/Components/Tab/Route/RouteContext.cs index d4adb736c9b..92f1b0e954e 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/RouteContext.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/RouteContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Tab/Route/RouteEntry.cs b/src/BootstrapBlazor/Components/Tab/Route/RouteEntry.cs index e368bc61a2d..05d18cfe6e7 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/RouteEntry.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/RouteEntry.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Tab/Route/RouteKey.cs b/src/BootstrapBlazor/Components/Tab/Route/RouteKey.cs index dd6aee74b49..999fce7309a 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/RouteKey.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/RouteKey.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Tab/Route/RouteTable.cs b/src/BootstrapBlazor/Components/Tab/Route/RouteTable.cs index 7ebac5ca26c..62482a02cd3 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/RouteTable.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/RouteTable.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Tab/Route/RouteTableFactory.cs b/src/BootstrapBlazor/Components/Tab/Route/RouteTableFactory.cs index db083437bed..7293a61905f 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/RouteTableFactory.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/RouteTableFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace Microsoft.AspNetCore.Components.Routing; /// -/// Resolves components for an application. +/// Resolves components for an application. +/// Resolves components for an application. /// [ExcludeFromCodeCoverage] internal static class RouteTableFactory @@ -145,33 +146,8 @@ private static HashSet GetParameterNames(RouteTemplate routeTemplate) } /// - /// Route precedence algorithm. - /// We collect all the routes and sort them from most specific to - /// less specific. The specificity of a route is given by the specificity - /// of its segments and the position of those segments in the route. - /// * A literal segment is more specific than a parameter segment. - /// * A parameter segment with more constraints is more specific than one with fewer constraints - /// * Segment earlier in the route are evaluated before segments later in the route. - /// For example: - /// /Literal is more specific than /Parameter - /// /Route/With/{parameter} is more specific than /{multiple}/With/{parameters} - /// /Product/{id:int} is more specific than /Product/{id} - /// - /// Routes can be ambiguous if: - /// They are composed of literals and those literals have the same values (case insensitive) - /// They are composed of a mix of literals and parameters, in the same relative order and the - /// literals have the same values. - /// For example: - /// * /literal and /Literal - /// /{parameter}/literal and /{something}/literal - /// /{parameter:constraint}/literal and /{something:constraint}/literal - /// - /// To calculate the precedence we sort the list of routes as follows: - /// * Shorter routes go first. - /// * A literal wins over a parameter in precedence. - /// * For literals with different values (case insensitive) we choose the lexical order - /// * For parameters with different numbers of constraints, the one with more wins - /// If we get to the end of the comparison routing we've detected an ambiguous pair of routes. + /// Route precedence algorithm. We collect all the routes and sort them from most specific to less specific. specificity of a route is given by the specificity of its segments and the position of those segments in the route. * A literal segment is more specific than a parameter segment. * A parameter segment with more constraints is more specific than one with fewer constraints * Segment earlier in the route are evaluated before segments later in the route. For example: /Literal is more specific than /Parameter /Route/With/{parameter} is more specific than /{multiple}/With/{parameters} /Product/{id:int} is more specific than /Product/{id} Routes can be ambiguous if: They are composed of literals and those literals have the same values (case insensitive) They are composed of a mix of literals and parameters, in the same relative order and the literals have the same values. For example: * /literal and /Literal /{parameter}/literal and /{something}/literal /{parameter:constraint}/literal and /{something:constraint}/literal To calculate the precedence we sort the list of routes as follows: * Shorter routes go first. * A literal wins over a parameter in precedence. * For literals with different values (case insensitive) we choose the lexical order * For parameters with different numbers of constraints, the one with more wins If we get to the end of the comparison routing we've detected an ambiguous pair of routes. + /// Route precedence algorithm. We collect all the routes and sort them from most specific to less specific. The specificity of a route is given by the specificity of its segments and the position of those segments in the route. * A literal segment is more specific than a parameter segment. * A parameter segment with more constraints is more specific than one with fewer constraints * Segment earlier in the route are evaluated before segments later in the route. For example: /Literal is more specific than /Parameter /Route/With/{parameter} is more specific than /{multiple}/With/{parameters} /Product/{id:int} is more specific than /Product/{id} Routes can be ambiguous if: They are composed of literals and those literals have the same values (case insensitive) They are composed of a mix of literals and parameters, in the same relative order and the literals have the same values. For example: * /literal and /Literal /{parameter}/literal and /{something}/literal /{parameter:constraint}/literal and /{something:constraint}/literal To calculate the precedence we sort the list of routes as follows: * Shorter routes go first. * A literal wins over a parameter in precedence. * For literals with different values (case insensitive) we choose the lexical order * For parameters with different numbers of constraints, the one with more wins If we get to the end of the comparison routing we've detected an ambiguous pair of routes. /// internal static int RouteComparison(RouteEntry x, RouteEntry y) { diff --git a/src/BootstrapBlazor/Components/Tab/Route/RouteTemplate.cs b/src/BootstrapBlazor/Components/Tab/Route/RouteTemplate.cs index b9d21759145..83088d4fb64 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/RouteTemplate.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/RouteTemplate.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Tab/Route/StringSegmentAccumulator.cs b/src/BootstrapBlazor/Components/Tab/Route/StringSegmentAccumulator.cs index 37f9410b7e9..bd694e0c09e 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/StringSegmentAccumulator.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/StringSegmentAccumulator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Tab/Route/TemplateParser.cs b/src/BootstrapBlazor/Components/Tab/Route/TemplateParser.cs index 5b26ddaa79f..1d5375928cb 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/TemplateParser.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/TemplateParser.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Tab/Route/TemplateSegment.cs b/src/BootstrapBlazor/Components/Tab/Route/TemplateSegment.cs index 5afcbe4624e..870756cc7ad 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/TemplateSegment.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/TemplateSegment.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Tab/Route/UrlValueConstraint.cs b/src/BootstrapBlazor/Components/Tab/Route/UrlValueConstraint.cs index 7bd3fd64a87..7c2d4a220a1 100644 --- a/src/BootstrapBlazor/Components/Tab/Route/UrlValueConstraint.cs +++ b/src/BootstrapBlazor/Components/Tab/Route/UrlValueConstraint.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace Microsoft.AspNetCore.Components.Routing; /// -/// Shared logic for parsing tokens from route values and querystring values. +/// Shared logic for parsing tokens from route values and querystring values. +/// Shared logic for parsing tokens from route values and querystring values. /// [ExcludeFromCodeCoverage] internal abstract class UrlValueConstraint diff --git a/src/BootstrapBlazor/Components/Tab/Tab.razor.cs b/src/BootstrapBlazor/Components/Tab/Tab.razor.cs index d4d944ad7a9..96500d63555 100644 --- a/src/BootstrapBlazor/Components/Tab/Tab.razor.cs +++ b/src/BootstrapBlazor/Components/Tab/Tab.razor.cs @@ -12,7 +12,8 @@ namespace BootstrapBlazor.Components; /// -/// Tab component +/// Tab component +/// Tab component /// public partial class Tab { @@ -56,413 +57,555 @@ public partial class Tab private readonly List _draggedItems = new(50); /// - /// Gets the collection of tab items. + /// 获得 the 集合 of tab items. + /// Gets the collection of tab items. /// public IEnumerable Items => TabItems; private List TabItems => _dragged ? _draggedItems : _items; /// - /// Gets or sets the excluded link. Default is false. + /// 获得/设置 the excluded link. 默认为 false. + /// Gets or sets the excluded link. Default is false. /// private bool Excluded { get; set; } /// - /// Gets or sets whether card style. Default is false. + /// 获得/设置 是否 card 样式. 默认为 false. + /// Gets or sets whether card style. Default is false. + /// 10.2.2 /// [Parameter] public bool IsCard { get; set; } /// - /// Gets or sets whether border card style. Default is false. + /// 获得/设置 是否 border card 样式. 默认为 false. + /// Gets or sets whether border card style. Default is false. + /// 10.2.2 /// [Parameter] public bool IsBorderCard { get; set; } /// - /// 获得/设置 是否仅渲染 Active 标签 默认 false + /// 获得/设置 是否仅渲染 Active 标签 默认 false + /// Get/Set whether to render only active tab. Default false + /// 10.2.2 /// [Parameter] public bool IsOnlyRenderActiveTab { get; set; } /// - /// 获得/设置 懒加载 TabItem, 首次不渲染 默认 false + /// 获得/设置 懒加载 TabItem, 首次不渲染 默认 false + /// Get/Set lazy load TabItem. Default false + /// 10.2.2 /// [Parameter] public bool IsLazyLoadTabItem { get; set; } /// - /// 获得/设置 Tab 标签头文本本地化回调方法 + /// 获得/设置 Tab 标签头文本本地化回调方法 + /// Get/Set Tab Header Text Localizer Callback + /// 10.2.2 /// [Parameter] public Func? OnTabHeaderTextLocalizer { get; set; } /// - /// 获得/设置 组件高度 默认值为 0 高度自动 + /// 获得/设置 组件高度 默认值为 0 高度自动 + /// Get/Set Component Height. Default 0 (Auto) + /// 10.2.2 /// [Parameter] public int Height { get; set; } /// - /// 获得/设置 组件标签显示位置 默认显示在 Top 位置 + /// 获得/设置 组件标签显示位置 默认显示在 Top 位置 + /// Get/Set Placement. Default Top + /// 10.2.2 /// [Parameter] public Placement Placement { get; set; } = Placement.Top; /// - /// 获得/设置 是否显示关闭按钮 默认为 false 不显示 + /// 获得/设置 是否显示关闭按钮 默认为 false 不显示 + /// Get/Set Whether to show close button. Default false + /// 10.2.2 /// [Parameter] public bool ShowClose { get; set; } /// - /// 获得/设置 是否显示全屏按钮 默认为 false 不显示 + /// 获得/设置 是否显示全屏按钮 默认为 false 不显示 + /// Get/Set Whether to show full screen button. Default false + /// 10.2.2 /// [Parameter] public bool ShowFullScreen { get; set; } /// - /// Gets or sets whether show the full screen button on context menu. Default is true. + /// 获得/设置 是否 show the full screen 按钮 on context menu. 默认为 true. + /// Gets or sets whether show the full screen button on context menu. Default is true. + /// 10.2.2 /// [Parameter] public bool ShowContextMenuFullScreen { get; set; } = true; /// - /// 关闭标签页回调方法 + /// 关闭标签页回调方法 + /// Close Tab Item Callback + /// 10.2.2 /// - /// 返回 false 时不关闭 标签页 + /// + /// 返回 false 时不关闭 标签页 + /// Return false to cancel closing + /// [Parameter] public Func>? OnCloseTabItemAsync { get; set; } /// - /// 获得/设置 是否显示扩展功能按钮 默认为 false 不显示 + /// 获得/设置 是否显示扩展功能按钮 默认为 false 不显示 + /// Get/Set Whether to show extend buttons. Default false + /// 10.2.2 /// [Parameter] public bool ShowExtendButtons { get; set; } /// - /// 获得/设置 是否显示前后导航按钮 默认为 true 显示 + /// 获得/设置 是否显示前后导航按钮 默认为 true 显示 + /// Get/Set Whether to show navigation buttons. Default true + /// 10.2.2 /// [Parameter] public bool ShowNavigatorButtons { get; set; } = true; /// - /// Gets or sets whether auto reset tab item index. Default is true. + /// 获得/设置 是否 auto reset tab item 索引. 默认为 true. + /// Gets or sets whether auto reset tab item index. Default is true. + /// 10.2.2 /// [Parameter] public bool IsLoopSwitchTabItem { get; set; } = true; /// - /// 获得/设置 是否显示活动标签 默认为 true 显示 + /// 获得/设置 是否显示活动标签 默认为 true 显示 + /// Get/Set Whether to show active bar. Default true + /// 10.2.2 /// [Parameter] public bool ShowActiveBar { get; set; } = true; /// - /// 获得/设置 点击 TabItem 时是否自动导航 默认为 false 不导航 + /// 获得/设置 点击 TabItem 时是否自动导航 默认为 false 不导航 + /// Get/Set whether to navigate when clicking TabItem. Default false + /// 10.2.2 /// [Parameter] public bool ClickTabToNavigation { get; set; } /// - /// 获得/设置 TabItems 模板 + /// 获得/设置 TabItems 模板 + /// Get/Set TabItems Template + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 NotAuthorized 模板 默认 null NET6.0/7.0 有效 + /// 获得/设置 NotAuthorized 模板 默认 null NET6.0/7.0 有效 + /// Get/Set NotAuthorized Template. Default null (Valid for NET6.0/7.0) + /// 10.2.2 /// [Parameter] public RenderFragment? NotAuthorized { get; set; } /// - /// 获得/设置 NotFound 模板 默认 null NET6.0/7.0 有效 + /// 获得/设置 NotFound 模板 默认 null NET6.0/7.0 有效 + /// Get/Set NotFound Template. Default null (Valid for NET6.0/7.0) + /// 10.2.2 /// [Parameter] public RenderFragment? NotFound { get; set; } /// - /// 获得/设置 NotFound 标签文本 默认 null NET6.0/7.0 有效 + /// 获得/设置 NotFound 标签文本 默认 null NET6.0/7.0 有效 + /// Get/Set NotFound Tab Text. Default null (Valid for NET6.0/7.0) + /// 10.2.2 /// [Parameter] public string? NotFoundTabText { get; set; } /// - /// 获得/设置 TabItems 模板 + /// 获得/设置 TabItems 模板 + /// Get/Set TabItems Template + /// 10.2.2 /// [Parameter] public RenderFragment? Body { get; set; } /// - /// 获得/设置 Gets or sets a collection of additional assemblies that should be searched for components that can match URIs. + /// 获得/设置 Gets or sets a collection of additional assemblies that should be searched for components that can match URIs. + /// Gets or sets Gets or sets a collection of additional assemblies that should be searched for components that can match URIs. + /// 10.2.2 /// [Parameter] public IEnumerable? AdditionalAssemblies { get; set; } /// - /// 获得/设置 排除地址支持通配符 + /// 获得/设置 排除地址支持通配符 + /// Get/Set Exclude Urls. Support wildcard + /// 10.2.2 /// [Parameter] public IEnumerable? ExcludeUrls { get; set; } /// - /// 获得/设置 默认标签页 关闭所有标签页时自动打开此地址 默认 null 未设置 + /// 获得/设置 默认标签页 关闭所有标签页时自动打开此地址 默认 null 未设置 + /// Get/Set Default Url. Open this url when all tabs closed. Default null + /// 10.2.2 /// [Parameter] public string? DefaultUrl { get; set; } /// - /// 获得/设置 点击 TabItem 时回调方法 + /// 获得/设置 点击 TabItem 时回调方法 + /// Get/Set Callback method when clicking TabItem + /// 10.2.2 /// [Parameter] public Func? OnClickTabItemAsync { get; set; } /// - /// 获得/设置 关闭当前 TabItem 菜单文本 + /// 获得/设置 关闭当前 TabItem 菜单文本 + /// Get/Set Close Current Tab Menu Text + /// 10.2.2 /// [Parameter] public string? CloseCurrentTabText { get; set; } /// - /// 获得/设置 关闭所有 TabItem 菜单文本 + /// 获得/设置 关闭所有 TabItem 菜单文本 + /// Get/Set Close All Tabs Menu Text + /// 10.2.2 /// [Parameter] public string? CloseAllTabsText { get; set; } /// - /// 获得/设置 关闭其他 TabItem 菜单文本 + /// 获得/设置 关闭其他 TabItem 菜单文本 + /// Get/Set Close Other Tabs Menu Text + /// 10.2.2 /// [Parameter] public string? CloseOtherTabsText { get; set; } /// - /// 获得/设置 按钮模板 默认 null + /// 获得/设置 按钮模板 默认 null + /// Get/Set Button Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? ButtonTemplate { get; set; } /// - /// Gets or sets the template of the toolbar button. Default is null. + /// 获得/设置 the 模板 of the toolbar 按钮. 默认为 null. + /// Gets or sets the template of the toolbar button. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? ToolbarTemplate { get; set; } /// - /// 获得/设置 标签页前置模板 默认 null - /// 在向前移动标签页按钮前 + /// 获得/设置 标签页前置模板 默认 null + /// Get/Set Before Navigator Template. Default null + /// 在向前移动标签页按钮前 + /// Before previous button + /// 10.2.2 /// [Parameter] public RenderFragment? BeforeNavigatorTemplate { get; set; } /// - /// 获得/设置 标签页后置模板 默认 null - /// 在向后移动标签页按钮前 + /// 获得/设置 标签页后置模板 默认 null + /// Get/Set After Navigator Template. Default null + /// 在向后移动标签页按钮前 + /// Before next button + /// 10.2.2 /// [Parameter] public RenderFragment? AfterNavigatorTemplate { get; set; } /// - /// 获得/设置 上一个标签图标 + /// 获得/设置 上一个标签图标 + /// Get/Set Previous Icon + /// 10.2.2 /// [Parameter] public string? PreviousIcon { get; set; } /// - /// 获得/设置 下一个标签图标 + /// 获得/设置 下一个标签图标 + /// Get/Set Next Icon + /// 10.2.2 /// [Parameter] public string? NextIcon { get; set; } /// - /// 获得/设置 下拉菜单标签图标 + /// 获得/设置 下拉菜单标签图标 + /// Get/Set Dropdown Icon + /// 10.2.2 /// [Parameter] public string? DropdownIcon { get; set; } /// - /// 获得/设置 关闭标签图标 + /// 获得/设置 关闭标签图标 + /// Get/Set Close Icon + /// 10.2.2 /// [Parameter] public string? CloseIcon { get; set; } /// - /// 获得/设置 导航菜单集合 默认 null + /// 获得/设置 导航菜单集合 默认 null + /// Get/Set Menus. Default null + /// 10.2.2 /// - /// 使用自定义布局时,需要 Tab 导航标签显示为菜单项时设置,已内置 默认 null + /// + /// 使用自定义布局时,需要 Tab 导航标签显示为菜单项时设置,已内置 默认 null + /// Used for custom layout to show menus in Tab navigation. Built-in . Default null + /// [Parameter] public IEnumerable? Menus { get; set; } /// - /// 获得/设置 是否允许拖放标题栏更改栏位顺序,默认为 false + /// 获得/设置 是否允许拖放标题栏更改栏位顺序,默认为 false + /// Get/Set whether to allow drag tab header to change order. Default false + /// 10.2.2 /// [Parameter] public bool AllowDrag { get; set; } /// - /// 获得/设置 拖动标签页结束回调方法 + /// 获得/设置 拖动标签页结束回调方法 + /// Get/Set Callback method when drag item end + /// 10.2.2 /// [Parameter] public Func? OnDragItemEndAsync { get; set; } /// - /// Gets or sets the tab style. Default is . + /// 获得/设置 the tab 样式. 默认为 . + /// Gets or sets the tab style. Default is . + /// 10.2.2 /// [Parameter] public TabStyle TabStyle { get; set; } /// - /// Gets or sets whether show the toolbar. Default is false. + /// 获得/设置 是否 show the toolbar. 默认为 false. + /// Gets or sets whether show the toolbar. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowToolbar { get; set; } /// - /// Gets or sets whether show the full screen button. Default is true. + /// 获得/设置 是否 show the full screen 按钮. 默认为 true. + /// Gets or sets whether show the full screen button. Default is true. + /// 10.2.2 /// [Parameter] public bool ShowFullscreenToolbarButton { get; set; } = true; /// - /// Gets or sets the full screen toolbar button icon string. Default is null. + /// 获得/设置 the full screen toolbar 按钮 图标 string. 默认为 null. + /// Gets or sets the full screen toolbar button icon string. Default is null. + /// 10.2.2 /// [Parameter] public string? FullscreenToolbarButtonIcon { get; set; } /// - /// Gets or sets the full screen toolbar button tooltip string. Default is null. + /// 获得/设置 the full screen toolbar 按钮 tooltip string. 默认为 null. + /// Gets or sets the full screen toolbar button tooltip string. Default is null. + /// 10.2.2 /// [Parameter] public string? FullscreenToolbarTooltipText { get; set; } /// - /// Gets or sets whether show the full screen button. Default is true. + /// 获得/设置 是否 show the full screen 按钮. 默认为 true. + /// Gets or sets whether show the full screen button. Default is true. + /// 10.2.2 /// [Parameter] public bool ShowRefreshToolbarButton { get; set; } = true; /// - /// Gets or sets the refresh toolbar button icon string. Default is null. + /// 获得/设置 the refresh toolbar 按钮 图标 string. 默认为 null. + /// Gets or sets the refresh toolbar button icon string. Default is null. + /// 10.2.2 /// [Parameter] public string? RefreshToolbarButtonIcon { get; set; } /// - /// Gets or sets the refresh toolbar button tooltip string. Default is null. + /// 获得/设置 the refresh toolbar 按钮 tooltip string. 默认为 null. + /// Gets or sets the refresh toolbar button tooltip string. Default is null. + /// 10.2.2 /// [Parameter] public string? RefreshToolbarTooltipText { get; set; } /// - /// Gets or sets the refresh toolbar button click event callback. Default is null. + /// 获得/设置 the refresh toolbar 按钮 click event 回调. 默认为 null. + /// Gets or sets the refresh toolbar button click event callback. Default is null. + /// 10.2.2 /// [Parameter] public Func? OnToolbarRefreshCallback { get; set; } /// - /// Gets or sets the previous tab navigation link tooltip text. Default is null. + /// 获得/设置 the previous tab navigation link tooltip text. 默认为 null. + /// Gets or sets the previous tab navigation link tooltip text. Default is null. + /// 10.2.2 /// [Parameter] public string? PrevTabNavLinkTooltipText { get; set; } /// - /// Gets or sets the next tab navigation link tooltip text. Default is null. + /// 获得/设置 the next tab navigation link tooltip text. 默认为 null. + /// Gets or sets the next tab navigation link tooltip text. Default is null. + /// 10.2.2 /// [Parameter] public string? NextTabNavLinkTooltipText { get; set; } /// - /// Gets or sets the close tab navigation link tooltip text. Default is null. + /// 获得/设置 the close tab navigation link tooltip text. 默认为 null. + /// Gets or sets the close tab navigation link tooltip text. Default is null. + /// 10.2.2 /// [Parameter] public string? CloseTabNavLinkTooltipText { get; set; } /// - /// Gets or sets whether enable tab context menu. Default is false. + /// 获得/设置 是否 enable tab context menu. 默认为 false. + /// Gets or sets whether enable tab context menu. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowContextMenu { get; set; } /// - /// Gets or sets the template of before context menu. Default is null. + /// 获得/设置 the 模板 of before context menu. 默认为 null. + /// Gets or sets the template of before context menu. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? BeforeContextMenuTemplate { get; set; } /// - /// Gets or sets the template of context menu. Default is null. + /// 获得/设置 the 模板 of context menu. 默认为 null. + /// Gets or sets the template of context menu. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? ContextMenuTemplate { get; set; } /// - /// Gets or sets the icon of tab item context menu refresh button. Default is null. + /// 获得/设置 the 图标 of tab item context menu refresh 按钮. 默认为 null. + /// Gets or sets the icon of tab item context menu refresh button. Default is null. + /// 10.2.2 /// [Parameter] public string? ContextMenuRefreshIcon { get; set; } /// - /// Gets or sets the icon of tab item context menu close button. Default is null. + /// 获得/设置 the 图标 of tab item context menu close 按钮. 默认为 null. + /// Gets or sets the icon of tab item context menu close button. Default is null. + /// 10.2.2 /// [Parameter] public string? ContextMenuCloseIcon { get; set; } /// - /// Gets or sets the icon of tab item context menu close other button. Default is null. + /// 获得/设置 the 图标 of tab item context menu close other 按钮. 默认为 null. + /// Gets or sets the icon of tab item context menu close other button. Default is null. + /// 10.2.2 /// [Parameter] public string? ContextMenuCloseOtherIcon { get; set; } /// - /// Gets or sets the icon of tab item context menu close all button. Default is null. + /// 获得/设置 the 图标 of tab item context menu close all 按钮. 默认为 null. + /// Gets or sets the icon of tab item context menu close all button. Default is null. + /// 10.2.2 /// [Parameter] public string? ContextMenuCloseAllIcon { get; set; } /// - /// Gets or sets the icon of tab item context menu full screen button. Default is null. + /// 获得/设置 the 图标 of tab item context menu full screen 按钮. 默认为 null. + /// Gets or sets the icon of tab item context menu full screen button. Default is null. + /// 10.2.2 /// [Parameter] public string? ContextMenuFullScreenIcon { get; set; } /// - /// Gets or sets before popup context menu callback. Default is null. + /// 获得/设置 before popup context menu 回调. 默认为 null. + /// Gets or sets before popup context menu callback. Default is null. + /// 10.2.2 /// [Parameter] public Func>? OnBeforeShowContextMenu { get; set; } /// - /// Gets or sets the instance. Default is null. + /// 获得/设置 the 实例. 默认为 null. + /// Gets or sets the instance. Default is null. + /// 10.2.2 /// [Parameter] public ITabHeader? TabHeader { get; set; } /// - /// 获得/设置 是否开启全局异常捕获 默认 null 读取配置文件 值 + /// 获得/设置 是否开启全局异常捕获 默认 null 读取配置文件 + /// Get/Set whether to enable global error logger. Default null (Read from ) + /// 10.2.2 /// [Parameter] public bool? EnableErrorLogger { get; set; } /// - /// 获得/设置 是否记录异常到 默认 null 使用 设置值 + /// 获得/设置 是否记录异常到 默认 null 使用 设置值 + /// Get/Set whether to log error to . Default null (Use ) + /// 10.2.2 /// [Parameter] public bool? EnableErrorLoggerILogger { get; set; } /// - /// 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 + /// 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 + /// Get/Set whether to show error toast. Default null (Use ) + /// 10.2.2 /// [Parameter] public bool? ShowErrorLoggerToast { get; set; } /// - /// 获得/设置 错误日志 弹窗标题 默认 null + /// 获得/设置 错误日志 弹窗标题 默认 null + /// Get/Set Error Logger Title. Default null + /// 10.2.2 /// [Parameter] public string? ErrorLoggerToastTitle { get; set; } /// - /// 获得/设置 自定义错误处理回调方法 + /// 获得/设置 自定义错误处理回调方法 + /// Get/Set Custom Error Handle Callback + /// 10.2.2 /// [Parameter] public Func? OnErrorHandleAsync { get; set; } @@ -642,7 +785,8 @@ private void AddTabByUrl() private bool ShouldShowExtendButtons() => ShowExtendButtons && (Placement == Placement.Top || Placement == Placement.Bottom); /// - /// 点击 TabItem 时回调此方法 + /// 点击 TabItem 时回调此方法 + /// Callback method when clicking TabItem /// private async Task OnClickTabItem(TabItem item) { @@ -661,7 +805,8 @@ private async Task OnClickTabItem(TabItem item) } /// - /// 切换到上一个标签方法 + /// 切换到上一个标签方法 + /// Switch to previous tab method /// public void ClickPrevTab() { @@ -704,7 +849,8 @@ public void ClickPrevTab() } /// - /// 切换到下一个标签方法 + /// 切换到下一个标签方法 + /// Switch to next tab method /// public void ClickNextTab() { @@ -748,7 +894,8 @@ public void ClickNextTab() } /// - /// 关闭当前标签页方法 + /// 关闭当前标签页方法 + /// Close current tab method /// public async Task CloseCurrentTab() { @@ -775,7 +922,8 @@ private void OnClickCloseAllTabs() } /// - /// 关闭所有标签页方法 + /// 关闭所有标签页方法 + /// Close all tabs method /// public void CloseAllTabs() { @@ -790,7 +938,8 @@ private void OnClickCloseOtherTabs() } /// - /// 关闭其他标签页方法 + /// 关闭其他标签页方法 + /// Close other tabs method /// public void CloseOtherTabs() { @@ -799,13 +948,15 @@ public void CloseOtherTabs() } /// - /// 添加 TabItem 方法 由 TabItem 方法加载时调用 + /// 添加 TabItem 方法 由 TabItem 方法加载时调用 + /// Add TabItem method. Called by TabItem /// - /// TabItemBase 实例 + /// TabItemBase 实例TabItemBase instance internal void AddItem(TabItem item) => TabItems.Add(item); /// - /// 通过 Url 添加 TabItem 标签方法 + /// 通过 Url 添加 TabItem 标签方法 + /// Add TabItem by Url method /// /// /// @@ -891,7 +1042,8 @@ void SetTabItemParameters(string? text, string? icon, bool closable, bool active } /// - /// 添加 TabItem 方法 + /// 添加 TabItem 方法 + /// Add TabItem method /// /// /// @@ -922,7 +1074,8 @@ private void AddTabItem(Dictionary parameters, int? index = nul } /// - /// 移除 TabItem 方法 + /// 移除 TabItem 方法 + /// Remove TabItem method /// /// public async Task RemoveTab(TabItem item) @@ -962,7 +1115,8 @@ public async Task RemoveTab(TabItem item) } /// - /// 设置指定 TabItem 为激活状态 + /// 设置指定 TabItem 为激活状态 + /// Set specified TabItem as active /// /// public void ActiveTab(TabItem item) @@ -973,7 +1127,8 @@ public void ActiveTab(TabItem item) } /// - /// 设置指定 TabItem 为激活状态 + /// 设置指定 TabItem 为激活状态 + /// Set specified TabItem as active /// /// public void ActiveTab(int index) @@ -986,7 +1141,8 @@ public void ActiveTab(int index) } /// - /// 获得当前活动 Tab + /// 获得当前活动 Tab + /// Get current active Tab /// /// public TabItem? GetActiveTab() => TabItems.Find(s => s.IsActive); @@ -998,7 +1154,8 @@ private void ActiveTabItem(TabItem item) } /// - /// 设置 TabItem 禁用状态 + /// 设置 TabItem 禁用状态 + /// Set TabItem disabled state /// /// /// @@ -1047,7 +1204,8 @@ private RenderFragment RenderTabItemContent(TabItem item) => builder => private bool _dragged; /// - /// 拖动 TabItem 回调方法有 JS 调用 + /// 拖动 TabItem 回调方法有 JS 调用 + /// Drag TabItem Callback method called by JS /// /// /// @@ -1088,7 +1246,8 @@ private async Task OnRefreshAsync() } /// - /// Refresh the tab item method + /// Refresh the tab item method + /// Refresh the tab item method /// /// public async Task Refresh(TabItem item) @@ -1233,7 +1392,8 @@ private RenderFragment RenderTabItems() => builder => }; /// - /// Sets the instance. + /// 设置 the 实例. + /// Sets the instance. /// /// public void SetTabHeader(ITabHeader tabHeader) => TabHeader = tabHeader; diff --git a/src/BootstrapBlazor/Components/Tab/TabItem.cs b/src/BootstrapBlazor/Components/Tab/TabItem.cs index 27d1e9d7a5a..8f1137f6b6c 100644 --- a/src/BootstrapBlazor/Components/Tab/TabItem.cs +++ b/src/BootstrapBlazor/Components/Tab/TabItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,79 +6,103 @@ namespace BootstrapBlazor.Components; /// -/// TabItem component +/// TabItem component +/// TabItem component /// public class TabItem : IdComponentBase { /// - /// Gets or sets the text. Default is null + /// 获得/设置 the text. 默认为 null + /// Gets or sets the text. Default is null + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// Gets or sets the TabItem Header template. Default is null + /// 获得/设置 the TabItem Header 模板. 默认为 null + /// Gets or sets the TabItem Header template. Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// - /// Gets or sets the request URL. Default is null + /// 获得/设置 the request URL. 默认为 null + /// Gets or sets the request URL. Default is null + /// 10.2.2 /// [Parameter] [NotNull] public string? Url { get; set; } /// - /// Gets or sets whether the current state is active. Default is false + /// 获得/设置 是否 the current state is active. 默认为 false + /// Gets or sets whether the current state is active. Default is false + /// 10.2.2 /// [Parameter] public bool IsActive { get; set; } /// - /// Gets or sets whether the current state is disabled, default is false + /// 获得/设置 是否 the current state is disabled, default is false + /// Gets or sets whether the current state is disabled, default is false + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// Gets or sets whether the current TabItem is closable, default is true + /// 获得/设置 是否 the current TabItem is closable, default is true + /// Gets or sets whether the current TabItem is closable, default is true + /// 10.2.2 /// [Parameter] public bool Closable { get; set; } = true; /// - /// Gets or sets whether the current TabItem is always loaded, this parameter is used to set , default is false + /// 获得/设置 是否 the current TabItem is always loaded, this parameter is used to set , default is false + /// Gets or sets whether the current TabItem is always loaded, this parameter is used to set , default is false + /// 10.2.2 /// [Parameter] public bool AlwaysLoad { get; set; } /// - /// Gets or sets the custom CSS class. Default is null + /// 获得/设置 the custom CSS class. 默认为 null + /// Gets or sets the custom CSS class. Default is null + /// 10.2.2 /// [Parameter] public string? CssClass { get; set; } /// - /// Gets or sets the icon string. Default is null + /// 获得/设置 the 图标 string. 默认为 null + /// Gets or sets the icon string. Default is null + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// Gets or sets whether to show the full screen button, default is true + /// 获得/设置 是否 to show the full screen 按钮, default is true + /// Gets or sets whether to show the full screen button, default is true + /// 10.2.2 /// [Parameter] public bool ShowFullScreen { get; set; } = true; /// - /// Gets or sets the component content. Default is null + /// 获得/设置 the component 内容. 默认为 null + /// Gets or sets the component content. Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// Gets or sets the associated Tab instance + /// 获得/设置 the associated Tab 实例 + /// Gets or sets the associated Tab instance /// [CascadingParameter] protected internal Tab? TabSet { get; set; } @@ -110,13 +134,15 @@ protected override void OnParametersSet() } /// - /// Method to set whether it is active + /// Method to set 是否 it is active + /// Method to set whether it is active /// /// public void SetActive(bool active) => IsActive = active; /// - /// Method to set whether it is disabled + /// Method to set 是否 it is disabled + /// Method to set whether it is disabled /// /// public void SetDisabled(bool disabled) @@ -125,13 +151,15 @@ public void SetDisabled(bool disabled) } /// - /// Method to set whether it is disabled without rendering + /// Method to set 是否 it is disabled without rendering + /// Method to set whether it is disabled without rendering /// /// internal void SetDisabledWithoutRender(bool disabled) => IsDisabled = disabled; /// - /// Method to reset the tab text and other parameters + /// Method to reset the tab text and other parameters + /// Method to reset the tab text and other parameters /// /// /// @@ -155,7 +183,8 @@ public void SetHeader(string text, string? icon = null, bool? closable = null) } /// - /// Gets a TabItem instance by specifying a set of parameters + /// 获得 a TabItem 实例 by specifying a set of parameters + /// Gets a TabItem instance by specifying a set of parameters /// /// /// diff --git a/src/BootstrapBlazor/Components/Tab/TabItemContent.cs b/src/BootstrapBlazor/Components/Tab/TabItemContent.cs index 5689f9becf2..21c8d03bf7e 100644 --- a/src/BootstrapBlazor/Components/Tab/TabItemContent.cs +++ b/src/BootstrapBlazor/Components/Tab/TabItemContent.cs @@ -11,7 +11,8 @@ namespace BootstrapBlazor.Components; class TabItemContent : IComponent, IHandlerException, IDisposable { /// - /// Gets or sets the component content. Default is null + /// 获得/设置 the component 内容. 默认为 null + /// Gets or sets the component content. Default is null /// [Parameter, NotNull] public TabItem? Item { get; set; } @@ -83,7 +84,8 @@ private void BuildRenderTree(RenderTreeBuilder builder) } /// - /// Render method + /// Render method + /// Render method /// public void Render() { @@ -118,7 +120,8 @@ public async Task HandlerExceptionAsync(Exception ex, RenderFragment } /// - /// IDispose 方法用于释放资源 + /// IDispose 方法用于释放资源 + /// Dispose method /// public void Dispose() { diff --git a/src/BootstrapBlazor/Components/Tab/TabLink.razor.cs b/src/BootstrapBlazor/Components/Tab/TabLink.razor.cs index 92b7c76dc74..cf991195616 100644 --- a/src/BootstrapBlazor/Components/Tab/TabLink.razor.cs +++ b/src/BootstrapBlazor/Components/Tab/TabLink.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,36 +6,47 @@ namespace BootstrapBlazor.Components; /// -/// Represents a link within a tab component. +/// Represents a link within a tab component. +/// Represents a link within a tab component. /// public sealed partial class TabLink { /// - /// Gets or sets the text of the link. Default is null + /// 获得/设置 the text of the link. 默认为 null + /// Gets or sets the text of the link. Default is null + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// Gets or sets the URL of the link. Default is null + /// 获得/设置 the URL of the link. 默认为 null + /// Gets or sets the URL of the link. Default is null + /// 10.2.2 /// [Parameter] public string? Url { get; set; } /// - /// Gets or sets the icon of the link. Default is null + /// 获得/设置 the 图标 of the link. 默认为 null + /// Gets or sets the icon of the link. Default is null + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// Gets or sets a value indicating whether the tab item is closable. Default is true. + /// 获得/设置 a value indicating 是否 the tab item is closable. 默认为 true. + /// Gets or sets a value indicating whether the tab item is closable. Default is true. + /// 10.2.2 /// [Parameter] public bool Closable { get; set; } = true; /// - /// Gets or sets the callback method when the link is clicked. Default is null. + /// 获得/设置 the 回调方法 when the link is clicked. 默认为 null. + /// Gets or sets the callback method when the link is clicked. Default is null. + /// 10.2.2 /// [Parameter] public Func? OnClick { get; set; } @@ -45,7 +56,9 @@ public sealed partial class TabLink private TabItemTextOptions? TabItemOptions { get; set; } /// - /// Gets or sets the content of the component. Default is null + /// 获得/设置 the 内容 of the component. 默认为 null + /// Gets or sets the content of the component. Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Tab/TabToolbarButton.razor.cs b/src/BootstrapBlazor/Components/Tab/TabToolbarButton.razor.cs index 47d1e089b73..a33a18a1f28 100644 --- a/src/BootstrapBlazor/Components/Tab/TabToolbarButton.razor.cs +++ b/src/BootstrapBlazor/Components/Tab/TabToolbarButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// TabToolbarButton component +/// TabToolbarButton component +/// TabToolbarButton component /// public partial class TabToolbarButton { /// - /// Gets or sets the button icon string. Default is null. + /// 获得/设置 the 按钮 图标 string. 默认为 null. + /// Gets or sets the button icon string. Default is null. + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } /// - /// Gets or sets the button click event handler. Default is null. + /// 获得/设置 the 按钮 click event handler. 默认为 null. + /// Gets or sets the button click event handler. Default is null. + /// 10.2.2 /// [Parameter] public Func? OnClickAsync { get; set; } /// - /// Gets or sets the tooltip text. Default is null. + /// 获得/设置 the tooltip text. 默认为 null. + /// Gets or sets the tooltip text. Default is null. + /// 10.2.2 /// [Parameter] public string? TooltipText { get; set; } diff --git a/src/BootstrapBlazor/Components/Table/ColumnVisibleItem.cs b/src/BootstrapBlazor/Components/Table/ColumnVisibleItem.cs index 69405a0d720..5f7c45fd3ab 100644 --- a/src/BootstrapBlazor/Components/Table/ColumnVisibleItem.cs +++ b/src/BootstrapBlazor/Components/Table/ColumnVisibleItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件列可见性类 +/// Table 组件列可见性类 +/// Table component列可见性类 /// /// /// @@ -16,18 +17,21 @@ namespace BootstrapBlazor.Components; public class ColumnVisibleItem(string name, bool visible) { /// - /// 获得 列名称 + /// 获得 列名称 + /// Gets 列名称 /// public string Name { get; } = name; /// - /// 获得 列名称 + /// 获得 列名称 + /// Gets 列名称 /// [JsonIgnore] public string? DisplayName { get; set; } /// - /// 获得 列可见性 + /// 获得 列可见性 + /// Gets 列可见性 /// public bool Visible { get; set; } = visible; } diff --git a/src/BootstrapBlazor/Components/Table/ColumnWidth.cs b/src/BootstrapBlazor/Components/Table/ColumnWidth.cs index 15fc158ba16..09ce354b970 100644 --- a/src/BootstrapBlazor/Components/Table/ColumnWidth.cs +++ b/src/BootstrapBlazor/Components/Table/ColumnWidth.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 列宽设置类 +/// 列宽设置类 +/// 列宽Sets类 /// struct ColumnWidth { /// - /// 获得/设置 列名称 + /// 获得/设置 列名称 + /// Gets or sets 列名称 /// public string? Name { get; set; } /// - /// 获得/设置 列宽 + /// 获得/设置 列宽 + /// Gets or sets 列宽 /// public int Width { get; set; } } diff --git a/src/BootstrapBlazor/Components/Table/IColumnCollection.cs b/src/BootstrapBlazor/Components/Table/IColumnCollection.cs index 56aede7fbad..5acf61f9d38 100644 --- a/src/BootstrapBlazor/Components/Table/IColumnCollection.cs +++ b/src/BootstrapBlazor/Components/Table/IColumnCollection.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 列集合接口 +/// 列集合接口 +/// 列collection接口 /// public interface IColumnCollection { /// - /// 获得 ITableColumn 集合 + /// 获得 ITableColumn 集合 + /// Gets ITableColumn collection /// List Columns { get; } } diff --git a/src/BootstrapBlazor/Components/Table/ITable.cs b/src/BootstrapBlazor/Components/Table/ITable.cs index 69fcb7529e4..598ad01258e 100644 --- a/src/BootstrapBlazor/Components/Table/ITable.cs +++ b/src/BootstrapBlazor/Components/Table/ITable.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// ITable 接口 +/// ITable 接口 +/// ITable 接口 /// public interface ITable : IColumnCollection { /// - /// 获得 ITable 实例配置的可见列集合 + /// 获得 ITable 实例配置的可见列集合 + /// Gets ITable instance配置的可见列collection /// IEnumerable GetVisibleColumns(); /// - /// 获得 过滤条件集合 + /// 获得 过滤条件集合 + /// Gets 过滤条件collection /// Dictionary Filters { get; } /// - /// 获得 过滤异步回调方法 + /// 获得 过滤异步回调方法 + /// Gets 过滤异步callback method /// Func? OnFilterAsync { get; } } diff --git a/src/BootstrapBlazor/Components/Table/ITableCellButton.cs b/src/BootstrapBlazor/Components/Table/ITableCellButton.cs index 0c9bdf7cd1a..82b5b617466 100644 --- a/src/BootstrapBlazor/Components/Table/ITableCellButton.cs +++ b/src/BootstrapBlazor/Components/Table/ITableCellButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// ITableCellButton 接口 +/// ITableCellButton 接口 +/// ITableCellButton Interface /// public interface ITableCellButton : ITableCellComponent { /// - /// 获得/设置 点击按钮是否选中正行 默认 true 选中 + /// 获得/设置 点击按钮是否选中正行 默认 true 选中 + /// Gets or sets whether select current row. Default is true /// bool AutoSelectedRowWhenClick { get; set; } /// - /// 获得/设置 点击按钮是否重新渲染 Table 组件 默认 false 不重新渲染 - /// 设置 true 时会调用 方法,触发 回调 + /// 获得/设置 点击按钮是否重新渲染 Table 组件 默认 false 不重新渲染 设置 true 时会调用 方法,触发 回调 + /// Gets or sets 点击buttonwhether重新渲染 Table component Default is false 不重新渲染 Sets true 时会调用 方法,触发 回调 /// bool AutoRenderTableWhenClick { get; set; } } diff --git a/src/BootstrapBlazor/Components/Table/ITableCellComponent.cs b/src/BootstrapBlazor/Components/Table/ITableCellComponent.cs index 2657a29f275..08c4b1766b4 100644 --- a/src/BootstrapBlazor/Components/Table/ITableCellComponent.cs +++ b/src/BootstrapBlazor/Components/Table/ITableCellComponent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// ITableCellComponent 单元格组件接口 +/// ITableCellComponent 单元格组件接口 +/// ITableCellComponent 单元格component接口 /// public interface ITableCellComponent { diff --git a/src/BootstrapBlazor/Components/Table/ITableColumn.cs b/src/BootstrapBlazor/Components/Table/ITableColumn.cs index ac004056c6b..70098eca1b1 100644 --- a/src/BootstrapBlazor/Components/Table/ITableColumn.cs +++ b/src/BootstrapBlazor/Components/Table/ITableColumn.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,197 +6,236 @@ namespace BootstrapBlazor.Components; /// -/// ITableHeader interface +/// ITableHeader interface +/// ITableHeader interface /// public interface ITableColumn : IEditorItem { /// - /// Gets or sets whether the current item is ignored when export operation. Default is false. + /// 获得/设置 是否 the current item is ignored when export operation. 默认为 false. + /// Gets or sets whether the current item is ignored when export operation. Default is false. /// bool? IgnoreWhenExport { get; set; } /// - /// Gets or sets whether sorting is allowed. Default is null. + /// 获得/设置 是否 sorting is allowed. 默认为 null. + /// Gets or sets whether sorting is allowed. Default is null. /// bool? Sortable { get; set; } /// - /// Gets or sets whether it is the default sort column. Default is false. + /// 获得/设置 是否 it is the default sort column. 默认为 false. + /// Gets or sets whether it is the default sort column. Default is false. /// bool DefaultSort { get; set; } /// - /// Gets or sets the default sort order. Default is SortOrder.Unset. + /// 获得/设置 the default sort order. 默认为 SortOrder.Unset. + /// Gets or sets the default sort order. Default is SortOrder.Unset. /// SortOrder DefaultSortOrder { get; set; } /// - /// Gets or sets whether data filtering is allowed. Default is null. + /// 获得/设置 是否 数据 filtering is allowed. 默认为 null. + /// Gets or sets whether data filtering is allowed. Default is null. /// bool? Filterable { get; set; } /// - /// Gets or sets whether the column participates in search. Default is null. + /// 获得/设置 是否 the column participates in search. 默认为 null. + /// Gets or sets whether the column participates in search. Default is null. /// bool? Searchable { get; set; } /// - /// Gets or sets the column width. + /// 获得/设置 the column 宽度. + /// Gets or sets the column width. /// int? Width { get; set; } /// - /// Gets or sets whether the column is fixed. Default is false. + /// 获得/设置 是否 the column is fixed. 默认为 false. + /// Gets or sets whether the column is fixed. Default is false. /// bool Fixed { get; set; } /// - /// Gets or sets whether text wrapping is allowed in this column. Default is null. + /// 获得/设置 是否 text wrapping is allowed in this column. 默认为 null. + /// Gets or sets whether text wrapping is allowed in this column. Default is null. /// bool? TextWrap { get; set; } /// - /// Gets or sets whether text overflow is ellipsis in this column. Default is null. + /// 获得/设置 是否 text overflow is ellipsis in this column. 默认为 null. + /// Gets or sets whether text overflow is ellipsis in this column. Default is null. /// bool? TextEllipsis { get; set; } /// - /// Gets or sets whether the header text is allowed to wrap. Default is false. + /// 获得/设置 是否 the header text is allowed to wrap. 默认为 false. + /// Gets or sets whether the header text is allowed to wrap. Default is false. /// bool HeaderTextWrap { get; set; } /// - /// Gets or sets whether the header shows a tooltip. Default is false. Can be used with . This parameter is not effective when is set to true. + /// 获得/设置 是否 the header shows a tooltip. 默认为 false. Can be used with . This parameter is not effective when is set to true. + /// Gets or sets whether the header shows a tooltip. Default is false. Can be used with . This parameter is not effective when is set to true. /// bool ShowHeaderTooltip { get; set; } /// - /// Gets or sets the header tooltip content. + /// 获得/设置 the header tooltip 内容. + /// Gets or sets the header tooltip content. /// string? HeaderTextTooltip { get; set; } /// - /// Gets or sets whether the header text is truncated when overflowing. Default is false. Can be used with . This parameter is not effective when is set to true. + /// 获得/设置 是否 the header text is truncated when overflowing. 默认为 false. Can be used with . This parameter is not effective when is set to true. + /// Gets or sets whether the header text is truncated when overflowing. Default is false. Can be used with . This parameter is not effective when is set to true. /// bool HeaderTextEllipsis { get; set; } /// - /// Gets or sets the custom CSS class for the column td. Default is null. + /// 获得/设置 the custom CSS class for the column td. 默认为 null. + /// Gets or sets the custom CSS class for the column td. Default is null. /// string? CssClass { get; set; } /// - /// Gets or sets the breakpoint at which the column is shown. Default is BreakPoint.None. + /// 获得/设置 the breakpoint at which the column is shown. 默认为 BreakPoint.None. + /// Gets or sets the breakpoint at which the column is shown. Default is BreakPoint.None. /// BreakPoint ShownWithBreakPoint { get; set; } /// - /// Gets or sets whether the column can be copied. Default is null. + /// 获得/设置 是否 the column can be copied. 默认为 null. + /// Gets or sets whether the column can be copied. Default is null. /// bool? ShowCopyColumn { get; set; } /// - /// Gets or sets the display template. + /// 获得/设置 the 显示 模板. + /// Gets or sets the display template. /// RenderFragment? Template { get; set; } /// - /// Gets or sets the search template. + /// 获得/设置 the search 模板. + /// Gets or sets the search template. /// RenderFragment? SearchTemplate { get; set; } /// - /// Gets or sets the filter template. + /// 获得/设置 the filter 模板. + /// Gets or sets the filter template. /// RenderFragment? FilterTemplate { get; set; } /// - /// Gets or sets the header template. + /// 获得/设置 the header 模板. + /// Gets or sets the header template. /// RenderFragment? HeaderTemplate { get; set; } /// - /// Gets or sets the toolbox template. Default is null. + /// 获得/设置 the toolbox 模板. 默认为 null. + /// Gets or sets the toolbox template. Default is null. /// RenderFragment? ToolboxTemplate { get; set; } /// - /// Gets or sets the column filter. + /// 获得/设置 the column filter. + /// Gets or sets the column filter. /// IFilter? Filter { get; set; } /// - /// Gets or sets the format string, such as "yyyy-MM-dd" for date types. + /// 获得/设置 the format string, such as "yyyy-MM-dd" for date 类型s. + /// Gets or sets the format string, such as "yyyy-MM-dd" for date types. /// string? FormatString { get; set; } /// - /// Gets or sets the column format callback delegate . + /// 获得/设置 the column format 回调 委托 . + /// Gets or sets the column format callback delegate . /// Func>? Formatter { get; set; } /// - /// Gets or sets the text alignment. Default is null, using Alignment.None. + /// 获得/设置 the text alignment. 默认为 null, using Alignment.None. + /// Gets or sets the text alignment. Default is null, using Alignment.None. /// Alignment? Align { get; set; } /// - /// Gets or sets whether to show tooltips on mouse hover. Default is null, using false value. + /// 获得/设置 是否 to show tooltips on mouse hover. 默认为 null, using false value. + /// Gets or sets whether to show tooltips on mouse hover. Default is null, using false value. /// bool? ShowTips { get; set; } /// - /// Gets or sets the custom tooltip content callback delegate. Default is null, using the current value. + /// 获得/设置 the custom tooltip 内容 回调 委托. 默认为 null, using the current value. + /// Gets or sets the custom tooltip content callback delegate. Default is null, using the current value. /// Func>? GetTooltipTextCallback { get; set; } /// - /// Gets or sets the cell render callback method. + /// 获得/设置 the cell render 回调方法. + /// Gets or sets the cell render callback method. /// Action? OnCellRender { get; set; } /// - /// Gets or sets whether the column is a MarkupString. Default is false. + /// 获得/设置 是否 the column is a MarkupString. 默认为 false. + /// Gets or sets whether the column is a MarkupString. Default is false. /// bool IsMarkupString { get; set; } /// - /// Gets or sets whether the column is required when adding a new item. Default is null. + /// 获得/设置 是否 the column is required when adding a new item. 默认为 null. + /// Gets or sets whether the column is required when adding a new item. Default is null. /// bool? IsRequiredWhenAdd { get; set; } /// - /// Gets or sets whether the column is required when editing an item. Default is null. + /// 获得/设置 是否 the column is required when editing an item. 默认为 null. + /// Gets or sets whether the column is required when editing an item. Default is null. /// bool? IsRequiredWhenEdit { get; set; } /// - /// Gets or sets whether the column is read-only when adding a new item. Default is null, using the value. + /// 获得/设置 是否 the column is read-only when adding a new item. 默认为 null, using the value. + /// Gets or sets whether the column is read-only when adding a new item. Default is null, using the value. /// bool? IsReadonlyWhenAdd { get; set; } /// - /// Gets or sets whether the column is read-only when editing an item. Default is null, using the value. + /// 获得/设置 是否 the column is read-only when editing an item. 默认为 null, using the value. + /// Gets or sets whether the column is read-only when editing an item. Default is null, using the value. /// bool? IsReadonlyWhenEdit { get; set; } /// - /// Gets or sets whether the current edit item is visible. Default is null, using true value. + /// 获得/设置 是否 the current edit item is visible. 默认为 null, using true value. + /// Gets or sets whether the current edit item is visible. Default is null, using true value. /// bool? Visible { get; set; } /// - /// Gets or sets whether the column is visible when adding a new item. Default is null, using the value. + /// 获得/设置 是否 the column is visible when adding a new item. 默认为 null, using the value. + /// Gets or sets whether the column is visible when adding a new item. Default is null, using the value. /// bool? IsVisibleWhenAdd { get; set; } /// - /// Gets or sets whether the column is visible when editing an item. Default is null, using the value. + /// 获得/设置 是否 the column is visible when editing an item. 默认为 null, using the value. + /// Gets or sets whether the column is visible when editing an item. Default is null, using the value. /// bool? IsVisibleWhenEdit { get; set; } /// - /// Gets or sets the custom search logic. + /// 获得/设置 the custom search logic. + /// Gets or sets the custom search logic. /// Func? CustomSearch { get; set; } } diff --git a/src/BootstrapBlazor/Components/Table/ITableEditDialogOption.cs b/src/BootstrapBlazor/Components/Table/ITableEditDialogOption.cs index 2de2fdf428d..6b827c680d7 100644 --- a/src/BootstrapBlazor/Components/Table/ITableEditDialogOption.cs +++ b/src/BootstrapBlazor/Components/Table/ITableEditDialogOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,102 +8,122 @@ namespace BootstrapBlazor.Components; /// -/// Table 编辑配置接口 +/// Table 编辑配置接口 +/// Table 编辑配置接口 /// public interface ITableEditDialogOption { /// - /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false + /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false + /// Gets or sets componentwhether采用 Tracking 模式对编辑项进行直接更新 Default is false /// bool IsTracking { get; set; } /// - /// 获得/设置 是否显示标签 默认为 true 显示标签 + /// 获得/设置 是否显示标签 默认为 true 显示标签 + /// Gets or sets whetherdisplay标签 Default is为 true display标签 /// bool ShowLabel { get; set; } /// - /// 获得/设置 实体类编辑模式 Add 还是 Update + /// 获得/设置 实体类编辑模式 Add 还是 Update + /// Gets or sets 实体类编辑模式 Add 还是 Update /// ItemChangedType ItemChangedType { get; set; } /// - /// 获得/设置 每行显示组件数量 默认为 null + /// 获得/设置 每行显示组件数量 默认为 null + /// Gets or sets 每行displaycomponent数量 Default is为 null /// int? ItemsPerRow { get; set; } /// - /// 获得/设置 设置行内组件布局格式 默认 Row 布局 + /// 获得/设置 设置行内组件布局格式 默认 Row 布局 + /// Gets or sets Sets行内component布局格式 Default is Row 布局 /// RowType RowType { get; set; } /// - /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// Gets or sets Sets Inline 模式下标签对齐方式 Default is None 等效于 Left 左对齐 /// Alignment LabelAlign { get; set; } /// - /// 获得/设置 查询时是否显示正在加载中动画 默认为 false + /// 获得/设置 查询时是否显示正在加载中动画 默认为 false + /// Gets or sets 查询时whetherdisplay正在加载中动画 Default is为 false /// bool ShowLoading { get; set; } /// - /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// Gets or sets 未分组编辑项布局位置 Default is false 在尾部 /// bool ShowUnsetGroupItemsOnTop { get; set; } /// - /// 获得/设置 编辑框模型 + /// 获得/设置 编辑框模型 + /// Gets or sets 编辑框模型 /// TModel? Model { get; set; } /// - /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// Gets or sets whether禁用表单内回车自动提交功能 Default is null 未Sets /// bool? DisableAutoSubmitFormByEnter { get; set; } /// - /// 获得/设置 保存按钮文本 + /// 获得/设置 保存按钮文本 + /// Gets or sets 保存button文本 /// string? SaveButtonText { get; set; } /// - /// 获得/设置 保存按钮图标 默认 null 使用当前主题图标 + /// 获得/设置 保存按钮图标 默认 null 使用当前主题图标 + /// Gets or sets 保存buttonicon Default is null 使用当前主题icon /// string? SaveButtonIcon { get; set; } /// - /// 获得/设置 关闭按钮文本 + /// 获得/设置 关闭按钮文本 + /// Gets or sets 关闭button文本 /// string? CloseButtonText { get; set; } /// - /// 获得/设置 关闭按钮图标 默认 null 使用当前主题图标 + /// 获得/设置 关闭按钮图标 默认 null 使用当前主题图标 + /// Gets or sets 关闭buttonicon Default is null 使用当前主题icon /// string? CloseButtonIcon { get; set; } /// - /// 获得 编辑项集合 + /// 获得 编辑项集合 + /// Gets 编辑项collection /// IEnumerable? Items { get; set; } /// - /// 获得/设置 保存回调委托 + /// 获得/设置 保存回调委托 + /// Gets or sets 保存回调delegate /// Func>? OnEditAsync { get; set; } /// - /// 获得/设置 关闭弹窗回调方法 + /// 获得/设置 关闭弹窗回调方法 + /// Gets or sets 关闭弹窗callback method /// Func? OnCloseAsync { get; set; } /// - /// 获得/设置 EditDialog Body 模板 + /// 获得/设置 EditDialog Body 模板 + /// Gets or sets EditDialog Body template /// RenderFragment? DialogBodyTemplate { get; set; } /// - /// 获得/设置 EditDialog Footer 模板 + /// 获得/设置 EditDialog Footer 模板 + /// Gets or sets EditDialog Footer template /// RenderFragment? DialogFooterTemplate { get; set; } } diff --git a/src/BootstrapBlazor/Components/Table/ITableExportContext.cs b/src/BootstrapBlazor/Components/Table/ITableExportContext.cs index 91ac6b7c488..0a3fbe19d56 100644 --- a/src/BootstrapBlazor/Components/Table/ITableExportContext.cs +++ b/src/BootstrapBlazor/Components/Table/ITableExportContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,34 +6,40 @@ namespace BootstrapBlazor.Components; /// -/// Table 导出数据上下文接口 +/// Table 导出数据上下文接口 +/// Table 导出data上下文接口 /// /// public interface ITableExportContext { /// - /// 获得 Table 实例所有列集合 + /// 获得 Table 实例所有列集合 + /// Gets Table instance所有列collection /// IEnumerable Columns { get; } /// - /// 获得 当前 行数据集合 + /// 获得 当前 行数据集合 + /// Gets 当前 行datacollection /// IEnumerable Rows { get; } /// - /// 获得 当前 Table 内置查询条件方法 + /// 获得 当前 Table 内置查询条件方法 + /// Gets 当前 Table 内置查询条件方法 /// /// QueryPageOptions BuildQueryPageOptions(); /// - /// 获得 当前 Table 内置 ExportAsync 方法 + /// 获得 当前 Table 内置 ExportAsync 方法 + /// Gets 当前 Table 内置 ExportAsync 方法 /// Task ExportAsync(); /// - /// 获得 当前 Table 显示列集合 + /// 获得 当前 Table 显示列集合 + /// Gets 当前 Table display列collection /// /// IEnumerable GetVisibleColumns(); diff --git a/src/BootstrapBlazor/Components/Table/ITableExportDataContext.cs b/src/BootstrapBlazor/Components/Table/ITableExportDataContext.cs index 242b19d220d..ef2a5da5383 100644 --- a/src/BootstrapBlazor/Components/Table/ITableExportDataContext.cs +++ b/src/BootstrapBlazor/Components/Table/ITableExportDataContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,28 +6,33 @@ namespace BootstrapBlazor.Components; /// -/// Table 导出数据上下文接口 +/// Table 导出数据上下文接口 +/// Table 导出data上下文接口 /// /// public interface ITableExportDataContext { /// - /// 获得 导出类型 枚举类型 + /// 获得 导出类型 枚举类型 + /// Gets 导出type enumtype /// TableExportType ExportType { get; } /// - /// 获得 当前 行数据集合 + /// 获得 当前 行数据集合 + /// Gets 当前 行datacollection /// IEnumerable Rows { get; } /// - /// 获得 当前表格可见列集合 + /// 获得 当前表格可见列集合 + /// Gets 当前表格可见列collection /// IEnumerable Columns { get; } /// - /// 获得 当前 Table 内置查询条件方法 + /// 获得 当前 Table 内置查询条件方法 + /// Gets 当前 Table 内置查询条件方法 /// QueryPageOptions Options { get; } } diff --git a/src/BootstrapBlazor/Components/Table/ITableSearchModel.cs b/src/BootstrapBlazor/Components/Table/ITableSearchModel.cs index e84d77fb6b0..f8ae0e3d202 100644 --- a/src/BootstrapBlazor/Components/Table/ITableSearchModel.cs +++ b/src/BootstrapBlazor/Components/Table/ITableSearchModel.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,28 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件自定义搜索模型接口定义 +/// Table 组件自定义搜索模型接口定义 +/// Table component自定义搜索模型接口定义 /// public interface ITableSearchModel { /// - /// 获得 搜索集合 + /// 获得 搜索集合 + /// Gets 搜索collection /// [Obsolete("This method is obsolete. Use GetSearches instead. 已过期,请使用 GetSearches 方法")] [ExcludeFromCodeCoverage] IEnumerable GetSearchs() => GetSearches(); /// - /// 获得 搜索集合 + /// 获得 搜索集合 + /// Gets 搜索collection /// IEnumerable GetSearches(); /// - /// 重置操作 + /// 重置操作 + /// 重置操作 /// void Reset(); } diff --git a/src/BootstrapBlazor/Components/Table/ITableToolbarButton.cs b/src/BootstrapBlazor/Components/Table/ITableToolbarButton.cs index 56c39e1b919..dfb949f8dd2 100644 --- a/src/BootstrapBlazor/Components/Table/ITableToolbarButton.cs +++ b/src/BootstrapBlazor/Components/Table/ITableToolbarButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// ITableToolbarButton 接口 +/// ITableToolbarButton 接口 +/// ITableToolbarButton 接口 /// public interface ITableToolbarButton : IToolbarComponent { /// - /// 获得/设置 选中一行时启用按钮 默认 false 均可用 + /// 获得/设置 选中一行时启用按钮 默认 false 均可用 + /// Gets or sets 选中一行时启用button Default is false 均可用 /// bool IsEnableWhenSelectedOneRow { get; set; } /// - /// 获得/设置 按钮是否被禁用回调方法 + /// 获得/设置 按钮是否被禁用回调方法 + /// Gets or sets buttonwhether被禁用callback method /// Func, bool>? IsDisabledCallback { get; set; } } diff --git a/src/BootstrapBlazor/Components/Table/IToolbarComponent.cs b/src/BootstrapBlazor/Components/Table/IToolbarComponent.cs index 2f3d6dd3e68..1b3b5437f56 100644 --- a/src/BootstrapBlazor/Components/Table/IToolbarComponent.cs +++ b/src/BootstrapBlazor/Components/Table/IToolbarComponent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 工具栏按钮接口 +/// IToolbarComponent 接口 +/// IToolbarComponent interface /// public interface IToolbarComponent { /// - /// 获得/设置 是否显示 默认 true 显示 + /// 获得/设置 是否显示 默认 true 显示 + /// Gets or sets whether display Default is true display /// bool IsShow { get; set; } } diff --git a/src/BootstrapBlazor/Components/Table/InternalTableColumn.cs b/src/BootstrapBlazor/Components/Table/InternalTableColumn.cs index b0f4ec945af..d05ff3c13ab 100644 --- a/src/BootstrapBlazor/Components/Table/InternalTableColumn.cs +++ b/src/BootstrapBlazor/Components/Table/InternalTableColumn.cs @@ -28,168 +28,201 @@ class InternalTableColumn(string fieldName, Type fieldType, string? fieldText = public bool? TextEllipsis { get; set; } /// - /// 获得/设置 是否不进行验证 默认为 false + /// 获得/设置 是否不进行验证 默认为 false + /// Gets or sets whether不进行验证 Default is为 false /// public bool SkipValidate { get; set; } /// - /// + /// + /// /// public bool? Ignore { get; set; } /// - /// + /// + /// /// public bool? Readonly { get; set; } /// - /// + /// + /// /// public bool? IsReadonlyWhenAdd { get; set; } /// - /// + /// + /// /// public bool? IsReadonlyWhenEdit { get; set; } /// - /// + /// + /// /// public bool? Visible { get; set; } /// - /// + /// + /// /// public bool? IsVisibleWhenAdd { get; set; } = true; /// - /// + /// + /// /// public bool? IsVisibleWhenEdit { get; set; } = true; /// - /// + /// + /// /// public bool? Required { get; set; } /// - /// + /// + /// /// public bool? IsRequiredWhenAdd { get; set; } /// - /// + /// + /// /// public bool? IsRequiredWhenEdit { get; set; } /// - /// + /// + /// /// public string? RequiredErrorMessage { get; set; } /// - /// + /// + /// /// public bool? ShowLabelTooltip { get; set; } /// - /// + /// + /// /// public string? CssClass { get; set; } /// - /// + /// + /// /// public BreakPoint ShownWithBreakPoint { get; set; } /// - /// + /// + /// /// public RenderFragment? Template { get; set; } /// - /// + /// + /// /// public RenderFragment? SearchTemplate { get; set; } /// - /// + /// + /// /// public RenderFragment? FilterTemplate { get; set; } /// - /// + /// + /// /// public RenderFragment? HeaderTemplate { get; set; } /// - /// + /// + /// /// public RenderFragment? ToolboxTemplate { get; set; } /// - /// + /// + /// /// public IFilter? Filter { get; set; } /// - /// + /// + /// /// public string? FormatString { get; set; } /// - /// + /// + /// /// public string? PlaceHolder { get; set; } /// - /// + /// + /// /// public Func>? Formatter { get; set; } /// - /// + /// + /// /// public Alignment? Align { get; set; } /// - /// + /// + /// /// public bool? ShowTips { get; set; } /// - /// + /// + /// /// public Func>? GetTooltipTextCallback { get; set; } /// - /// + /// + /// /// public Type PropertyType { get; } = fieldType; /// - /// + /// + /// /// [ExcludeFromCodeCoverage] public bool Editable { get; set; } = true; /// - /// + /// + /// /// public string? Step { get; set; } /// - /// + /// + /// /// public int Rows { get; set; } /// - /// + /// + /// /// public int Cols { get; set; } /// - /// + /// + /// /// [NotNull] public string? Text { get; set; } = fieldText; @@ -197,134 +230,160 @@ class InternalTableColumn(string fieldName, Type fieldType, string? fieldText = public RenderFragment? EditTemplate { get; set; } /// - /// + /// + /// /// public Type? ComponentType { get; set; } /// - /// + /// + /// /// public IEnumerable>? ComponentParameters { get; set; } /// - /// + /// + /// /// public IEnumerable? Items { get; set; } /// - /// + /// + /// /// public int Order { get; set; } /// - /// + /// + /// /// public IEnumerable? Lookup { get; set; } /// - /// + /// + /// /// public bool ShowSearchWhenSelect { get; set; } /// - /// + /// + /// /// [Obsolete("已弃用,请删除;Deprecated, please delete")] [ExcludeFromCodeCoverage] public bool IsFixedSearchWhenSelect { get; set; } /// - /// + /// + /// /// public bool IsPopover { get; set; } /// - /// > + /// + /// /// public StringComparison LookupStringComparison { get; set; } = StringComparison.OrdinalIgnoreCase; /// - /// > + /// + /// /// public string? LookupServiceKey { get; set; } /// - /// > + /// + /// /// public object? LookupServiceData { get; set; } /// - /// + /// + /// /// public ILookupService? LookupService { get; set; } /// - /// + /// + /// /// public Action? OnCellRender { get; set; } /// - /// + /// + /// /// public List? ValidateRules { get; set; } /// - /// + /// + /// /// public string? GroupName { get; set; } /// - /// + /// + /// /// public int GroupOrder { get; set; } /// - /// + /// + /// /// public bool? ShowCopyColumn { get; set; } /// - /// + /// + /// /// public bool HeaderTextWrap { get; set; } /// - /// + /// + /// /// public bool ShowHeaderTooltip { get; set; } /// - /// + /// + /// /// public string? HeaderTextTooltip { get; set; } /// - /// + /// + /// /// public bool HeaderTextEllipsis { get; set; } /// - /// + /// + /// /// public bool IsMarkupString { get; set; } /// - /// + /// + /// /// public string GetDisplayName() => Text; /// - /// + /// + /// /// public string GetFieldName() => FieldName; /// - /// + /// + /// /// public Func? CustomSearch { get; set; } /// - /// + /// + /// /// public bool? IgnoreWhenExport { get; set; } } diff --git a/src/BootstrapBlazor/Components/Table/ItemChangedType.cs b/src/BootstrapBlazor/Components/Table/ItemChangedType.cs index 298130243bc..6eb8604f4b5 100644 --- a/src/BootstrapBlazor/Components/Table/ItemChangedType.cs +++ b/src/BootstrapBlazor/Components/Table/ItemChangedType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 数据变化类型 +/// 数据变化类型 +/// data变化type /// public enum ItemChangedType { /// - /// 新建 + /// 新建 + /// 新建 /// Add, /// - /// 更新 + /// 更新 + /// 更新 /// Update, } diff --git a/src/BootstrapBlazor/Components/Table/LookupContent.cs b/src/BootstrapBlazor/Components/Table/LookupContent.cs index cc683e1d69b..894e687acf4 100644 --- a/src/BootstrapBlazor/Components/Table/LookupContent.cs +++ b/src/BootstrapBlazor/Components/Table/LookupContent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -11,36 +11,43 @@ internal class LookupContent : ComponentBase, ILookup { /// /// + /// 10.2.2 /// [Parameter] public IEnumerable? Lookup { get; set; } /// /// + /// 10.2.2 /// [Parameter] public ILookupService? LookupService { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? LookupServiceKey { get; set; } /// /// + /// 10.2.2 /// [Parameter] public object? LookupServiceData { get; set; } /// /// + /// 10.2.2 /// [Parameter] public StringComparison LookupStringComparison { get; set; } = StringComparison.OrdinalIgnoreCase; /// - /// 获得/设置 显示值 + /// 获得/设置 显示值 + /// Gets or sets display值 + /// 10.2.2 /// [Parameter] public string? Value { get; set; } diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Checkbox.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Checkbox.cs index b9775225493..c2227ca6271 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Checkbox.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Checkbox.cs @@ -8,49 +8,59 @@ namespace BootstrapBlazor.Components; public partial class Table { /// - /// 获得 选择列显示文字 + /// 获得 选择列显示文字 + /// Get Checkbox Column Display Text /// protected string? CheckboxDisplayTextString => ShowCheckboxText ? CheckboxDisplayText : null; /// - /// 获得 thead 样式表集合 + /// 获得 thead 样式表集合 + /// Get thead style sheet collection /// protected string? HeaderClass => CssBuilder.Default() .AddClass(HeaderStyle.ToDescriptionString(), HeaderStyle != TableHeaderStyle.None) .Build(); /// - /// 获得/设置 是否保持选择行,默认为 false 不保持 + /// 获得/设置 是否保持选择行,默认为 false 不保持 + /// Get/Set Whether to keep selected rows. Default false + /// 10.2.2 /// [Parameter] public bool IsKeepSelectedRows { get; set; } /// - /// 获得/设置 新建数据是否保持原选择行,默认为 false 不保持 + /// 获得/设置 新建数据是否保持原选择行,默认为 false 不保持 + /// Get/Set Keep selected rows after adding data. Default false + /// 10.2.2 /// [Parameter] public bool IsKeepSelectedRowAfterAdd { get; set; } /// - /// 获得 表头行是否选中状态 + /// 获得 表头行是否选中状态 + /// Get Header Row Check State /// /// protected CheckboxState HeaderCheckState() { var ret = CheckboxState.UnChecked; - //过滤掉不可选择的记录 + // 过滤掉不可选择的记录 + // Filter out unselectable records var filterRows = ShowRowCheckboxCallback == null ? Rows : Rows.Where(ShowRowCheckboxCallback); if (filterRows.Any()) { if (!filterRows.Except(SelectedRows).Any()) { - // 所有行被选中 + // 所有行被选中 + // All rows are selected // all rows are selected ret = CheckboxState.Checked; } else if (filterRows.Any(row => SelectedRows.Any(i => Equals(i, row)))) { - // 任意一行被选中 + // 任意一行被选中 + // Any one row is selected // any one row is selected ret = CheckboxState.Indeterminate; } @@ -59,28 +69,35 @@ protected CheckboxState HeaderCheckState() } /// - /// 获得 当前行是否被选中 + /// 获得 当前行是否被选中 + /// Get whether current row is selected /// /// /// protected CheckboxState RowCheckState(TItem item) => SelectedRows.Any(i => Equals(i, item)) ? CheckboxState.Checked : CheckboxState.UnChecked; /// - /// 获得/设置 是否为多选模式 默认为 false + /// 获得/设置 是否为多选模式 默认为 false + /// Get/Set Multiple Selection Mode. Default false + /// 10.2.2 /// /// 此参数在 模式下为 true [Parameter] public bool IsMultipleSelect { get; set; } /// - /// 获得/设置 是否显示选择框文字 默认为 false + /// 获得/设置 是否显示选择框文字 默认为 false + /// Get/Set Show Checkbox Text. Default false + /// 10.2.2 /// /// [Parameter] public bool ShowCheckboxText { get; set; } /// - /// 获得/设置 显示选择框文字 默认为 选择 + /// 获得/设置 显示选择框文字 默认为 选择 + /// Get/Set Checkbox Display Text. Default "Select" + /// 10.2.2 /// /// [Parameter] @@ -88,7 +105,9 @@ protected CheckboxState HeaderCheckState() public string? CheckboxDisplayText { get; set; } /// - /// 获得/设置 表格行是否显示选择框 默认全部显示 此属性在 参数为 true 时生效 + /// 获得/设置 表格行是否显示选择框 默认全部显示 此属性在 参数为 true 时生效 + /// Get/Set Whether to show row checkbox. Default show all. This property is effective when is true + /// 10.2.2 /// [Parameter] public Func? ShowRowCheckboxCallback { get; set; } @@ -96,7 +115,8 @@ protected CheckboxState HeaderCheckState() private bool GetShowRowCheckbox(TItem item) => ShowRowCheckboxCallback == null || ShowRowCheckboxCallback(item); /// - /// 点击 Header 选择复选框时触发此方法 + /// 点击 Header 选择复选框时触发此方法 + /// Header Checkbox Click Method /// /// /// @@ -111,7 +131,8 @@ protected virtual async Task OnHeaderCheck(CheckboxState state, TItem val) } /// - /// 点击选择复选框时触发此方法 + /// 点击选择复选框时触发此方法 + /// Checkbox Click Method /// protected async Task OnCheck(CheckboxState state, TItem val) { @@ -139,17 +160,21 @@ protected async Task OnCheck(CheckboxState state, TItem val) } /// - /// 是否重置列变量 方法中重置为 false + /// 是否重置列变量 方法中重置为 false + /// Whether to reset column variables. Reset to false in method /// private bool _resetColumns; /// - /// 是否重置列拖拽事件 方法中重置为 false + /// 是否重置列拖拽事件 方法中重置为 false + /// Whether to reset column drag listener. Reset to false in method /// private bool _resetColDragListener; /// - /// 获得/设置 列改变显示状态回调方法 + /// 获得/设置 列改变显示状态回调方法 + /// Get/Set Column Visible Changed Callback + /// 10.2.2 /// [Parameter] public Func? OnColumnVisibleChanged { get; set; } diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs index f5fa0d02ff1..a854557c175 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Edit.cs @@ -10,36 +10,45 @@ namespace BootstrapBlazor.Components; public partial class Table { /// - /// 获得/设置 编辑弹窗 Title 文字 + /// 获得/设置 编辑弹窗 Title 文字 + /// Get/Set Edit Dialog Title Text /// [NotNull] protected string? EditModalTitleString { get; set; } /// - /// 获得/设置 被选中数据集合 + /// 获得/设置 被选中数据集合 + /// Get/Set Selected Rows Collection + /// 10.2.2 /// [Parameter] public List SelectedRows { get; set; } = []; /// - /// 获得/设置 选中行变化回调方法 + /// 获得/设置 选中行变化回调方法 + /// Get/Set Selected Rows Changed Callback + /// 10.2.2 /// [Parameter] public EventCallback> SelectedRowsChanged { get; set; } /// - /// 获得/设置 新建行位置枚举 默认为 Last 最后 + /// 获得/设置 新建行位置枚举 默认为 Last 最后 + /// Get/Set Insert Row Mode. Default Last + /// 10.2.2 /// [Parameter] public InsertRowMode InsertRowMode { get; set; } = InsertRowMode.Last; /// - /// 获得/设置 是否正在查询数据 + /// 获得/设置 是否正在查询数据 + /// Get/Set Whether is querying data /// private bool IsLoading { get; set; } /// - /// 获得 渲染模式 + /// 获得 渲染模式 + /// Get Render Mode /// protected TableRenderMode ActiveRenderMode => RenderMode switch { @@ -48,160 +57,211 @@ public partial class Table }; /// - /// 获得/设置 客户端屏幕宽度 + /// 获得/设置 客户端屏幕宽度 + /// Get/Set Client Screen Width /// protected BreakPoint ScreenSize { get; set; } /// - /// 获得/设置 组件编辑模式 默认为弹窗编辑行数据 PopupEditForm + /// 获得/设置 组件编辑模式 默认为弹窗编辑行数据 PopupEditForm + /// Get/Set Edit Mode. Default PopupEditForm + /// 10.2.2 /// [Parameter] public EditMode EditMode { get; set; } /// - /// 获得/设置 组件布局方式 默认为 Auto + /// 获得/设置 组件布局方式 默认为 Auto + /// Get/Set Render Mode. Default Auto + /// 10.2.2 /// [Parameter] public TableRenderMode RenderMode { get; set; } /// - /// 获得/设置 组件布局自适应切换阈值 默认为 768 + /// 获得/设置 组件布局自适应切换阈值 默认为 768 + /// Get/Set Render Mode Responsive Width. Default 768 + /// 10.2.2 /// [Parameter] public BreakPoint RenderModeResponsiveWidth { get; set; } = BreakPoint.Medium; /// - /// 获得/设置 编辑弹框是否 Body 出现滚动条 默认 false + /// 获得/设置 编辑弹框是否 Body 出现滚动条 默认 false + /// Get/Set Whether to show scrollbar in Edit Dialog Body. Default false + /// 10.2.2 /// [Parameter] public bool ScrollingDialogContent { get; set; } /// - /// 获得/设置 是否支持键盘 ESC 关闭当前弹窗 默认 true 支持 + /// 获得/设置 是否支持键盘 ESC 关闭当前弹窗 默认 true 支持 + /// Get/Set Whether to support ESC key to close current dialog. Default true + /// 10.2.2 /// [Parameter] public bool IsKeyboard { get; set; } = true; /// - /// 获得/设置 行样式格式回调委托 + /// 获得/设置 行样式格式回调委托 + /// Get/Set Row Class Formatter Callback + /// 10.2.2 /// [Parameter] public Func? SetRowClassFormatter { get; set; } /// - /// 获得/设置 取消保存后回调委托方法 + /// 获得/设置 取消保存后回调委托方法 + /// Get/Set After Cancel Save Callback + /// 10.2.2 /// [Parameter] public Func? OnAfterCancelSaveAsync { get; set; } /// - /// 获得/设置 保存后回调委托方法 + /// 获得/设置 保存后回调委托方法 + /// Get/Set After Save Callback + /// 10.2.2 /// [Parameter] public Func? OnAfterSaveAsync { get; set; } /// - /// 获得/设置 删除后回调委托方法 + /// 获得/设置 删除后回调委托方法 + /// Get/Set After Delete Callback + /// 10.2.2 /// [Parameter] public Func, Task>? OnAfterDeleteAsync { get; set; } /// - /// 获得/设置 保存删除后回调委托方法 + /// 获得/设置 保存删除后回调委托方法 + /// Get/Set After Modify Callback + /// 10.2.2 /// [Parameter] public Func? OnAfterModifyAsync { get; set; } /// - /// 获得/设置 编辑数据弹窗 Title + /// 获得/设置 编辑数据弹窗 Title + /// Get/Set Edit Dialog Title + /// 10.2.2 /// [Parameter] [NotNull] public string? EditModalTitle { get; set; } /// - /// 获得/设置 新建数据弹窗 Title + /// 获得/设置 新建数据弹窗 Title + /// Get/Set Add Dialog Title + /// 10.2.2 /// [Parameter] [NotNull] public string? AddModalTitle { get; set; } /// - /// 获得/设置 EditModel 实例 + /// 获得/设置 EditModel 实例 + /// Get/Set EditModel Instance + /// 10.2.2 /// [Parameter] [NotNull] public TItem? EditModel { get; set; } /// - /// 获得/设置 EditTemplate 实例 + /// 获得/设置 EditTemplate 实例 + /// Get/Set EditTemplate Instance + /// 10.2.2 /// [Parameter] public RenderFragment? EditTemplate { get; set; } /// - /// 获得/设置 BeforeRowButtonTemplate 实例 此模板生成的按钮默认放置到按钮前面如需放置前面 请查看 + /// 获得/设置 BeforeRowButtonTemplate 实例 此模板生成的按钮默认放置到按钮前面如需放置前面 请查看 + /// Get/Set BeforeRowButtonTemplate Instance. The buttons generated by this template are placed before the button by default. If you need to place them in front, please check + /// 10.2.2 /// [Parameter] public RenderFragment? BeforeRowButtonTemplate { get; set; } /// - /// 获得/设置 RowButtonTemplate 实例 此模板生成的按钮默认放置到按钮后面如需放置前面 请查看 + /// 获得/设置 RowButtonTemplate 实例 此模板生成的按钮默认放置到按钮后面如需放置前面 请查看 + /// Get/Set RowButtonTemplate Instance. The buttons generated by this template are placed after the button by default. If you need to place them in front, please check + /// 10.2.2 /// [Parameter] public RenderFragment? RowButtonTemplate { get; set; } /// - /// 获得/设置 是否显示 行内更多按钮 默认 false 不显示 + /// 获得/设置 是否显示 行内更多按钮 默认 false 不显示 + /// Get/Set Whether to show inline more button. Default false + /// 10.2.2 /// [Parameter] public bool ShowMoreButton { get; set; } /// - /// 获得/设置 更多按钮颜色 默认 + /// 获得/设置 更多按钮颜色 默认 + /// Get/Set More Button Color. Default + /// 10.2.2 /// [Parameter] public Color MoreButtonColor { get; set; } = Color.Secondary; /// - /// 获得/设置 更多按钮文本 默认 null 读取资源文件设置文本 + /// 获得/设置 更多按钮文本 默认 null 读取资源文件设置文本 + /// Get/Set More Button Text. Default null (Read from resource file) + /// 10.2.2 /// [Parameter] public string? MoreButtonText { get; set; } /// - /// 获得/设置 行内更多按钮下拉框模板 默认 null + /// 获得/设置 行内更多按钮下拉框模板 默认 null + /// Get/Set Inline More Button Dropdown Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? MoreButtonDropdownTemplate { get; set; } /// - /// 获得/设置 行内功能按钮列头文本 默认为 操作 + /// 获得/设置 行内功能按钮列头文本 默认为 操作 + /// Get/Set Column Button Header Text. Default "Operation" + /// 10.2.2 /// [Parameter] [NotNull] public string? ColumnButtonTemplateHeaderText { get; set; } /// - /// 获得/设置 点击行即选中本行 默认为 false + /// 获得/设置 点击行即选中本行 默认为 false + /// Get/Set Click Row to Select. Default false + /// 10.2.2 /// [Parameter] public bool ClickToSelect { get; set; } /// - /// 获得/设置 单选模式下双击即编辑本行 默认为 false + /// 获得/设置 单选模式下双击即编辑本行 默认为 false + /// Get/Set Double Click Row to Edit in Single Select Mode. Default false + /// 10.2.2 /// [Parameter] public bool DoubleClickToEdit { get; set; } /// - /// 获得/设置 是否自动生成列信息 默认为 false + /// 获得/设置 是否自动生成列信息 默认为 false + /// Get/Set Whether to auto generate columns. Default false + /// 10.2.2 /// [Parameter] public bool AutoGenerateColumns { get; set; } /// - /// 获得/设置 查询时是否显示正在加载中动画 默认为 false + /// 获得/设置 查询时是否显示正在加载中动画 默认为 false + /// Get/Set Whether to show loading animation when querying. Default false + /// 10.2.2 /// [Parameter] public bool ShowLoading { get; set; } @@ -210,13 +270,16 @@ public partial class Table private string? DataServiceInvalidOperationText { get; set; } /// - /// 获得/设置 数据服务参数 组件采用就近原则 如果提供了 Items > OnQueryAsync > DataService > 全局注入的数据服务 IDataService + /// 获得/设置 数据服务参数 组件采用就近原则 如果提供了 Items > OnQueryAsync > DataService > 全局注入的数据服务 IDataService + /// Get/Set Data Service. Use nearby principle. Items > OnQueryAsync > DataService > Global Data Service + /// 10.2.2 /// [Parameter] public IDataService? DataService { get; set; } /// - /// 获得/设置 注入数据服务 + /// 获得/设置 注入数据服务 + /// Get/Set Injected Data Service /// [Inject] [NotNull] @@ -313,13 +376,17 @@ private async Task InternalOnAddAsync() } /// - /// 获得/设置 新建模型回调方法 默认 null 未设置时使用默认无参构造函数创建 + /// 获得/设置 新建模型回调方法 默认 null 未设置时使用默认无参构造函数创建 + /// Get/Set Create Item Callback. Default null. Use default parameterless constructor if not set + /// 10.2.2 /// [Parameter] public Func? CreateItemCallback { get; set; } /// - /// Get or sets Whether to automatically initialize model properties default value is false. + /// 获得/设置 是否自动初始化模型属性 默认为 false + /// Gets or sets Whether to automatically initialize model properties. Default value is false + /// 10.2.2 /// [Parameter] public bool IsAutoInitializeModelProperty { get; set; } @@ -343,7 +410,9 @@ private TItem CreateInstance() } /// - /// 获得/设置 新建搜索模型回调方法 默认 null 未设置时先 尝试使用 回调,再使用默认无参构造函数创建 + /// 获得/设置 新建搜索模型回调方法 默认 null 未设置时先 尝试使用 回调,再使用默认无参构造函数创建 + /// Get/Set Create Search Model Callback. Default null. Try to use callback first, then use default parameterless constructor + /// 10.2.2 /// [Parameter] public Func? CreateSearchModelCallback { get; set; } @@ -351,7 +420,8 @@ private TItem CreateInstance() private TItem CreateSearchModel() => CreateSearchModelCallback?.Invoke() ?? CreateTItem(); /// - /// 单选模式下选择行时调用此方法 + /// 单选模式下选择行时调用此方法 + /// Method called when a row is selected in single selection mode /// /// protected async Task ClickRow(TItem val) @@ -394,20 +464,23 @@ private async Task OnSelectedRowsChanged() } /// - /// 检查当前行是否被选中方法 + /// 检查当前行是否被选中方法 + /// Check if current row is selected /// /// /// protected virtual bool CheckActive(TItem val) => SelectedRows.Any(row => Equals(val, row)); /// - /// 刷新按钮回调方法 + /// 刷新按钮回调方法 + /// Refresh Button Callback /// /// protected Task OnClickRefreshAsync() => QueryAsync(); /// - /// 点击 CardView 按钮回调方法 + /// 点击 CardView 按钮回调方法 + /// Click CardView Button Callback /// /// protected void OnClickCardView() @@ -450,15 +523,17 @@ private async Task QueryAsync(bool shouldRender, int? pageIndex = null, bool tri } /// - /// 查询按钮调用此方法 参数 pageIndex 默认值 null 保持上次页码 第一页页码为 1 + /// 查询按钮调用此方法 参数 pageIndex 默认值 null 保持上次页码 第一页页码为 1 + /// Query Button calls this method. Parameter pageIndex default null, keep last page number. First page number is 1 /// /// public Task QueryAsync(int? pageIndex = null) => QueryAsync(true, pageIndex); /// - /// 显示/隐藏 Loading 遮罩 + /// 显示/隐藏 Loading 遮罩 + /// Show/Hide Loading Mask /// - /// true 时显示,false 时隐藏 + /// true 时显示,false 时隐藏true 时display,false 时隐藏 /// public async ValueTask ToggleLoading(bool state) { @@ -470,9 +545,10 @@ public async ValueTask ToggleLoading(bool state) } /// - /// 显示/隐藏 Loading 遮罩 + /// 显示/隐藏 Loading 遮罩 + /// Show/Hide Loading Mask /// - /// true 时显示,false 时隐藏 + /// true 时显示,false 时隐藏true 时display,false 时隐藏 /// protected async ValueTask InternalToggleLoading(bool state) { @@ -483,17 +559,20 @@ protected async ValueTask InternalToggleLoading(bool state) } /// - /// 调用 OnQuery 回调方法获得数据源 + /// 调用 OnQuery 回调方法获得数据源 + /// Call OnQuery callback to get data source /// protected async Task QueryData(bool triggerByPagination = false) { - // 目前设计使用 Items 参数后不回调 OnQueryAsync 方法 + // 目前设计使用 Items 参数后不回调 OnQueryAsync 方法 + // Currently designed so that OnQueryAsync is not called when Items parameter is used if (Items == null) { var queryOption = BuildQueryPageOptions(); - // 是否为分页查询 - queryOption.IsTriggerByPagination = triggerByPagination; - // 设置是否为首次查询 + // 是否为分页查询 + // Is triggered by pagination + // 设置是否为首次查询 + // Set whether it is the first query queryOption.IsFirstQuery = _firstQuery; if (OnQueryAsync == null && typeof(TItem).IsAssignableTo(typeof(IDynamicObject))) @@ -524,11 +603,13 @@ async Task OnQuery(QueryPageOptions queryOption) if (!IsKeepSelectedRows) { - // 处理选中行逻辑 + // 处理选中行逻辑 + // Process selected row logic ResetSelectedRows(QueryItems); } - // 分页情况下内部不做处理防止页码错乱 + // 分页情况下内部不做处理防止页码错乱 + // Do not process internally in pagination case to prevent page number disorder ProcessData(); if (IsTree) @@ -536,7 +617,8 @@ async Task OnQuery(QueryPageOptions queryOption) await ProcessTreeData(); } - // 更新数据后清除缓存防止新数据不显示 + // 更新数据后清除缓存防止新数据不显示 + // Clear cache after updating data to prevent new data from not showing _rowsCache = null; return; @@ -546,14 +628,16 @@ void ProcessData() var sorted = queryData.IsSorted; var searched = queryData.IsSearch; - // 外部未处理 SearchText 模糊查询 + // 外部未处理 SearchText 模糊查询 + // External not handled SearchText fuzzy query if (!searched && queryOption.Searches.Count > 0) { QueryItems = QueryItems.Where(queryOption.Searches.GetFilterFunc(FilterLogic.Or)); TotalCount = QueryItems.Count(); } - // 外部未处理自定义高级搜索 内部进行高级自定义搜索过滤 + // 外部未处理自定义高级搜索 内部进行高级自定义搜索过滤 + // External not handled custom advanced search, internal advanced custom search filtering if (!IsAdvanceSearch && queryOption.CustomerSearches.Count > 0) { QueryItems = QueryItems.Where(queryOption.CustomerSearches.GetFilterFunc()); @@ -561,15 +645,18 @@ void ProcessData() IsAdvanceSearch = true; } - // 外部未过滤,内部自行过滤 + // 外部未过滤,内部自行过滤 + // External not filtered, internal filtering if (!filtered && queryOption.Filters.Count > 0) { QueryItems = QueryItems.Where(queryOption.Filters.GetFilterFunc()); TotalCount = QueryItems.Count(); } - // 外部未处理排序,内部自行排序 - // 先处理列头排序 再处理默认多列排序 + // 外部未处理排序,内部自行排序 + // External not handled sorting, internal sorting + // 先处理列头排序 再处理默认多列排序 + // Process column header sort first, then default multi-column sort if (!sorted) { if (OnSort == null && queryOption.SortOrder != SortOrder.Unset && !string.IsNullOrEmpty(queryOption.SortName)) @@ -604,7 +691,8 @@ async Task ProcessTreeData() async Task CheckExpand(IEnumerable> nodes) { - // 恢复当前节点状态 + // 恢复当前节点状态 + // Restore current node state foreach (var node in nodes) { await TreeNodeCache.CheckExpandAsync(node, GetChildrenRowAsync); @@ -693,7 +781,8 @@ private async Task ClickEditButton(TItem item) SelectedRows.Add(item); await OnSelectedRowsChanged(); - // 更新行选中状态 + // 更新行选中状态 + // Update row selection state await EditAsync(); } @@ -703,7 +792,8 @@ private async Task ClickEditButton(TItem item) private async Task ClickUpdateButtonCallback() { - // 验证 InCell 模式下的表单 + // 验证 InCell 模式下的表单 + // Validate form in InCell mode var valid = await _inCellValidateForm.ValidateAsync(); if (!valid) { @@ -715,7 +805,8 @@ private async Task ClickUpdateButtonCallback() } /// - /// 双击行回调此方法 + /// 双击行回调此方法 + /// Double click row callback method /// /// protected async Task DoubleClickRow(TItem item) @@ -734,7 +825,8 @@ protected async Task DoubleClickRow(TItem item) } /// - /// 行尾列按钮点击回调此方法 + /// 行尾列按钮点击回调此方法 + /// Row button click callback method /// /// protected Func> ClickBeforeDelete(TItem item) => () => diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs index e0ab238f8b9..dca02f06e05 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Localization.cs @@ -10,351 +10,455 @@ namespace BootstrapBlazor.Components; public partial class Table { /// - /// 获得/设置 新建按钮文本 + /// 获得/设置 新建按钮文本 + /// Get/Set Add Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? AddButtonText { get; set; } /// - /// 获得/设置 新建按钮图标 + /// 获得/设置 新建按钮图标 + /// Get/Set Add Button Icon + /// 10.2.2 /// [Parameter] public string? AddButtonIcon { get; set; } /// - /// 获得/设置 编辑按钮文本 + /// 获得/设置 编辑按钮文本 + /// Get/Set Edit Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? EditButtonText { get; set; } /// - /// 获得/设置 编辑按钮图标 + /// 获得/设置 编辑按钮图标 + /// Get/Set Edit Button Icon + /// 10.2.2 /// [Parameter] public string? EditButtonIcon { get; set; } /// - /// 获得/设置 更多按钮图标 + /// 获得/设置 更多按钮图标 + /// Get/Set More Button Icon + /// 10.2.2 /// [Parameter] public string? MoreButtonIcon { get; set; } /// - /// 获得/设置 更新按钮文本 + /// 获得/设置 更新按钮文本 + /// Get/Set Update Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? UpdateButtonText { get; set; } /// - /// 获得/设置 取消按钮文本 + /// 获得/设置 取消按钮文本 + /// Get/Set Cancel Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? CancelButtonText { get; set; } /// - /// 获得/设置 取消按钮图标 + /// 获得/设置 取消按钮图标 + /// Get/Set Cancel Button Icon + /// 10.2.2 /// [Parameter] public string? CancelButtonIcon { get; set; } /// - /// 获得/设置 删除按钮文本 + /// 获得/设置 删除按钮文本 + /// Get/Set Delete Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? DeleteButtonText { get; set; } /// - /// 获得/设置 删除按钮图标 + /// 获得/设置 删除按钮图标 + /// Get/Set Delete Button Icon + /// 10.2.2 /// [Parameter] public string? DeleteButtonIcon { get; set; } /// - /// 获得/设置 取消删除按钮文本 + /// 获得/设置 取消删除按钮文本 + /// Get/Set Cancel Delete Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? CancelDeleteButtonText { get; set; } /// - /// 获得/设置 保存按钮文本 + /// 获得/设置 保存按钮文本 + /// Get/Set Save Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? SaveButtonText { get; set; } /// - /// 获得/设置 保存按钮图标 + /// 获得/设置 保存按钮图标 + /// Get/Set Save Button Icon + /// 10.2.2 /// [Parameter] public string? SaveButtonIcon { get; set; } /// - /// 获得/设置 保存按钮文本 + /// 获得/设置 关闭按钮文本 + /// Get/Set Close Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? CloseButtonText { get; set; } /// - /// 获得/设置 保存按钮图标 + /// 获得/设置 关闭按钮图标 + /// Get/Set Close Button Icon + /// 10.2.2 /// [Parameter] public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 确认删除按钮文本 + /// 获得/设置 确认删除按钮文本 + /// Get/Set Confirm Delete Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ConfirmDeleteButtonText { get; set; } /// - /// 获得/设置 确认删除弹窗文本 + /// 获得/设置 确认删除弹窗文本 + /// Get/Set Confirm Delete Dialog Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ConfirmDeleteContentText { get; set; } /// - /// 获得/设置 刷新按钮文本 + /// 获得/设置 刷新按钮文本 + /// Get/Set Refresh Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? RefreshButtonText { get; set; } /// - /// 获得/设置 刷新按钮图标 + /// 获得/设置 刷新按钮图标 + /// Get/Set Refresh Button Icon + /// 10.2.2 /// [Parameter] public string? RefreshButtonIcon { get; set; } /// - /// 获得/设置 视图按钮文本 + /// 获得/设置 视图按钮文本 + /// Get/Set Card View Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? CardViewButtonText { get; set; } /// - /// 获得/设置 视图按钮图标 + /// 获得/设置 视图按钮图标 + /// Get/Set Card View Button Icon + /// 10.2.2 /// [Parameter] public string? CardViewButtonIcon { get; set; } /// - /// 获得/设置 列显示隐藏按钮提示信息文本 + /// 获得/设置 列显示隐藏按钮提示信息文本 + /// Get/Set Column Button Title Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ColumnButtonTitleText { get; set; } /// - /// 获得/设置 列按钮文本 + /// 获得/设置 列按钮文本 + /// Get/Set Column Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ColumnButtonText { get; set; } /// - /// 获得/设置 列拷贝按钮图标 + /// 获得/设置 列拷贝按钮图标 + /// Get/Set Copy Column Button Icon + /// 10.2.2 /// [Parameter] public string? CopyColumnButtonIcon { get; set; } /// - /// 获得/设置 导出按钮文本 + /// 获得/设置 导出按钮文本 + /// Get/Set Export Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ExportButtonText { get; set; } /// - /// 获得/设置 搜索栏 Placeholder 文本 + /// 获得/设置 搜索栏 Placeholder 文本 + /// Get/Set Search Placeholder Text + /// 10.2.2 /// [Parameter] [NotNull] public string? SearchPlaceholderText { get; set; } /// - /// 获得/设置 搜索按钮文本 + /// 获得/设置 搜索按钮文本 + /// Get/Set Search Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? SearchButtonText { get; set; } /// - /// 获得/设置 搜索按钮图标 + /// 获得/设置 搜索按钮图标 + /// Get/Set Search Button Icon + /// 10.2.2 /// [Parameter] public string? SearchButtonIcon { get; set; } /// - /// 获得/设置 搜索弹窗文本 + /// 获得/设置 搜索弹窗文本 + /// Get/Set Search Dialog Text + /// 10.2.2 /// [Parameter] [NotNull] public string? SearchModalTitle { get; set; } /// - /// 获得/设置 获得/设置 搜索框提示文字 + /// 获得/设置 搜索框提示文字 + /// Get/Set Search Tooltip + /// 10.2.2 /// [Parameter] [NotNull] public string? SearchTooltip { get; set; } /// - /// 获得/设置 重置按钮文本 + /// 获得/设置 重置按钮文本 + /// Get/Set Reset Search Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? ResetSearchButtonText { get; set; } /// - /// 获得/设置 重置按钮图标 + /// 获得/设置 重置按钮图标 + /// Get/Set Reset Search Button Icon + /// 10.2.2 /// [Parameter] public string? ResetSearchButtonIcon { get; set; } /// - /// 获得/设置 高级搜索按钮文本 + /// 获得/设置 高级搜索按钮文本 + /// Get/Set Advance Search Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? AdvanceButtonText { get; set; } /// - /// 获得/设置 高级搜索按钮图标 + /// 获得/设置 高级搜索按钮图标 + /// Get/Set Advance Search Button Icon + /// 10.2.2 /// [Parameter] public string? AdvanceButtonIcon { get; set; } /// - /// 获得/设置 新增按钮 Toast 提示 Title 文字 + /// 获得/设置 新增按钮 Toast 提示 Title 文字 + /// Get/Set Add Button Toast Title + /// 10.2.2 /// [Parameter] [NotNull] public string? AddButtonToastTitle { get; set; } /// - /// 获得/设置 新增按钮 Toast 提示 Content 文字 + /// 获得/设置 新增按钮 Toast 提示 Content 文字 + /// Get/Set Add Button Toast Content + /// 10.2.2 /// [Parameter] [NotNull] public string? AddButtonToastContent { get; set; } /// - /// 获得/设置 编辑按钮 Toast 提示 Title 文字 + /// 获得/设置 编辑按钮 Toast 提示 Title 文字 + /// Get/Set Edit Button Toast Title + /// 10.2.2 /// [Parameter] [NotNull] public string? EditButtonToastTitle { get; set; } /// - /// 获得/设置 编辑按钮 Toast 未选择时提示 Content 文字 + /// 获得/设置 编辑按钮 Toast 未选择时提示 Content 文字 + /// Get/Set Edit Button Toast Not Selected Content + /// 10.2.2 /// [Parameter] [NotNull] public string? EditButtonToastNotSelectContent { get; set; } /// - /// 获得/设置 编辑按钮 Toast 选择项设置不可编辑时提示 Content 文字 + /// 获得/设置 编辑按钮 Toast 选择项设置不可编辑时提示 Content 文字 + /// Get/Set Edit Button Toast Read Only Content + /// 10.2.2 /// [Parameter] [NotNull] public string? EditButtonToastReadonlyContent { get; set; } /// - /// 获得/设置 编辑按钮 Toast 多项选择时提示 Content 文字 + /// 获得/设置 编辑按钮 Toast 多项选择时提示 Content 文字 + /// Get/Set Edit Button Toast Multiple Selected Content + /// 10.2.2 /// [Parameter] [NotNull] public string? EditButtonToastMoreSelectContent { get; set; } /// - /// 获得/设置 编辑按钮 Toast 未提供 Save 方法时提示 Content 文字 + /// 获得/设置 编辑按钮 Toast 未提供 Save 方法时提示 Content 文字 + /// Get/Set Edit Button Toast No Save Method Content + /// 10.2.2 /// [Parameter] [NotNull] public string? EditButtonToastNoSaveMethodContent { get; set; } /// - /// 获得/设置 保存按钮 Toast 提示 Title 文字 + /// 获得/设置 保存按钮 Toast 提示 Title 文字 + /// Get/Set Save Button Toast Title + /// 10.2.2 /// [Parameter] [NotNull] public string? SaveButtonToastTitle { get; set; } /// - /// 获得/设置 保存按钮 Toast 提示 Content 文字 + /// 获得/设置 保存按钮 Toast 提示 Content 文字 + /// Get/Set Save Button Toast Content + /// 10.2.2 /// [Parameter] [NotNull] public string? SaveButtonToastContent { get; set; } /// - /// 获得/设置 保存按钮结果 Toast 提示 Content 文字 + /// 获得/设置 保存按钮结果 Toast 提示 Content 文字 + /// Get/Set Save Button Toast Result Content + /// 10.2.2 /// [Parameter] [NotNull] public string? SaveButtonToastResultContent { get; set; } /// - /// 获得/设置 保存成功文字 + /// 获得/设置 保存成功文字 + /// Get/Set Success Text + /// 10.2.2 /// [Parameter] [NotNull] public string? SuccessText { get; set; } /// - /// 获得/设置 保存失败 + /// 获得/设置 保存失败 + /// Get/Set Fail Text + /// 10.2.2 /// [Parameter] [NotNull] public string? FailText { get; set; } /// - /// 获得/设置 删除按钮 Toast 提示 Title 文字 + /// 获得/设置 删除按钮 Toast 提示 Title 文字 + /// Get/Set Delete Button Toast Title + /// 10.2.2 /// [Parameter] [NotNull] public string? DeleteButtonToastTitle { get; set; } /// - /// 获得/设置 删除按钮选项中有无法删除项时 Toast 提示文字 + /// 获得/设置 删除按钮选项中有无法删除项时 Toast 提示文字 + /// Get/Set Delete Button Toast Can Not Delete Content + /// 10.2.2 /// [Parameter] [NotNull] public string? DeleteButtonToastCanNotDeleteContent { get; set; } /// - /// 获得/设置 删除按钮 Toast 提示 Content 文字 + /// 获得/设置 删除按钮 Toast 提示 Content 文字 + /// Get/Set Delete Button Toast Content + /// 10.2.2 /// [Parameter] [NotNull] public string? DeleteButtonToastContent { get; set; } /// - /// 获得/设置 删除按钮结果 Toast 提示 Content 文字 + /// 获得/设置 删除按钮结果 Toast 提示 Content 文字 + /// Get/Set Delete Button Toast Result Content + /// 10.2.2 /// [Parameter] [NotNull] public string? DeleteButtonToastResultContent { get; set; } /// - /// 获得/设置 高级排序按钮文本 + /// 获得/设置 高级排序按钮文本 + /// Get/Set Advanced Sort Button Text + /// 10.2.2 /// [Parameter] [NotNull] public string? AdvancedSortButtonText { get; set; } /// - /// 获得/设置 高级排序弹窗文本 + /// 获得/设置 高级排序弹窗文本 + /// Get/Set Advanced Sort Modal Title + /// 10.2.2 /// [Parameter] [NotNull] diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Pagination.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Pagination.cs index deb7e8e709b..8892fc92df3 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Pagination.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Pagination.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,126 +8,162 @@ namespace BootstrapBlazor.Components; public partial class Table { /// - /// 获得/设置 是否分页 默认为 false + /// 获得/设置 是否分页 默认为 false + /// Get/Set Whether to allow pagination. Default false + /// 10.2.2 /// [Parameter] public bool IsPagination { get; set; } /// - /// 获得/设置 Page up/down 页码数量 默认 5 + /// 获得/设置 Page up/down 页码数量 默认 5 + /// Get/Set Page up/down page link count. Default 5 + /// 10.2.2 /// [Parameter] public int MaxPageLinkCount { get; set; } = 5; /// - /// 获得/设置 是否在顶端显示分页 默认为 false + /// 获得/设置 是否在顶端显示分页 默认为 false + /// Get/Set Whether to show pagination at top. Default false + /// 10.2.2 /// [Parameter] public bool ShowTopPagination { get; set; } /// - /// 获得/设置 是否显示行号列 默认为 false + /// 获得/设置 是否显示行号列 默认为 false + /// Get/Set Whether to show line number column. Default false + /// 10.2.2 /// [Parameter] public bool ShowLineNo { get; set; } /// - /// 获得/设置 行号列标题文字 默认为 行号 + /// 获得/设置 行号列标题文字 默认为 行号 + /// Get/Set Line Number Column Header Text. Default "Line No" + /// 10.2.2 /// [Parameter] [NotNull] public string? LineNoText { get; set; } /// - /// 获得/设置 每页显示数据数量的外部数据源 + /// 获得/设置 每页显示数据数量的外部数据源 + /// Get/Set External data source for items per page + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? PageItemsSource { get; set; } /// - /// 异步查询回调方法,设置 后无法触发此回调方法 + /// 异步查询回调方法,设置 后无法触发此回调方法 + /// Async query callback method. Cannot trigger this when is set + /// 10.2.2 /// [Parameter] public Func>>? OnQueryAsync { get; set; } /// - /// 获得/设置 数据总条目 + /// 获得/设置 数据总条目 + /// Get/Set Total items count /// protected int TotalCount { get; set; } /// - /// 获得/设置 分页页码总数 内置规则 PageCount > 1 时显示分页组件 + /// 获得/设置 分页页码总数 内置规则 PageCount > 1 时显示分页组件 + /// Get/Set Total page count. Internal rule: show pagination when PageCount > 1 /// protected int PageCount { get; set; } /// - /// 获得/设置 当前页码 默认 1 + /// 获得/设置 当前页码 默认 1 + /// Get/Set Current page index. Default 1 /// protected int PageIndex { get; set; } = 1; /// - /// 获得/设置 默认每页数据数量 默认 null 使用 第一个值 + /// 获得/设置 默认每页数据数量 默认 null 使用 第一个值 + /// Get/Set Default items per page. Default null (Use first value of ) + /// 10.2.2 /// [Parameter] public int? PageItems { get; set; } /// - /// 获得/设置 是否显示 Goto 跳转导航 + /// 获得/设置 是否显示 Goto 跳转导航 + /// Get/Set Whether to show Goto navigator + /// 10.2.2 /// [Parameter] public bool ShowGotoNavigator { get; set; } = true; /// - /// 获得/设置 是否显示 Goto 跳转导航文本信息 默认 null + /// 获得/设置 是否显示 Goto 跳转导航文本信息 默认 null + /// Get/Set Whether to show Goto navigator label text. Default null + /// 10.2.2 /// [Parameter] public string? GotoNavigatorLabelText { get; set; } /// - /// 获得/设置 Goto 导航模板 + /// 获得/设置 Goto 导航模板 + /// Get/Set Goto navigator template + /// 10.2.2 /// [Parameter] public RenderFragment? GotoTemplate { get; set; } /// - /// 获得/设置 是否显示 PageInfo 内容 默认 true 显示 + /// 获得/设置 是否显示 PageInfo 内容 默认 true 显示 + /// Get/Set Whether to show PageInfo. Default true + /// 10.2.2 /// [Parameter] public bool ShowPageInfo { get; set; } = true; /// - /// 获得/设置 分页信息文字 默认 null + /// 获得/设置 分页信息文字 默认 null + /// Get/Set Page Info Text. Default null + /// 10.2.2 /// [Parameter] public string? PageInfoText { get; set; } /// - /// 获得/设置 分页信息模板 + /// 获得/设置 分页信息模板 + /// Get/Set Page Info Template + /// 10.2.2 /// [Parameter] public RenderFragment? PageInfoTemplate { get; set; } /// - /// 获得/设置 分页信息内容模板 默认 null + /// 获得/设置 分页信息内容模板 默认 null + /// Get/Set Page Info Body Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? PageInfoBodyTemplate { get; set; } /// - /// 获得/设置 当前行 + /// 获得/设置 当前行 + /// Get/Set Start Index /// protected int StartIndex { get; set; } /// - /// 当前每页项目数量设置 默认 null 内部使用 + /// 当前每页项目数量设置 默认 null 内部使用 + /// Current items per page setting. Default null (Internal Use) /// private int _pageItems; private int? _originPageItems; /// - /// 内部 分页信息模板 + /// 内部 分页信息模板 + /// Internal Page Info Template /// protected RenderFragment InternalPageInfoTemplate => builder => { @@ -150,7 +186,8 @@ public partial class Table private bool _shouldScrollTop = false; /// - /// 点击页码调用此方法 + /// 点击页码调用此方法 + /// Page Link Click Callback /// /// protected async Task OnPageLinkClick(int pageIndex) @@ -161,17 +198,21 @@ protected async Task OnPageLinkClick(int pageIndex) if (!IsKeepSelectedRows) { - // 清空选中行 + // 清空选中行 + // Clear selected rows SelectedRows.Clear(); } - // 无刷新查询数据 + // 无刷新查询数据 + // Query data without refresh await QueryAsync(false, triggerByPagination: true); - // 通知 SelectedRow 双向绑定集合改变 + // 通知 SelectedRow 双向绑定集合改变 + // Notify SelectedRow two-way binding collection changed await OnSelectedRowsChanged(); - // 通知 UI 滚动到顶端 + // 通知 UI 滚动到顶端 + // Notify UI scroll to top if (IsAutoScrollTopWhenClickPage) { _shouldScrollTop = true; @@ -180,7 +221,8 @@ protected async Task OnPageLinkClick(int pageIndex) } /// - /// 每页记录条数变化是调用此方法 + /// 每页记录条数变化是调用此方法 + /// Page Items Value Changed Callback /// protected async Task OnPageItemsValueChanged(int pageItems) { @@ -195,7 +237,8 @@ protected async Task OnPageItemsValueChanged(int pageItems) private List? _pageItemsSource; /// - /// 获得 分页数据源 + /// 获得 分页数据源 + /// Get Page Items Source /// /// protected List GetPageItemsSource() diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Search.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Search.cs index 0d652b430c6..4cf95165924 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Search.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Search.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -11,121 +11,157 @@ namespace BootstrapBlazor.Components; public partial class Table { /// - /// 获得 高级搜索样式 + /// 获得 高级搜索样式 + /// Get Advanced Search Class /// protected string? AdvanceSearchClass => CssBuilder.Default("btn btn-secondary") .AddClass("btn-info", IsAdvanceSearch) .Build(); /// - /// 获得/设置 是否已经处理高级搜索 默认 false + /// 获得/设置 是否已经处理高级搜索 默认 false + /// Get/Set Whether processed advanced search. Default false /// protected bool IsAdvanceSearch { get; set; } /// - /// 获得/设置 SearchTemplate 实例 + /// 获得/设置 SearchTemplate 实例 + /// Get/Set SearchTemplate Instance + /// 10.2.2 /// [Parameter] public RenderFragment? SearchTemplate { get; set; } /// - /// 获得/设置 SearchModel 实例 + /// 获得/设置 SearchModel 实例 + /// Get/Set SearchModel Instance /// [Parameter, NotNull] public TItem? SearchModel { get; set; } /// - /// 获得/设置 自定义搜索模型 + /// 获得/设置 自定义搜索模型 + /// Get/Set Customer Search Model + /// 10.2.2 /// [Parameter] public ITableSearchModel? CustomerSearchModel { get; set; } /// - /// 获得/设置 自定义搜索模型模板 + /// 获得/设置 自定义搜索模型模板 + /// Get/Set Customer Search Model Template + /// 10.2.2 /// [Parameter] public RenderFragment? CustomerSearchTemplate { get; set; } /// - /// 获得/设置 是否显示搜索框 默认为 false 不显示搜索框 + /// 获得/设置 是否显示搜索框 默认为 false 不显示搜索框 + /// Get/Set Whether to show search box. Default false + /// 10.2.2 /// [Parameter] public bool ShowSearch { get; set; } /// - /// 获得/设置 是否收缩顶部搜索框 默认为 false 不收缩搜索框 是否显示搜索框请设置 值 Top + /// 获得/设置 是否收缩顶部搜索框 默认为 false 不收缩搜索框 是否显示搜索框请设置 值 Top + /// Get/Set Whether to collapse top search box. Default false. Set to Top if needed + /// 10.2.2 /// [Parameter] public bool CollapsedTopSearch { get; set; } /// - /// 获得/设置 是否显示搜索文本框 默认为 true 显示搜索文本框 + /// 获得/设置 是否显示搜索文本框 默认为 true 显示搜索文本框 + /// Get/Set Whether to show search text box. Default true. + /// 10.2.2 /// [Parameter] public bool ShowSearchText { get; set; } = true; /// - /// 获得/设置 是否显示搜索框提示文本 默认 true + /// 获得/设置 是否显示搜索框提示文本 默认 true + /// Get/Set Whether to show search text tooltip. Default true + /// 10.2.2 /// [Parameter] public bool ShowSearchTextTooltip { get; set; } = true; /// - /// 获得/设置 是否显示清空搜索按钮 默认 true 显示 + /// 获得/设置 是否显示清空搜索按钮 默认 true 显示 + /// Get/Set Whether to show reset search button. Default true. + /// 10.2.2 /// [Parameter] public bool ShowResetButton { get; set; } = true; /// - /// 获得/设置 是否显示搜索按钮 默认 true 显示 + /// 获得/设置 是否显示搜索按钮 默认 true 显示 + /// Get/Set Whether to show search button. Default true. + /// 10.2.2 /// [Parameter] public bool ShowSearchButton { get; set; } = true; /// - /// 获得/设置 是否显示高级搜索按钮 默认 true 显示 + /// 获得/设置 是否显示高级搜索按钮 默认 true 显示 + /// Get/Set Whether to show advanced search button. Default true. + /// 10.2.2 /// [Parameter] public bool ShowAdvancedSearch { get; set; } = true; /// - /// 获得/设置 搜索关键字 通过列设置的 Searchable 自动生成搜索拉姆达表达式 + /// 获得/设置 搜索关键字 通过列设置的 Searchable 自动生成搜索拉姆达表达式 + /// Get/Set Search Keyword. Automatically generate search lambda expression based on Searchable set on columns + /// 10.2.2 /// [Parameter] public string? SearchText { get; set; } /// - /// 获得/设置 搜索栏渲染方式 默认 Popup 弹窗模式 + /// 获得/设置 搜索栏渲染方式 默认 Popup 弹窗模式 + /// Get/Set Search Mode. Default Popup + /// 10.2.2 /// [Parameter] public SearchMode SearchMode { get; set; } /// - /// 获得/设置 每行显示组件数量 默认为 2 + /// 获得/设置 每行显示组件数量 默认为 2 + /// Get/Set Items per row. Default 2 + /// 10.2.2 /// [Parameter] public int SearchDialogItemsPerRow { get; set; } = 2; /// - /// 获得/设置 设置行内组件布局格式 默认 Inline 布局 + /// 获得/设置 设置行内组件布局格式 默认 Inline 布局 + /// Get/Set Row Layout Type. Default Inline + /// 10.2.2 /// [Parameter] public RowType SearchDialogRowType { get; set; } = RowType.Inline; /// - /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// Get/Set Label Alignment in Inline mode of . Default None (Left) + /// 10.2.2 /// [Parameter] public Alignment SearchDialogLabelAlign { get; set; } /// - /// 重置搜索按钮异步回调方法 + /// 重置搜索按钮异步回调方法 + /// Reset Search Button Async Callback + /// 10.2.2 /// [Parameter] public Func? OnResetSearchAsync { get; set; } /// - /// 重置查询方法 + /// 重置查询方法 + /// Reset Search Method /// protected async Task ResetSearchClick() { @@ -149,7 +185,8 @@ protected async Task ResetSearchClick() } /// - /// 查询方法 + /// 查询方法 + /// Search Method /// protected async Task SearchClick() { @@ -158,25 +195,32 @@ protected async Task SearchClick() } /// - /// 获得/设置 搜索框的大小 + /// 获得/设置 搜索框的大小 + /// Get/Set Search Dialog Size + /// 10.2.2 /// [Parameter] public Size SearchDialogSize { get; set; } = Size.ExtraExtraLarge; /// - /// 获得/设置 搜索框是否可以拖拽 默认 false 不可以拖拽 + /// 获得/设置 搜索框是否可以拖拽 默认 false 不可以拖拽 + /// Get/Set Whether search dialog is draggable. Default false + /// 10.2.2 /// [Parameter] public bool SearchDialogIsDraggable { get; set; } /// - /// 获得/设置 搜索框是否显示最大化按钮 默认 true 不显示 + /// 获得/设置 搜索框是否显示最大化按钮 默认 true 不显示 + /// Get/Set Whether to show maximize button on search dialog. Default true (Note: Comment says true but default is true. Text says 'Default true No Show'? No, usually true means show. Code says true. Adjusted English to match code logic) + /// 10.2.2 /// [Parameter] public bool SearchDialogShowMaximizeButton { get; set; } = true; /// - /// 高级查询按钮点击时调用此方法 + /// 高级查询按钮点击时调用此方法 + /// Advanced Search Button Click Method /// protected async Task ShowSearchDialog() { @@ -226,13 +270,15 @@ protected async Task ShowSearchDialog() } /// - /// 获得 中过滤条件 模板中的条件无法获得 + /// 获得 中过滤条件 模板中的条件无法获得 + /// Get Filter Actions from . Conditions in cannot be obtained /// /// protected IEnumerable GetCustomerSearches() { var searches = new List(); - // 处理自定义 SearchModel 条件 + // 处理自定义 SearchModel 条件 + // Process custom SearchModel conditions if (CustomerSearchModel != null) { searches.AddRange(CustomerSearchModel.GetSearches()); @@ -241,7 +287,8 @@ protected IEnumerable GetCustomerSearches() } /// - /// 获得 中过滤条件 + /// 获得 中过滤条件 + /// Get Filter Actions from /// /// protected List GetAdvanceSearches() @@ -274,7 +321,8 @@ protected List GetAdvanceSearches() } /// - /// 通过列集合中的 列与 拼装 IFilterAction 集合 + /// 通过列集合中的 列与 拼装 IFilterAction 集合 + /// Assemble IFilterAction collection using columns and /// /// protected List GetSearches() => Columns.Where(col => col.GetSearchable()).ToSearches(SearchText); @@ -299,7 +347,8 @@ private async Task OnSearchKeyUp(KeyboardEventArgs args) } /// - /// 重置搜索按钮调用此方法 + /// 重置搜索按钮调用此方法 + /// Reset Search Button Click Method /// protected async Task ClearSearchClick() { @@ -308,7 +357,8 @@ protected async Task ClearSearchClick() } /// - /// + /// + /// /// /// private IEnumerable GetSearchColumns() => Columns.Where(c => c.GetSearchable()); diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Sort.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Sort.cs index 4475f3eeb6f..6e4d45b414d 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Sort.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Sort.cs @@ -8,67 +8,84 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public partial class Table { /// - /// 获得/设置 排序字段名称 + /// 获得/设置 排序字段名称 + /// Get/Set Sort Column Name /// protected string? SortName { get; set; } /// - /// 获得/设置 排序方式 + /// 获得/设置 排序方式 + /// Get/Set Sort Order /// protected SortOrder SortOrder { get; set; } /// - /// 获得/设置 升序图标 fa-solid fa-sort-up + /// 获得/设置 升序图标 fa-solid fa-sort-up + /// Get/Set Sort Ascending Icon fa-solid fa-sort-up + /// 10.2.2 /// [Parameter] [NotNull] public string? SortIconAsc { get; set; } /// - /// 获得/设置 降序图标 fa-solid fa-sort-down + /// 获得/设置 降序图标 fa-solid fa-sort-down + /// Get/Set Sort Descending Icon fa-solid fa-sort-down + /// 10.2.2 /// [Parameter] [NotNull] public string? SortIconDesc { get; set; } /// - /// 获得/设置 默认图标 fa-solid fa-sort + /// 获得/设置 默认图标 fa-solid fa-sort + /// Get/Set Default Icon fa-solid fa-sort + /// 10.2.2 /// [Parameter] [NotNull] public string? SortIcon { get; set; } /// - /// 获得/设置 过滤图标 默认 fa-solid fa-filter + /// 获得/设置 过滤图标 默认 fa-solid fa-filter + /// Get/Set Filter Icon Default fa-solid fa-filter + /// 10.2.2 /// [Parameter] public string? FilterIcon { get; set; } /// - /// 获得/设置 多列排序顺序 默认为空 多列时使用逗号分割 如:"Name, Age desc" + /// 获得/设置 多列排序顺序 默认为空 多列时使用逗号分割 如:"Name, Age desc" + /// Get/Set Multi-column sort order. Default empty. Separated by comma, e.g., "Name, Age desc" + /// 10.2.2 /// [Parameter] public string? SortString { get; set; } /// - /// 获得/设置 点击表头排序时回调方法 + /// 获得/设置 点击表头排序时回调方法 + /// Get/Set Callback method when clicking header to sort + /// 10.2.2 /// [Parameter] public Func? OnSort { get; set; } /// - /// 获得/设置 内部表头排序时回调方法 + /// 获得/设置 内部表头排序时回调方法 + /// Get/Set Callback method when internal header sort /// [NotNull] protected Func? InternalOnSortAsync { get; set; } /// - /// 点击列进行排序方法 + /// 点击列进行排序方法 + /// Method to sort by clicking column /// protected Func OnClickHeader(ITableColumn col) => async () => { @@ -89,15 +106,18 @@ protected Func OnClickHeader(ITableColumn col) => async () => SortName = col.GetFieldName(); - // 清除高级排序 (保证点击 Header 排序的优先级最高) + // 清除高级排序 (保证点击 Header 排序的优先级最高) + // Clear advanced sort (Ensure the highest priority of clicking header sort) AdvancedSortItems.Clear(); - // 通知 Table 组件刷新数据 + // 通知 Table 组件刷新数据 + // Notify Table component to refresh data await InternalOnSortAsync(SortName, SortOrder); }; /// - /// 获取指定列头样式字符串 + /// 获取指定列头样式字符串 + /// Get style string for specified column header /// /// /// @@ -110,7 +130,8 @@ protected Func OnClickHeader(ITableColumn col) => async () => .Build(); /// - /// 获得列头单元格样式 + /// 获得列头单元格样式 + /// Get header cell style /// /// /// @@ -181,7 +202,8 @@ private int MultipleSelectColumnLeft() : CheckboxColumnCompactWidth; /// - /// 获得指定列头固定列样式 + /// 获得指定列头固定列样式 + /// Get fixed column style for specified column header /// /// /// @@ -194,7 +216,8 @@ private int MultipleSelectColumnLeft() .Build(); /// - /// 获得扩展按钮列固定列样式 + /// 获得扩展按钮列固定列样式 + /// Get fixed column style for extend button column /// /// protected string? FixedExtendButtonsColumnClassString => CssBuilder.Default("table-column-button") @@ -205,7 +228,8 @@ private int MultipleSelectColumnLeft() .Build(); /// - /// 获得 按钮列样式表集合 + /// 获得 按钮列样式表集合 + /// Get button column class collection /// /// protected string? ExtendButtonsColumnClass => CssBuilder.Default() @@ -216,7 +240,8 @@ private int MultipleSelectColumnLeft() .Build(); /// - /// 获得扩展按钮列固定列样式 + /// 获得扩展按钮列固定列样式 + /// Gets扩展button列固定列style /// /// protected string? GetFixedExtendButtonsColumnStyleString(int margin = 0) => CssBuilder.Default() @@ -254,7 +279,8 @@ private bool IsFirstColumn(ITableColumn col) => FirstFixedColumnCache.GetOrAdd(c var ret = false; if (col.Fixed && IsTail(col)) { - // 查找前一列是否固定 + // 查找前一列是否固定 + // Check if the previous column is fixed var index = Columns.IndexOf(col) - 1; if (index > 0) { @@ -313,7 +339,8 @@ private bool IsTail(ITableColumn col) } /// - /// 获得列单元格 Style 用于设置文本超长溢出 + /// 获得列单元格 Style 用于设置文本超长溢出 + /// Get cell style for setting text overflow /// /// /// @@ -329,7 +356,8 @@ string GetFixedHeaderStyleString() => IsFixedHeader } /// - /// 获得指定列头固定列样式 + /// 获得指定列头固定列样式 + /// Get fixed column style for specified column header /// /// /// @@ -389,7 +417,8 @@ string GetFixedHeaderStyleString() => IsFixedHeader width += ExtendButtonColumnWidth; } - // 如果是固定表头时增加滚动条位置 + // 如果是固定表头时增加滚动条位置 + // Add scroll bar position if it is fixed header if (IsFixedHeader && (index + 1) == columns.Count) { width += margin; @@ -398,7 +427,8 @@ string GetFixedHeaderStyleString() => IsFixedHeader } /// - /// 获取指定列头样式字符串 + /// 获取指定列头样式字符串 + /// Get style string for specified column header /// /// /// @@ -410,7 +440,8 @@ string GetFixedHeaderStyleString() => IsFixedHeader .Build(); /// - /// 获得 Cell 文字样式 + /// 获得 Cell 文字样式 + /// Get Cell Text Style /// /// /// @@ -428,7 +459,8 @@ string GetFixedHeaderStyleString() => IsFixedHeader .Build(); /// - /// 获取指定列头样式字符串 + /// 获取指定列头样式字符串 + /// 获取指定列头style字符串 /// /// protected string? GetIconClassString(string fieldName) => CssBuilder.Default("sort-icon") @@ -438,7 +470,8 @@ string GetFixedHeaderStyleString() => IsFixedHeader .Build(); /// - /// 获取指定列头样式字符串 + /// 获取指定列头样式字符串 + /// 获取指定列头style字符串 /// /// protected string? GetColumnToolboxIconClassString() => CssBuilder.Default(ColumnToolboxIcon) @@ -446,50 +479,64 @@ string GetFixedHeaderStyleString() => IsFixedHeader #region Advanced Sort /// - /// 获得 高级排序样式 + /// 获得 高级排序样式 + /// Get Advanced Sort Style /// protected string? AdvancedSortClass => CssBuilder.Default("btn btn-secondary") .AddClass("btn-info", AdvancedSortItems.Any()) .Build(); /// - /// 获得/设置 是否显示高级排序按钮 默认 false 不显示 /> + /// 获得/设置 是否显示高级排序按钮 默认 false 不显示 + /// Get/Set Whether to show advanced sort button. Default false + /// 10.2.2 /// [Parameter] public bool ShowAdvancedSort { get; set; } /// - /// 获得/设置 高级排序按钮图标 + /// 获得/设置 高级排序按钮图标 + /// Get/Set Advanced Sort Button Icon + /// 10.2.2 /// [Parameter] public string? AdvancedSortButtonIcon { get; set; } /// - /// 获得/设置 高级排序框的大小 默认 Medium + /// 获得/设置 高级排序框的大小 默认 Medium + /// Get/Set Advanced Sort Dialog Size. Default Medium + /// 10.2.2 /// [Parameter] public Size AdvancedSortDialogSize { get; set; } = Size.Medium; /// - /// 获得/设置 高级排序框是否可以拖拽 默认 false 不可以拖拽 + /// 获得/设置 高级排序框是否可以拖拽 默认 false 不可以拖拽 + /// Get/Set Whether advanced sort dialog is draggable. Default false + /// 10.2.2 /// [Parameter] public bool AdvancedSortDialogIsDraggable { get; set; } /// - /// 获得/设置 高级排序框是否显示最大化按钮 默认 false 不显示 + /// 获得/设置 高级排序框是否显示最大化按钮 默认 false 不显示 + /// Get/Set Whether to show maximize button on advanced sort dialog. Default false + /// 10.2.2 /// [Parameter] public bool AdvancedSortDialogShowMaximizeButton { get; set; } /// - /// 获得/设置 高级排序,默认为 Empty + /// 获得/设置 高级排序,默认为 Empty + /// Get/Set Advanced Sort Items. Default Empty + /// 10.2.2 /// [Parameter] public List AdvancedSortItems { get; set; } = []; /// - /// 高级排序按钮点击时调用此方法 + /// 高级排序按钮点击时调用此方法 + /// Method called when advanced sort button is clicked /// private async Task ShowSortDialog() { @@ -513,7 +560,8 @@ private async Task ShowSortDialog() } /// - /// 获得 中过滤条件 + /// 获得 中过滤条件 + /// Get filter conditions from /// /// protected IEnumerable GetAdvancedSortList() => ShowAdvancedSort ? AdvancedSortItems.Select(p => p.ToString()) : Enumerable.Empty(); diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs index 6e11bfc295f..bdd40ab1bf7 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs @@ -10,230 +10,306 @@ namespace BootstrapBlazor.Components; public partial class Table { /// - /// 获得/设置 是否显示工具栏 默认 false 不显示 + /// 获得/设置 是否显示工具栏 默认 false 不显示 + /// Get/Set Whether to show toolbar. Default false + /// 10.2.2 /// [Parameter] public bool ShowToolbar { get; set; } /// - /// Gets or sets the template of table toolbar. Default is null. + /// 获得/设置 the 模板 of table toolbar. 默认为 null. + /// Gets or sets the template of table toolbar. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? ToolbarTemplate { get; set; } /// - /// 获得/设置 首次加载是否显示加载骨架屏 默认 false 不显示 使用 参数值 + /// 获得/设置 首次加载是否显示加载骨架屏 默认 false 不显示 使用 参数值 + /// Get/Set Whether to show skeleton when first loading. Default false. Use parameter value + /// 10.2.2 /// [Parameter] public bool ShowSkeleton { get; set; } /// - /// 获得/设置 首次加载是否显示加载动画 默认 true 显示 设置 值覆盖此参数 + /// 获得/设置 首次加载是否显示加载动画 默认 true 显示 设置 值覆盖此参数 + /// Get/Set Whether to show loading animation when first loading. Default true. Setting value covers this parameter + /// 10.2.2 /// [Parameter] public bool ShowLoadingInFirstRender { get; set; } = true; /// - /// 获得/设置 是否显示按钮列 默认为 true + /// 获得/设置 是否显示按钮列 默认为 true + /// Get/Set Whether to show Button Column. Default true + /// 10.2.2 /// /// 本属性设置为 true 新建编辑删除按钮设置为 false 可单独控制每个按钮是否显示 [Parameter] public bool ShowDefaultButtons { get; set; } = true; /// - /// 获得/设置 是否显示新建按钮 默认为 true 显示 + /// 获得/设置 是否显示新建按钮 默认为 true 显示 + /// Get/Set Whether to show Add Button. Default true + /// 10.2.2 /// [Parameter] public bool ShowAddButton { get; set; } = true; /// - /// 获得/设置 是否显示编辑按钮 默认为 true 行内是否显示请使用 + /// 获得/设置 是否显示编辑按钮 默认为 true 行内是否显示请使用 + /// Get/Set Whether to show Edit Button. Default true. Use and for in-row display + /// 10.2.2 /// [Parameter] public bool ShowEditButton { get; set; } = true; /// - /// 获得/设置 是否显示删除按钮 默认为 true 行内是否显示请使用 + /// 获得/设置 是否显示删除按钮 默认为 true 行内是否显示请使用 + /// Get/Set Whether to show Delete Button. Default true. Use and for in-row display + /// 10.2.2 /// [Parameter] public bool ShowDeleteButton { get; set; } = true; /// - /// 获得/设置 是否显示导出按钮 默认为 false 不显示 + /// 获得/设置 是否显示导出按钮 默认为 false 不显示 + /// Get/Set Whether to show Export Button. Default false + /// 10.2.2 /// [Parameter] public bool ShowExportButton { get; set; } /// - /// 获得/设置 是否显示 Excel 导出按钮 默认为 true 显示 + /// 获得/设置 是否显示 Excel 导出按钮 默认为 true 显示 + /// Get/Set Whether to show Export Excel Button. Default true + /// 10.2.2 /// [Parameter] public bool ShowExportExcelButton { get; set; } = true; /// - /// 获得/设置 是否显示 Csv 导出按钮 默认为 false 显示 + /// 获得/设置 是否显示 Csv 导出按钮 默认为 false 显示 + /// Get/Set Whether to show Export Csv Button. Default false + /// 10.2.2 /// [Parameter] public bool ShowExportCsvButton { get; set; } /// - /// 获得/设置 是否显示 Pdf 导出按钮 默认为 false 显示 + /// 获得/设置 是否显示 Pdf 导出按钮 默认为 false 显示 + /// Get/Set Whether to show Export Pdf Button. Default false + /// 10.2.2 /// [Parameter] public bool ShowExportPdfButton { get; set; } /// - /// 获得/设置 导出按钮图标 + /// 获得/设置 导出按钮图标 + /// Get/Set Export Button Icon + /// 10.2.2 /// [Parameter] public string? ExportButtonIcon { get; set; } /// - /// 获得/设置 内置导出 Csv 按钮图标 + /// 获得/设置 内置导出 Csv 按钮图标 + /// Get/Set Default Export Csv Button Icon + /// 10.2.2 /// [Parameter] public string? CsvExportIcon { get; set; } /// - /// 获得/设置 内置导出 Excel 按钮图标 + /// 获得/设置 内置导出 Excel 按钮图标 + /// Get/Set Default Export Excel Button Icon + /// 10.2.2 /// [Parameter] public string? ExcelExportIcon { get; set; } /// - /// 获得/设置 内置导出 Pdf 按钮图标 + /// 获得/设置 内置导出 Pdf 按钮图标 + /// Get/Set Default Export Pdf Button Icon + /// 10.2.2 /// [Parameter] public string? PdfExportIcon { get; set; } /// - /// 获得/设置 导出数据前是否弹出 Toast 提示框 默认 true + /// 获得/设置 导出数据前是否弹出 Toast 提示框 默认 true + /// Get/Set Whether to show Toast before export. Default true + /// 10.2.2 /// [Parameter] public bool ShowToastBeforeExport { get; set; } = true; /// - /// 获得/设置 导出数据后是否弹出 Toast 提示框 默认 true + /// 获得/设置 导出数据后是否弹出 Toast 提示框 默认 true + /// Get/Set Whether to show Toast after export. Default true + /// 10.2.2 /// [Parameter] public bool ShowToastAfterExport { get; set; } = true; /// - /// 获得/设置 导出数据前回调方法 默认 null + /// 获得/设置 导出数据前回调方法 默认 null + /// Get/Set Before Export Callback. Default null + /// 10.2.2 /// [Parameter] public Func? BeforeExportCallback { get; set; } /// - /// 获得/设置 导出数据后回调方法 默认 null + /// 获得/设置 导出数据后回调方法 默认 null + /// Get/Set After Export Callback. Default null + /// 10.2.2 /// [Parameter] public Func? AfterExportCallback { get; set; } /// - /// 获得/设置 导出按钮下拉菜单模板 默认 null + /// 获得/设置 导出按钮下拉菜单模板 默认 null + /// Get/Set Export Button Dropdown Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment>? ExportButtonDropdownTemplate { get; set; } /// - /// 获得/设置 内置导出微软 Csv 按钮文本 默认 null 读取资源文件 + /// 获得/设置 内置导出微软 Csv 按钮文本 默认 null 读取资源文件 + /// Get/Set Export Microsoft Csv Button Text. Default null (Read from resource file) + /// 10.2.2 /// [Parameter] public string? ExportCsvDropdownItemText { get; set; } /// - /// 获得/设置 内置导出微软 Excel 按钮文本 默认 null 读取资源文件 + /// 获得/设置 内置导出微软 Excel 按钮文本 默认 null 读取资源文件 + /// Get/Set Export Microsoft Excel Button Text. Default null (Read from resource file) + /// 10.2.2 /// [Parameter] public string? ExportExcelDropdownItemText { get; set; } /// - /// 获得/设置 内置导出 Pdf 按钮文本 默认 null 读取资源文件 + /// 获得/设置 内置导出 Pdf 按钮文本 默认 null 读取资源文件 + /// Get/Set Export Pdf Button Text. Default null (Read from resource file) + /// 10.2.2 /// [Parameter] public string? ExportPdfDropdownItemText { get; set; } /// - /// 获得/设置 是否显示扩展按钮 默认为 false + /// 获得/设置 是否显示扩展按钮 默认为 false + /// Get/Set Whether to show Extension Button. Default false + /// 10.2.2 /// [Parameter] public bool ShowExtendButtons { get; set; } /// - /// 获得/设置 是否自动收缩工具栏按钮 默认 true + /// 获得/设置 是否自动收缩工具栏按钮 默认 true + /// Get/Set Whether to auto collapse toolbar buttons. Default true + /// 10.2.2 /// [Parameter] public bool IsAutoCollapsedToolbarButton { get; set; } = true; /// - /// 获得/设置 工具栏按钮收缩后是否继承原先按钮的颜色样式和中空化 默认 false + /// 获得/设置 工具栏按钮收缩后是否继承原先按钮的颜色样式和中空化 默认 false + /// Get/Set Whether to inherit button style when toolbar buttons collapsed. Default false + /// 10.2.2 /// [Parameter] public bool ShowColorWhenToolbarButtonsCollapsed { get; set; } /// - /// 获得/设置 工具栏移动端按钮图标 + /// 获得/设置 工具栏移动端按钮图标 + /// Get/Set Toolbar Mobile Button Icon + /// 10.2.2 /// [Parameter] public string? GearIcon { get; set; } /// - /// 获得/设置 扩展按钮是否在前面 默认 false 在行尾 + /// 获得/设置 扩展按钮是否在前面 默认 false 在行尾 + /// Get/Set Whether extension buttons are in front. Default false (At the end) + /// 10.2.2 /// [Parameter] public bool IsExtendButtonsInRowHeader { get; set; } /// - /// 获得/设置 行内操作列宽度 默认为 130 + /// 获得/设置 行内操作列宽度 默认为 130 + /// Get/Set Extension Column Width. Default 130 + /// 10.2.2 /// [Parameter] public int ExtendButtonColumnWidth { get; set; } = 130; /// - /// 获得/设置 行内操作列对齐方式 默认 center + /// 获得/设置 行内操作列对齐方式 默认 center + /// Get/Set Extension Column Alignment. Default center + /// 10.2.2 /// [Parameter] public Alignment ExtendButtonColumnAlignment { get; set; } /// - /// 获得/设置 是否显示行内扩展编辑按钮 默认 true 显示 + /// 获得/设置 是否显示行内扩展编辑按钮 默认 true 显示 + /// Get/Set Whether to show inline extension edit button. Default true + /// 10.2.2 /// [Parameter] public bool ShowExtendEditButton { get; set; } = true; /// - /// 获得/设置 是否显示行内扩展编辑按钮 默认为 null 未设置时使用 值 + /// 获得/设置 是否显示行内扩展编辑按钮 默认为 null 未设置时使用 + /// Get/Set Whether to show inline extension edit button. Default null. use value if not set + /// 10.2.2 /// [Parameter] public Func? ShowExtendEditButtonCallback { get; set; } /// - /// 获得/设置 是否禁用行内扩展编辑按钮 默认 false 不禁用 + /// 获得/设置 是否禁用行内扩展编辑按钮 默认 false 不禁用 + /// Get/Set Whether to disable inline extension edit button. Default false + /// 10.2.2 /// [Parameter] public bool DisableExtendEditButton { get; set; } /// - /// 获得/设置 是否禁用行内扩展编辑按钮 默认为 null 未设置时使用 值 + /// 获得/设置 是否禁用行内扩展编辑按钮 默认为 null 未设置时使用 + /// Get/Set Whether to disable inline extension edit button. Default null. use value if not set + /// 10.2.2 /// [Parameter] public Func? DisableExtendEditButtonCallback { get; set; } /// - /// 获得/设置 是否禁用行内扩展删除按钮 默认 false 不禁用 + /// 获得/设置 是否禁用行内扩展删除按钮 默认 false 不禁用 + /// Get/Set Whether to disable inline extension delete button. Default false + /// 10.2.2 /// [Parameter] public bool DisableExtendDeleteButton { get; set; } /// - /// 获得/设置 是否禁用行内扩展删除按钮 默认为 null 未设置时使用 值 + /// 获得/设置 是否禁用行内扩展删除按钮 默认为 null 未设置时使用 + /// Get/Set Whether to disable inline extension delete button. Default null. use value if not set + /// 10.2.2 /// [Parameter] public Func? DisableExtendDeleteButtonCallback { get; set; } /// - /// 获得/设置 是否显示行内扩展编辑按钮 默认为 null 未设置时使用 值 + /// 获得/设置 是否显示行内扩展编辑按钮 默认为 null 未设置时使用 + /// Get/Set Whether to show inline extension edit button. Default null. use value if not set + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 ShowExtendEditButtonCallback 参数. Deprecated Use ShowExtendEditButtonCallback instead.")] @@ -245,19 +321,25 @@ public Func? ShowEditButtonCallback } /// - /// 获得/设置 是否显示行内扩展删除按钮 默认 true 显示 + /// 获得/设置 是否显示行内扩展删除按钮 默认 true 显示 + /// Get/Set Whether to show inline extension delete button. Default true + /// 10.2.2 /// [Parameter] public bool ShowExtendDeleteButton { get; set; } = true; /// - /// 获得/设置 是否显示行内扩展删除按钮 默认为 null 未设置时使用 值 + /// 获得/设置 是否显示行内扩展删除按钮 默认为 null 未设置时使用 + /// Get/Set Whether to show inline extension delete button. Default null. use value if not set + /// 10.2.2 /// [Parameter] public Func? ShowExtendDeleteButtonCallback { get; set; } /// - /// 获得/设置 是否显示行内扩展删除按钮 默认为 null 未设置时使用 值 + /// 获得/设置 是否显示行内扩展删除按钮 默认为 null 未设置时使用 + /// Get/Set Whether to show inline extension delete button. Default null. use value if not set + /// 10.2.2 /// [Parameter] [Obsolete(" 已过期,请使用 ShowExtendDeleteButtonCallback 参数. Deprecated Use ShowExtendDeleteButtonCallback instead.")] @@ -269,198 +351,264 @@ public Func? ShowDeleteButtonCallback } /// - /// 获得/设置 是否固定扩展按钮列 默认为 false 不固定 + /// 获得/设置 是否固定扩展按钮列 默认为 false 不固定 + /// Get/Set Whether to fix Extension Button Column. Default false + /// 10.2.2 /// [Parameter] public bool FixedExtendButtonsColumn { get; set; } /// - /// 获得/设置 是否固定多选列 默认为 false 不固定 + /// 获得/设置 是否固定多选列 默认为 false 不固定 + /// Get/Set Whether to fix Multiple Select Column. Default false + /// 10.2.2 /// [Parameter] public bool FixedMultipleColumn { get; set; } /// - /// 获得/设置 是否固定明细行 Header 列 默认为 false 不固定 + /// 获得/设置 是否固定明细行 Header 列 默认为 false 不固定 + /// Get/Set Whether to fix Detail Row Header Column. Default false + /// 10.2.2 /// [Parameter] public bool FixedDetailRowHeaderColumn { get; set; } /// - /// 获得/设置 是否固定 LineNo 列 默认为 false 不固定 + /// 获得/设置 是否固定 LineNo 列 默认为 false 不固定 + /// Get/Set Whether to fix LineNo Column. Default false + /// 10.2.2 /// [Parameter] public bool FixedLineNoColumn { get; set; } /// - /// 获得/设置 是否显示刷新按钮 默认为 true + /// 获得/设置 是否显示刷新按钮 默认为 true + /// Get/Set Whether to show Refresh Button. Default true + /// 10.2.2 /// [Parameter] public bool ShowRefresh { get; set; } = true; /// - /// 获得/设置 是否显示视图按钮 默认为 false 模式下此设置无效 + /// 获得/设置 是否显示视图按钮 默认为 false 模式下此设置无效 + /// Get/Set Whether to show Card View Button. Default false. Not effective in mode + /// 10.2.2 /// [Parameter] public bool ShowCardView { get; set; } /// - /// 获得/设置 是否显示列选择下拉框 默认为 false 不显示 点击下拉框内列控制是否显示后触发 回调方法 + /// 获得/设置 是否显示列选择下拉框 默认为 false 不显示 点击下拉框内列控制是否显示后触发 回调方法 + /// Get/Set Whether to show Column List Dropdown. Default false. Trigger when column visible changed + /// 10.2.2 /// [Parameter] public bool ShowColumnList { get; set; } /// - /// 获得/设置 列选择下拉框中是否显示控制功能按钮默认为 false 不显示 + /// 获得/设置 列选择下拉框中是否显示控制功能按钮默认为 false 不显示 + /// Get/Set Whether to show control buttons in Column List Dropdown. Default false + /// 10.2.2 /// [Parameter] public bool ShowColumnListControls { get; set; } /// - /// 获得/设置 列选择下拉框图标 + /// 获得/设置 列选择下拉框图标 + /// Get/Set Column List Dropdown Icon + /// 10.2.2 /// [Parameter] public string? ColumnListButtonIcon { get; set; } /// - /// 获得/设置 保存、删除失败后是否显示 Toast 提示框 默认为 true 显示 + /// 获得/设置 保存、删除失败后是否显示 Toast 提示框 默认为 true 显示 + /// Get/Set Whether to show Toast when save or delete failed. Default true + /// 10.2.2 /// [Parameter] public bool ShowToastAfterSaveOrDeleteModel { get; set; } = true; /// - /// 获得/设置 表格 Toolbar 按钮模板 - /// 表格工具栏左侧按钮模板,模板中内容出现在默认按钮前面 + /// 获得/设置 表格 Toolbar 按钮模板 + /// Get/Set Table Toolbar Button Template + /// 表格工具栏左侧按钮模板,模板中内容出现在默认按钮前面 + /// Table toolbar left button template, content appears before default buttons + /// 10.2.2 /// [Parameter] public RenderFragment? TableToolbarBeforeTemplate { get; set; } /// - /// 获得/设置 表格 Toolbar 按钮模板 - /// 表格工具栏左侧按钮模板,模板中内容出现在默认按钮后面 + /// 获得/设置 表格 Toolbar 按钮模板 + /// Get/Set Table Toolbar Button Template + /// 表格工具栏左侧按钮模板,模板中内容出现在默认按钮后面 + /// Table toolbar left button template, content appears after default buttons + /// 10.2.2 /// [Parameter] public RenderFragment? TableToolbarTemplate { get; set; } /// - /// 获得/设置 表格 Toolbar 按钮模板 - /// 表格工具栏右侧按钮模板,模板中内容出现在默认按钮前面 + /// 获得/设置 表格 Toolbar 按钮模板 + /// Get/Set Table Toolbar Button Template + /// 表格工具栏右侧按钮模板,模板中内容出现在默认按钮前面 + /// Table toolbar right button template, content appears before default buttons + /// 10.2.2 /// [Parameter] public RenderFragment? TableExtensionToolbarBeforeTemplate { get; set; } /// - /// 获得/设置 表格 Toolbar 按钮模板 - /// 表格工具栏右侧按钮模板,模板中内容出现在默认按钮后面 + /// 获得/设置 表格 Toolbar 按钮模板 + /// Get/Set Table Toolbar Button Template + /// 表格工具栏右侧按钮模板,模板中内容出现在默认按钮后面 + /// Table toolbar right button template, content appears after default buttons + /// 10.2.2 /// [Parameter] public RenderFragment? TableExtensionToolbarTemplate { get; set; } /// - /// 获得/设置 新建按钮回调方法 用于补充模型字段值 + /// 获得/设置 新建按钮回调方法 用于补充模型字段值 + /// Get/Set Add Button Callback. Used to populate model field values + /// 10.2.2 /// - /// 有些场景下新建模型有些属性字段默认值需要更改为默认业务值,或者该属性数据库中设置不可为空,新建模型默认值为空时,可通过此回调进行属性值补充更新 + /// + /// 有些场景下新建模型有些属性字段默认值需要更改为默认业务值,或者该属性数据库中设置不可为空,新建模型默认值为空时,可通过此回调进行属性值补充更新 + /// In some scenarios, the default value of some attribute fields of the new model needs to be changed to the default business value, or the attribute cannot be null in the database. When the default value of the new model is null, this callback can be used to update the attribute value + /// [Parameter] public Func>? OnAddAsync { get; set; } /// - /// 获得/设置 编辑按钮回调方法 + /// 获得/设置 编辑按钮回调方法 + /// Get/Set Edit Button Callback + /// 10.2.2 /// [Parameter] public Func? OnEditAsync { get; set; } /// - /// 获得/设置 保存按钮异步回调方法 + /// 获得/设置 保存按钮异步回调方法 + /// Get/Set Save Button Async Callback + /// 10.2.2 /// [Parameter] public Func>? OnSaveAsync { get; set; } /// - /// 获得/设置 删除按钮异步回调方法 + /// 获得/设置 删除按钮异步回调方法 + /// Get/Set Delete Button Async Callback + /// 10.2.2 /// [Parameter] public Func, Task>? OnDeleteAsync { get; set; } /// - /// 获得/设置 导出按钮异步回调方法 + /// 获得/设置 导出按钮异步回调方法 + /// Get/Set Export Button Async Callback + /// 10.2.2 /// [Parameter] public Func, Task>? OnExportAsync { get; set; } /// - /// 获得/设置 保存弹窗中的保存按钮显示文本 默认为资源文件中的 保存 + /// 获得/设置 保存弹窗中的保存按钮显示文本 默认为资源文件中的 保存 + /// Get/Set Save Button Text in Edit Dialog. Default "Save" in resource file + /// 10.2.2 /// [Parameter] public string? EditDialogSaveButtonText { get; set; } /// - /// 获得/设置 保存弹窗中的保存按钮图标 默认 null 使用当前主题图标 + /// 获得/设置 保存弹窗中的保存按钮图标 默认 null 使用当前主题图标 + /// Get/Set Save Button Icon in Edit Dialog. Default null (Use current theme icon) + /// 10.2.2 /// [Parameter] public string? EditDialogSaveButtonIcon { get; set; } /// - /// 获得/设置 保存弹窗中的关闭按钮显示文本 默认为资源文件中的 关闭 + /// 获得/设置 保存弹窗中的关闭按钮显示文本 默认为资源文件中的 关闭 + /// Get/Set Close Button Text in Edit Dialog. Default "Close" in resource file + /// 10.2.2 /// [Parameter] public string? EditDialogCloseButtonText { get; set; } /// - /// 获得/设置 保存弹窗中的关闭按钮图标 默认 null 使用当前主题图标 + /// 获得/设置 保存弹窗中的关闭按钮图标 默认 null 使用当前主题图标 + /// Get/Set Close Button Icon in Edit Dialog. Default null (Use current theme icon) + /// 10.2.2 /// [Parameter] public string? EditDialogCloseButtonIcon { get; set; } /// - /// 获得/设置 导出数据弹窗 Title 默认为资源文件 导出数据 + /// 获得/设置 导出数据弹窗 Title 默认为资源文件 导出数据 + /// Get/Set Export Dialog Title. Default "Export Data" in resource file + /// 10.2.2 /// [Parameter] [NotNull] public string? ExportToastTitle { get; set; } /// - /// 获得/设置 导出数据提示内容 默认为资源文件 + /// 获得/设置 导出数据提示内容 默认为资源文件 + /// Get/Set Export Toast Content. Default in resource file + /// 10.2.2 /// [Parameter] [NotNull] public string? ExportToastContent { get; set; } /// - /// 获得/设置 正在导出数据提示内容 默认为资源文件 + /// 获得/设置 正在导出数据提示内容 默认为资源文件 + /// Get/Set Export In Progress Toast Content. Default in resource file + /// 10.2.2 /// [Parameter] [NotNull] public string? ExportToastInProgressContent { get; set; } /// - /// 获得/设置 编辑弹窗配置类扩展回调方法 新建/编辑弹窗弹出前回调此方法用于设置弹窗配置信息 + /// 获得/设置 编辑弹窗配置类扩展回调方法 新建/编辑弹窗弹出前回调此方法用于设置弹窗配置信息 + /// Get/Set Edit Dialog Option Callback. Called before showing Add/Edit Dialog to configure options + /// 10.2.2 /// [Parameter] public Action>? BeforeShowEditDialogCallback { get; set; } /// - /// ToastService 服务实例 + /// ToastService 服务实例 + /// ToastService Instance /// [Inject] [NotNull] protected ToastService? Toast { get; set; } /// - /// DialogService 服务实例 + /// DialogService 服务实例 + /// DialogService Instance /// [Inject] [NotNull] protected DialogService? DialogService { get; set; } /// - /// DrawerService 服务实例 + /// DrawerService 服务实例 + /// DrawerService Instance /// [Inject] [NotNull] protected DrawerService? DrawerService { get; set; } /// - /// 获得/设置 抽屉打开之前回调方法 用于设置 抽屉配置信息 + /// 获得/设置 抽屉打开之前回调方法 用于设置 抽屉配置信息 + /// Get/Set Before Show Drawer Callback. Used to configure + /// 10.2.2 /// [Parameter] public Func? OnBeforeShowDrawer { get; set; } @@ -470,17 +618,20 @@ public Func? ShowDeleteButtonCallback private ITableExport? TableExport { get; set; } /// - /// 获得/设置 各列是否显示状态集合 + /// 获得/设置 各列是否显示状态集合 + /// Get/Set Columns Visibility Status Collection /// private readonly List _visibleColumns = []; /// - /// 获得当前可见列集合 + /// 获得当前可见列集合 + /// Get Visible Columns Collection /// /// public IEnumerable GetVisibleColumns() { - // 不可见列 + // 不可见列 + // Invisible columns var items = _visibleColumns.Where(i => i.Visible).Select(a => a.Name).ToHashSet(); return Columns.Where(i => !i.GetIgnore() && items.Contains(i.GetFieldName()) && ScreenSize >= i.ShownWithBreakPoint); } @@ -500,18 +651,21 @@ private bool GetColumnsListState(ColumnVisibleItem item) private bool InCellMode => AddInCell || EditInCell; /// - /// 获得 InCell 模式下的 ValidateForm 实例 + /// 获得 InCell 模式下的 ValidateForm 实例 + /// Get ValidateForm Instance in InCell Mode /// private ValidateForm _inCellValidateForm = default!; /// - /// 新建按钮方法 + /// 新建按钮方法 + /// Add Button Method /// public async Task AddAsync() { if (DynamicContext != null) { - // 数据源为 DataTable 新建后重建行与列 + // 数据源为 DataTable 新建后重建行与列 + // Data source is DataTable, rebuild rows and columns after adding await DynamicContext.AddAsync(SelectedRows.OfType()); ResetDynamicContext(); @@ -559,24 +713,29 @@ public async Task AddAsync() private bool ShowEditForm { get; set; } /// - /// 编辑按钮方法 + /// 编辑按钮方法 + /// Edit Button Method /// public async Task EditAsync() { if (SelectedRows.Count == 1) { - // 检查是否选中了不可编辑行(行内无编辑按钮),同时检查按钮禁用状态(禁用时不可编辑) - // ShowExtendEditButton 不参与逻辑,不显示扩展编辑按钮时用户可能自定义按钮调用 EditAsync 方法 + // 检查是否选中了不可编辑行(行内无编辑按钮),同时检查按钮禁用状态(禁用时不可编辑) + // Check if an uneditable row is selected (no inline edit button), and check button disabled state (cannot edit when disabled) + // ShowExtendEditButton 不参与逻辑,不显示扩展编辑按钮时用户可能自定义按钮调用 EditAsync 方法 + // ShowExtendEditButton does not participate in logic. Users may invoke EditAsync method via custom buttons even when extension edit button is hidden if (ProhibitEdit()) { - // 提示不可编辑 + // 提示不可编辑 + // Toast uneditable await ShowToastAsync(EditButtonToastTitle, EditButtonToastReadonlyContent); } else { await ToggleLoading(true); - // 跟踪模式与动态类型时使用原始数据,否则使用克隆数据 + // 跟踪模式与动态类型时使用原始数据,否则使用克隆数据 + // Use original data in tracking mode and dynamic type, otherwise use clone data EditModel = (IsTracking || DynamicContext != null) ? SelectedRows[0] : Utility.Clone(SelectedRows[0]); if (OnEditAsync != null) { @@ -592,7 +751,8 @@ public async Task EditAsync() } EditModalTitleString = EditModalTitle; - // 显示编辑框 + // 显示编辑框 + // Show Edit Dialog if (EditMode == EditMode.Popup) { await ShowEditDialog(ItemChangedType.Update); @@ -618,7 +778,8 @@ public async Task EditAsync() } else { - // 不选或者多选弹窗提示 + // 不选或者多选弹窗提示 + // Toast if not selected or multiple selected var content = SelectedRows.Count == 0 ? EditButtonToastNotSelectContent : EditButtonToastMoreSelectContent; await ShowToastAsync(EditButtonToastTitle, content); } @@ -641,7 +802,8 @@ private async Task ShowDeleteToastAsync(string title, string content, ToastCateg } /// - /// 取消保存方法 + /// 取消保存方法 + /// Cancel Save Method /// /// protected async Task CancelSave() @@ -665,7 +827,8 @@ protected async Task CancelSave() } /// - /// 保存数据方法 + /// 保存数据方法 + /// Save Data Method /// /// /// @@ -684,7 +847,8 @@ protected async Task SaveModelAsync(EditContext context, ItemChangedType c valid = await InternalOnSaveAsync((TItem)context.Model, changedType); } - // 回调外部自定义方法 + // 回调外部自定义方法 + // Callback external custom method if (OnAfterSaveAsync != null) { await OnAfterSaveAsync((TItem)context.Model); @@ -704,7 +868,8 @@ protected async Task SaveModelAsync(EditContext context, ItemChangedType c } /// - /// 保存数据 + /// 保存数据 + /// Save Data /// /// /// @@ -766,49 +931,65 @@ protected async Task SaveAsync(EditContext context, ItemChangedType changedType) } /// - /// 编辑框的大小 + /// 编辑框的大小 + /// 编辑框的大小 + /// 10.2.2 /// [Parameter] public Size EditDialogSize { get; set; } = Size.ExtraExtraLarge; /// - /// 获得/设置 编辑框是否可以拖拽 默认 false 不可以拖拽,参数 值为 false 时此参数才生效 + /// 获得/设置 编辑框是否可以拖拽 默认 false 不可以拖拽,参数 值为 false 时此参数才生效 + /// Gets or sets 编辑框whether可以拖拽 Default is false 不可以拖拽,参数 值为 false 时此参数才生效 + /// 10.2.2 /// [Parameter] public bool EditDialogIsDraggable { get; set; } /// - /// 获得/设置 编辑框 FullScreenSize 参数 默认 none + /// 获得/设置 编辑框 FullScreenSize 参数 默认 none + /// Gets or sets 编辑框 FullScreenSize 参数 Default is none + /// 10.2.2 /// [Parameter] public FullScreenSize EditDialogFullScreenSize { get; set; } /// - /// 获得/设置 编辑框是否显示最大化按钮 默认 true 显示,此时 参数无效 + /// 获得/设置 编辑框是否显示最大化按钮 默认 true 显示,此时 参数无效 + /// Gets or sets 编辑框whetherdisplay最大化button Default is true display,此时 参数无效 + /// 10.2.2 /// [Parameter] public bool EditDialogShowMaximizeButton { get; set; } = true; /// - /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// Gets or sets 未分组编辑项布局位置 Default is false 在尾部 + /// 10.2.2 /// [Parameter] public bool ShowUnsetGroupItemsOnTop { get; set; } /// - /// 获得/设置 弹窗 Footer + /// 获得/设置 弹窗 Footer + /// Gets or sets 弹窗 Footer + /// 10.2.2 /// [Parameter] public RenderFragment? EditFooterTemplate { get; set; } /// - /// 获得/设置 编辑弹窗关闭前回调方法 + /// 获得/设置 编辑弹窗关闭前回调方法 + /// Get/Set Before Close Edit Dialog Callback + /// 10.2.2 /// [Parameter] public Func? EditDialogCloseAsync { get; set; } /// - /// 获得/设置 编辑弹窗 Dialog, 可避免弹窗中 Table 再次弹窗时隐藏原表格问题 + /// 获得/设置 编辑弹窗 Dialog, 可避免弹窗中 Table 再次弹窗时隐藏原表格问题 + /// Get/Set Edit Dialog. To avoid hiding the original table when the table popup again in the popup window + /// 10.2.2 /// [Parameter] public Dialog? EditDialog { get; set; } @@ -822,8 +1003,10 @@ private async Task AddItem(EditContext context) private async Task EditItem(EditContext context) { - // 使用 Comparer 确保能找到集合中的编辑项 - // 解决可能使用 Clone 副本导致编辑数据与 Items 中数据不一致 + // 使用 Comparer 确保能找到集合中的编辑项 + // Use Comparer to ensure the edit item is found in the collection + // 解决可能使用 Clone 副本导致编辑数据与 Items 中数据不一致 + // To solve the problem that the edit data may be inconsistent with the data in Items due to using Clone copy var entity = Rows.FirstOrDefault(i => this.Equals(i, (TItem)context.Model)); if (entity != null) { @@ -869,7 +1052,8 @@ private void AppendOptions(ITableEditDialogOption option, ItemChangedType } /// - /// 弹出编辑对话框方法 + /// 弹出编辑对话框方法 + /// Show Edit Dialog Method /// protected async Task ShowEditDialog(ItemChangedType changedType) { @@ -905,7 +1089,8 @@ protected async Task ShowEditDialog(ItemChangedType changedType) } /// - /// 弹出编辑抽屉方法 + /// 弹出编辑抽屉方法 + /// Show Edit Drawer Method /// protected async Task ShowEditDrawer(ItemChangedType changedType) { @@ -952,7 +1137,8 @@ private async Task OnCloseEditDialogCallbackAsync(bool saved) if (!saved) { - // EFCore 模式保存失败后调用 CancelAsync 回调 + // EFCore 模式保存失败后调用 CancelAsync 回调 + // Call CancelAsync callback after EFCore mode save failed var d = DataService ?? InjectDataService; if (d is IEntityFrameworkCoreDataService ef) { @@ -1005,7 +1191,8 @@ private async Task OnSaveEditCallbackAsync(EditContext context, ItemChange } /// - /// 确认删除按钮方法 + /// 确认删除按钮方法 + /// Confirm Delete Button Method /// protected async Task ConfirmDelete() { @@ -1034,7 +1221,8 @@ private bool ProhibitDelete() => (ShowExtendDeleteButtonCallback != null && Sele || DisableExtendDeleteButton; /// - /// 删除数据方法 + /// 删除数据方法 + /// Delete Data Method /// protected async Task DeleteAsync() { @@ -1082,9 +1270,12 @@ async Task DeleteItemsAsync() { if (IsPagination) { - // 删除成功 重新查询 - // 由于数据删除导致页码会改变,尤其是最后一页 - // 重新计算页码 + // 删除成功 重新查询 + // Delete success, re-query + // 由于数据删除导致页码会改变,尤其是最后一页 + // The page number will change due to data deletion, especially the last page + // 重新计算页码 + // Recalculate page number // https://gitee.com/LongbowEnterprise/BootstrapBlazor/issues/I1UJSL PageIndex = GetSafePageIndex(); var items = PageItemsSource.Where(item => item >= (TotalCount - SelectedRows.Count)).ToList(); @@ -1119,19 +1310,22 @@ private void ResetDynamicContext() Columns.Clear(); Columns.AddRange(cols); - // Columns 重构 清空缓存 + // Columns 重构 清空缓存 + // Columns Reconstruct, clear cache FirstFixedColumnCache.Clear(); LastFixedColumnCache.Clear(); InternalResetVisibleColumns(Columns); var queryOption = BuildQueryPageOptions(); - // 设置是否为首次查询 + // 设置是否为首次查询 + // Set whether it is the first query queryOption.IsFirstQuery = _firstQuery; QueryDynamicItems(queryOption, DynamicContext); - // 重新绑定列拖拽 + // 重新绑定列拖拽 + // Rebind column resize _bindResizeColumn = true; } } @@ -1155,7 +1349,8 @@ private void QueryDynamicItems(QueryPageOptions queryOption, IDynamicObjectConte } QueryItems = items.Cast().ToList(); - // 重置选中行 + // 重置选中行 + // Reset selected rows ResetSelectedRows(QueryItems); } } @@ -1221,25 +1416,29 @@ private Task ExportExcelAsync() => ExecuteExportAsync(() => OnExportAsync != nul : TableExport.ExportExcelAsync(Rows, GetExportColumns())); /// - /// Gets the export column collection. + /// 获得 the export column 集合. + /// Gets the export column collection. /// /// public List GetExportColumns() => [.. GetVisibleColumns().Where(i => i.IgnoreWhenExport is not true)]; /// - /// 获取当前 Table 选中的所有行数据 + /// 获取当前 Table 选中的所有行数据 + /// Get user selected rows /// /// protected IEnumerable GetSelectedRows() => SelectedRows; /// - /// 是否显示行内编辑按钮 + /// 是否显示行内编辑按钮 + /// Whether to show inline edit button /// /// protected bool GetShowExtendEditButton(TItem item) => ShowExtendEditButtonCallback?.Invoke(item) ?? ShowExtendEditButton; /// - /// 是否显示行内删除按钮 + /// 是否显示行内删除按钮 + /// Whether to show inline delete button /// /// protected bool GetShowExtendDeleteButton(TItem item) => ShowExtendDeleteButtonCallback?.Invoke(item) ?? ShowExtendDeleteButton; diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.TreeNode.cs b/src/BootstrapBlazor/Components/Table/Table.razor.TreeNode.cs index 73f0ebd5b63..ae72d9065c3 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.TreeNode.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.TreeNode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,30 +8,38 @@ namespace BootstrapBlazor.Components; public partial class Table { /// - /// 获得/设置 是否为树形数据 默认为 false + /// 获得/设置 是否为树形数据 默认为 false + /// Get/Set Whether it is tree data. Default false + /// 10.2.2 /// [Parameter] public bool IsTree { get; set; } /// - /// 获得/设置 生成树状结构回调方法 + /// 获得/设置 生成树状结构回调方法 + /// Get/Set Callback for generating tree structure + /// 10.2.2 /// [Parameter] public Func, Task>>>? TreeNodeConverter { get; set; } /// - /// 获得/设置 树形数据节点展开式回调委托方法 + /// 获得/设置 树形数据节点展开式回调委托方法 + /// Get/Set Callback delegate for expanding tree data node + /// 10.2.2 /// [Parameter] public Func>>>? OnTreeExpand { get; set; } /// - /// 获得/设置 树形数据集合 + /// 获得/设置 树形数据集合 + /// Get/Set Tree Data Collection /// private List> TreeRows { get; } = new(100); /// - /// 获得/设置 是否正在加载子项 默认为 false + /// 获得/设置 是否正在加载子项 默认为 false + /// Get/Set Whether loading children. Default false /// private bool IsLoadChildren { get; set; } @@ -39,31 +47,40 @@ public partial class Table private string? NotSetOnTreeExpandErrorMessage { get; set; } /// - /// 获得/设置 数型结构小箭头图标 + /// 获得/设置 数型结构小箭头图标 + /// Get/Set Tree Node Icon + /// 10.2.2 /// [Parameter] public string? TreeIcon { get; set; } /// - /// 获得/设置 数型结构展开小箭头图标 + /// 获得/设置 数型结构展开小箭头图标 + /// Get/Set Tree Node Expand Icon + /// 10.2.2 /// [Parameter] public string? TreeExpandIcon { get; set; } /// - /// 获得/设置 数型结构正在加载图标 + /// 获得/设置 数型结构正在加载图标 + /// Get/Set Tree Node Loading Icon + /// 10.2.2 /// [Parameter] public string? TreeNodeLoadingIcon { get; set; } /// - /// 获得/设置 缩进大小 默认为 16 单位 px + /// 获得/设置 缩进大小 默认为 16 单位 px + /// Get/Set Indent Size. Default 16 px + /// 10.2.2 /// [Parameter] public int IndentSize { get; set; } = 16; /// - /// 树形数据小箭头缩进 + /// 树形数据小箭头缩进 + /// Tree Node Indent /// /// /// @@ -72,7 +89,8 @@ public partial class Table .Build(); /// - /// 树形数据展开小箭头 + /// 树形数据展开小箭头 + /// Tree Node Expand Arrow /// /// /// @@ -83,13 +101,15 @@ public partial class Table .Build(); /// - /// 节点缓存类实例 + /// 节点缓存类实例 + /// Node Cache Instance /// [NotNull] protected ExpandableNodeCache, TItem>? TreeNodeCache { get; set; } /// - /// 展开收缩树形数据节点方法 + /// 展开收缩树形数据节点方法 + /// Toggle Tree Node Method /// /// /// @@ -99,16 +119,19 @@ protected Func ToggleTreeRow(TItem item) => async () => { if (TreeNodeCache.TryFind(TreeRows, item, out var node)) { - // 重建当前节点缓存 + // 重建当前节点缓存 + // Rebuild current node cache IsLoadChildren = true; node.IsExpand = !node.IsExpand; await TreeNodeCache.ToggleNodeAsync(node, GetChildrenRowAsync); IsLoadChildren = false; - // 清除缓存 + // 清除缓存 + // Clear cache _rowsCache = null; - // 更新 UI + // 更新 UI + // Update UI StateHasChanged(); } } diff --git a/src/BootstrapBlazor/Components/Table/Table.razor.cs b/src/BootstrapBlazor/Components/Table/Table.razor.cs index cbcec66299a..9e6a5edfe25 100644 --- a/src/BootstrapBlazor/Components/Table/Table.razor.cs +++ b/src/BootstrapBlazor/Components/Table/Table.razor.cs @@ -11,56 +11,71 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件基类 +/// Table 组件基类 +/// Table Component Base Class /// [CascadingTypeParameter(nameof(TItem))] public partial class Table : ITable, IModelEqualityComparer where TItem : class { /// - /// Gets or sets a value indicating whether automatic search functionality is enabled. Default value is false. + /// 获得/设置 a value indicating 是否 automatic search functionality is enabled. 默认 value is false. + /// Gets or sets a value indicating whether automatic search functionality is enabled. Default value is false. + /// 10.2.2 /// [Parameter] public bool AutoSearchOnInput { get; set; } /// - /// 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 + /// 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 + /// Get/Set Not Supported Column Filter Message. Default null (Read from resource file) + /// 10.2.2 /// [Parameter] public string? NotSupportedColumnFilterMessage { get; set; } /// - /// 获得/设置 Loading 模板 + /// 获得/设置 Loading 模板 + /// Get/Set Loading Template + /// 10.2.2 /// [Parameter] public RenderFragment? LoadingTemplate { get; set; } /// - /// 获得/设置 列工具栏图标 fa-solid fa-gear + /// 获得/设置 列工具栏图标 fa-solid fa-gear + /// Get/Set Column Toolbox Icon fa-solid fa-gear + /// 10.2.2 /// [Parameter] [NotNull] public string? ColumnToolboxIcon { get; set; } /// - /// 获得/设置 默认固定列宽度 默认 200 单位 px + /// 获得/设置 默认固定列宽度 默认 200 单位 px + /// Get/Set Default Fixed Column Width. Default 200 px + /// 10.2.2 /// [Parameter] public int DefaultFixedColumnWidth { get; set; } = 200; /// - /// 获得/设置 是否使用按钮组显示行内扩展按钮 默认 true + /// 获得/设置 是否使用按钮组显示行内扩展按钮 默认 true + /// Get/Set Whether to use button group for extend buttons. Default true + /// 10.2.2 /// [Parameter] public bool IsGroupExtendButtons { get; set; } = true; /// - /// 获得/设置 内置虚拟化组件实例 + /// 获得/设置 内置虚拟化组件实例 + /// Get/Set Internal Virtualize Component Instance /// [NotNull] private Virtualize? _virtualizeElement = null; /// - /// 获得 Table 组件样式表 + /// 获得 Table 组件样式表 + /// Get Table Component CSS Class /// private string? ClassName => CssBuilder.Default("table-container") .AddClassFromAttributes(AdditionalAttributes) @@ -72,7 +87,8 @@ public partial class Table : ITable, IModelEqualityComparer where .Build(); /// - /// 获得 Table 组件样式表 + /// 获得 Table 组件样式表 + /// Get Table Component CSS Class /// private string? TableClassName => CssBuilder.Default("table") .AddClass("table-sm", TableSize == TableSize.Compact) @@ -84,7 +100,8 @@ public partial class Table : ITable, IModelEqualityComparer where .Build(); /// - /// 获得 wrapper 样式表集合 + /// 获得 wrapper 样式表集合 + /// Get wrapper CSS Class /// protected string? WrapperClassName => CssBuilder.Default() .AddClass("table-shim", ActiveRenderMode == TableRenderMode.Table) @@ -106,7 +123,8 @@ public partial class Table : ITable, IModelEqualityComparer where private bool FixedColumn => FixedExtendButtonsColumn || FixedMultipleColumn || FixedDetailRowHeaderColumn || FixedLineNoColumn || Columns.Any(c => c.Fixed); /// - /// 获得 Body 内行样式 + /// 获得 Body 内行样式 + /// Get Body Row CSS Class /// /// /// @@ -121,7 +139,8 @@ public partial class Table : ITable, IModelEqualityComparer where .Build(); /// - /// 明细行首小图标单元格样式 + /// 明细行首小图标单元格样式 + /// Detail Row Icon Cell CSS Class /// protected string? GetDetailBarClassString(TItem item) => CssBuilder.Default("table-cell is-bar") .AddClass("is-load", DetailRows.Contains(item)) @@ -132,7 +151,8 @@ public partial class Table : ITable, IModelEqualityComparer where .Build(); /// - /// 获得明细行样式 + /// 获得明细行样式 + /// Get Detail Row CSS Class /// /// /// @@ -141,7 +161,8 @@ public partial class Table : ITable, IModelEqualityComparer where .Build(); /// - /// 获得明细行小图标样式 + /// 获得明细行小图标样式 + /// Get Detail Row Icon CSS Class /// /// /// @@ -186,32 +207,42 @@ private string GetSortTooltip(ITableColumn col) => SortName != col.GetFieldName( private static string? GetColWidthString(int? width) => width.HasValue ? $"width: {width.Value}px;" : null; /// - /// 获得/设置 滚动条宽度 默认 null 未设置使用 配置类中的 + /// 获得/设置 滚动条宽度 默认 null 未设置使用 配置类中的 + /// Get/Set Scroll Width. Default null (Use ) + /// 10.2.2 /// [Parameter] public int? ScrollWidth { get; set; } /// - /// 获得/设置 滚动条 hover 状态下宽度 默认 null 未设置使用 配置类中的 + /// 获得/设置 滚动条 hover 状态下宽度 默认 null 未设置使用 配置类中的 + /// Get/Set Scroll Hover Width. Default null (Use ) + /// 10.2.2 /// [Parameter] public int? ScrollHoverWidth { get; set; } /// - /// 获得/设置 列调整提示前缀文字 默认 null 未设置使用资源文件中文字 + /// 获得/设置 列调整提示前缀文字 默认 null 未设置使用资源文件中文字 + /// Get/Set Column Resize Tooltip Prefix. Default null (Read from resource file) + /// 10.2.2 /// [Parameter] public string? ColumnWidthTooltipPrefix { get; set; } /// - /// 获得/设置 是否显示列宽提示信息,默认 false 显示 + /// 获得/设置 是否显示列宽提示信息,默认 false 显示 + /// Get/Set Whether to show column width tooltip. Default false + /// 10.2.2 /// [Parameter] public bool ShowColumnWidthTooltip { get; set; } - ///// - ///// 获得/设置 行 Key 回调方法 - ///// + /// + /// 获得/设置 行 Key 回调方法 + /// Gets or sets 行 Key callback method + /// 10.2.2 + /// //[Parameter] //public Func? OnGetRowKey { get; set; } @@ -226,194 +257,263 @@ private string GetSortTooltip(ITableColumn col) => SortName != col.GetFieldName( private int ActualScrollHoverWidth => ScrollHoverWidth ?? Options.CurrentValue.ScrollOptions.ScrollHoverWidth; /// - /// 获得/设置 Table 高度 默认为 null + /// 获得/设置 Table 高度 默认为 null + /// Get/Set Table Height. Default null + /// 10.2.2 /// - /// 开启固定表头功能时生效 + /// + /// 开启固定表头功能时生效 + /// Effective when is true + /// [Parameter] public int? Height { get; set; } /// - /// 获得/设置 固定表头 默认 false + /// 获得/设置 固定表头 默认 false + /// Get/Set Fixed Header. Default false + /// 10.2.2 /// [Parameter] public bool IsFixedHeader { get; set; } /// - /// 获得/设置 固定 Footer 默认 false + /// 获得/设置 固定 Footer 默认 false + /// Get/Set Fixed Footer. Default false + /// 10.2.2 /// [Parameter] public bool IsFixedFooter { get; set; } /// - /// 获得/设置 多表头模板 + /// 获得/设置 多表头模板 + /// Get/Set Multi Header Template + /// 10.2.2 /// [Parameter] public RenderFragment? MultiHeaderTemplate { get; set; } /// - /// 获得/设置 列拷贝 Tooltip 文字 + /// 获得/设置 列拷贝 Tooltip 文字 + /// Get/Set Copy Column Tooltip Text + /// 10.2.2 /// [Parameter] public string? CopyColumnTooltipText { get; set; } /// - /// 获得/设置 列拷贝完毕后 Tooltip 文字 + /// 获得/设置 列拷贝完毕后 Tooltip 文字 + /// Get/Set Copy Column Copied Tooltip Text + /// 10.2.2 /// [Parameter] public string? CopyColumnCopiedTooltipText { get; set; } /// - /// 获得/设置 CopyColumn Tooltip 默认 true + /// 获得/设置 CopyColumn Tooltip 默认 true + /// Get/Set CopyColumn Tooltip. Default true + /// 10.2.2 /// [Parameter] public bool ShowCopyColumnTooltip { get; set; } = true; /// - /// 明细行集合用于数据懒加载 + /// 明细行集合用于数据懒加载 + /// 明细行collection用于data懒加载 /// protected List ExpandRows { get; } = []; /// - /// 获得/设置 组件工作模式为 Excel 模式 默认 false + /// 获得/设置 组件工作模式为 Excel 模式 默认 false + /// Get/Set Excel Mode. Default false + /// 10.2.2 /// [Parameter] public bool IsExcel { get; set; } /// - /// 获得/设置 是否启用 Excel 模式下的键盘导航功能 默认 true + /// 获得/设置 是否启用 Excel 模式下的键盘导航功能 默认 true + /// Get/Set Enable Keyboard Navigation in Excel Mode. Default true + /// 10.2.2 /// [Parameter] public bool EnableKeyboardNavigationCell { get; set; } = true; /// - /// 获得/设置 是否显示明细行 默认为 null 为空时使用 进行逻辑判断 + /// 获得/设置 是否显示明细行 默认为 null 为空时使用 进行逻辑判断 + /// Get/Set Whether to show detail row. Default null (Check ) + /// 10.2.2 /// [Parameter] public bool? IsDetails { get; set; } /// - /// 获得/设置 无数据时是否隐藏表格 Footer 默认为 false 不隐藏 + /// 获得/设置 无数据时是否隐藏表格 Footer 默认为 false 不隐藏 + /// Get/Set Whether to hide footer when no data. Default false + /// 10.2.2 /// [Parameter] public bool IsHideFooterWhenNoData { get; set; } /// - /// 获得/设置 每行显示组件数量 默认为 2 + /// 获得/设置 每行显示组件数量 默认为 2 + /// Get/Set Items per row in Edit Dialog. Default 2 + /// 10.2.2 /// [Parameter] public int EditDialogItemsPerRow { get; set; } = 2; /// - /// 获得/设置 设置行内组件布局格式 默认 Inline 布局 + /// 获得/设置 设置行内组件布局格式 默认 Inline 布局 + /// Get/Set Row Layout Format. Default Inline + /// 10.2.2 /// [Parameter] public RowType EditDialogRowType { get; set; } = RowType.Inline; /// - /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// Get/Set Label Alignment in Inline Mode. Default None (Left) + /// 10.2.2 /// [Parameter] public Alignment EditDialogLabelAlign { get; set; } /// - /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// Get/Set Whether to disable auto submit form by enter. Default null + /// 10.2.2 /// [Parameter] public bool? DisableAutoSubmitFormByEnter { get; set; } /// - /// 获得/设置 明细行 Row Header 宽度 默认 24 + /// 获得/设置 明细行 Row Header 宽度 默认 24 + /// Get/Set Detail Row Header Width. Default 24 + /// 10.2.2 /// [Parameter] public int DetailColumnWidth { get; set; } /// - /// 获得/设置 显示文字的复选框列宽度 默认 80 + /// 获得/设置 显示文字的复选框列宽度 默认 80 + /// Get/Set Show Checkbox Text Column Width. Default 80 + /// 10.2.2 /// [Parameter] public int ShowCheckboxTextColumnWidth { get; set; } /// - /// 获得/设置 复选框宽度 默认 36 + /// 获得/设置 复选框宽度 默认 36 + /// Get/Set Checkbox Column Width. Default 36 + /// 10.2.2 /// [Parameter] public int CheckboxColumnWidth { get; set; } /// - /// 获得/设置 紧凑模式下复选框宽度 默认 28 + /// 获得/设置 紧凑模式下复选框宽度 默认 28 + /// Get/Set Compact Checkbox Column Width. Default 28 + /// 10.2.2 /// [Parameter] public int CheckboxColumnCompactWidth { get; set; } /// - /// 获得/设置 行号列宽度 默认 60 + /// 获得/设置 行号列宽度 默认 60 + /// Get/Set Line No Column Width. Default 60 + /// 10.2.2 /// [Parameter] public int LineNoColumnWidth { get; set; } /// - /// 获得/设置 行号内容位置 + /// 获得/设置 行号内容位置 + /// Get/Set Line No Column Alignment + /// 10.2.2 /// [Parameter] public Alignment LineNoColumnAlignment { get; set; } /// - /// 获得/设置 呈现每行之前的回调 + /// 获得/设置 呈现每行之前的回调 + /// Get/Set Callback before render row + /// 10.2.2 /// [Parameter] public Action? OnBeforeRenderRow { get; set; } /// - /// 获得/设置 Table 组件渲染完毕回调 + /// 获得/设置 Table 组件渲染完毕回调 + /// Get/Set Callback after Table rendered + /// 10.2.2 /// [Parameter] public Func, bool, Task>? OnAfterRenderCallback { get; set; } /// - /// 获得/设置 是否自动将选中行滚动到可视区域 默认 false + /// 获得/设置 是否自动将选中行滚动到可视区域 默认 false + /// Get/Set Whether to auto scroll last selected row to view. Default false + /// 10.2.2 /// [Parameter] public bool AutoScrollLastSelectedRowToView { get; set; } /// - /// 获得/设置 选中行滚动到可视区域对齐方式 默认 ScrollToViewAlign.Center + /// 获得/设置 选中行滚动到可视区域对齐方式 默认 ScrollToViewAlign.Center + /// Get/Set Alignment for auto scroll selected row. Default ScrollToViewAlign.Center + /// 10.2.2 /// [Parameter] public ScrollToViewAlign AutoScrollVerticalAlign { get; set; } = ScrollToViewAlign.Center; /// - /// 获得/设置 双击单元格回调委托 + /// 获得/设置 双击单元格回调委托 + /// Get/Set Double Click Cell Callback + /// 10.2.2 /// [Parameter] public Func? OnDoubleClickCellCallback { get; set; } /// - /// 获得/设置 展开收起明细行回调方法 第二个参数 true 时表示展开 false 时表示收起 + /// 获得/设置 展开收起明细行回调方法 第二个参数 true 时表示展开 false 时表示收起 + /// Get/Set Callback for toggle detail row. Second param true for expand, false for collapse + /// 10.2.2 /// [Parameter] public Func? OnToggleDetailRowCallback { get; set; } /// - /// 获得/设置 工具栏下拉框按钮是否 IsPopover 默认 false + /// 获得/设置 工具栏下拉框按钮是否 IsPopover 默认 false + /// Get/Set Whether toolbar dropdown button is Popover. Default false + /// 10.2.2 /// [Parameter] public bool IsPopoverToolbarDropdownButton { get; set; } /// - /// 获得/设置 数据滚动模式 + /// 获得/设置 数据滚动模式 + /// Get/Set Scroll Mode + /// 10.2.2 /// [Parameter] public ScrollMode ScrollMode { get; set; } /// - /// 获得/设置 虚拟滚动行高 默认为 38 + /// 获得/设置 虚拟滚动行高 默认为 38 + /// Get/Set Virtual Scroll Row Height. Default 38 + /// 10.2.2 /// - /// 需要设置 值为 Virtual 时生效 + /// + /// 需要设置 值为 Virtual 时生效 + /// Effective when is Virtual + /// [Parameter] public float RowHeight { get; set; } = 38f; /// - /// Gets or sets the overscan count for virtual scrolling. Default is 10. + /// 获得/设置 the overscan count for virtual scrolling. 默认为 10. + /// Gets or sets the overscan count for virtual scrolling. Default is 10. + /// 10.2.2 /// /// Effective when is set to . [Parameter] @@ -424,7 +524,9 @@ private string GetSortTooltip(ITableColumn col) => SortName != col.GetFieldName( private IOptionsMonitor? Options { get; set; } /// - /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false + /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false + /// Get/Set Whether to use Tracking mode. Default false + /// 10.2.2 /// [Parameter] public bool IsTracking { get; set; } @@ -456,19 +558,24 @@ private bool ShowDetails() => IsDetails == null : IsDetails.Value && DetailRowTemplate != null; /// - /// 获得/设置 明细行手风琴效果 默认 false + /// 获得/设置 明细行手风琴效果 默认 false + /// Get/Set Accordion for detail rows. Default false + /// 10.2.2 /// [Parameter] public bool IsAccordion { get; set; } /// - /// 获得/设置 列最小宽度 默认 null 未设置 可通过 统一设置 + /// 获得/设置 列最小宽度 默认 null 未设置 可通过 统一设置 + /// Get/Set Column Min Width. Default null + /// 10.2.2 /// [Parameter] public int? ColumnMinWidth { get; set; } /// - /// 明细行功能中切换行状态时调用此方法 + /// 明细行功能中切换行状态时调用此方法 + /// Method called when toggling detail row /// /// public async Task ExpandDetailRow(TItem item) @@ -494,308 +601,417 @@ public async Task ExpandDetailRow(TItem item) } /// - /// 明细行集合用于数据懒加载 + /// 明细行集合用于数据懒加载 + /// Detail Rows Collection for Lazy Load /// protected List DetailRows { get; } = []; /// - /// 获得 表头集合 + /// 获得 表头集合 + /// Get Columns Collection /// public List Columns { get; } = new(50); /// - /// 获得/设置 明细行模板 + /// 获得/设置 明细行模板 + /// Get/Set Detail Row Template + /// 10.2.2 /// [Parameter] public RenderFragment? DetailRowTemplate { get; set; } /// - /// 获得/设置 行模板 + /// 获得/设置 行模板 + /// Get/Set Row Template + /// 10.2.2 /// [Parameter] public RenderFragment>? RowTemplate { get; set; } /// - /// 获得/设置 行内容模板 + /// 获得/设置 行内容模板 + /// Get/Set Row Content Template + /// 10.2.2 /// [Parameter] public RenderFragment>? RowContentTemplate { get; set; } /// - /// 获得/设置 TableHeader 实例 + /// 获得/设置 TableHeader 实例 + /// Get/Set TableHeader Instance + /// 10.2.2 /// [Parameter] public RenderFragment? TableColumns { get; set; } /// - /// 获得/设置 TableFooter 实例 + /// 获得/设置 TableFooter 实例 + /// Get/Set TableFooter Instance + /// 10.2.2 /// [Parameter] public RenderFragment>? TableFooter { get; set; } /// - /// 获得/设置 Table Footer 模板 + /// 获得/设置 Table Footer 模板 + /// Get/Set Table Footer Template + /// 10.2.2 /// [Parameter] public RenderFragment>? FooterTemplate { get; set; } /// - /// 获得/设置 数据集合,适用于无功能仅做数据展示使用,高级功能时请使用 回调委托 + /// 获得/设置 数据集合,适用于无功能仅做数据展示使用,高级功能时请使用 回调委托 + /// Get/Set Items. Use for advanced features + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// - /// 获得/设置 数据集合回调方法 + /// 获得/设置 数据集合回调方法 + /// Get/Set Items Changed Callback + /// 10.2.2 /// [Parameter] public EventCallback> ItemsChanged { get; set; } /// - /// 获得/设置 表格组件大小 默认为 Normal 正常模式 + /// 获得/设置 表格组件大小 默认为 Normal 正常模式 + /// Get/Set Table Size. Default Normal + /// 10.2.2 /// [Parameter] public TableSize TableSize { get; set; } /// - /// 获得/设置 无数据时显示模板 默认 null + /// 获得/设置 无数据时显示模板 默认 null + /// Get/Set Empty Template. Default null + /// 10.2.2 /// [Parameter] public RenderFragment? EmptyTemplate { get; set; } /// - /// 获得/设置 无数据时显示文本 默认取资源文件 英文 NoData 中文 无数据 + /// 获得/设置 无数据时显示文本 默认取资源文件 英文 NoData 中文 无数据 + /// Get/Set Empty Text. Default null (Read from resource file) + /// 10.2.2 /// [Parameter] public string? EmptyText { get; set; } /// - /// 获得/设置 无数据时显示图片路径 默认 null 未设置 + /// 获得/设置 无数据时显示图片路径 默认 null 未设置 + /// Get/Set Empty Image Path. Default null + /// 10.2.2 /// [Parameter] public string? EmptyImage { get; set; } /// - /// 获得/设置 是否显示无数据空记录 默认 false 不显示 + /// 获得/设置 是否显示无数据空记录 默认 false 不显示 + /// Get/Set Whether to show empty record. Default false + /// 10.2.2 /// [Parameter] public bool ShowEmpty { get; set; } /// - /// 获得/设置 是否显示过滤表头 默认 false 不显示 + /// 获得/设置 是否显示过滤表头 默认 false 不显示 + /// Get/Set Whether to show filter header. Default false + /// 10.2.2 /// [Parameter] public bool ShowFilterHeader { get; set; } /// - /// 获得/设置 是否显示过滤表头 默认 false 不显示 + /// 获得/设置 是否显示过滤表头 默认 false 不显示 + /// Get/Set Whether to show multi filter header. Default false + /// 10.2.2 /// [Parameter] public bool ShowMultiFilterHeader { get; set; } /// - /// 获得/设置 是否显示表脚 默认为 false + /// 获得/设置 是否显示表脚 默认为 false + /// Get/Set Whether to show footer. Default false + /// 10.2.2 /// [Parameter] public bool ShowFooter { get; set; } /// - /// 获得/设置 是否允许列宽度调整 默认 false 固定表头时此属性生效 + /// 获得/设置 是否允许列宽度调整 默认 false 固定表头时此属性生效 + /// Get/Set Whether to allow resizing column width. Default false (Effective when fixed header) + /// 10.2.2 /// [Parameter] public bool AllowResizing { get; set; } /// - /// 获得/设置 是否表头允许折行 默认 false 不折行 此设置为 true 时覆盖 参数值 + /// 获得/设置 是否表头允许折行 默认 false 不折行 此设置为 true 时覆盖 参数值 + /// Get/Set Whether header text wrap. Default false + /// 10.2.2 /// [Parameter] public bool HeaderTextWrap { get; set; } /// - /// 获得/设置 是否斑马线样式 默认为 false + /// 获得/设置 是否斑马线样式 默认为 false + /// Get/Set Striped Style. Default false + /// 10.2.2 /// - /// 此参数在 模式下不生效 + /// + /// 此参数在 模式下不生效 + /// Not effective in mode + /// [Parameter] public bool IsStriped { get; set; } /// - /// 获得/设置 首次加载时是否自动查询数据 默认 true 模式下此参数不起作用 + /// 获得/设置 首次加载时是否自动查询数据 默认 true 模式下此参数不起作用 + /// Get/Set Whether to auto query on first render. Default true + /// 10.2.2 /// [Parameter] public bool IsAutoQueryFirstRender { get; set; } = true; /// - /// 获得/设置 是否带边框样式 默认为 false + /// 获得/设置 是否带边框样式 默认为 false + /// Get/Set Bordered Style. Default false + /// 10.2.2 /// [Parameter] public bool IsBordered { get; set; } /// - /// 获得/设置 是否自动刷新表格 默认为 false + /// 获得/设置 是否自动刷新表格 默认为 false + /// Get/Set Whether to auto refresh. Default false + /// 10.2.2 /// - /// 此参数在 模式下不生效 + /// + /// 此参数在 模式下不生效 + /// Not effective in mode + /// [Parameter] public bool IsAutoRefresh { get; set; } /// - /// 获得/设置 自动刷新时间间隔 默认 2000 毫秒 + /// 获得/设置 自动刷新时间间隔 默认 2000 毫秒 + /// Get/Set Auto Refresh Interval. Default 2000 ms + /// 10.2.2 /// [Parameter] public int AutoRefreshInterval { get; set; } = 2000; /// - /// 获取/设置 表格 thead 样式 ,默认为浅色 + /// 获取/设置 表格 thead 样式 ,默认为浅色 + /// Get/Set Table Header Style. Default + /// 10.2.2 /// [Parameter] public TableHeaderStyle HeaderStyle { get; set; } = TableHeaderStyle.None; /// - /// 获得/设置 单击行回调委托方法 + /// 获得/设置 单击行回调委托方法 + /// Get/Set On Click Row Callback + /// 10.2.2 /// [Parameter] public Func? OnClickRowCallback { get; set; } /// - /// 获得/设置 双击行回调委托方法 + /// 获得/设置 双击行回调委托方法 + /// Get/Set On Double Click Row Callback + /// 10.2.2 /// [Parameter] public Func? OnDoubleClickRowCallback { get; set; } /// - /// 获得/设置 是否显示每行的明细行展开图标 + /// 获得/设置 是否显示每行的明细行展开图标 + /// Get/Set Whether to show detail row expand icon + /// 10.2.2 /// - /// 此参数在 模式下不生效 + /// + /// 此参数在 模式下不生效 + /// Not effective in mode + /// [Parameter] public Func? ShowDetailRow { get; set; } /// - /// 获得/设置 动态数据上下文实例 + /// 获得/设置 动态数据上下文实例 + /// Get/Set Dynamic Data Context Instance + /// 10.2.2 /// [Parameter] public IDynamicObjectContext? DynamicContext { get; set; } /// - /// 获得/设置 未设置排序时 tooltip 显示文字 默认点击升序 + /// 获得/设置 未设置排序时 tooltip 显示文字 默认点击升序 + /// Get/Set Unset Sort Tooltip Text. Default Click to Asc + /// 10.2.2 /// [Parameter] [NotNull] public string? UnsetText { get; set; } /// - /// 获得/设置 升序排序时 tooltip 显示文字 默认点击降序 + /// 获得/设置 升序排序时 tooltip 显示文字 默认点击降序 + /// Get/Set Asc Sort Tooltip Text. Default Click to Desc + /// 10.2.2 /// [Parameter] [NotNull] public string? SortAscText { get; set; } /// - /// 获得/设置 降序排序时 tooltip 显示文字 默认取消排序 + /// 获得/设置 降序排序时 tooltip 显示文字 默认取消排序 + /// Get/Set Desc Sort Tooltip Text. Default Cancel Sort + /// 10.2.2 /// [Parameter] [NotNull] public string? SortDescText { get; set; } /// - /// 获得/设置 列创建时回调委托方法 + /// 获得/设置 列创建时回调委托方法 + /// Get/Set On Column Creating Callback + /// 10.2.2 /// [Parameter] public Func, Task>? OnColumnCreating { get; set; } /// - /// 获得/设置 自定义列排序规则 默认 null 未设置 使用内部排序机制 1 2 3 0 -3 -2 -1 顺序 + /// 获得/设置 自定义列排序规则 默认 null 未设置 使用内部排序机制 1 2 3 0 -3 -2 -1 顺序 + /// Get/Set Custom Column Order Callback. Default null + /// 10.2.2 /// - /// 如果设置 并且设置 开启客户端持久化后本回调不生效 + /// + /// 如果设置 并且设置 开启客户端持久化后本回调不生效 + /// Not effective if and are set + /// [Parameter] public Func, IEnumerable>? ColumnOrderCallback { get; set; } /// - /// 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 + /// 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键
+ /// Get/Set Data Primary Key Attribute. Default + /// 10.2.2 ///
[Parameter] [NotNull] public Type? CustomKeyAttribute { get; set; } = typeof(KeyAttribute); /// - /// 获得/设置 比较数据是否相同回调方法 默认为 null - /// 提供此回调方法时忽略 属性 + /// 获得/设置 比较数据是否相同回调方法 默认为 null + /// Get/Set Model Equality Comparer. Default null + /// 提供此回调方法时忽略 属性 + /// Ignore if this callback is provided + /// 10.2.2 /// [Parameter] public Func? ModelEqualityComparer { get; set; } /// - /// 获得/设置 获得高级搜索条件回调方法 默认 null + /// 获得/设置 获得高级搜索条件回调方法 默认 null + /// Get/Set Get Advanced Search Filter Callback. Default null + /// 10.2.2 /// [Parameter] public Func?>? GetAdvancedSearchFilterCallback { get; set; } /// - /// 获得/设置 客户端表格名称 默认 null 用于客户端列宽与列顺序持久化功能 + /// 获得/设置 客户端表格名称 默认 null 用于客户端列宽与列顺序持久化功能 + /// Get/Set Client Table Name. Default null + /// 10.2.2 /// [Parameter] public string? ClientTableName { get; set; } /// - /// 获得/设置 左对齐显示文本 + /// 获得/设置 左对齐显示文本 + /// Get/Set Align Left Text + /// 10.2.2 /// [Parameter] [NotNull] public string? AlignLeftText { get; set; } /// - /// 获得/设置左对齐提示信息文本 + /// 获得/设置左对齐提示信息文本 + /// Get/Set Align Left Tooltip Text + /// 10.2.2 /// [Parameter] [NotNull] public string? AlignLeftTooltipText { get; set; } /// - /// 获得/设置 居中对齐显示文本 + /// 获得/设置 居中对齐显示文本 + /// Get/Set Align Center Text + /// 10.2.2 /// [Parameter] [NotNull] public string? AlignCenterText { get; set; } /// - /// 获得/设置 居中对齐提示信息文本 + /// 获得/设置 居中对齐提示信息文本 + /// Get/Set Align Center Tooltip Text + /// 10.2.2 /// [Parameter] [NotNull] public string? AlignCenterTooltipText { get; set; } /// - /// 获得/设置 右对齐显示文本 + /// 获得/设置 右对齐显示文本 + /// Get/Set Align Right Text + /// 10.2.2 /// [Parameter] [NotNull] public string? AlignRightText { get; set; } /// - /// 获得/设置 右对齐提示信息文本 + /// 获得/设置 右对齐提示信息文本 + /// Get/Set Align Right Tooltip Text + /// 10.2.2 /// [Parameter] [NotNull] public string? AlignRightTooltipText { get; set; } /// - /// 获得/设置 新建按钮是否禁用回调方法 默认 null 未设置 + /// 获得/设置 新建按钮是否禁用回调方法 默认 null 未设置 + /// Get/Set Disable Add Button Callback. Default null + /// 10.2.2 /// [Parameter] public Func, bool>? DisableAddButtonCallback { get; set; } /// - /// 获得/设置 删除按钮是否禁用回调方法 默认 null 未设置 + /// 获得/设置 删除按钮是否禁用回调方法 默认 null 未设置 + /// Get/Set Disable Delete Button Callback. Default null + /// 10.2.2 /// [Parameter] public Func, bool>? DisableDeleteButtonCallback { get; set; } /// - /// 获得/设置 编辑按钮是否禁用回调方法 默认 null 未设置 + /// 获得/设置 编辑按钮是否禁用回调方法 默认 null 未设置 + /// Get/Set Disable Edit Button Callback. Default null + /// 10.2.2 /// [Parameter] public Func, bool>? DisableEditButtonCallback { get; set; } /// - /// 获得/设置 翻页时是否自动滚动到顶部 默认 false + /// 获得/设置 翻页时是否自动滚动到顶部 默认 false + /// Get/Set Whether to scroll to top when paging. Default false + /// 10.2.2 /// [Parameter] public bool IsAutoScrollTopWhenClickPage { get; set; } @@ -819,7 +1035,8 @@ public async Task ExpandDetailRow(TItem item) .Build(); /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized method /// protected override void OnInitialized() { @@ -856,7 +1073,8 @@ protected override void OnInitialized() } /// - /// OnInitializedAsync 方法 + /// OnInitializedAsync 方法 + /// OnInitializedAsync method /// /// protected override async Task OnInitializedAsync() @@ -959,19 +1177,22 @@ private void OnInitParameters() } /// - /// 获得/设置 是否为第一次 Render + /// 获得/设置 是否为第一次 Render + /// Get/Set Whether it is the first Render /// protected bool FirstRender { get; set; } = true; /// - /// 获得/设置 自动刷新 CancellationTokenSource 实例 + /// 获得/设置 自动刷新 CancellationTokenSource 实例 + /// Get/Set Auto Refresh CancellationTokenSource Instance /// protected CancellationTokenSource? AutoRefreshCancelTokenSource { get; set; } private bool _bindResizeColumn; /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet method /// protected override void OnParametersSet() { @@ -1016,7 +1237,8 @@ protected override void OnParametersSet() } /// - /// OnAfterRenderAsync 方法 + /// OnAfterRenderAsync 方法 + /// OnAfterRenderAsync method /// /// protected override async Task OnAfterRenderAsync(bool firstRender) @@ -1334,7 +1556,8 @@ private void InternalResetVisibleColumns(List columns, IEnumerable } /// - /// 设置 列可见方法 + /// 设置 列可见方法 + /// Set Column Visible Method /// /// public void ResetVisibleColumns(IEnumerable columns) @@ -1350,7 +1573,8 @@ public void ResetVisibleColumns(IEnumerable columns) } /// - /// 周期性查询方法 + /// 周期性查询方法 + /// Periodic Query Method /// /// protected async Task LoopQueryAsync() @@ -1370,7 +1594,8 @@ protected async Task LoopQueryAsync() private bool _autoQuery; /// - /// OnQueryAsync 查询结果数据集合 + /// OnQueryAsync 查询结果数据集合 + /// OnQueryAsync Query Result Data Collection /// private IEnumerable QueryItems { get; set; } = []; @@ -1378,7 +1603,8 @@ protected async Task LoopQueryAsync() private List? _rowsCache = null; /// - /// 获得 当前表格所有 Rows 集合 + /// 获得 当前表格所有 Rows 集合 + /// Get current table all Rows collection /// public List Rows { @@ -1392,9 +1618,10 @@ public List Rows } } - #region 生成 Row 方法 + #region Generate Row Method /// - /// 获得 指定单元格数据方法 + /// 获得 指定单元格数据方法 + /// Get specified cell data method /// /// /// @@ -1486,7 +1713,8 @@ private static TableCellArgs GetCellArgs(TItem item, ITableColumn col, ref int c } /// - /// 渲染单元格方法 + /// 渲染单元格方法 + /// Render Cell Method /// /// /// @@ -1506,7 +1734,8 @@ RenderFragment RenderEditTemplate() => col.EditTemplate == null } /// - /// 渲染 Excel 单元格方法 + /// 渲染 Excel 单元格方法 + /// Render Excel Cell Method /// /// /// @@ -1558,12 +1787,14 @@ void SetEditTemplate() #region Filter /// - /// 获得/设置 表头过滤时回调方法 + /// 获得/设置 表头过滤时回调方法 + /// Get/Set Filter Callback /// public Func? OnFilterAsync { get; private set; } /// - /// 获得 过滤集合 + /// 获得 过滤集合 + /// Get Filter Collection /// public Dictionary Filters { get; } = []; #endregion @@ -1626,7 +1857,8 @@ private bool GetShowHeader() private int GetLineNo(TItem item) => Rows.IndexOf(item) + 1 + ((ScrollMode == ScrollMode.Virtual && Items == null) ? StartIndex : (PageIndex - 1) * _pageItems); /// - /// Reset all Columns Filter + /// Reset all Columns Filter + /// Reset all Columns Filter /// public async Task ResetFilters() { @@ -1643,7 +1875,8 @@ public async Task ResetFilters() } /// - /// Reset all Columns Sort + /// Reset all Columns Sort + /// Reset all Columns Sort /// public async Task ResetSortAsync() { @@ -1656,13 +1889,15 @@ public async Task ResetSortAsync() private bool GetAddButtonStatus() => DisableAddButtonCallback?.Invoke(SelectedRows) ?? false; /// - /// 返回 true 时按钮禁用 + /// 返回 true 时按钮禁用 + /// Return true when button is disabled /// /// private bool GetEditButtonStatus() => ShowAddForm || AddInCell || (DisableEditButtonCallback?.Invoke(SelectedRows) ?? SelectedRows.Count != 1); /// - /// 返回 true 时按钮禁用 + /// 返回 true 时按钮禁用 + /// Return true when button is disabled /// /// private bool GetDeleteButtonStatus() => ShowAddForm || AddInCell || (DisableDeleteButtonCallback?.Invoke(SelectedRows) ?? SelectedRows.Count == 0); @@ -1684,7 +1919,9 @@ private async Task OnContextMenu(MouseEventArgs e, TItem item) } /// - /// 获得/设置 是否允许拖放标题栏更改栏位顺序,默认为 false + /// 获得/设置 是否允许拖放标题栏更改栏位顺序,默认为 false + /// Get/Set Whether to allow dragging column header to change column order. Default false + /// 10.2.2 /// [Parameter] public bool AllowDragColumn { get; set; } @@ -1692,19 +1929,25 @@ private async Task OnContextMenu(MouseEventArgs e, TItem item) private string? DraggableString => AllowDragColumn ? "true" : null; /// - /// 获得/设置 拖动列结束回调方法,默认 null 可存储数据库用于服务器端保持列顺序 + /// 获得/设置 拖动列结束回调方法,默认 null 可存储数据库用于服务器端保持列顺序 + /// Get/Set Drag Column End Callback. Default null + /// 10.2.2 /// [Parameter] public Func, Task>? OnDragColumnEndAsync { get; set; } /// - /// 获得/设置 设置列宽回调方法 + /// 获得/设置 设置列宽回调方法 + /// Get/Set Resize Column Callback + /// 10.2.2 /// [Parameter] public Func? OnResizeColumnAsync { get; set; } /// - /// 获得/设置 自动调整列宽回调方法 + /// 获得/设置 自动调整列宽回调方法 + /// Get/Set Auto Fit Column Width Callback + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 OnAutoFitColumnWidthCallback 替代; Deprecated, please use OnAutoFitColumnWidthCallback instead")] @@ -1712,19 +1955,24 @@ private async Task OnContextMenu(MouseEventArgs e, TItem item) public Func>? OnAutoFitContentAsync { get; set; } /// - /// 获得/设置 自动调整列宽回调方法 + /// 获得/设置 自动调整列宽回调方法 + /// Get/Set Auto Fit Column Width Callback + /// 10.2.2 /// [Parameter] public Func>? OnAutoFitColumnWidthCallback { get; set; } /// - /// 获得/设置 列宽自适应时是否包含表头 默认 false + /// 获得/设置 列宽自适应时是否包含表头 默认 false + /// Get/Set Whether to include header when auto fit column width. Default false + /// 10.2.2 /// [Parameter] public bool FitColumnWidthIncludeHeader { get; set; } /// - /// 列宽自适应方法 + /// 列宽自适应方法 + /// Fit All Column Width Method /// public async Task FitAllColumnWidth() { @@ -1732,7 +1980,8 @@ public async Task FitAllColumnWidth() } /// - /// 重置列方法 由 JavaScript 脚本调用 + /// 重置列方法 由 JavaScript 脚本调用 + /// Reset Column Method called by JavaScript /// /// /// @@ -1762,7 +2011,8 @@ public async Task DragColumnCallback(int originIndex, int currentIndex) } /// - /// 设置列宽方法 由 JavaScript 脚本调用 + /// 设置列宽方法 由 JavaScript 脚本调用 + /// Resize Column Method called by JavaScript /// /// /// @@ -1778,10 +2028,11 @@ public async Task ResizeColumnCallback(int index, float width) } /// - /// 列宽自适应回调方法 由 JavaScript 脚本调用 + /// 列宽自适应回调方法 由 JavaScript 脚本调用 + /// Auto Fit Column Width Callback called by JavaScript /// - /// 当前列名称 - /// 当前列宽 + /// 当前列名称当前列name + /// 当前列宽当前列宽 /// [JSInvokable] public async Task AutoFitColumnWidthCallback(string fieldName, float calcWidth) @@ -1795,12 +2046,14 @@ public async Task AutoFitColumnWidthCallback(string fieldName, float calc } /// - /// 是否触摸 + /// 是否触摸 + /// Is Touch /// private bool TouchStart { get; set; } /// - /// 触摸定时器工作指示 + /// 触摸定时器工作指示 + /// Touch timer work indicator /// private bool IsBusy { get; set; } @@ -1871,7 +2124,8 @@ private RenderFragment RenderRowContent(TItem item) => builder => }; /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose Method /// /// protected override async ValueTask DisposeAsync(bool disposing) diff --git a/src/BootstrapBlazor/Components/Table/TableAdvancedSortDialog.razor.cs b/src/BootstrapBlazor/Components/Table/TableAdvancedSortDialog.razor.cs index 1981791534e..f45cea48bb9 100644 --- a/src/BootstrapBlazor/Components/Table/TableAdvancedSortDialog.razor.cs +++ b/src/BootstrapBlazor/Components/Table/TableAdvancedSortDialog.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,15 @@ namespace BootstrapBlazor.Components; /// -/// Table 高级排序弹窗的内容组件 +/// Table 高级排序弹窗的内容组件 +/// Table 高级排序弹窗的contentcomponent /// public partial class TableAdvancedSortDialog : ComponentBase, IResultDialog { /// - /// 获得/设置 排序列列表 实例值 + /// 获得/设置 排序列列表 实例值 + /// Gets or sets 排序列列表 instance值 + /// 10.2.2 /// [Parameter] [NotNull] @@ -23,37 +26,48 @@ public partial class TableAdvancedSortDialog : ComponentBase, IResultDialog public List? Value { get; set; } /// - /// 获得/设置 排序列列表 回调方法 支持双向绑定 + /// 获得/设置 排序列列表 回调方法 支持双向绑定 + /// Gets or sets 排序列列表 callback method 支持双向绑定 + /// 10.2.2 /// [Parameter] public EventCallback> ValueChanged { get; set; } /// - /// 获得/设置 可排序列的列表 + /// 获得/设置 可排序列的列表 + /// Gets or sets 可排序列的列表 + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// - /// 获得/设置 增加排序条件图标 + /// 获得/设置 增加排序条件图标 + /// Gets or sets 增加排序条件icon + /// 10.2.2 /// [Parameter] public string? PlusIcon { get; set; } /// - /// 获得/设置 移除排序条件图标 + /// 获得/设置 移除排序条件图标 + /// Gets or sets 移除排序条件icon + /// 10.2.2 /// [Parameter] public string? RemoveIcon { get; set; } /// - /// 获得/设置 减少排序条件图标 + /// 获得/设置 减少排序条件图标 + /// Gets or sets 减少排序条件icon + /// 10.2.2 /// [Parameter] public string? MinusIcon { get; set; } /// - /// 排序规则列表 + /// 排序规则列表 + /// 排序规则列表 /// private List? SortOrders { get; set; } @@ -101,7 +115,8 @@ private void OnClickRemove(TableSortItem item) } /// - /// + /// + /// /// public async Task OnClose(DialogResult result) { diff --git a/src/BootstrapBlazor/Components/Table/TableCellArgs.cs b/src/BootstrapBlazor/Components/Table/TableCellArgs.cs index e40b5899089..7f357e2bcff 100644 --- a/src/BootstrapBlazor/Components/Table/TableCellArgs.cs +++ b/src/BootstrapBlazor/Components/Table/TableCellArgs.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,39 +6,46 @@ namespace BootstrapBlazor.Components; /// -/// 单元格数据类 +/// 单元格数据类 +/// 单元格data类 /// public class TableCellArgs { /// - /// 获得 当前单元格行数据 请自行转化为绑定模型 + /// 获得 当前单元格行数据 请自行转化为绑定模型 + /// Gets current row data /// [NotNull] public object? Row { get; internal set; } /// - /// 获得 当前单元格绑定列名称 + /// 获得 当前单元格绑定列名称 + /// Gets 当前单元格绑定列名称 /// [NotNull] public string? ColumnName { get; internal set; } /// - /// 获得/设置 合并单元格数量 默认 0 + /// 获得/设置 合并单元格数量 默认 0 + /// Gets or sets 合并单元格数量 Default is 0 /// public int Colspan { get; set; } /// - /// 获得/设置 当前单元格样式 默认 null + /// 获得/设置 当前单元格样式 默认 null + /// Gets or sets 当前单元格style Default is null /// public string? Class { get; set; } /// - /// 获得/设置 当前单元格显示内容 + /// 获得/设置 当前单元格显示内容 + /// Gets or sets current cell content /// public string? Value { get; set; } /// - /// 获得/设置 当前单元格内容模板 + /// 获得/设置 当前单元格内容模板 + /// Gets or sets current cell content template /// public RenderFragment? ValueTemplate { get; set; } } diff --git a/src/BootstrapBlazor/Components/Table/TableCellButton.cs b/src/BootstrapBlazor/Components/Table/TableCellButton.cs index e8c9e535a6a..d363eec9372 100644 --- a/src/BootstrapBlazor/Components/Table/TableCellButton.cs +++ b/src/BootstrapBlazor/Components/Table/TableCellButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,38 +6,45 @@ namespace BootstrapBlazor.Components; /// -/// 单元格内按钮组件 +/// 单元格内按钮组件 +/// 单元格内buttoncomponent /// [JSModuleNotInherited] public class TableCellButton : ButtonBase, ITableCellButton { /// - /// 获得/设置 Table 扩展按钮集合实例 + /// 获得/设置 Table 扩展按钮集合实例 + /// Gets or sets Table 扩展buttoncollectioninstance /// [CascadingParameter] protected TableExtensionButton? Buttons { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool AutoSelectedRowWhenClick { get; set; } = true; /// /// + /// 10.2.2 /// [Parameter] public bool AutoRenderTableWhenClick { get; set; } /// - /// 获得/设置 是否显示 默认 true 显示 + /// 获得/设置 是否显示 默认 true 显示 + /// Gets or sets whetherdisplay Default is true display + /// 10.2.2 /// /// 一般是通过 context 进行业务判断是否需要显示功能按钮 [Parameter] public bool IsShow { get; set; } = true; /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized 方法 /// protected override void OnInitialized() { @@ -52,7 +59,8 @@ protected override void OnInitialized() } /// - /// DisposeAsyncCore + /// DisposeAsyncCore + /// DisposeAsyncCore /// /// /// diff --git a/src/BootstrapBlazor/Components/Table/TableCellButtonArgs.cs b/src/BootstrapBlazor/Components/Table/TableCellButtonArgs.cs index 1364f34e9ae..ed78e518522 100644 --- a/src/BootstrapBlazor/Components/Table/TableCellButtonArgs.cs +++ b/src/BootstrapBlazor/Components/Table/TableCellButtonArgs.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 单元格内按钮组件 +/// 单元格内按钮组件 +/// 单元格内buttoncomponent /// public class TableCellButtonArgs : ITableCellButton { diff --git a/src/BootstrapBlazor/Components/Table/TableCellComponent.cs b/src/BootstrapBlazor/Components/Table/TableCellComponent.cs index 091297a8bf1..900fa71bbf7 100644 --- a/src/BootstrapBlazor/Components/Table/TableCellComponent.cs +++ b/src/BootstrapBlazor/Components/Table/TableCellComponent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,30 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件单元格自定义组件 +/// Table 组件单元格自定义组件 +/// Table component单元格自定义component /// public class TableCellComponent : ComponentBase, ITableCellComponent, IDisposable { /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Gets or sets 子component + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 Table 扩展按钮集合实例 + /// 获得/设置 Table 扩展按钮集合实例 + /// Gets or sets Table 扩展buttoncollectioninstance /// [CascadingParameter] protected TableExtensionButton? Buttons { get; set; } /// - /// 获得/设置 是否显示 默认 true 显示 + /// 获得/设置 是否显示 默认 true 显示 + /// Gets or sets whetherdisplay Default is true display + /// 10.2.2 /// /// 一般是通过 context 进行业务判断是否需要显示功能按钮 [Parameter] @@ -40,7 +46,8 @@ protected override void OnInitialized() } /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. /// /// protected virtual void Dispose(bool disposing) diff --git a/src/BootstrapBlazor/Components/Table/TableCellPopConfirmButton.cs b/src/BootstrapBlazor/Components/Table/TableCellPopConfirmButton.cs index a4defbe84c3..b702b27054e 100644 --- a/src/BootstrapBlazor/Components/Table/TableCellPopConfirmButton.cs +++ b/src/BootstrapBlazor/Components/Table/TableCellPopConfirmButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,13 +8,15 @@ namespace BootstrapBlazor.Components; /// -/// TableCellPopConfirmButton 单元格内按钮组件 +/// TableCellPopConfirmButton 单元格内按钮组件 +/// TableCellPopConfirmButton 单元格内buttoncomponent /// [JSModuleNotInherited] public class TableCellPopConfirmButton : PopConfirmButtonBase, ITableCellButton { /// - /// 获得/设置 Table 扩展按钮集合实例 + /// 获得/设置 Table 扩展按钮集合实例 + /// Gets or sets Table 扩展buttoncollectioninstance /// [CascadingParameter] protected TableExtensionButton? Buttons { get; set; } @@ -25,25 +27,30 @@ public class TableCellPopConfirmButton : PopConfirmButtonBase, ITableCellButton /// /// + /// 10.2.2 /// [Parameter] public bool AutoSelectedRowWhenClick { get; set; } = true; /// /// + /// 10.2.2 /// [Parameter] public bool AutoRenderTableWhenClick { get; set; } /// - /// 获得/设置 是否显示本按钮 默认 true 显示 + /// 获得/设置 是否显示本按钮 默认 true 显示 + /// Gets or sets whetherdisplay本button Default is true display + /// 10.2.2 /// /// 一般是通过 context 进行业务判断是否需要显示功能按钮 [Parameter] public bool IsShow { get; set; } = true; /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized 方法 /// protected override void OnInitialized() { @@ -62,7 +69,8 @@ protected override void OnInitialized() } /// - /// DisposeAsyncCore + /// DisposeAsyncCore + /// DisposeAsyncCore /// /// /// diff --git a/src/BootstrapBlazor/Components/Table/TableColumn.cs b/src/BootstrapBlazor/Components/Table/TableColumn.cs index af50f4ecf0a..2ef2889b48d 100644 --- a/src/BootstrapBlazor/Components/Table/TableColumn.cs +++ b/src/BootstrapBlazor/Components/Table/TableColumn.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,152 +9,187 @@ namespace BootstrapBlazor.Components; /// -/// 表头组件 +/// 表头组件 +/// 表头component /// -/// 模型泛型 -/// 绑定字段值类型 +/// 模型泛型model generic +/// 绑定字段值类型bind value type public class TableColumn : BootstrapComponentBase, ITableColumn { /// - /// 获得/设置 相关过滤器 + /// 获得/设置 相关过滤器 + /// Gets or sets 相关过滤器 /// public IFilter? Filter { get; set; } /// - /// 获得/设置 组件类型 默认为 null + /// 获得/设置 组件类型 默认为 null + /// Gets or sets component type Default is为 null + /// 10.2.2 /// [Parameter] public Type? ComponentType { get; set; } /// - /// 获得/设置 组件自定义类型参数集合 默认为 null + /// 获得/设置 组件自定义类型参数集合 默认为 null + /// Gets or sets component自定义type参数collection Default is为 null + /// 10.2.2 /// [Parameter] public IEnumerable>? ComponentParameters { get; set; } /// - /// 获得/设置 绑定列类型 + /// 获得/设置 绑定列类型 + /// Gets or sets 绑定列type /// [NotNull] public Type? PropertyType { get; set; } /// - /// 获得/设置 数据绑定字段值 + /// 获得/设置 数据绑定字段值 + /// Gets or sets data绑定字段值 + /// 10.2.2 /// [Parameter] [MaybeNull] public TType Field { get; set; } /// - /// 获得/设置 ValueExpression 表达式 + /// 获得/设置 ValueExpression 表达式 + /// Gets or sets ValueExpression 表达式 + /// 10.2.2 /// [Parameter] public Expression>? FieldExpression { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? IgnoreWhenExport { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? Sortable { get; set; } /// - /// 获得/设置 是否为默认排序列 默认为 false + /// 获得/设置 是否为默认排序列 默认为 false + /// Gets or sets whether为Default is排序列 Default is为 false + /// 10.2.2 /// [Parameter] public bool DefaultSort { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? TextWrap { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? TextEllipsis { get; set; } /// - /// 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null + /// 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null + /// Gets or sets whether label tooltip Default is null + /// 10.2.2 /// [Parameter] public bool? ShowLabelTooltip { get; set; } /// - /// 获得/设置 是否表头允许折行 默认 false 不折行 + /// 获得/设置 是否表头允许折行 默认 false 不折行 + /// Gets or sets whether表头允许折行 Default is false 不折行 + /// 10.2.2 /// [Parameter] public bool HeaderTextWrap { get; set; } /// - /// 获得/设置 是否表头显示 Tooltip 默认 false 不显示 可配合 使用 设置 为 true 时本参数不生效 + /// 获得/设置 是否表头显示 Tooltip 默认 false 不显示 可配合 使用 设置 为 true 时本参数不生效 + /// Gets or sets whether表头display Tooltip Default is false 不display 可配合 使用 Sets 为 true 时本参数不生效 + /// 10.2.2 /// [Parameter] public bool ShowHeaderTooltip { get; set; } /// - /// 获得/设置 是否表头 Tooltip 内容 + /// 获得/设置 是否表头 Tooltip 内容 + /// Gets or sets whether表头 Tooltip content + /// 10.2.2 /// [Parameter] public string? HeaderTextTooltip { get; set; } /// - /// 获得/设置 是否表头溢出时截断 默认 false 不截断 可配合 使用 设置 为 true 时本参数不生效 + /// 获得/设置 是否表头溢出时截断 默认 false 不截断 可配合 使用 设置 为 true 时本参数不生效 + /// Gets or sets whether表头溢出时截断 Default is false 不截断 可配合 使用 Sets 为 true 时本参数不生效 + /// 10.2.2 /// [Parameter] public bool HeaderTextEllipsis { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? Step { get; set; } /// /// + /// 10.2.2 /// [Parameter] public int Rows { get; set; } /// /// + /// 10.2.2 /// [Parameter] public int Cols { get; set; } /// /// + /// 10.2.2 /// [Parameter] public SortOrder DefaultSortOrder { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? Filterable { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? Searchable { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? Ignore { get; set; } /// /// + /// 10.2.2 /// [Parameter] [ExcludeFromCodeCoverage] @@ -163,144 +198,176 @@ public class TableColumn : BootstrapComponentBase, ITableColumn /// /// + /// 10.2.2 /// [Parameter] public bool? Readonly { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? IsReadonlyWhenAdd { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? IsReadonlyWhenEdit { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? Visible { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? IsVisibleWhenAdd { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? IsVisibleWhenEdit { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? Required { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? IsRequiredWhenAdd { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? IsRequiredWhenEdit { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? RequiredErrorMessage { get; set; } /// /// + /// 10.2.2 /// [Parameter] public Func? CustomSearch { get; set; } /// - /// 获得/设置 是否不进行验证 默认为 false + /// 获得/设置 是否不进行验证 默认为 false + /// Gets or sets whether不进行验证 Default is为 false + /// 10.2.2 /// [Parameter] public bool SkipValidate { get; set; } /// - /// 获得/设置 表头显示文字 + /// 获得/设置 表头显示文字 + /// Gets or sets 表头display文字 + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 placeholder 文本 默认为 null + /// 获得/设置 placeholder 文本 默认为 null + /// Gets or sets placeholder 文本 Default is为 null + /// 10.2.2 /// [Parameter] public string? PlaceHolder { get; set; } /// - /// 获得/设置 列宽 默认为 auto + /// 获得/设置 列宽 默认为 auto + /// Gets or sets 列宽 Default is为 auto + /// 10.2.2 /// [Parameter] public int? Width { get; set; } /// - /// 获得/设置 是否固定本列 默认 false 不固定 + /// 获得/设置 是否固定本列 默认 false 不固定 + /// Gets or sets whether固定本列 Default is false 不固定 + /// 10.2.2 /// [Parameter] public bool Fixed { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool? ShowCopyColumn { get; set; } /// - /// 获得/设置 字段鼠标悬停提示 + /// 获得/设置 字段鼠标悬停提示 + /// Gets or sets 字段鼠标悬停提示 + /// 10.2.2 /// [Parameter] public bool? ShowTips { get; set; } /// /// + /// 10.2.2 /// [Parameter] public Func>? GetTooltipTextCallback { get; set; } /// - /// 获得/设置 列 td 自定义样式 默认为 null 未设置 + /// 获得/设置 列 td 自定义样式 默认为 null 未设置 + /// Gets or sets 列 td 自定义style Default is为 null 未Sets + /// 10.2.2 /// [Parameter] public string? CssClass { get; set; } /// /// + /// 10.2.2 /// [Parameter] public Alignment? Align { get; set; } /// - /// 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd + /// 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd + /// Gets or sets 格式化字符串 如时间typeSets yyyy-MM-dd + /// 10.2.2 /// [Parameter] public string? FormatString { get; set; } /// /// + /// 10.2.2 /// [Parameter] public Func>? Formatter { get; set; } /// /// + /// 10.2.2 /// [Parameter] public RenderFragment>? Template { get; set; } @@ -332,6 +399,7 @@ public class TableColumn : BootstrapComponentBase, ITableColumn /// /// + /// 10.2.2 /// [Parameter] public RenderFragment? EditTemplate { get; set; } @@ -352,8 +420,8 @@ public class TableColumn : BootstrapComponentBase, ITableColumn /// /// + /// 10.2.2 /// - /// [Parameter] public RenderFragment? SearchTemplate { get; set; } @@ -373,54 +441,63 @@ public class TableColumn : BootstrapComponentBase, ITableColumn /// /// + /// 10.2.2 /// [Parameter] public RenderFragment? FilterTemplate { get; set; } /// /// + /// 10.2.2 /// [Parameter] public RenderFragment? HeaderTemplate { get; set; } /// /// + /// 10.2.2 /// [Parameter] public RenderFragment? ToolboxTemplate { get; set; } /// /// + /// 10.2.2 /// [Parameter] public BreakPoint ShownWithBreakPoint { get; set; } /// /// + /// 10.2.2 /// [Parameter] public IEnumerable? Items { get; set; } /// /// + /// 10.2.2 /// [Parameter] public int Order { get; set; } /// /// + /// 10.2.2 /// [Parameter] public IEnumerable? Lookup { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool ShowSearchWhenSelect { get; set; } /// /// + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请删除;Deprecated, please delete")] @@ -429,66 +506,78 @@ public class TableColumn : BootstrapComponentBase, ITableColumn /// /// + /// 10.2.2 /// [Parameter] public bool IsPopover { get; set; } /// - /// > + /// + /// 10.2.2 /// [Parameter] public StringComparison LookupStringComparison { get; set; } = StringComparison.OrdinalIgnoreCase; /// /// + /// 10.2.2 /// [Parameter] public ILookupService? LookupService { get; set; } /// - /// > + /// + /// 10.2.2 /// [Parameter] public string? LookupServiceKey { get; set; } /// - /// > + /// + /// 10.2.2 /// [Parameter] public object? LookupServiceData { get; set; } /// /// + /// 10.2.2 /// [Parameter] public Action? OnCellRender { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool IsMarkupString { get; set; } /// - /// 获得/设置 自定义验证集合 + /// 获得/设置 自定义验证集合 + /// Gets or sets 自定义验证collection + /// 10.2.2 /// [Parameter] public List? ValidateRules { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? FieldName { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? GroupName { get; set; } /// /// + /// 10.2.2 /// [Parameter] public int GroupOrder { get; set; } diff --git a/src/BootstrapBlazor/Components/Table/TableColumnContext.cs b/src/BootstrapBlazor/Components/Table/TableColumnContext.cs index b0a5de8b6fd..536d33c3b00 100644 --- a/src/BootstrapBlazor/Components/Table/TableColumnContext.cs +++ b/src/BootstrapBlazor/Components/Table/TableColumnContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,20 +6,23 @@ namespace BootstrapBlazor.Components; /// -/// TableColumn 上下文类 +/// TableColumn 上下文类 +/// TableColumn 上下文类 /// /// /// public class TableColumnContext(TItem model, TValue value) { /// - /// 获得/设置 行数据实例 + /// 获得/设置 行数据实例 + /// Gets or sets 行datainstance /// [NotNull] public TItem Row { get; } = model ?? throw new ArgumentNullException(nameof(model)); /// - /// 获得/设置 当前绑定字段数据实例 + /// 获得/设置 当前绑定字段数据实例 + /// Gets or sets 当前绑定字段datainstance /// public TValue Value => value; } diff --git a/src/BootstrapBlazor/Components/Table/TableContentCellContext.cs b/src/BootstrapBlazor/Components/Table/TableContentCellContext.cs index 27a6f57a3c2..f1b24d1a6b3 100644 --- a/src/BootstrapBlazor/Components/Table/TableContentCellContext.cs +++ b/src/BootstrapBlazor/Components/Table/TableContentCellContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Table/TableEditDrawerOption.cs b/src/BootstrapBlazor/Components/Table/TableEditDrawerOption.cs index eee718a03a0..1110d824e39 100644 --- a/src/BootstrapBlazor/Components/Table/TableEditDrawerOption.cs +++ b/src/BootstrapBlazor/Components/Table/TableEditDrawerOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// 编辑弹窗配置类 +/// 编辑弹窗配置类 +/// 编辑弹窗配置类 /// public class TableEditDrawerOption : ITableEditDialogOption { /// - /// 构造函数 + /// 构造函数 + /// 构造函数 /// public TableEditDrawerOption() { @@ -21,97 +23,116 @@ public TableEditDrawerOption() } /// - /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false + /// 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false + /// Gets or sets componentwhether采用 Tracking 模式对编辑项进行直接更新 Default is false /// public bool IsTracking { get; set; } /// - /// 获得/设置 是否显示标签 默认为 true 显示标签 + /// 获得/设置 是否显示标签 默认为 true 显示标签 + /// Gets or sets whetherdisplay标签 Default is为 true display标签 /// public bool ShowLabel { get; set; } /// - /// 获得/设置 实体类编辑模式 Add 还是 Update + /// 获得/设置 实体类编辑模式 Add 还是 Update + /// Gets or sets 实体类编辑模式 Add 还是 Update /// public ItemChangedType ItemChangedType { get; set; } /// - /// 获得/设置 每行显示组件数量 默认为 null + /// 获得/设置 每行显示组件数量 默认为 null + /// Gets or sets 每行displaycomponent数量 Default is为 null /// public int? ItemsPerRow { get; set; } /// - /// 获得/设置 设置行内组件布局格式 默认 Row 布局 + /// 获得/设置 设置行内组件布局格式 默认 Row 布局 + /// Gets or sets Sets行内component布局格式 Default is Row 布局 /// public RowType RowType { get; set; } /// - /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 + /// Gets or sets Sets Inline 模式下标签对齐方式 Default is None 等效于 Left 左对齐 /// public Alignment LabelAlign { get; set; } /// - /// 获得/设置 查询时是否显示正在加载中动画 默认为 false + /// 获得/设置 查询时是否显示正在加载中动画 默认为 false + /// Gets or sets 查询时whetherdisplay正在加载中动画 Default is为 false /// public bool ShowLoading { get; set; } /// - /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// 获得/设置 未分组编辑项布局位置 默认 false 在尾部 + /// Gets or sets 未分组编辑项布局位置 Default is false 在尾部 /// public bool ShowUnsetGroupItemsOnTop { get; set; } /// - /// 获得/设置 编辑框模型 + /// 获得/设置 编辑框模型 + /// Gets or sets 编辑框模型 /// public TModel? Model { get; set; } /// - /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// Gets or sets whether禁用表单内回车自动提交功能 Default is null 未Sets /// public bool? DisableAutoSubmitFormByEnter { get; set; } /// - /// 获得/设置 关闭按钮图标 默认 null 使用当前主题图标 + /// 获得/设置 关闭按钮图标 默认 null 使用当前主题图标 + /// Gets or sets 关闭buttonicon Default is null 使用当前主题icon /// public string? CloseButtonIcon { get; set; } /// - /// 获得/设置 关闭按钮文本 + /// 获得/设置 关闭按钮文本 + /// Gets or sets 关闭button文本 /// public string? CloseButtonText { get; set; } /// - /// 获得/设置 保存按钮图标 默认 null 使用当前主题图标 + /// 获得/设置 保存按钮图标 默认 null 使用当前主题图标 + /// Gets or sets 保存buttonicon Default is null 使用当前主题icon /// public string? SaveButtonIcon { get; set; } /// - /// 获得/设置 查询按钮文本 + /// 获得/设置 查询按钮文本 + /// Gets or sets 查询button文本 /// public string? SaveButtonText { get; set; } /// - /// 获得/设置 EditDialog Body 模板 + /// 获得/设置 EditDialog Body 模板 + /// Gets or sets EditDialog Body template /// public RenderFragment? DialogBodyTemplate { get; set; } /// - /// 获得/设置 EditDialog Footer 模板 + /// 获得/设置 EditDialog Footer 模板 + /// Gets or sets EditDialog Footer template /// public RenderFragment? DialogFooterTemplate { get; set; } /// - /// 获得 编辑项集合 + /// 获得 编辑项集合 + /// Gets 编辑项collection /// public IEnumerable? Items { get; set; } /// - /// 获得/设置 关闭弹窗回调方法 + /// 获得/设置 关闭弹窗回调方法 + /// Gets or sets 关闭弹窗callback method /// public Func? OnCloseAsync { get; set; } /// - /// 获得/设置 保存回调委托 + /// 获得/设置 保存回调委托 + /// Gets or sets 保存回调delegate /// public Func>? OnEditAsync { get; set; } } diff --git a/src/BootstrapBlazor/Components/Table/TableExportContext.cs b/src/BootstrapBlazor/Components/Table/TableExportContext.cs index e3644dccb3a..c0c99d4af34 100644 --- a/src/BootstrapBlazor/Components/Table/TableExportContext.cs +++ b/src/BootstrapBlazor/Components/Table/TableExportContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -7,11 +7,13 @@ namespace BootstrapBlazor.Components; /// /// +/// /// internal class TableExportContext : ITableExportContext { /// - /// 获得 Table 实例 + /// 获得 Table 实例 + /// Gets Table instance /// private ITable Table { get; } @@ -46,12 +48,13 @@ internal class TableExportContext : ITableExportContext private Func ExportCallbackAsync { get; } /// - /// 构造函数 + /// 构造函数 + /// 构造函数 /// - /// ITable 实例 - /// 行数据集合 - /// ITable 实例当前条件生成方法 - /// ITable 实例内置 Export 方法 + /// ITable 实例ITable instance + /// 行数据集合行datacollection + /// ITable 实例当前条件生成方法ITable instance当前条件生成method + /// ITable 实例内置 Export 方法ITable instance内置 Export method public TableExportContext(ITable table, IEnumerable rows, Func optionsBuilder, Func exportAsync) { Table = table; diff --git a/src/BootstrapBlazor/Components/Table/TableExportDataContext.cs b/src/BootstrapBlazor/Components/Table/TableExportDataContext.cs index fe3e9be12d3..da4494ab63b 100644 --- a/src/BootstrapBlazor/Components/Table/TableExportDataContext.cs +++ b/src/BootstrapBlazor/Components/Table/TableExportDataContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Components/Table/TableExtensionButton.razor.cs b/src/BootstrapBlazor/Components/Table/TableExtensionButton.razor.cs index abd09ce06a2..33b6c1e1b34 100644 --- a/src/BootstrapBlazor/Components/Table/TableExtensionButton.razor.cs +++ b/src/BootstrapBlazor/Components/Table/TableExtensionButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,35 +6,43 @@ namespace BootstrapBlazor.Components; /// -/// TableExtensionButton 表格扩展按钮类 +/// TableExtensionButton 表格扩展按钮类 +/// TableExtensionButton 表格扩展button类 /// [JSModuleNotInherited] public partial class TableExtensionButton { /// - /// 获得 Toolbar 扩展按钮集合 + /// 获得 Toolbar 扩展按钮集合 + /// Gets Toolbar 扩展buttoncollection /// private readonly List _buttons = []; /// - /// Specifies the content to be rendered inside this + /// Specifies the 内容 to be rendered inside this + /// Specifies the content to be rendered inside this + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 扩展按钮点击回调方法 + /// 获得/设置 扩展按钮点击回调方法 + /// Gets or sets 扩展button点击callback method + /// 10.2.2 /// [Parameter] public Func? OnClickButton { get; set; } /// - /// 添加按钮到工具栏方法 + /// 添加按钮到工具栏方法 + /// 添加button到工具栏方法 /// public void AddButton(ITableCellComponent button) => _buttons.Add(button); /// - ///从工具栏中移除按钮 + /// 从工具栏中移除按钮 + /// 从工具栏中移除button /// public void RemoveButton(ITableCellComponent button) => _buttons.Remove(button); diff --git a/src/BootstrapBlazor/Components/Table/TableFooterCell.razor.cs b/src/BootstrapBlazor/Components/Table/TableFooterCell.razor.cs index 17d44c8d1a0..422dc249d90 100644 --- a/src/BootstrapBlazor/Components/Table/TableFooterCell.razor.cs +++ b/src/BootstrapBlazor/Components/Table/TableFooterCell.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// TableFooterCell 组件 +/// TableFooterCell 组件 +/// TableFooterCell component /// public partial class TableFooterCell { @@ -21,55 +22,72 @@ public partial class TableFooterCell .Build(); /// - /// 获得/设置 单元格内容 + /// 获得/设置 单元格内容 + /// Gets or sets 单元格content + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 文字对齐方式 默认为 Alignment.None + /// 获得/设置 文字对齐方式 默认为 Alignment.None + /// Gets or sets 文字对齐方式 Default is为 Alignment.None + /// 10.2.2 /// [Parameter] public Alignment Align { get; set; } /// - /// 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd + /// 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd + /// Gets or sets 格式化字符串 如时间typeSets yyyy-MM-dd + /// 10.2.2 /// [Parameter] public string? FormatString { get; set; } /// - /// 获得/设置 列格式化回调委托 + /// 获得/设置 列格式化回调委托 + /// Gets or sets 列格式化回调delegate + /// 10.2.2 /// [Parameter] public Func>? Formatter { get; set; } /// - /// 获得/设置 聚合方法枚举 默认 Sum + /// 获得/设置 聚合方法枚举 默认 Sum + /// Gets or sets 聚合方法enum Default is Sum + /// 10.2.2 /// [Parameter] public AggregateType Aggregate { get; set; } /// - /// 获得/设置 自定义统计列回调方法 + /// 获得/设置 自定义统计列回调方法 + /// Gets or sets 自定义统计列callback method + /// 10.2.2 /// [Parameter] public Func? CustomerAggregateCallback { get; set; } /// - /// 获得/设置 统计列名称 默认为 null 不参与统计仅作为显示单元格 + /// 获得/设置 统计列名称 默认为 null 不参与统计仅作为显示单元格 + /// Gets or sets 统计列名称 Default is为 null 不参与统计仅作为display单元格 + /// 10.2.2 /// [Parameter] public string? Field { get; set; } /// - /// 获得/设置 colspan 值 默认 null 自己手动设置值 + /// 获得/设置 colspan 值 默认 null 自己手动设置值 + /// Gets or sets colspan 值 Default is null 自己手动Sets值 + /// 10.2.2 /// [Parameter] public Func? ColspanCallback { get; set; } /// - /// 获得/设置 是否为移动端模式 + /// 获得/设置 是否为移动端模式 + /// Gets or sets whether为移动端模式 /// [CascadingParameter(Name = "IsMobileMode")] private bool IsMobileMode { get; set; } @@ -78,13 +96,16 @@ public partial class TableFooterCell private BreakPoint BreakPoint { get; set; } /// - /// 获得/设置 是否为移动端模式 + /// 获得/设置 是否为移动端模式 + /// Gets or sets whether为移动端模式 /// [CascadingParameter(Name = "TableFooterContext")] private object? DataSource { get; set; } /// - /// 获得/设置 显示节点阈值 默认值 BreakPoint.None 未设置 + /// 获得/设置 显示节点阈值 默认值 BreakPoint.None 未设置 + /// Gets or sets display节点阈值 Default is值 BreakPoint.None 未Sets + /// 10.2.2 /// [Parameter] public BreakPoint ShownWithBreakPoint { get; set; } @@ -101,13 +122,15 @@ protected override async Task OnParametersSetAsync() } /// - /// 检查当前列是否显示方法 + /// 检查当前列是否显示方法 + /// 检查当前列whetherdisplay方法 /// /// protected bool CheckShownWithBreakpoint => BreakPoint >= ShownWithBreakPoint; /// - /// 解析 Count Aggregate + /// 解析 Count Aggregate + /// 解析 Count Aggregate /// /// private string? GetCountValue() @@ -253,7 +276,8 @@ protected override async Task OnParametersSetAsync() } /// - /// 通过属性名称构建委托 + /// 通过属性名称构建委托 + /// 通过property名称构建delegate /// /// /// diff --git a/src/BootstrapBlazor/Components/Table/TableFormatContent.cs b/src/BootstrapBlazor/Components/Table/TableFormatContent.cs index ad0d1cb9a08..e94ff4a2aa8 100644 --- a/src/BootstrapBlazor/Components/Table/TableFormatContent.cs +++ b/src/BootstrapBlazor/Components/Table/TableFormatContent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,7 +10,9 @@ namespace BootstrapBlazor.Components; internal class TableFormatContent : ComponentBase { /// - /// 获得/设置 格式化方法 + /// 获得/设置 格式化方法 + /// Gets or sets 格式化方法 + /// 10.2.2 /// [Parameter] [NotNull] @@ -18,7 +20,9 @@ internal class TableFormatContent : ComponentBase public Func>? Formatter { get; set; } /// - /// 获得/设置 当前显示数据项 + /// 获得/设置 当前显示数据项 + /// Gets or sets 当前displaydata项 + /// 10.2.2 /// [Parameter] [NotNull] diff --git a/src/BootstrapBlazor/Components/Table/TableRowContext.cs b/src/BootstrapBlazor/Components/Table/TableRowContext.cs index 430709f1d0a..6e5621f7c32 100644 --- a/src/BootstrapBlazor/Components/Table/TableRowContext.cs +++ b/src/BootstrapBlazor/Components/Table/TableRowContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// TableRow 上下文类 +/// TableRow 上下文类 +/// TableRow 上下文类 /// /// /// @@ -14,18 +15,21 @@ namespace BootstrapBlazor.Components; public class TableRowContext(TItem model, IEnumerable columns, TableRenderMode renderMode) { /// - /// 获得/设置 当前渲染模式 + /// 获得/设置 当前渲染模式 + /// Gets or sets 当前渲染模式 /// public TableRenderMode RenderMode { get; } = renderMode; /// - /// 获得/设置 行数据实例 + /// 获得/设置 行数据实例 + /// Gets or sets 行datainstance /// [NotNull] public TItem Row { get; } = model ?? throw new ArgumentNullException(nameof(model)); /// - /// 获得/设置 当前绑定字段数据实例 + /// 获得/设置 当前绑定字段数据实例 + /// Gets or sets 当前绑定字段datainstance /// public IEnumerable Columns { get; } = columns; } diff --git a/src/BootstrapBlazor/Components/Table/TableSize.cs b/src/BootstrapBlazor/Components/Table/TableSize.cs index 633c5acaa8c..e02bee03cc7 100644 --- a/src/BootstrapBlazor/Components/Table/TableSize.cs +++ b/src/BootstrapBlazor/Components/Table/TableSize.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// Table 大小枚举类型 +/// Table 大小枚举类型 +/// Table 大小enumtype /// public enum TableSize { /// - /// 正常模式 + /// 正常模式 + /// 正常模式 /// Normal, /// - /// 紧凑模式 + /// 紧凑模式 + /// 紧凑模式 /// Compact } diff --git a/src/BootstrapBlazor/Components/Table/TableSortItem.cs b/src/BootstrapBlazor/Components/Table/TableSortItem.cs index df0a3dc014a..a6ee3222af6 100644 --- a/src/BootstrapBlazor/Components/Table/TableSortItem.cs +++ b/src/BootstrapBlazor/Components/Table/TableSortItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 排序项 (高级排序使用) +/// 排序项 (高级排序使用) +/// 排序项 (高级排序使用) /// public class TableSortItem { /// - /// 排序字段名 默认 string.Empty + /// 获得/设置 排序字段名称 默认 + /// Gets or sets the sort field name. Default value is /// public string SortName { get; set; } = string.Empty; /// - /// 排序顺序 默认 SortOrder.Unset + /// 获得/设置 排序顺序 默认 + /// Gets or sets the sort order. Default value is SortOrder.Unset /// public SortOrder SortOrder { get; set; } /// /// /// - /// public override string ToString() { var order = SortOrder == SortOrder.Unset ? "" : SortOrder.ToString(); diff --git a/src/BootstrapBlazor/Components/Table/TableTemplateColumn.cs b/src/BootstrapBlazor/Components/Table/TableTemplateColumn.cs index 2c4ad8e95c1..22abab64129 100644 --- a/src/BootstrapBlazor/Components/Table/TableTemplateColumn.cs +++ b/src/BootstrapBlazor/Components/Table/TableTemplateColumn.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// TableTemplateColumn component +/// TableTemplateColumn component +/// TableTemplateColumn component /// /// No need to bind model properties public class TableTemplateColumn : TableColumn diff --git a/src/BootstrapBlazor/Components/Table/TableToolbar.razor.cs b/src/BootstrapBlazor/Components/Table/TableToolbar.razor.cs index 73df603c19f..d78760d872a 100644 --- a/src/BootstrapBlazor/Components/Table/TableToolbar.razor.cs +++ b/src/BootstrapBlazor/Components/Table/TableToolbar.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// Table Toolbar 组件 +/// Table Toolbar 组件 +/// Table Toolbar component /// #if NET6_0_OR_GREATER [CascadingTypeParameter(nameof(TItem))] @@ -16,39 +17,50 @@ namespace BootstrapBlazor.Components; public partial class TableToolbar : ComponentBase { /// - /// 获得 Toolbar 按钮集合 + /// 获得 Toolbar 按钮集合 + /// Gets Toolbar buttoncollection /// private readonly List _buttons = []; private readonly ConcurrentDictionary _asyncButtonStateCache = new(ReferenceEqualityComparer.Instance); /// - /// Specifies the content to be rendered inside this + /// Specifies the 内容 to be rendered inside this + /// Specifies the content to be rendered inside this + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 按钮点击后回调委托 + /// 获得/设置 按钮点击后回调委托 + /// Gets or sets button点击后回调delegate + /// 10.2.2 /// [Parameter] [NotNull] public Func>? OnGetSelectedRows { get; set; } /// - /// 获得/设置 是否自动收缩工具栏按钮 默认 true + /// 获得/设置 是否自动收缩工具栏按钮 默认 true + /// Gets or sets whether自动收缩工具栏button Default is true + /// 10.2.2 /// [Parameter] public bool IsAutoCollapsedToolbarButton { get; set; } = true; /// - /// 获得/设置 工具栏按钮收缩后是否继承原先按钮的颜色样式 默认 false + /// 获得/设置 工具栏按钮收缩后是否继承原先按钮的颜色样式 默认 false + /// Gets or sets 工具栏button收缩后whether继承原先button的colorstyle Default is false + /// 10.2.2 /// [Parameter] public bool ShowColorWhenToolbarButtonsCollapsed { get; set; } /// - /// 获得/设置 移动端按钮图标 + /// 获得/设置 移动端按钮图标 + /// Gets or sets 移动端buttonicon + /// 10.2.2 /// [Parameter] public string? GearIcon { get; set; } @@ -131,12 +143,14 @@ private bool GetDisabled(ButtonBase button) } /// - /// 添加按钮到工具栏方法 + /// 添加按钮到工具栏方法 + /// 添加button到工具栏方法 /// public void AddButton(IToolbarComponent button) => _buttons.Add(button); /// - /// 移除按钮到工具栏方法 + /// 移除按钮到工具栏方法 + /// 移除button到工具栏方法 /// public void RemoveButton(IToolbarComponent button) => _buttons.Remove(button); } diff --git a/src/BootstrapBlazor/Components/Table/TableToolbarButton.cs b/src/BootstrapBlazor/Components/Table/TableToolbarButton.cs index b5d8857f454..e93ece99971 100644 --- a/src/BootstrapBlazor/Components/Table/TableToolbarButton.cs +++ b/src/BootstrapBlazor/Components/Table/TableToolbarButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,37 +6,47 @@ namespace BootstrapBlazor.Components; /// -/// 表格 Toolbar 按钮组件 +/// 表格 Toolbar 按钮组件 +/// Table toolbar button component /// [JSModuleNotInherited] public class TableToolbarButton : ButtonBase, ITableToolbarButton { /// - /// 获得/设置 按钮点击后回调委托 + /// 获得/设置 按钮点击后回调委托 + /// Gets or sets button点击后回调delegate + /// 10.2.2 /// [Parameter] public Func, Task>? OnClickCallback { get; set; } /// - /// 获得/设置 选中一行时启用按钮 默认 false 均可用 + /// 获得/设置 选中一行时启用按钮 默认 false 均可用 + /// Gets or sets 选中一行时启用button Default is false 均可用 + /// 10.2.2 /// [Parameter] public bool IsEnableWhenSelectedOneRow { get; set; } /// - /// 获得/设置 按钮是否被禁用回调方法 + /// 获得/设置 按钮是否被禁用回调方法 + /// Gets or sets button whether disable callback method + /// 10.2.2 /// [Parameter] public Func, bool>? IsDisabledCallback { get; set; } /// - /// 获得/设置 是否显示 默认 true 显示 + /// 获得/设置 是否显示 默认 true 显示 + /// Gets or sets whether display this button Default is true display + /// 10.2.2 /// [Parameter] public bool IsShow { get; set; } = true; /// - /// 获得/设置 Table Toolbar 实例 + /// 获得/设置 Table Toolbar 实例 + /// Gets or sets Table Toolbar instance /// [CascadingParameter] protected TableToolbar? Toolbar { get; set; } @@ -52,7 +62,8 @@ protected override void OnInitialized() } /// - /// DisposeAsyncCore 方法 + /// DisposeAsyncCore 方法 + /// DisposeAsyncCore 方法 /// /// /// diff --git a/src/BootstrapBlazor/Components/Table/TableToolbarComponent.cs b/src/BootstrapBlazor/Components/Table/TableToolbarComponent.cs index 5909c77641e..faabb40f8f7 100644 --- a/src/BootstrapBlazor/Components/Table/TableToolbarComponent.cs +++ b/src/BootstrapBlazor/Components/Table/TableToolbarComponent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Table 工具栏自定义组件 +/// Table 工具栏自定义组件 +/// Table 工具栏自定义component /// public class TableToolbarComponent : ComponentBase, IToolbarComponent, IDisposable { @@ -17,13 +18,16 @@ public class TableToolbarComponent : ComponentBase, IToolbarComponent, ID public bool IsShow { get; set; } = true; /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Gets or sets 子component + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 Table Toolbar 实例 + /// 获得/设置 Table Toolbar 实例 + /// Gets or sets Table Toolbar instance /// [CascadingParameter] protected TableToolbar? Toolbar { get; set; } @@ -39,7 +43,8 @@ protected override void OnInitialized() } /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. /// /// protected virtual void Dispose(bool disposing) diff --git a/src/BootstrapBlazor/Components/Table/TableToolbarPopConfirmButton.cs b/src/BootstrapBlazor/Components/Table/TableToolbarPopConfirmButton.cs index 81302b5f17f..ff7f740cc03 100644 --- a/src/BootstrapBlazor/Components/Table/TableToolbarPopConfirmButton.cs +++ b/src/BootstrapBlazor/Components/Table/TableToolbarPopConfirmButton.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,37 +8,47 @@ namespace BootstrapBlazor.Components; /// -/// TableToolbarPopConfirmButton 组件 +/// TableToolbarPopConfirmButton 组件 +/// TableToolbarPopConfirmButton component /// [JSModuleNotInherited] public class TableToolbarPopConfirmButton : PopConfirmButtonBase, ITableToolbarButton { /// - /// 获得/设置 按钮点击后回调委托 + /// 获得/设置 按钮点击后回调委托 + /// Gets or sets button点击后回调delegate + /// 10.2.2 /// [Parameter] public Func, Task>? OnConfirmCallback { get; set; } /// - /// 获得/设置 是否显示 默认 true 显示 + /// 获得/设置 是否显示 默认 true 显示 + /// Gets or sets whetherdisplay Default is true display + /// 10.2.2 /// [Parameter] public bool IsShow { get; set; } = true; /// - /// 获得/设置 选中一行时启用按钮 默认 false 均可用 + /// 获得/设置 选中一行时启用按钮 默认 false 均可用 + /// Gets or sets 选中一行时启用button Default is false 均可用 + /// 10.2.2 /// [Parameter] public bool IsEnableWhenSelectedOneRow { get; set; } /// - /// 获得/设置 按钮是否被禁用回调方法 + /// 获得/设置 按钮是否被禁用回调方法 + /// Gets or sets buttonwhether被禁用callback method + /// 10.2.2 /// [Parameter] public Func, bool>? IsDisabledCallback { get; set; } /// - /// 获得/设置 Table Toolbar 实例 + /// 获得/设置 Table Toolbar 实例 + /// Gets or sets Table Toolbar instance /// [CascadingParameter] protected TableToolbar? Toolbar { get; set; } @@ -70,7 +80,8 @@ protected override void OnParametersSet() } /// - /// DisposeAsyncCore 方法 + /// DisposeAsyncCore 方法 + /// DisposeAsyncCore 方法 /// /// /// diff --git a/src/BootstrapBlazor/Components/Tag/Tag.razor.cs b/src/BootstrapBlazor/Components/Tag/Tag.razor.cs index 9aa7bb8a83d..3216dad34a4 100644 --- a/src/BootstrapBlazor/Components/Tag/Tag.razor.cs +++ b/src/BootstrapBlazor/Components/Tag/Tag.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Tag 组件类 +/// Tag 组件类 +/// Tag component类 /// public partial class Tag { /// - /// 获得 样式集合 + /// 获得 样式集合 + /// Gets stylecollection /// /// private string? ClassName => CssBuilder.Default("tag fade show") diff --git a/src/BootstrapBlazor/Components/Textarea/Textarea.razor.cs b/src/BootstrapBlazor/Components/Textarea/Textarea.razor.cs index 54d8be133cc..deaeee81c58 100644 --- a/src/BootstrapBlazor/Components/Textarea/Textarea.razor.cs +++ b/src/BootstrapBlazor/Components/Textarea/Textarea.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,42 +6,51 @@ namespace BootstrapBlazor.Components; /// -/// Textarea component +/// Textarea component +/// Textarea component /// public partial class Textarea { /// - /// Scroll to the top + /// Scroll to the top + /// Scroll to the top /// /// public Task ScrollToTop() => InvokeVoidAsync("execute", Id, "toTop"); /// - /// Scroll to a specific value + /// Scroll to a specific value + /// Scroll to a specific value /// /// public Task ScrollTo(int value) => InvokeVoidAsync("execute", Id, "to", value); /// - /// Scroll to the bottom + /// Scroll to the bottom + /// Scroll to the bottom /// /// public Task ScrollToBottom() => InvokeVoidAsync("execute", Id, "toBottom"); /// - /// Gets or sets whether auto-scroll is enabled. Default is false. + /// 获得/设置 是否 auto-scroll is enabled. 默认为 false. + /// Gets or sets whether auto-scroll is enabled. Default is false. + /// 10.2.2 /// [Parameter] public bool IsAutoScroll { get; set; } /// - /// Gets or sets whether Shift + Enter replaces the default Enter key behavior. Default is false. + /// 获得/设置 是否 Shift + Enter replaces the default Enter key behavior. 默认为 false. + /// Gets or sets whether Shift + Enter replaces the default Enter key behavior. Default is false. + /// 10.2.2 /// [Parameter] public bool UseShiftEnter { get; set; } /// - /// Gets the client-side auto-scroll identifier. + /// 获得 the client-side auto-scroll identifier. + /// Gets the client-side auto-scroll identifier. /// private string? AutoScrollString => IsAutoScroll ? "auto" : null; diff --git a/src/BootstrapBlazor/Components/ThemeProvider/ThemeProvider.razor.cs b/src/BootstrapBlazor/Components/ThemeProvider/ThemeProvider.razor.cs index 02bee1c5961..9ecb58bb659 100644 --- a/src/BootstrapBlazor/Components/ThemeProvider/ThemeProvider.razor.cs +++ b/src/BootstrapBlazor/Components/ThemeProvider/ThemeProvider.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,78 +8,103 @@ namespace BootstrapBlazor.Components; /// -/// ThemeProvider 组件 +/// ThemeProvider 组件 +/// ThemeProvider component /// public partial class ThemeProvider { /// - /// 获得/设置 自动模式图标 默认 null + /// 获得/设置 自动模式图标 默认 null + /// Gets or sets 自动模式icon Default is null + /// 10.2.2 /// [Parameter] public string? AutoModeIcon { get; set; } /// - /// 获得/设置 自动模式文本 默认 null 未设置使用本地化资源 + /// 获得/设置 自动模式文本 默认 null 未设置使用本地化资源 + /// Gets or sets 自动模式文本 Default is null 未Sets使用本地化资源 + /// 10.2.2 /// [Parameter] public string? AutoModeText { get; set; } /// - /// 获得/设置 暗黑模式图标 默认 null + /// 获得/设置 暗黑模式图标 默认 null + /// Gets or sets 暗黑模式icon Default is null + /// 10.2.2 /// [Parameter] public string? DarkModeIcon { get; set; } /// - /// 获得/设置 暗黑模式文本 默认 null 未设置使用本地化资源 + /// 获得/设置 暗黑模式文本 默认 null 未设置使用本地化资源 + /// Gets or sets 暗黑模式文本 Default is null 未Sets使用本地化资源 + /// 10.2.2 /// [Parameter] public string? DarkModeText { get; set; } /// - /// 获得/设置 明亮模式图标 默认 null + /// 获得/设置 明亮模式图标 默认 null + /// Gets or sets 明亮模式icon Default is null + /// 10.2.2 /// [Parameter] public string? LightModeIcon { get; set; } /// - /// 获得/设置 明亮模式文本 默认 null 未设置使用本地化资源 + /// 获得/设置 明亮模式文本 默认 null 未设置使用本地化资源 + /// Gets or sets 明亮模式文本 Default is null 未Sets使用本地化资源 + /// 10.2.2 /// [Parameter] public string? LightModeText { get; set; } /// - /// 获得/设置 当前选中模式图标 默认 null + /// 获得/设置 当前选中模式图标 默认 null + /// Gets or sets 当前选中模式icon Default is null + /// 10.2.2 /// [Parameter] public string? ActiveIcon { get; set; } /// - /// 获得/设置 下拉框是否显示阴影效果 默认 true + /// 获得/设置 下拉框是否显示阴影效果 默认 true + /// Gets or sets 下拉框whetherdisplay阴影效果 Default is true + /// 10.2.2 /// [Parameter] public bool ShowShadow { get; set; } = true; /// - /// 获得/设置 下拉框对其方式 默认 Right + /// 获得/设置 下拉框对其方式 默认 Right + /// Gets or sets 下拉框对其方式 Default is Right + /// 10.2.2 /// [Parameter] public Alignment Alignment { get; set; } = Alignment.Right; /// - /// 获得/设置 主题切换回调方法 + /// 获得/设置 主题切换回调方法 + /// Gets or sets 主题切换callback method + /// 10.2.2 /// [Parameter] public Func? OnThemeChangedAsync { get; set; } /// - /// 主题类型 + /// 主题类型 + /// 主题type + /// 10.2.2 /// [Parameter] public ThemeValue ThemeValue { get; set; } = ThemeValue.UseLocalStorage; /// - /// 主题类型改变回调方法 + /// 主题类型改变回调方法 + /// 主题type改变callback method + /// 10.2.2 /// [Parameter] public EventCallback ThemeValueChanged { get; set; } @@ -127,7 +152,8 @@ protected override void OnParametersSet() protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, ThemeValue, nameof(OnThemeChanged)); /// - /// JavaScript 回调方法 + /// JavaScript 回调方法 + /// JavaScript callback method /// /// /// diff --git a/src/BootstrapBlazor/Components/ThemeProvider/ThemeValue.cs b/src/BootstrapBlazor/Components/ThemeProvider/ThemeValue.cs index 5305bcfc357..668779d8a42 100644 --- a/src/BootstrapBlazor/Components/ThemeProvider/ThemeValue.cs +++ b/src/BootstrapBlazor/Components/ThemeProvider/ThemeValue.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,31 +8,36 @@ namespace BootstrapBlazor.Components; /// -/// 主题选项 +/// 主题选项 +/// 主题选项 /// [JsonEnumConverter(true)] public enum ThemeValue { /// - /// 自动 + /// 自动 + /// 自动 /// [Description("auto")] Auto, /// - /// 明亮主题 + /// 明亮主题 + /// 明亮主题 /// [Description("light")] Light, /// - /// 暗黑主题 + /// 暗黑主题 + /// 暗黑主题 /// [Description("dark")] Dark, /// - /// 使用本地保存选项 + /// 使用本地保存选项 + /// 使用本地保存选项 /// [Description("useLocalStorage")] UseLocalStorage, diff --git a/src/BootstrapBlazor/Components/TimePicker/TimePicker.razor.cs b/src/BootstrapBlazor/Components/TimePicker/TimePicker.razor.cs index e6d48595e65..4c555f72806 100644 --- a/src/BootstrapBlazor/Components/TimePicker/TimePicker.razor.cs +++ b/src/BootstrapBlazor/Components/TimePicker/TimePicker.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,39 +8,50 @@ namespace BootstrapBlazor.Components; /// -/// TimePicker 组件 +/// TimePicker 组件 +/// TimePicker component /// public partial class TimePicker { /// - /// 获得/设置 取消按钮显示文字 + /// 获得/设置 取消按钮显示文字 + /// Gets or sets 取消buttondisplay文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? CancelButtonText { get; set; } /// - /// 获得/设置 确定按钮显示文字 + /// 获得/设置 确定按钮显示文字 + /// Gets or sets 确定buttondisplay文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? ConfirmButtonText { get; set; } /// - /// 获得/设置 是否显示秒 默认为 true + /// 获得/设置 是否显示秒 默认为 true + /// Gets or sets whetherdisplay秒 Default is为 true + /// 10.2.2 /// [Parameter] [NotNull] public bool HasSeconds { get; set; } = true; /// - /// 获得/设置 取消按钮回调委托 + /// 获得/设置 取消按钮回调委托 + /// Gets or sets 取消button回调delegate + /// 10.2.2 /// [Parameter] public Func? OnClose { get; set; } /// - /// 获得/设置 确认按钮回调委托 + /// 获得/设置 确认按钮回调委托 + /// Gets or sets 确认button回调delegate + /// 10.2.2 /// [Parameter] public Func? OnConfirm { get; set; } @@ -50,12 +61,14 @@ public partial class TimePicker private IStringLocalizer>? Localizer { get; set; } /// - /// 获得/设置 当前时间 + /// 获得/设置 当前时间 + /// Gets or sets 当前时间 /// private TimeSpan CurrentTime { get; set; } /// - /// 获得/设置 样式 + /// 获得/设置 样式 + /// Gets or sets style /// private string? ClassString => CssBuilder.Default("bb-time-picker") .AddClassFromAttributes(AdditionalAttributes) @@ -74,7 +87,8 @@ protected override void OnParametersSet() } /// - /// 点击取消按钮回调此方法 + /// 点击取消按钮回调此方法 + /// 点击取消button回调此方法 /// private async Task OnClickClose() { @@ -86,7 +100,8 @@ private async Task OnClickClose() } /// - /// 点击确认按钮时回调此方法 + /// 点击确认按钮时回调此方法 + /// 点击确认button时回调此方法 /// private async Task OnClickConfirm() { diff --git a/src/BootstrapBlazor/Components/TimePicker/TimePickerCell.razor.cs b/src/BootstrapBlazor/Components/TimePicker/TimePickerCell.razor.cs index eb7e6bb6b40..ee03ec34a8c 100644 --- a/src/BootstrapBlazor/Components/TimePicker/TimePickerCell.razor.cs +++ b/src/BootstrapBlazor/Components/TimePicker/TimePickerCell.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// 时间选择滚轮单元组件 +/// 时间选择滚轮单元组件 +/// 时间选择滚轮单元component /// public partial class TimePickerCell { @@ -17,7 +18,8 @@ public partial class TimePickerCell .Build(); /// - /// 获得 当前样式名称 + /// 获得 当前样式名称 + /// Gets 当前style名称 /// private string? GetClassName(int index) => CssBuilder.Default("time-spinner-item") .AddClass("prev", ViewMode switch @@ -41,7 +43,8 @@ public partial class TimePickerCell .Build(); /// - /// 获得 滚轮单元数据区间 + /// 获得 滚轮单元数据区间 + /// Gets 滚轮单元data区间 /// private IEnumerable Range => ViewMode switch { @@ -50,7 +53,8 @@ public partial class TimePickerCell }; /// - /// 获得 组件单元数据样式 + /// 获得 组件单元数据样式 + /// Gets component单元datastyle /// private string? StyleName => CssBuilder.Default() .AddClass($"transform: translateY({CalcTranslateY().ToString(CultureInfo.InvariantCulture)}px);") @@ -65,31 +69,41 @@ public partial class TimePickerCell .Build(); /// - /// 获得/设置 时间选择框视图模式 + /// 获得/设置 时间选择框视图模式 + /// Gets or sets 时间选择框视图模式 + /// 10.2.2 /// [Parameter] public TimePickerCellViewMode ViewMode { get; set; } /// - /// 获得/设置 组件值 + /// 获得/设置 组件值 + /// Gets or sets component值 + /// 10.2.2 /// [Parameter] public TimeSpan Value { get; set; } /// - /// 获得/设置 组件值变化时委托方法 + /// 获得/设置 组件值变化时委托方法 + /// Gets or sets component值变化时delegate方法 + /// 10.2.2 /// [Parameter] public EventCallback ValueChanged { get; set; } /// - /// 获得/设置 向上箭头图标 + /// 获得/设置 向上箭头图标 + /// Gets or sets 向上箭头icon + /// 10.2.2 /// [Parameter] public string? UpIcon { get; set; } /// - /// 获得/设置 向下箭头图标 + /// 获得/设置 向下箭头图标 + /// Gets or sets 向下箭头icon + /// 10.2.2 /// [Parameter] public string? DownIcon { get; set; } @@ -116,7 +130,8 @@ protected override void OnParametersSet() protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop); /// - /// 上翻页按钮调用此方法 + /// 上翻页按钮调用此方法 + /// 上翻页button调用此方法 /// [JSInvokable] public async Task OnClickUp() @@ -139,13 +154,15 @@ public async Task OnClickUp() } /// - /// 计算单元格高度回调方法 + /// 计算单元格高度回调方法 + /// 计算单元格heightcallback method /// [JSInvokable] public void OnHeightCallback(double height) => _height = height; /// - /// 下翻页按钮调用此方法 + /// 下翻页按钮调用此方法 + /// 下翻页button调用此方法 /// [JSInvokable] public async Task OnClickDown() diff --git a/src/BootstrapBlazor/Components/Timeline/Timeline.razor.cs b/src/BootstrapBlazor/Components/Timeline/Timeline.razor.cs index ee865c1618f..8f615873c49 100644 --- a/src/BootstrapBlazor/Components/Timeline/Timeline.razor.cs +++ b/src/BootstrapBlazor/Components/Timeline/Timeline.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 时间线组件基类 +/// 时间线组件基类 +/// 时间线component基类 /// public partial class Timeline { /// - /// 获得 Timeline 样式 + /// 获得 Timeline 样式 + /// Gets Timeline style /// protected string? ClassString => CssBuilder.Default("timeline") .AddClass("is-alternate", IsAlternate && !IsLeft) @@ -20,32 +22,41 @@ public partial class Timeline .Build(); /// - /// 获得/设置 绑定数据集 + /// 获得/设置 绑定数据集 + /// Gets or sets 绑定data集 + /// 10.2.2 /// [Parameter] [NotNull] public IEnumerable? Items { get; set; } /// - /// 获得/设置 是否反转 + /// 获得/设置 是否反转 + /// Gets or sets whether反转 + /// 10.2.2 /// [Parameter] public bool IsReverse { get; set; } /// - /// 获得/设置 是否左右交替出现 默认 false + /// 获得/设置 是否左右交替出现 默认 false + /// Gets or sets whether左右交替出现 Default is false + /// 10.2.2 /// [Parameter] public bool IsAlternate { get; set; } /// - /// 获得/设置 内容是否出现在时间线左侧 默认为 false + /// 获得/设置 内容是否出现在时间线左侧 默认为 false + /// Gets or sets contentwhether出现在时间线左侧 Default is为 false + /// 10.2.2 /// [Parameter] public bool IsLeft { get; set; } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet 方法 /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Timeline/TimelineItem.cs b/src/BootstrapBlazor/Components/Timeline/TimelineItem.cs index c6ca35a6e91..9c45ce3292e 100644 --- a/src/BootstrapBlazor/Components/Timeline/TimelineItem.cs +++ b/src/BootstrapBlazor/Components/Timeline/TimelineItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,42 +6,50 @@ namespace BootstrapBlazor.Components; /// -/// 时间线选项 +/// 时间线选项 +/// 时间线选项 /// public class TimelineItem { /// - /// 获得/设置 时间线内容 + /// 获得/设置 时间线内容 + /// Gets or sets 时间线content /// public string? Content { get; set; } /// - /// 获得/设置 时间线描述 + /// 获得/设置 时间线描述 + /// Gets or sets 时间线描述 /// public string? Description { get; set; } /// - /// 获得/设置 时间线描述模板 + /// 获得/设置 时间线描述模板 + /// Gets or sets 时间线描述template /// public RenderFragment? DescriptionTemplate { get; set; } /// - /// 获得/设置 时间线颜色 + /// 获得/设置 时间线颜色 + /// Gets or sets 时间线color /// public Color Color { get; set; } /// - /// 获得/设置 时间线图标 + /// 获得/设置 时间线图标 + /// Gets or sets 时间线icon /// public string? Icon { get; set; } /// - /// 获得/设置 自定义组件 + /// 获得/设置 自定义组件 + /// Gets or sets 自定义component /// public BootstrapDynamicComponent? Component { get; set; } /// - /// 获得 时间线节点样式 + /// 获得 时间线节点样式 + /// Gets 时间线节点style /// internal string? ToNodeClassString() => CssBuilder.Default("timeline-item-node-normal timeline-item-node") .AddClass($"bg-{Color.ToDescriptionString()}", Color != Color.None && string.IsNullOrEmpty(Icon)) @@ -49,7 +57,8 @@ public class TimelineItem .Build(); /// - /// 获得 图标样式 + /// 获得 图标样式 + /// Gets iconstyle /// /// internal string? ToIconClassString() => CssBuilder.Default("timeline-item-icon") diff --git a/src/BootstrapBlazor/Components/Timer/Timer.razor.cs b/src/BootstrapBlazor/Components/Timer/Timer.razor.cs index fffa9744870..e70e86e7513 100644 --- a/src/BootstrapBlazor/Components/Timer/Timer.razor.cs +++ b/src/BootstrapBlazor/Components/Timer/Timer.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,13 +8,15 @@ namespace BootstrapBlazor.Components; /// -/// Timer 组件 +/// Timer 组件 +/// Timer component /// [BootstrapModuleAutoLoader(ModuleName = "utility", AutoInvokeInit = false, AutoInvokeDispose = false)] public partial class Timer { /// - /// 获得 组件样式字符串 + /// 获得 组件样式字符串 + /// Gets componentstyle字符串 /// protected override string? ClassString => CssBuilder.Default("timer") .AddClass(base.ClassString) @@ -26,7 +28,8 @@ public partial class Timer .Build(); /// - /// 获得/设置 当前进度值 + /// 获得/设置 当前进度值 + /// Gets or sets 当前进度值 /// private string? ValueString => $"{Math.Round(((1 - CurrentTimespan.TotalSeconds * 1.0 / Value.TotalSeconds) * CircleLength), 2)}"; @@ -35,7 +38,8 @@ public partial class Timer private bool IsPause { get; set; } /// - /// 获得/设置 Title 字符串 + /// 获得/设置 Title 字符串 + /// Gets or sets Title 字符串 /// private string ValueTitleString => CurrentTimespan.Hours == 0 ? $"{CurrentTimespan:mm\\:ss}" : $"{CurrentTimespan:hh\\:mm\\:ss}"; @@ -46,71 +50,93 @@ public partial class Timer private bool Vibrate { get; set; } /// - /// 获得/设置 当前值 + /// 获得/设置 当前值 + /// Gets or sets 当前值 + /// 10.2.2 /// [Parameter] public TimeSpan Value { get; set; } /// - /// 获得/设置 文件预览框宽度 + /// 获得/设置 文件预览框宽度 + /// Gets or sets 文件预览框width + /// 10.2.2 /// [Parameter] public override int Width { get; set; } = 300; /// - /// 获得/设置 倒计时结束时回调委托 + /// 获得/设置 倒计时结束时回调委托 + /// Gets or sets 倒计时结束时回调delegate + /// 10.2.2 /// [Parameter] public Func? OnTimeout { get; set; } /// - /// 获得/设置 取消时回调委托 + /// 获得/设置 取消时回调委托 + /// Gets or sets 取消时回调delegate + /// 10.2.2 /// [Parameter] public Func? OnCancel { get; set; } /// - /// 获得/设置 进度条宽度 默认为 2 + /// 获得/设置 进度条宽度 默认为 2 + /// Gets or sets 进度条width Default is为 2 + /// 10.2.2 /// [Parameter] public override int StrokeWidth { get; set; } = 6; /// - /// 获得/设置 倒计时结束时设备震动 + /// 获得/设置 倒计时结束时设备震动 + /// Gets or sets 倒计时结束时设备震动 + /// 10.2.2 /// [Parameter] public bool IsVibrate { get; set; } = true; /// - /// 获得/设置 暂停按钮文字 + /// 获得/设置 暂停按钮文字 + /// Gets or sets 暂停button文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? PauseText { get; set; } /// - /// 获得/设置 继续按钮文字 + /// 获得/设置 继续按钮文字 + /// Gets or sets 继续button文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? ResumeText { get; set; } /// - /// 获得/设置 取消按钮文字 + /// 获得/设置 取消按钮文字 + /// Gets or sets 取消button文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? CancelText { get; set; } /// - /// 获得/设置 取消按钮文字 + /// 获得/设置 取消按钮文字 + /// Gets or sets 取消button文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? StarText { get; set; } /// - /// 获得/设置 Alert 图标 + /// 获得/设置 Alert 图标 + /// Gets or sets Alert icon + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } @@ -236,7 +262,8 @@ private async Task OnClickCancel() } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose 方法 /// /// protected override async ValueTask DisposeAsync(bool disposing) diff --git a/src/BootstrapBlazor/Components/Title/Title.cs b/src/BootstrapBlazor/Components/Title/Title.cs index 80f12f266b0..db2197dcfad 100644 --- a/src/BootstrapBlazor/Components/Title/Title.cs +++ b/src/BootstrapBlazor/Components/Title/Title.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Title 组件 +/// Title 组件 +/// Title component /// public class Title : ComponentBase { @@ -15,7 +16,9 @@ public class Title : ComponentBase private TitleService? TitleService { get; set; } /// - /// 获得/设置 当前页标题文字 + /// 获得/设置 当前页标题文字 + /// Gets or sets 当前页标题文字 + /// 10.2.2 /// [Parameter] public string? Text { get; set; } diff --git a/src/BootstrapBlazor/Components/Toast/Toast.razor.cs b/src/BootstrapBlazor/Components/Toast/Toast.razor.cs index 59a4421b5c4..c50f8be3839 100644 --- a/src/BootstrapBlazor/Components/Toast/Toast.razor.cs +++ b/src/BootstrapBlazor/Components/Toast/Toast.razor.cs @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// ToastBox 组件 +/// ToastBox 组件 +/// ToastBox component /// public partial class Toast { /// - /// 获得/设置 弹出框类型 + /// 获得/设置 弹出框类型 + /// Gets or sets 弹出框type /// private string? AutoHide => Options.IsAutoHide ? null : "false"; /// - /// 获得/设置 弹出框类型 + /// 获得/设置 弹出框类型 + /// Gets or sets 弹出框type /// private string? ClassString => CssBuilder.Default("toast") .AddClass(Options.ClassString) @@ -24,14 +27,16 @@ public partial class Toast .Build(); /// - /// 获得/设置 进度条样式 + /// 获得/设置 进度条样式 + /// Gets or sets 进度条style /// private string? ProgressClass => CssBuilder.Default("toast-progress") .AddClass($"bg-{Options.Category.ToDescriptionString()}") .Build(); /// - /// 获得/设置 图标样式 + /// 获得/设置 图标样式 + /// Gets or sets iconstyle /// private string? IconString => CssBuilder.Default() .AddClass(Options.SuccessIcon, Options.Category == ToastCategory.Success) @@ -51,17 +56,21 @@ public partial class Toast .Build(); /// - /// 获得/设置 弹出框自动关闭时长 + /// 获得/设置 弹出框自动关闭时长 + /// Gets or sets 弹出框自动关闭时长 /// private string? DelayString => Options.IsAutoHide ? Options.Delay.ToString() : null; /// - /// 获得/设置 是否开启动画效果 + /// 获得/设置 是否开启动画效果 + /// Gets or sets whether开启动画效果 /// private string? AnimationString => Options.Animation ? null : "false"; /// - /// 获得/设置 ToastOption 实例 + /// 获得/设置 ToastOption 实例 + /// Gets or sets ToastOption instance + /// 10.2.2 /// [Parameter] [NotNull] @@ -69,7 +78,8 @@ public partial class Toast public ToastOption? Options { get; set; } /// - /// 获得/设置 Toast 实例 + /// 获得/设置 Toast 实例 + /// Gets or sets Toast instance /// /// [CascadingParameter] @@ -122,7 +132,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(Close)); /// - /// 清除 ToastBox 方法 + /// 清除 ToastBox 方法 + /// 清除 ToastBox 方法 /// [JSInvokable] public async Task Close() diff --git a/src/BootstrapBlazor/Components/Toast/ToastContainer.razor.cs b/src/BootstrapBlazor/Components/Toast/ToastContainer.razor.cs index 16f8689b39e..6fdec54e23b 100644 --- a/src/BootstrapBlazor/Components/Toast/ToastContainer.razor.cs +++ b/src/BootstrapBlazor/Components/Toast/ToastContainer.razor.cs @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Toast 弹出窗组件 +/// Toast 弹出窗组件 +/// Toast 弹出窗component /// public partial class ToastContainer : IDisposable { @@ -24,12 +25,15 @@ public partial class ToastContainer : IDisposable .Build(); /// - /// 获得 弹出窗集合 + /// 获得 弹出窗集合 + /// Gets 弹出窗collection /// private List Toasts { get; } = []; /// - /// 获得/设置 显示文字 + /// 获得/设置 显示文字 + /// Gets or sets display文字 + /// 10.2.2 /// [Parameter] [NotNull] @@ -44,7 +48,8 @@ public partial class ToastContainer : IDisposable private IOptionsMonitor? Options { get; set; } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized 方法 /// protected override void OnInitialized() { @@ -76,7 +81,8 @@ private async Task Show(ToastOption option) } /// - /// 关闭弹窗 + /// 关闭弹窗 + /// 关闭弹窗 /// /// public async Task Close(ToastOption option) @@ -90,7 +96,8 @@ public async Task Close(ToastOption option) } /// - /// 设置 Toast 容器位置方法 + /// 设置 Toast 容器位置方法 + /// Sets Toast 容器位置方法 /// /// public void SetPlacement(Placement placement) @@ -100,7 +107,8 @@ public void SetPlacement(Placement placement) } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose 方法 /// /// protected virtual void Dispose(bool disposing) @@ -112,7 +120,8 @@ protected virtual void Dispose(bool disposing) } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose 方法 /// public void Dispose() { diff --git a/src/BootstrapBlazor/Components/Toast/ToastOption.cs b/src/BootstrapBlazor/Components/Toast/ToastOption.cs index 291328fcfdf..b5314e382cb 100644 --- a/src/BootstrapBlazor/Components/Toast/ToastOption.cs +++ b/src/BootstrapBlazor/Components/Toast/ToastOption.cs @@ -6,92 +6,110 @@ namespace BootstrapBlazor.Components; /// -/// Toast 弹出窗参数配置类 +/// Toast 弹出窗参数配置类 +/// Toast 弹出窗参数配置类 /// public class ToastOption : PopupOptionBase { /// - /// 获得/设置 弹窗载体 + /// 获得/设置 弹窗载体 + /// Gets or sets 弹窗载体 /// internal Toast? Toast { get; set; } /// - /// 获得/设置 弹出框类型 + /// 获得/设置 弹出框类型 + /// Gets or sets 弹出框type /// public ToastCategory Category { get; set; } /// - /// 获得/设置 成功图标 + /// 获得/设置 成功图标 + /// Gets or sets 成功icon /// public string? SuccessIcon { get; set; } /// - /// 获得/设置 提示图标 + /// 获得/设置 提示图标 + /// Gets or sets 提示icon /// public string? InformationIcon { get; set; } /// - /// 获得/设置 错误图标 + /// 获得/设置 错误图标 + /// Gets or sets 错误icon /// public string? ErrorIcon { get; set; } /// - /// 获得/设置 警告图标 + /// 获得/设置 警告图标 + /// Gets or sets 警告icon /// public string? WarningIcon { get; set; } /// - /// 获得/设置 显示标题 + /// 获得/设置 显示标题 + /// Gets or sets display标题 /// public string? Title { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Gets or sets 子component /// public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否显示关闭按钮 默认 true + /// 获得/设置 是否显示关闭按钮 默认 true + /// Gets or sets whetherdisplay关闭button Default is true /// public bool ShowClose { get; set; } = true; /// - /// 获得/设置 是否显示 Header 默认 true + /// 获得/设置 是否显示 Header 默认 true + /// Gets or sets whetherdisplay Header Default is true /// public bool ShowHeader { get; set; } = true; /// - /// 获得/设置 是否阻止重复消息 默认 false + /// 获得/设置 是否阻止重复消息 默认 false + /// Gets or sets whether阻止重复消息 Default is false /// public bool PreventDuplicates { get; set; } /// - /// 获得/设置 Header 模板 默认为 null + /// 获得/设置 Header 模板 默认为 null + /// Gets or sets Header template Default is为 null /// public RenderFragment? HeaderTemplate { get; set; } /// - /// 获得/设置 是否开启动画 默认 true + /// 获得/设置 是否开启动画 默认 true + /// Gets or sets whether开启动画 Default is true /// public bool Animation { get; set; } = true; /// - /// 获得/设置 关闭当前 Toast 回调委托 默认 null + /// 获得/设置 关闭当前 Toast 回调委托 默认 null + /// Gets or sets 关闭当前 Toast 回调delegate Default is null /// public Func? OnCloseAsync { get; set; } /// - /// 获得/设置 附加 style 字符串到 元素上 + /// 获得/设置 附加 style 字符串到 元素上 + /// Gets or sets 附加 style 字符串到 元素上 /// public string? StyleString { get; set; } /// - /// 获得/设置 附加 class 字符串到 元素上 + /// 获得/设置 附加 class 字符串到 元素上 + /// Gets or sets 附加 class 字符串到 元素上 /// public string? ClassString { get; set; } /// - /// 关闭当前弹窗方法 + /// 关闭当前弹窗方法 + /// 关闭当前弹窗方法 /// public async Task Close() { diff --git a/src/BootstrapBlazor/Components/Toast/ToastService.cs b/src/BootstrapBlazor/Components/Toast/ToastService.cs index 82aa9902b21..c059bc777ba 100644 --- a/src/BootstrapBlazor/Components/Toast/ToastService.cs +++ b/src/BootstrapBlazor/Components/Toast/ToastService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,16 +6,18 @@ namespace BootstrapBlazor.Components; /// -/// Toast 弹出窗服务类 +/// Toast 弹出窗服务类 +/// Toast 弹出窗服务类 /// /// public class ToastService(IOptionsMonitor options) : BootstrapServiceBase { /// - /// Show 方法 + /// Show 方法 + /// Show 方法 /// /// - /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件 + /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件指定弹窗component default is为 null 使用 component内置弹窗component public async Task Show(ToastOption option, ToastContainer? toastContainer = null) { if (!option.ForceDelay && options.CurrentValue.ToastDelay != 0) diff --git a/src/BootstrapBlazor/Components/Toggle/Toggle.razor.cs b/src/BootstrapBlazor/Components/Toggle/Toggle.razor.cs index c1ee0530a15..17f9bfa2b33 100644 --- a/src/BootstrapBlazor/Components/Toggle/Toggle.razor.cs +++ b/src/BootstrapBlazor/Components/Toggle/Toggle.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public partial class Toggle { @@ -26,7 +27,9 @@ public partial class Toggle .Build(); /// - /// 获得/设置 组件颜色 默认为 Success 颜色 + /// 获得/设置 组件颜色 默认为 Success 颜色 + /// Gets or sets componentcolor Default is为 Success color + /// 10.2.2 /// [Parameter] public Color Color { get; set; } = Color.Success; @@ -36,7 +39,8 @@ public partial class Toggle private IStringLocalizer? Localizer { get; set; } /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized 方法 /// protected override void OnInitialized() { @@ -47,7 +51,8 @@ protected override void OnInitialized() } /// - /// 点击控件时触发此方法 + /// 点击控件时触发此方法 + /// 点击控件时触发此方法 /// private async Task OnClick() { diff --git a/src/BootstrapBlazor/Components/Toggle/ToggleBase.cs b/src/BootstrapBlazor/Components/Toggle/ToggleBase.cs index 7626a10b405..83be89380e8 100644 --- a/src/BootstrapBlazor/Components/Toggle/ToggleBase.cs +++ b/src/BootstrapBlazor/Components/Toggle/ToggleBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,40 @@ namespace BootstrapBlazor.Components; /// -/// Toggle 开关组件 +/// Toggle 开关组件 +/// Toggle 开关component /// public class ToggleBase : ValidateBase { /// - /// 获得 Style 集合 + /// 获得 Style 集合 + /// Gets Style collection /// protected virtual string? StyleName => CssBuilder.Default() .AddClass($"width: {Width}px;", Width > 0) .Build(); /// - /// 获得/设置 组件宽度 + /// 获得/设置 组件宽度 + /// Gets or sets componentwidth + /// 10.2.2 /// [Parameter] public virtual int Width { get; set; } = 120; /// - /// 获得/设置 组件 On 时显示文本 + /// 获得/设置 组件 On 时显示文本 + /// Gets or sets component On 时display文本 + /// 10.2.2 /// [Parameter] [NotNull] public virtual string? OnText { get; set; } /// - /// 获得/设置 组件 Off 时显示文本 + /// 获得/设置 组件 Off 时显示文本 + /// Gets or sets component Off 时display文本 + /// 10.2.2 /// [Parameter] [NotNull] diff --git a/src/BootstrapBlazor/Components/Toolbar/Toolbar.razor.cs b/src/BootstrapBlazor/Components/Toolbar/Toolbar.razor.cs index a66162f8141..e877a71a30f 100644 --- a/src/BootstrapBlazor/Components/Toolbar/Toolbar.razor.cs +++ b/src/BootstrapBlazor/Components/Toolbar/Toolbar.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,23 @@ namespace BootstrapBlazor.Components; /// -/// Toolbar 组件用于显示工具栏内容 +/// Toolbar 组件用于显示工具栏内容 +/// Toolbar component用于display工具栏content /// public partial class Toolbar { /// - /// 获得/设置 是否允许换行显示工具栏内容 默认 false + /// 获得/设置 是否允许换行显示工具栏内容 默认 false + /// Gets or sets whether允许换行display工具栏content Default is false + /// 10.2.2 /// [Parameter] public bool IsWrap { get; set; } /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Toolbar/ToolbarButtonGroup.razor.cs b/src/BootstrapBlazor/Components/Toolbar/ToolbarButtonGroup.razor.cs index 7b21daaf2d5..5c36d8ae479 100644 --- a/src/BootstrapBlazor/Components/Toolbar/ToolbarButtonGroup.razor.cs +++ b/src/BootstrapBlazor/Components/Toolbar/ToolbarButtonGroup.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// ToolbarGroup 组件用于在工具栏中添加一组按钮 +/// ToolbarGroup 组件用于在工具栏中添加一组按钮 +/// ToolbarGroup component用于在工具栏中添加一组button /// public partial class ToolbarButtonGroup { /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Toolbar/ToolbarItem.razor.cs b/src/BootstrapBlazor/Components/Toolbar/ToolbarItem.razor.cs index 17cf54185db..7b7f1e828a6 100644 --- a/src/BootstrapBlazor/Components/Toolbar/ToolbarItem.razor.cs +++ b/src/BootstrapBlazor/Components/Toolbar/ToolbarItem.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// ToolbarItem 组件用于在工具栏中添加子组件 +/// ToolbarItem 组件用于在工具栏中添加子组件 +/// ToolbarItem component用于在工具栏中添加子component /// public partial class ToolbarItem { /// - /// 获得/设置 子组件模板 + /// 获得/设置 子组件模板 + /// Gets or sets 子componenttemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } diff --git a/src/BootstrapBlazor/Components/Toolbar/ToolbarSeparator.razor.cs b/src/BootstrapBlazor/Components/Toolbar/ToolbarSeparator.razor.cs index 3d9e8e09b47..9ec931c15b1 100644 --- a/src/BootstrapBlazor/Components/Toolbar/ToolbarSeparator.razor.cs +++ b/src/BootstrapBlazor/Components/Toolbar/ToolbarSeparator.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// ToolbarSeparator 组件用于在工具栏中添加分隔符 +/// ToolbarSeparator 组件用于在工具栏中添加分隔符 +/// ToolbarSeparator component用于在工具栏中添加分隔符 /// public partial class ToolbarSeparator { diff --git a/src/BootstrapBlazor/Components/Toolbar/ToolbarSpace.razor.cs b/src/BootstrapBlazor/Components/Toolbar/ToolbarSpace.razor.cs index 6491908bf15..abe0080c646 100644 --- a/src/BootstrapBlazor/Components/Toolbar/ToolbarSpace.razor.cs +++ b/src/BootstrapBlazor/Components/Toolbar/ToolbarSpace.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// ToolbarSpace 组件用于在工具栏中添加空白空间 +/// ToolbarSpace 组件用于在工具栏中添加空白空间 +/// ToolbarSpace component用于在工具栏中添加空白空间 /// public partial class ToolbarSpace { diff --git a/src/BootstrapBlazor/Components/Tooltip/ITooltip.cs b/src/BootstrapBlazor/Components/Tooltip/ITooltip.cs index 8ffda90c231..4eb0f6135b2 100644 --- a/src/BootstrapBlazor/Components/Tooltip/ITooltip.cs +++ b/src/BootstrapBlazor/Components/Tooltip/ITooltip.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,50 +6,59 @@ namespace BootstrapBlazor.Components; /// -/// ITooltip 接口 +/// ITooltip 接口 +/// ITooltip 接口 /// public interface ITooltip { /// - /// 获得/设置 位置 + /// 获得/设置 位置 + /// Gets or sets 位置 /// Placement Placement { get; set; } /// - /// 获得/设置 显示内容 + /// 获得/设置 显示内容 + /// Gets or sets displaycontent /// string? Title { get; set; } /// - /// 获得/设置 内容是否为 Html 默认 false + /// 获得/设置 内容是否为 Html 默认 false + /// Gets or sets contentwhether为 Html Default is false /// bool IsHtml { get; set; } /// - /// 获得/设置 触发方式 可组合 click focus hover manual 默认为 focus hover + /// 获得/设置 触发方式 可组合 click focus hover manual 默认为 focus hover + /// Gets or sets 触发方式 可组合 click focus hover manual Default is为 focus hover /// /// 设置 manual 时,请使用 组件实例方法 对弹窗状态进行控制 string? Trigger { get; set; } /// - /// 获得/设置 自定义样式 默认 null + /// 获得/设置 自定义样式 默认 null + /// Gets or sets 自定义style Default is null /// /// 由 data-bs-custom-class 实现 string? CustomClass { get; set; } /// - /// 获得/设置 显示隐藏延时 默认 null + /// 获得/设置 显示隐藏延时 默认 null + /// Gets or sets display隐藏延时 Default is null /// /// Delay showing and hiding the tooltip (ms)—doesn’t apply to manual trigger type. If a number is supplied, delay is applied to both hide/show. Object structure is: delay: { "show": 500, "hide": 100 }. string? Delay { get; set; } /// - /// 获得/设置 是否对 进行关键字过滤 默认 true + /// 获得/设置 是否对 进行关键字过滤 默认 true + /// Gets or sets whether对 进行关键字过滤 Default is true /// bool Sanitize { get; set; } /// - /// 获得/设置 元素选择器 + /// 获得/设置 元素选择器 + /// Gets or sets 元素选择器 /// string? Selector { get; set; } } diff --git a/src/BootstrapBlazor/Components/Tooltip/Tooltip.razor.cs b/src/BootstrapBlazor/Components/Tooltip/Tooltip.razor.cs index bcba585290e..d1f527cbfe5 100644 --- a/src/BootstrapBlazor/Components/Tooltip/Tooltip.razor.cs +++ b/src/BootstrapBlazor/Components/Tooltip/Tooltip.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// Tooltip 组件 +/// Tooltip 组件 +/// Tooltip component /// public partial class Tooltip : ITooltip { /// - /// 弹窗位置字符串 + /// 弹窗位置字符串 + /// 弹窗位置字符串 /// protected string? PlacementString => Placement == Placement.Auto ? null : Placement.ToDescriptionString(); /// - /// 获得 是否关键字过滤字符串 + /// 获得 是否关键字过滤字符串 + /// Gets whether关键字过滤字符串 /// protected string? SanitizeString => Sanitize ? null : "false"; /// - /// 获得 是否 Html 字符串 + /// 获得 是否 Html 字符串 + /// Gets whether Html 字符串 /// protected string? HtmlString => IsHtml ? "true" : null; @@ -30,78 +34,95 @@ public partial class Tooltip : ITooltip .Build(); /// - /// fallbackPlacements 参数 + /// fallbackPlacements 参数 + /// fallbackPlacements 参数 /// protected string? FallbackPlacementsString => FallbackPlacements != null ? string.Join(",", FallbackPlacements) : null; /// /// + /// 10.2.2 /// [Parameter] public string? Delay { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? Selector { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? Title { get; set; } /// - /// 获得/设置 获得显示内容异步回调方法 默认 null + /// 获得/设置 获得显示内容异步回调方法 默认 null + /// Gets or sets Getsdisplaycontent异步callback method Default is null + /// 10.2.2 /// [Parameter] public Func>? GetTitleCallback { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool IsHtml { get; set; } /// /// + /// 10.2.2 /// [Parameter] public bool Sanitize { get; set; } = true; /// /// + /// 10.2.2 /// [Parameter] public Placement Placement { get; set; } = Placement.Top; /// - /// 获得/设置 位置 默认为 null + /// 获得/设置 位置 默认为 null + /// Gets or sets 位置 Default is为 null + /// 10.2.2 /// [Parameter] public string[]? FallbackPlacements { get; set; } /// - /// 获得/设置 偏移量 默认为 null + /// 获得/设置 偏移量 默认为 null + /// Gets or sets 偏移量 Default is为 null + /// 10.2.2 /// [Parameter] public string? Offset { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? CustomClass { get; set; } /// /// + /// 10.2.2 /// [Parameter] public string? Trigger { get; set; } /// - /// 获得/设置 子组件 + /// 获得/设置 子组件 + /// Gets or sets 子component + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } @@ -131,7 +152,8 @@ protected override async Task OnParametersSetAsync() } /// - /// 设置参数方法 + /// 设置参数方法 + /// Sets参数方法 /// public void SetParameters(string title, Placement placement = Placement.Auto, string? trigger = null, string? customClass = null, bool? isHtml = null, bool? sanitize = null, string? delay = null, string? selector = null, string? offset = null) { @@ -149,23 +171,26 @@ public void SetParameters(string title, Placement placement = Placement.Auto, st } /// - /// 显示 Tooltip 弹窗方法 + /// 显示 Tooltip 弹窗方法 + /// display Tooltip 弹窗方法 /// - /// 延时指定毫秒后显示弹窗 默认 null 不延时 + /// 延时指定毫秒后显示弹窗 默认 null 不延时延时指定毫秒后display弹窗 default is null 不延时 /// public Task Show(int? delay = null) => InvokeVoidAsync("show", Id, delay); /// - /// 关闭 Tooltip 弹窗方法 + /// 关闭 Tooltip 弹窗方法 + /// 关闭 Tooltip 弹窗方法 /// - /// 延时指定毫秒后关闭弹窗 默认 null 不延时 + /// 延时指定毫秒后关闭弹窗 默认 null 不延时延时指定毫秒后关闭弹窗 default is null 不延时 /// public Task Hide(int? delay = null) => InvokeVoidAsync("hide", Id, delay); /// - /// 切换 Tooltip 弹窗当前状态方法 + /// 切换 Tooltip 弹窗当前状态方法 + /// 切换 Tooltip 弹窗当前状态方法 /// - /// 延时指定毫秒后切换弹窗方法 默认 null 不延时 + /// 延时指定毫秒后切换弹窗方法 默认 null 不延时延时指定毫秒后切换弹窗method default is null 不延时 /// public Task Toggle(int? delay = null) => InvokeVoidAsync("toggle", Id, delay); } diff --git a/src/BootstrapBlazor/Components/Tooltip/TooltipWrapperBase.cs b/src/BootstrapBlazor/Components/Tooltip/TooltipWrapperBase.cs index c556a5891a9..1ce65a564ac 100644 --- a/src/BootstrapBlazor/Components/Tooltip/TooltipWrapperBase.cs +++ b/src/BootstrapBlazor/Components/Tooltip/TooltipWrapperBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,40 +6,50 @@ namespace BootstrapBlazor.Components; /// -/// TooltipWrapperBase 基类 +/// TooltipWrapperBase 基类 +/// TooltipWrapperBase 基类 /// public abstract class TooltipWrapperBase : BootstrapModuleComponentBase { /// - /// Tooltip 弹窗位置字符串 + /// Tooltip 弹窗位置字符串 + /// Tooltip 弹窗位置字符串 /// protected virtual string? PlacementString => (!string.IsNullOrEmpty(TooltipText) && TooltipPlacement != Placement.Auto) ? TooltipPlacement.ToDescriptionString() : null; /// - /// Tooltip Trigger 字符串 + /// Tooltip Trigger 字符串 + /// Tooltip Trigger 字符串 /// protected virtual string? TriggerString => TooltipTrigger == "hover focus" ? null : TooltipTrigger; /// - /// the instance of Tooltip component + /// the 实例 of Tooltip component + /// the instance of Tooltip component /// [CascadingParameter] protected Tooltip? Tooltip { get; set; } /// - /// 获得/设置 TooltipText 显示文字 默认为 null + /// 获得/设置 TooltipText 显示文字 默认为 null + /// Gets or sets TooltipText display文字 Default is为 null + /// 10.2.2 /// [Parameter] public string? TooltipText { get; set; } /// - /// 获得/设置 Tooltip 显示位置 默认为 Top + /// 获得/设置 Tooltip 显示位置 默认为 Top + /// Gets or sets Tooltip display位置 Default is为 Top + /// 10.2.2 /// [Parameter] public Placement TooltipPlacement { get; set; } = Placement.Top; /// - /// 获得/设置 Tooltip 触发方式 默认为 hover focus + /// 获得/设置 Tooltip 触发方式 默认为 hover focus + /// Gets or sets Tooltip 触发方式 Default is为 hover focus + /// 10.2.2 /// [Parameter] [NotNull] diff --git a/src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs b/src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs index 2b5b3f4713d..fef14eea5db 100644 --- a/src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs +++ b/src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// 穿梭框组件 +/// 穿梭框组件 +/// 穿梭框component /// public partial class Transfer { @@ -17,14 +18,16 @@ public partial class Transfer private IStringLocalizer>? Localizer { get; set; } /// - /// 获得/设置 按钮文本样式 + /// 获得/设置 按钮文本样式 + /// Gets or sets button文本style /// private string? LeftButtonClassName => CssBuilder.Default() .AddClass("d-none", string.IsNullOrEmpty(LeftButtonText)) .Build(); /// - /// 获得/设置 按钮文本样式 + /// 获得/设置 按钮文本样式 + /// Gets or sets button文本style /// private string? RightButtonClassName => CssBuilder.Default("me-1") .AddClass("d-none", string.IsNullOrEmpty(RightButtonText)) @@ -35,17 +38,21 @@ public partial class Transfer .Build(); /// - /// 获得/设置 左侧数据集合 + /// 获得/设置 左侧数据集合 + /// Gets or sets 左侧datacollection /// private List LeftItems { get; } = []; /// - /// 获得/设置 右侧数据集合 + /// 获得/设置 右侧数据集合 + /// Gets or sets 右侧datacollection /// private List RightItems { get; } = []; /// - /// 获得/设置 组件绑定数据项集合 + /// 获得/设置 组件绑定数据项集合 + /// Gets or sets component绑定data项collection + /// 10.2.2 /// [Parameter] [NotNull] @@ -53,55 +60,73 @@ public partial class Transfer public IEnumerable? Items { get; set; } /// - /// 获得/设置 选中项集合发生改变时回调委托方法 + /// 获得/设置 选中项集合发生改变时回调委托方法 + /// Gets or sets 选中项collection发生改变时回调delegate方法 + /// 10.2.2 /// [Parameter] public Func, Task>? OnSelectedItemsChanged { get; set; } /// - /// 获得/设置 左侧面板 Header 显示文本 + /// 获得/设置 左侧面板 Header 显示文本 + /// Gets or sets 左侧面板 Header display文本 + /// 10.2.2 /// [Parameter] public string? LeftPanelText { get; set; } /// - /// 获得/设置 右侧面板 Header 显示文本 + /// 获得/设置 右侧面板 Header 显示文本 + /// Gets or sets 右侧面板 Header display文本 + /// 10.2.2 /// [Parameter] public string? RightPanelText { get; set; } /// - /// 获得/设置 向左侧转移图标 + /// 获得/设置 向左侧转移图标 + /// Gets or sets 向左侧转移icon + /// 10.2.2 /// [Parameter] public string? LeftIcon { get; set; } /// - /// 获得/设置 向右侧转移图标 + /// 获得/设置 向右侧转移图标 + /// Gets or sets 向右侧转移icon + /// 10.2.2 /// [Parameter] public string? RightIcon { get; set; } /// - /// 获得/设置 左侧按钮显示文本 + /// 获得/设置 左侧按钮显示文本 + /// Gets or sets 左侧buttondisplay文本 + /// 10.2.2 /// [Parameter] public string? LeftButtonText { get; set; } /// - /// 获得/设置 右侧按钮显示文本 + /// 获得/设置 右侧按钮显示文本 + /// Gets or sets 右侧buttondisplay文本 + /// 10.2.2 /// [Parameter] public string? RightButtonText { get; set; } /// - /// 获得/设置 是否显示搜索框 + /// 获得/设置 是否显示搜索框 + /// Gets or sets whetherdisplay搜索框 + /// 10.2.2 /// [Parameter] public bool ShowSearch { get; set; } /// - /// 获得/设置 左侧面板搜索框 placeholder 文字 + /// 获得/设置 左侧面板搜索框 placeholder 文字 + /// Gets or sets 左侧面板搜索框 placeholder 文字 + /// 10.2.2 /// [Parameter] [Obsolete("已过期,请使用 LeftPanelSearchPlaceHolderString 代替 Please use LeftPanelSearchPlaceHolderString")] @@ -109,13 +134,17 @@ public partial class Transfer public string? LeftPannelSearchPlaceHolderString { get => LeftPanelSearchPlaceHolderString; set => LeftPanelSearchPlaceHolderString = value; } /// - /// 获得/设置 左侧面板搜索框 placeholder 文字 + /// 获得/设置 左侧面板搜索框 placeholder 文字 + /// Gets or sets 左侧面板搜索框 placeholder 文字 + /// 10.2.2 /// [Parameter] public string? LeftPanelSearchPlaceHolderString { get; set; } /// - /// 获得/设置 右侧面板搜索框 placeholder 文字 + /// 获得/设置 右侧面板搜索框 placeholder 文字 + /// Gets or sets 右侧面板搜索框 placeholder 文字 + /// 10.2.2 /// [Parameter] [Obsolete("已过期,请使用 RightPanelSearchPlaceHolderString 代替 Please use RightPanelSearchPlaceHolderString")] @@ -123,88 +152,116 @@ public partial class Transfer public string? RightPannelSearchPlaceHolderString { get => RightPanelSearchPlaceHolderString; set => RightPanelSearchPlaceHolderString = value; } /// - /// 获得/设置 右侧面板搜索框 placeholder 文字 + /// 获得/设置 右侧面板搜索框 placeholder 文字 + /// Gets or sets 右侧面板搜索框 placeholder 文字 + /// 10.2.2 /// [Parameter] public string? RightPanelSearchPlaceHolderString { get; set; } /// - /// 获得/设置 右侧面板包含的最大数量, 默认为 0 不限制 + /// 获得/设置 右侧面板包含的最大数量, 默认为 0 不限制 + /// Gets or sets 右侧面板包含的最大数量, Default is为 0 不限制 + /// 10.2.2 /// [Parameter] public int Max { get; set; } /// - /// 获得/设置 设置最大值时错误消息文字 + /// 获得/设置 设置最大值时错误消息文字 + /// Gets or sets Sets最大值时错误消息文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? MaxErrorMessage { get; set; } /// - /// 获得/设置 右侧面板包含的最大数量,默认为 0 不限制 + /// 获得/设置 右侧面板包含的最大数量,默认为 0 不限制 + /// Gets or sets 右侧面板包含的最大数量,Default is为 0 不限制 + /// 10.2.2 /// [Parameter] public int Min { get; set; } /// - /// 获得/设置 设置最小值时错误消息文字 + /// 获得/设置 设置最小值时错误消息文字 + /// Gets or sets Sets最小值时错误消息文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? MinErrorMessage { get; set; } /// - /// 获得/设置 数据样式回调方法 默认为 null + /// 获得/设置 数据样式回调方法 默认为 null + /// Gets or sets datastylecallback method Default is为 null + /// 10.2.2 /// [Parameter] [NotNull] public Func? OnSetItemClass { get; set; } /// - /// 获得/设置 左侧 Panel Header 模板 + /// 获得/设置 左侧 Panel Header 模板 + /// Gets or sets 左侧 Panel Header template + /// 10.2.2 /// [Parameter] public RenderFragment>? LeftHeaderTemplate { get; set; } /// - /// 获得/设置 左侧 Panel Item 模板 + /// 获得/设置 左侧 Panel Item 模板 + /// Gets or sets 左侧 Panel Item template + /// 10.2.2 /// [Parameter] public RenderFragment? LeftItemTemplate { get; set; } /// - /// 获得/设置 右侧 Panel Header 模板 + /// 获得/设置 右侧 Panel Header 模板 + /// Gets or sets 右侧 Panel Header template + /// 10.2.2 /// [Parameter] public RenderFragment>? RightHeaderTemplate { get; set; } /// - /// 获得/设置 右侧 Panel Item 模板 + /// 获得/设置 右侧 Panel Item 模板 + /// Gets or sets 右侧 Panel Item template + /// 10.2.2 /// [Parameter] public RenderFragment? RightItemTemplate { get; set; } /// - /// 获得/设置 组件高度 默认值 null 未设置 + /// 获得/设置 组件高度 默认值 null 未设置 + /// Gets or sets componentheight Default is值 null 未Sets + /// 10.2.2 /// [Parameter] public string? Height { get; set; } /// - /// 获得/设置 候选项是否为换行模式 默认 false 不换行 + /// 获得/设置 候选项是否为换行模式 默认 false 不换行 + /// Gets or sets 候选项whether为换行模式 Default is false 不换行 + /// 10.2.2 /// [Parameter] public bool IsWrapItem { get; set; } = true; /// - /// 获得/设置 候选项宽度 默认 null 未设置 + /// 获得/设置 候选项宽度 默认 null 未设置 + /// Gets or sets 候选项width Default is null 未Sets + /// 10.2.2 /// [Parameter] public string? ItemWidth { get; set; } /// - /// 获得/设置 候选项文本是否为换行 默认 false 不换行 + /// 获得/设置 候选项文本是否为换行 默认 false 不换行 + /// Gets or sets 候选项文本whether为换行 Default is false 不换行 + /// 10.2.2 /// [Parameter] public bool IsWrapItemText { get; set; } @@ -227,7 +284,8 @@ public partial class Transfer .Build(); /// - /// OnInitialized 方法 + /// OnInitialized 方法 + /// OnInitialized 方法 /// protected override void OnInitialized() { @@ -238,7 +296,8 @@ protected override void OnInitialized() } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet 方法 /// protected override void OnParametersSet() { @@ -303,7 +362,8 @@ private void ResetRules() } /// - /// 选中数据移动方法 + /// 选中数据移动方法 + /// 选中data移动方法 /// private async Task TransferItems(List source, List target, bool isLeft) { @@ -344,7 +404,8 @@ private async Task TransferItems(List source, List t } /// - /// + /// + /// /// /// /// @@ -374,7 +435,8 @@ protected override bool TryParseValueFromString(string value, out TValue result, } /// - /// FormatValueAsString 方法 + /// FormatValueAsString 方法 + /// FormatValueAsString 方法 /// /// /// @@ -383,7 +445,8 @@ protected override bool TryParseValueFromString(string value, out TValue result, : Utility.ConvertValueToString(value); /// - /// 选项状态改变时回调此方法 + /// 选项状态改变时回调此方法 + /// 选项状态改变时回调此方法 /// private Task SelectedItemsChanged() { @@ -392,7 +455,8 @@ private Task SelectedItemsChanged() } /// - /// 获得按钮是否可用 + /// 获得按钮是否可用 + /// Getsbuttonwhether可用 /// /// private static bool GetButtonState(IEnumerable source) => !(source.Any(i => i.Active)); diff --git a/src/BootstrapBlazor/Components/Transfer/TransferPanel.razor.cs b/src/BootstrapBlazor/Components/Transfer/TransferPanel.razor.cs index 946ba4e5968..45b1057df04 100644 --- a/src/BootstrapBlazor/Components/Transfer/TransferPanel.razor.cs +++ b/src/BootstrapBlazor/Components/Transfer/TransferPanel.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,12 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// TransferPanelBase 穿梭框面板组件 +/// TransferPanelBase 穿梭框面板组件 +/// TransferPanelBase 穿梭框面板component /// public partial class TransferPanel { /// - /// 获得/设置 搜索关键字 + /// 获得/设置 搜索关键字 + /// Gets or sets 搜索关键字 /// protected string? SearchText { get; set; } @@ -23,7 +25,8 @@ public partial class TransferPanel .Build(); /// - /// 获得 搜索图标样式 + /// 获得 搜索图标样式 + /// Gets 搜索iconstyle /// private string? SearchClass => CssBuilder.Default("input-prefix") .AddClass("is-on", !string.IsNullOrEmpty(SearchText)) @@ -31,7 +34,8 @@ public partial class TransferPanel .Build(); /// - /// 获得 Panel 样式 + /// 获得 Panel 样式 + /// Gets Panel style /// private string? PanelListClassString => CssBuilder.Default("transfer-panel-list scroll") .AddClass("search", ShowSearch) @@ -43,12 +47,15 @@ public partial class TransferPanel .Build(); /// - /// 获得 组件是否被禁用属性值 + /// 获得 组件是否被禁用属性值 + /// Gets componentwhether被禁用property值 /// private string? Disabled => IsDisabled ? "disabled" : null; /// - /// 获得/设置 数据集合 + /// 获得/设置 数据集合 + /// Gets or sets datacollection + /// 10.2.2 /// [Parameter] [NotNull] @@ -58,57 +65,75 @@ public partial class TransferPanel public List? Items { get; set; } /// - /// 获得/设置 数据样式回调方法 默认为 null + /// 获得/设置 数据样式回调方法 默认为 null + /// Gets or sets datastylecallback method Default is为 null + /// 10.2.2 /// [Parameter] public Func? OnSetItemClass { get; set; } /// - /// 获得/设置 面板显示文字 + /// 获得/设置 面板显示文字 + /// Gets or sets 面板display文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? Text { get; set; } /// - /// 获得/设置 是否显示搜索框 + /// 获得/设置 是否显示搜索框 + /// Gets or sets whetherdisplay搜索框 + /// 10.2.2 /// [Parameter] public bool ShowSearch { get; set; } /// - /// 获得/设置 搜索框图标 + /// 获得/设置 搜索框图标 + /// Gets or sets 搜索框icon + /// 10.2.2 /// [Parameter] public string? SearchIcon { get; set; } /// - /// 获得/设置 选项状态变化时回调方法 + /// 获得/设置 选项状态变化时回调方法 + /// Gets or sets 选项状态变化时callback method + /// 10.2.2 /// [Parameter] public Func? OnSelectedItemsChanged { get; set; } /// - /// 获得/设置 搜索框的 placeholder 字符串 + /// 获得/设置 搜索框的 placeholder 字符串 + /// Gets or sets 搜索框的 placeholder 字符串 + /// 10.2.2 /// [Parameter] [NotNull] public string? SearchPlaceHolderString { get; set; } /// - /// 获得/设置 是否禁用 默认为 false + /// 获得/设置 是否禁用 默认为 false + /// Gets or sets whether禁用 Default is为 false + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// 获得/设置 Header 模板 + /// 获得/设置 Header 模板 + /// Gets or sets Header template + /// 10.2.2 /// [Parameter] public RenderFragment>? HeaderTemplate { get; set; } /// - /// 获得/设置 Item 模板 + /// 获得/设置 Item 模板 + /// Gets or sets Item template + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } @@ -122,7 +147,8 @@ public partial class TransferPanel private IIconTheme? IconTheme { get; set; } /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet 方法 /// protected override void OnParametersSet() { @@ -136,7 +162,8 @@ protected override void OnParametersSet() } /// - /// 头部复选框初始化值方法 + /// 头部复选框初始化值方法 + /// 头部复选框初始化值方法 /// protected CheckboxState HeaderCheckState() { @@ -154,7 +181,8 @@ protected CheckboxState HeaderCheckState() } /// - /// 左侧头部复选框初始化值方法 + /// 左侧头部复选框初始化值方法 + /// 左侧头部复选框初始化值方法 /// protected async Task OnHeaderCheck(CheckboxState state, SelectedItem item) { @@ -177,7 +205,8 @@ protected async Task OnHeaderCheck(CheckboxState state, SelectedItem item) } /// - /// + /// + /// /// /// protected async Task OnStateChanged(CheckboxState state, SelectedItem item) @@ -193,7 +222,8 @@ protected async Task OnStateChanged(CheckboxState state, SelectedItem item) } /// - /// 搜索框文本改变时回调此方法 + /// 搜索框文本改变时回调此方法 + /// 搜索框文本改变时回调此方法 /// /// protected virtual void OnSearch(ChangeEventArgs e) @@ -205,7 +235,8 @@ protected virtual void OnSearch(ChangeEventArgs e) } /// - /// 搜索文本框按键回调方法 + /// 搜索文本框按键回调方法 + /// 搜索文本框按键callback method /// /// protected void OnKeyUp(KeyboardEventArgs e) @@ -218,7 +249,8 @@ protected void OnKeyUp(KeyboardEventArgs e) } /// - /// 清空搜索条件方法 + /// 清空搜索条件方法 + /// 清空搜索条件方法 /// protected void ClearSearch() { diff --git a/src/BootstrapBlazor/Components/Transition/Transition.razor.cs b/src/BootstrapBlazor/Components/Transition/Transition.razor.cs index cac1ccde901..047febd00d0 100644 --- a/src/BootstrapBlazor/Components/Transition/Transition.razor.cs +++ b/src/BootstrapBlazor/Components/Transition/Transition.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Transition 动画组件 +/// Transition 动画组件 +/// Transition 动画component /// public partial class Transition { @@ -21,37 +22,48 @@ public partial class Transition .Build(); /// - /// 获得/设置 是否显示动画 默认 true + /// 获得/设置 是否显示动画 默认 true + /// Gets or sets whetherdisplay动画 Default is true + /// 10.2.2 /// [Parameter] public bool Show { get; set; } = true; /// - /// 获得/设置 动画名称 默认 FadeIn + /// 获得/设置 动画名称 默认 FadeIn + /// Gets or sets 动画名称 Default is FadeIn + /// 10.2.2 /// [Parameter] public TransitionType TransitionType { get; set; } = TransitionType.FadeIn; /// - /// 获得/设置 动画执行时长 单位毫秒 默认为 0 未生效 + /// 获得/设置 动画执行时长 单位毫秒 默认为 0 未生效 + /// Gets or sets 动画执行时长 单位毫秒 Default is为 0 未生效 + /// 10.2.2 /// [Parameter] public int Duration { get; set; } /// - /// 获得/设置 子内容 + /// 获得/设置 子内容 + /// Gets or sets 子content + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 动画执行完成回调委托 + /// 获得/设置 动画执行完成回调委托 + /// Gets or sets 动画执行完成回调delegate + /// 10.2.2 /// [Parameter] public Func? OnTransitionEnd { get; set; } /// - /// 动画执行完毕结束异步方法 JSInvoke 调用 + /// 动画执行完毕结束异步方法 JSInvoke 调用 + /// 动画执行完毕结束异步方法 JSInvoke 调用 /// [JSInvokable] public async Task TransitionEndAsync() diff --git a/src/BootstrapBlazor/Components/Tree/Tree.razor.cs b/src/BootstrapBlazor/Components/Tree/Tree.razor.cs index cd9dcd58101..9b91f9f58fb 100644 --- a/src/BootstrapBlazor/Components/Tree/Tree.razor.cs +++ b/src/BootstrapBlazor/Components/Tree/Tree.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Tree 组件 +/// Tree 组件 +/// Tree component /// [ExcludeFromCodeCoverage] [Obsolete("已弃用,请使用 TreeView 组件代替;Deprecated Please use TreeView component")] @@ -16,21 +17,24 @@ public partial class Tree private string? GroupName { get; set; } /// - /// 获得 按钮样式集合 + /// 获得 按钮样式集合 + /// Gets buttonstylecollection /// private string? ClassString => CssBuilder.Default("tree") .AddClassFromAttributes(AdditionalAttributes) .Build(); /// - /// 获得 Loading 样式集合 + /// 获得 Loading 样式集合 + /// Gets Loading stylecollection /// private string? LoadingClassString => CssBuilder.Default("table-loading") .AddClassFromAttributes(AdditionalAttributes) .Build(); /// - /// 获得/设置 TreeItem 图标 + /// 获得/设置 TreeItem 图标 + /// Gets or sets TreeItem icon /// /// /// @@ -39,7 +43,8 @@ public partial class Tree .Build(); /// - /// 获得/设置 TreeItem 小箭头样式 + /// 获得/设置 TreeItem 小箭头样式 + /// Gets or sets TreeItem 小箭头style /// /// /// @@ -50,7 +55,8 @@ public partial class Tree .Build(); /// - /// 获得/设置 当前行样式 + /// 获得/设置 当前行样式 + /// Gets or sets 当前行style /// /// /// @@ -59,7 +65,8 @@ public partial class Tree .Build(); /// - /// 获得/设置 TreeNode 样式 + /// 获得/设置 TreeNode 样式 + /// Gets or sets TreeNode style /// /// /// @@ -68,80 +75,106 @@ public partial class Tree .Build(); /// - /// 获得/设置 选中节点 默认 null + /// 获得/设置 选中节点 默认 null + /// Gets or sets 选中节点 Default is null + /// 10.2.2 /// [Parameter] public TreeItem? ActiveItem { get; set; } /// - /// 获得/设置 是否为手风琴效果 默认为 false + /// 获得/设置 是否为手风琴效果 默认为 false + /// Gets or sets whether为手风琴效果 Default is为 false + /// 10.2.2 /// [Parameter] public bool IsAccordion { get; set; } /// - /// 获得/设置 是否点击节点时展开或者收缩子项 默认 false + /// 获得/设置 是否点击节点时展开或者收缩子项 默认 false + /// Gets or sets whether点击节点时展开或者收缩子项 Default is false + /// 10.2.2 /// [Parameter] public bool ClickToggleNode { get; set; } /// - /// 获得/设置 是否显示加载骨架屏 默认 false 不显示 + /// 获得/设置 是否显示加载骨架屏 默认 false 不显示 + /// Gets or sets whetherdisplay加载骨架屏 Default is false 不display + /// 10.2.2 /// [Parameter] public bool ShowSkeleton { get; set; } /// - /// 获得/设置 Tree Node 节点图标 + /// 获得/设置 Tree Node 节点图标 + /// Gets or sets Tree Node 节点icon + /// 10.2.2 /// [Parameter] public string? NodeIcon { get; set; } /// - /// 获得/设置 Tree Node 展开节点图标 + /// 获得/设置 Tree Node 展开节点图标 + /// Gets or sets Tree Node 展开节点icon + /// 10.2.2 /// [Parameter] public string? ExpandNodeIcon { get; set; } /// - /// 获得/设置 菜单数据集合 + /// 获得/设置 菜单数据集合 + /// Gets or sets 菜单datacollection + /// 10.2.2 /// [Parameter] [NotNull] public List? Items { get; set; } /// - /// 获得/设置 是否显示 CheckBox 默认 false 不显示 + /// 获得/设置 是否显示 CheckBox 默认 false 不显示 + /// Gets or sets whetherdisplay CheckBox Default is false 不display + /// 10.2.2 /// [Parameter] public bool ShowCheckbox { get; set; } /// - /// 获得/设置 是否显示 Radio 默认 false 不显示 + /// 获得/设置 是否显示 Radio 默认 false 不显示 + /// Gets or sets whetherdisplay Radio Default is false 不display + /// 10.2.2 /// [Parameter] public bool ShowRadio { get; set; } /// - /// 获得/设置 是否显示 Icon 图标 默认 false 不显示 + /// 获得/设置 是否显示 Icon 图标 默认 false 不显示 + /// Gets or sets whetherdisplay Icon icon Default is false 不display + /// 10.2.2 /// [Parameter] public bool ShowIcon { get; set; } /// - /// 获得/设置 树形控件节点点击时回调委托 + /// 获得/设置 树形控件节点点击时回调委托 + /// Gets or sets 树形控件节点点击时回调delegate + /// 10.2.2 /// [Parameter] public Func? OnTreeItemClick { get; set; } /// - /// 获得/设置 树形控件节点选中时回调委托 + /// 获得/设置 树形控件节点选中时回调委托 + /// Gets or sets 树形控件节点选中时回调delegate + /// 10.2.2 /// [Parameter] public Func, Task>? OnTreeItemChecked { get; set; } /// - /// 获得/设置 节点展开前回调委托 + /// 获得/设置 节点展开前回调委托 + /// Gets or sets 节点展开前回调delegate + /// 10.2.2 /// [Parameter] public Func? OnExpandNode { get; set; } @@ -172,7 +205,8 @@ protected override void OnParametersSet() } /// - /// 选中节点时触发此方法 + /// 选中节点时触发此方法 + /// 选中节点时触发此方法 /// /// private async Task OnClick(TreeItem item) @@ -204,7 +238,8 @@ private async Task OnClick(TreeItem item) } /// - /// 更改节点是否展开方法 + /// 更改节点是否展开方法 + /// 更改节点whether展开方法 /// /// private async Task OnExpandRowAsync(TreeItem item) @@ -224,7 +259,8 @@ private async Task OnExpandRowAsync(TreeItem item) } /// - /// 节点 Checkbox 状态改变时触发此方法 + /// 节点 Checkbox 状态改变时触发此方法 + /// 节点 Checkbox 状态改变时触发此方法 /// /// /// @@ -241,7 +277,8 @@ private async Task OnStateChanged(CheckboxState state, TreeItem item) } /// - /// 获得 所有选中节点集合 + /// 获得 所有选中节点集合 + /// Gets 所有选中节点collection /// /// public IEnumerable GetCheckedItems() => Items.Aggregate(new List(), (t, item) => diff --git a/src/BootstrapBlazor/Components/Tree/TreeItem.cs b/src/BootstrapBlazor/Components/Tree/TreeItem.cs index 16fabccd05d..b58ac70b678 100644 --- a/src/BootstrapBlazor/Components/Tree/TreeItem.cs +++ b/src/BootstrapBlazor/Components/Tree/TreeItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,58 +6,67 @@ namespace BootstrapBlazor.Components; /// -/// TreeItem 组件 +/// TreeItem 组件 +/// TreeItem component /// [ExcludeFromCodeCoverage] public class TreeItem : NodeItem { /// - /// 获得/设置 是否显示正在加载动画 默认为 false + /// 获得/设置 是否显示正在加载动画 默认为 false + /// Gets or sets whether display loading backdrop Default is false /// public bool ShowLoading { get; set; } /// - /// 获得/设置 子节点数据源 + /// 获得/设置 子节点数据源 + /// Gets or sets 子节点data源 /// public List Items { get; set; } = []; /// - /// 获得/设置 TreeItem 标识 + /// 获得/设置 TreeItem 标识 + /// Gets or sets TreeItem 标识 /// public object? Key { get; set; } /// - /// 获得/设置 TreeItem 相关额外信息 + /// 获得/设置 TreeItem 相关额外信息 + /// Gets or sets TreeItem 相关额外信息 /// public object? Tag { get; set; } /// - /// 获得/设置 是否被选中 + /// 获得/设置 是否被选中 + /// Gets or sets whether被选中 /// public bool Checked { get; set; } /// - /// 获取/设置 是否有子节点 默认 false + /// 获取/设置 是否有子节点 默认 false + /// 获取/Sets whether有子节点 Default is false /// public bool HasChildNode { get; set; } /// - /// 获得 所有子项集合 + /// 获得 所有子项集合 + /// Gets 所有子项collection /// /// public IEnumerable GetAllSubItems() => Items.Concat(GetSubItems(Items)); - private static IEnumerable GetSubItems(List items) => items.SelectMany(i => i.Items.Any() ? i.Items.Concat(GetSubItems(i.Items)) : i.Items); + private static IEnumerable GetSubItems(List items) => items.SelectMany(i => i.Items.Count > 0 ? i.Items.Concat(GetSubItems(i.Items)) : i.Items); /// - /// 级联设置复选状态 + /// 级联设置复选状态 + /// 级联Sets复选状态 /// public void CascadeSetCheck(bool isChecked) { foreach (var item in Items) { item.Checked = isChecked; - if (item.Items.Any()) + if (item.Items.Count > 0) { item.CascadeSetCheck(isChecked); } @@ -65,7 +74,8 @@ public void CascadeSetCheck(bool isChecked) } ///// - ///// 级联设置展开状态方法 + ///// 级联设置展开状态方法 + ///// 级联Sets展开状态方法 ///// //public void CollapseOtherNodes() //{ diff --git a/src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs b/src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs index 063b20b7ba5..4c24e0ab682 100644 --- a/src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs +++ b/src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// Tree component +/// Tree component +/// Tree component /// [CascadingTypeParameter(nameof(TItem))] public partial class TreeView : IModelEqualityComparer @@ -24,264 +25,351 @@ public partial class TreeView : IModelEqualityComparer private TreeViewItem? _activeItem; /// - /// Gets or sets whether to show the loading animation. Default is false. + /// 获得/设置 是否 to show the loading animation. 默认为 false. + /// Gets or sets whether to show the loading animation. Default is false. /// [Obsolete("Deprecated. Please remove it.")] [ExcludeFromCodeCoverage] public bool IsReset { get; set; } /// - /// Gets or sets whether show the toolbar of tree view item. Default is false. + /// 获得/设置 是否 show the toolbar of tree view item. 默认为 false. + /// Gets or sets whether show the toolbar of tree view item. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowToolbar { get; set; } /// - /// Gets or sts A callback method that determines whether to show the toolbar of the tree view item. + /// 获得 or sts A 回调方法 that determines 是否 to show the toolbar of the tree view item. + /// Gets or sts A callback method that determines whether to show the toolbar of the tree view item. + /// 10.2.2 /// [Parameter] public Func, Task>? ShowToolbarCallback { get; set; } /// - /// Gets or sets whether the entire component is disabled. Default is false. + /// 获得/设置 是否 the entire component is disabled. 默认为 false. + /// Gets or sets whether the entire component is disabled. Default is false. + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. + /// 获得/设置 是否 nodes can be expanded or collapsed when the component is disabled. 默认为 false. + /// Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. + /// 10.2.2 /// [Parameter] public bool CanExpandWhenDisabled { get; set; } /// - /// Gets or sets whether the tree view has accordion behavior. Default is false. Accordion behavior is not supported in virtual scrolling mode. + /// 获得/设置 是否 the tree view has accordion behavior. 默认为 false. Accordion behavior is not supported in virtual scrolling mode. + /// Gets or sets whether the tree view has accordion behavior. Default is false. Accordion behavior is not supported in virtual scrolling mode. + /// 10.2.2 /// [Parameter] public bool IsAccordion { get; set; } /// - /// Gets or sets whether clicking a node expands or collapses its children. Default is false. + /// 获得/设置 是否 clicking a node expands or collapses its children. 默认为 false. + /// Gets or sets whether clicking a node expands or collapses its children. Default is false. + /// 10.2.2 /// [Parameter] public bool ClickToggleNode { get; set; } /// - /// Gets or sets whether clicking a node toggles its checkbox state. Default is false. Effective when is true. + /// 获得/设置 是否 clicking a node toggles its checkbox state. 默认为 false. Effective when is true. + /// Gets or sets whether clicking a node toggles its checkbox state. Default is false. Effective when is true. + /// 10.2.2 /// [Parameter] public bool ClickToggleCheck { get; set; } /// - /// Gets or sets whether to show the loading skeleton. Default is false. + /// 获得/设置 是否 to show the loading skeleton. 默认为 false. + /// Gets or sets whether to show the loading skeleton. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowSkeleton { get; set; } /// - /// Gets or sets whether to show the search bar. Default is false. + /// 获得/设置 是否 to show the search bar. 默认为 false. + /// Gets or sets whether to show the search bar. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowSearch { get; set; } /// - /// Gets or sets whether to show the reset search button. Default is true. + /// 获得/设置 是否 to show the reset search 按钮. 默认为 true. + /// Gets or sets whether to show the reset search button. Default is true. + /// 10.2.2 /// [Parameter] public bool ShowResetSearchButton { get; set; } = true; /// - /// Gets or sets the search bar template. Default is null. + /// 获得/设置 the search bar 模板. 默认为 null. + /// Gets or sets the search bar template. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? SearchTemplate { get; set; } /// - /// Gets or sets the search icon. Default is not set, using the built-in theme icon. + /// 获得/设置 the search 图标. 默认为 not set, using the built-in theme 图标. + /// Gets or sets the search icon. Default is not set, using the built-in theme icon. + /// 10.2.2 /// [Parameter] public string? SearchIcon { get; set; } /// - /// Gets or sets the clear search icon. Default is not set, using the built-in theme icon. + /// 获得/设置 the clear search 图标. 默认为 not set, using the built-in theme 图标. + /// Gets or sets the clear search icon. Default is not set, using the built-in theme icon. + /// 10.2.2 /// [Parameter] public string? ClearSearchIcon { get; set; } /// - /// Gets or sets the search callback method. Default is null. + /// 获得/设置 the search 回调方法. 默认为 null. + /// Gets or sets the search callback method. Default is null. + /// 10.2.2 /// /// Enabled by setting to true. [Parameter] public Func>?>>? OnSearchAsync { get; set; } /// - /// Gets or sets the hierarchical data collection. + /// 获得/设置 the hierarchical 数据 集合. + /// Gets or sets the hierarchical data collection. + /// 10.2.2 /// [Parameter] [NotNull] public List>? Items { get; set; } /// - /// Gets or sets whether to show checkboxes. Default is false. + /// 获得/设置 是否 to show checkboxes. 默认为 false. + /// Gets or sets whether to show checkboxes. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowCheckbox { get; set; } /// - /// Gets or sets the maximum number of selected items. + /// 获得/设置 the maximum number of selected items. + /// Gets or sets the maximum number of selected items. + /// 10.2.2 /// [Parameter] public int MaxSelectedCount { get; set; } /// - /// Gets or sets the callback method when the maximum number of selected items is exceeded. + /// 获得/设置 the 回调方法 when the maximum number of selected items is exceeded. + /// Gets or sets the callback method when the maximum number of selected items is exceeded. + /// 10.2.2 /// [Parameter] public Func? OnMaxSelectedCountExceed { get; set; } /// - /// Gets or sets whether to show icons. Default is false. + /// 获得/设置 是否 to show 图标s. 默认为 false. + /// Gets or sets whether to show icons. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowIcon { get; set; } /// - /// Gets or sets the callback method when a tree item is clicked. + /// 获得/设置 the 回调方法 when a tree item is clicked. + /// Gets or sets the callback method when a tree item is clicked. + /// 10.2.2 /// [Parameter] public Func, Task>? OnTreeItemClick { get; set; } /// - /// 获得/设置 点击节点前回调方法 + /// 获得/设置 点击节点前回调方法 + /// Gets or sets 点击节点前callback method + /// 10.2.2 /// [Parameter] public Func, Task>? OnBeforeTreeItemClick { get; set; } /// - /// Gets or sets the callback method when a tree item is checked. + /// 获得/设置 the 回调方法 when a tree item is checked. + /// Gets or sets the callback method when a tree item is checked. + /// 10.2.2 /// [Parameter] public Func>, Task>? OnTreeItemChecked { get; set; } /// - /// Gets or sets the callback method to get child data when a node is expanded. + /// 获得/设置 the 回调方法 to get child 数据 when a node is expanded. + /// Gets or sets the callback method to get child data when a node is expanded. + /// 10.2.2 /// [Parameter] public Func, Task>>>? OnExpandNodeAsync { get; set; } /// /// + /// 10.2.2 /// [Parameter] public Type CustomKeyAttribute { get; set; } = typeof(KeyAttribute); /// /// + /// 10.2.2 /// [Parameter] public Func? ModelEqualityComparer { get; set; } /// - /// Gets or sets the loading icon for tree nodes. + /// 获得/设置 the loading 图标 for tree nodes. + /// Gets or sets the loading icon for tree nodes. + /// 10.2.2 /// [Parameter] public string? LoadingIcon { get; set; } /// - /// Gets or sets the icon for tree nodes. + /// 获得/设置 the 图标 for tree nodes. + /// Gets or sets the icon for tree nodes. + /// 10.2.2 /// [Parameter] public string? NodeIcon { get; set; } /// - /// Gets or sets the icon for expanded tree nodes. + /// 获得/设置 the 图标 for expanded tree nodes. + /// Gets or sets the icon for expanded tree nodes. + /// 10.2.2 /// [Parameter] public string? ExpandNodeIcon { get; set; } /// - /// Gets or sets whether to enable keyboard navigation. Default is false. - /// ArrowLeft collapses the node. + /// 获得/设置 是否 to enable keyboard navigation. 默认为 false. ArrowLeft collapses the node. /// ArrowRight expands the node. /// ArrowUp moves to the previous node. /// ArrowDown moves to the next node. /// Space selects the current node. + /// + /// Gets or sets whether to enable keyboard navigation. Default is false. ArrowLeft collapses the node. + /// ArrowRight expands the node. + /// ArrowUp moves to the previous node. + /// ArrowDown moves to the next node. + /// Space selects the current node. + /// + /// 10.2.2 /// [Parameter] public bool EnableKeyboard { get; set; } /// - /// Gets or sets the scroll into view options for keyboard navigation. Default is null, using { behavior: "smooth", block: "nearest", inline: "start" }. + /// 获得/设置 the scroll into view options for keyboard navigation. 默认为 null, using { behavior: "smooth", block: "nearest", inline: "start" }. + /// Gets or sets the scroll into view options for keyboard navigation. Default is null, using { behavior: "smooth", block: "nearest", inline: "start" }. + /// 10.2.2 /// [Parameter] public ScrollIntoViewOptions? ScrollIntoViewOptions { get; set; } /// - /// Gets or sets whether to enable virtual scrolling. Default is false. + /// 获得/设置 是否 to enable virtual scrolling. 默认为 false. + /// Gets or sets whether to enable virtual scrolling. Default is false. + /// 10.2.2 /// [Parameter] public bool IsVirtualize { get; set; } /// - /// Gets or sets the row height for virtual scrolling. Default is 29f. + /// 获得/设置 the row 高度 for virtual scrolling. 默认为 29f. + /// Gets or sets the row height for virtual scrolling. Default is 29f. + /// 10.2.2 /// /// Effective when is set to true. [Parameter] public float RowHeight { get; set; } = 29f; /// - /// Gets or sets the overscan count for virtual scrolling. Default is 10. + /// 获得/设置 the overscan count for virtual scrolling. 默认为 10. + /// Gets or sets the overscan count for virtual scrolling. Default is 10. + /// 10.2.2 /// /// Effective when is set to true. [Parameter] public int OverscanCount { get; set; } = 10; /// - /// Gets or sets the toolbar content template. Default is null. + /// 获得/设置 the toolbar 内容 模板. 默认为 null. + /// Gets or sets the toolbar content template. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? ToolbarTemplate { get; set; } /// - /// Gets or sets the title of the popup-window. Default is null. + /// 获得/设置 the title of the popup-window. 默认为 null. + /// Gets or sets the title of the popup-window. Default is null. + /// 10.2.2 /// [Parameter] public string? ToolbarEditTitle { get; set; } /// - /// Gets or sets the title of the popup-window. Default is null. + /// 获得/设置 the title of the popup-window. 默认为 null. + /// Gets or sets the title of the popup-window. Default is null. + /// 10.2.2 /// [Parameter] public string? ToolbarEditLabelText { get; set; } /// - /// Gets or sets the update the tree text value callback. Default is null. - /// If return true will update the tree text value, otherwise will not update. + /// 获得/设置 the update the tree text value 回调. 默认为 null. If return true will update the tree text value, otherwise will not update. + /// + /// Gets or sets the update the tree text value callback. Default is null. If return true will update the tree text value, otherwise will not update. + /// + /// 10.2.2 /// [Parameter] public Func>? OnUpdateCallbackAsync { get; set; } /// - /// Gets or sets whether to automatically update child nodes when the node state changes. Default is false. + /// 获得/设置 是否 to automatically update child nodes when the node state changes. 默认为 false. + /// Gets or sets whether to automatically update child nodes when the node state changes. Default is false. + /// 10.2.2 /// [Parameter] public bool AutoCheckChildren { get; set; } /// - /// Gets or sets whether to automatically update parent nodes when the node state changes. Default is false. + /// 获得/设置 是否 to automatically update parent nodes when the node state changes. 默认为 false. + /// Gets or sets whether to automatically update parent nodes when the node state changes. Default is false. + /// 10.2.2 /// [Parameter] public bool AutoCheckParent { get; set; } /// - /// Gets or sets a value indicating whether drag-and-drop operations are allowed. Default is false + /// 获得/设置 a value indicating 是否 drag-and-drop operations are allowed. 默认为 false + /// Gets or sets a value indicating whether drag-and-drop operations are allowed. Default is false + /// 10.2.2 /// [Parameter] public bool AllowDrag { get; set; } /// - /// 获得/设置 拖动标签页结束回调方法 + /// 获得/设置 拖动标签页结束回调方法 + /// Gets or sets 拖动标签页结束callback method + /// 10.2.2 /// [Parameter] public Func, Task>? OnDragItemEndAsync { get; set; } @@ -412,7 +500,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) private bool _keyboardArrowUpDownTrigger; /// - /// Client-side user keyboard operation handler method called by JavaScript + /// Client-side user keyboard operation handler method called by JavaScript + /// Client-side user keyboard operation handler method called by JavaScript /// /// /// @@ -436,7 +525,8 @@ public async ValueTask TriggerKeyDown(string key) } /// - /// Triggers the end of a drag-and-drop operation within the tree view. + /// Triggers the end of a drag-and-drop operation within the tree view. + /// Triggers the end of a drag-and-drop operation within the tree view. /// /// This method is invoked via JavaScript interop to signal the completion of a drag-and-drop /// action. If a handler is assigned to , it will be invoked with the drag @@ -460,7 +550,8 @@ public async ValueTask TriggerDragEnd(int originIndex, int currentIndex, bool is } /// - /// Client-side method to query the state of the specified row checkbox, called by JavaScript + /// Client-side method to query the state of the specified row checkbox, called by JavaScript + /// Client-side method to query the state of the specified row checkbox, called by JavaScript /// /// /// @@ -655,7 +746,8 @@ private Task OnClickResetSearch() } /// - /// Set the active node + /// Set the active node + /// Set the active node /// public void SetActiveItem(TreeViewItem? item) { @@ -665,7 +757,8 @@ public void SetActiveItem(TreeViewItem? item) } /// - /// Set the data source method for + /// Set the 数据 source method for + /// Set the data source method for /// public void SetItems(List> items) { @@ -675,7 +768,8 @@ public void SetItems(List> items) } /// - /// Set the active node + /// Set the active node + /// Set the active node /// public void SetActiveItem(TItem item) { @@ -690,7 +784,8 @@ public void SetActiveItem(TItem item) }; /// - /// Toggle node expand collapse state method + /// Toggle node expand collapse state method + /// Toggle node expand collapse state method /// /// private async Task OnToggleNodeAsync(TreeViewItem node) @@ -770,7 +865,8 @@ private async Task OnCheckStateChanged(TreeViewItem item, CheckboxState s } /// - /// Clear all selected nodes + /// Clear all selected nodes + /// Clear all selected nodes /// public void ClearCheckedItems() { @@ -788,7 +884,8 @@ public void ClearCheckedItems() } /// - /// Gets all selected node collections + /// 获得 all selected node 集合s + /// Gets all selected node collections /// /// public IEnumerable> GetCheckedItems() => Items.Aggregate(new List>(), (t, item) => @@ -799,7 +896,8 @@ public IEnumerable> GetCheckedItems() => Items.Aggregate(new }).Where(i => i.CheckedState == CheckboxState.Checked); /// - /// Check if the data is the same + /// Check if the 数据 is the same + /// Check if the data is the same /// /// /// diff --git a/src/BootstrapBlazor/Components/TreeView/TreeViewDragContext.cs b/src/BootstrapBlazor/Components/TreeView/TreeViewDragContext.cs index 8d04151ab91..d34cf6529e5 100644 --- a/src/BootstrapBlazor/Components/TreeView/TreeViewDragContext.cs +++ b/src/BootstrapBlazor/Components/TreeView/TreeViewDragContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 组件拖动上下文类 +/// 组件拖动上下文类 +/// component拖动上下文类 /// public class TreeViewDragContext(TreeViewItem source, TreeViewItem target, bool children = false) { /// - /// 获得 源节点 + /// 获得 源节点 + /// Gets 源节点 /// public TreeViewItem Source => source; /// - /// 获得 目标节点 + /// 获得 目标节点 + /// Gets 目标节点 /// public TreeViewItem Target => target; /// - /// 获得 是否未目标节点的子节点 + /// 获得 是否未目标节点的子节点 + /// Gets whether未目标节点的子节点 /// public bool IsChildren => children; } diff --git a/src/BootstrapBlazor/Components/TreeView/TreeViewItem.cs b/src/BootstrapBlazor/Components/TreeView/TreeViewItem.cs index e1599b73c8e..1a66a2ea92b 100644 --- a/src/BootstrapBlazor/Components/TreeView/TreeViewItem.cs +++ b/src/BootstrapBlazor/Components/TreeView/TreeViewItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,39 +6,46 @@ namespace BootstrapBlazor.Components; /// -/// TreeItem 组件 +/// TreeItem 组件 +/// TreeItem component /// public class TreeViewItem : TreeNodeBase, ICheckableNode { /// - /// 获得/设置 是否显示正在加载动画 默认为 false + /// 获得/设置 是否显示正在加载动画 默认为 false + /// Gets or sets whether display loading backdrop Default is为 false /// [Obsolete("已弃用;Deprecated")] [ExcludeFromCodeCoverage] public bool ShowLoading { get; set; } /// - /// 获得/设置 是否被选中 + /// 获得/设置 是否被选中 + /// Gets or sets checked state /// public CheckboxState CheckedState { get; set; } /// - /// 获得/设置 子节点数据源 + /// 获得/设置 子节点数据源 + /// Gets or sets 子节点data源 /// public List> Items { get; set; } = []; /// - /// 获得/设置 子节点集合 + /// 获得/设置 子节点集合 + /// Gets or sets 子节点collection /// IEnumerable> IExpandableNode.Items { get => Items; set => Items = [.. value.OfType>()]; } /// - /// 获得/设置 父级节点 + /// 获得/设置 父级节点 + /// Gets or sets 父级节点 /// public TreeViewItem? Parent { get; set; } /// - /// 获得/设置 父级节点 + /// 获得/设置 父级节点 + /// Gets or sets 父级节点 /// IExpandableNode? IExpandableNode.Parent { @@ -54,25 +61,11 @@ public class TreeViewItem : TreeNodeBase, ICheckableNode } /// - /// 构造函数 + /// 构造函数 + /// 构造函数 /// public TreeViewItem([DisallowNull] TItem item) { Value = item; } - - ///// - ///// 级联设置展开状态方法 - ///// - //public void CollapseOtherNodes() - //{ - // if (!string.IsNullOrEmpty(ParentId)) - // { - // var parent = Items.FirstOrDefault(i => i.Id) - // foreach (var node in Parent.Items.Where(p => p.IsExpanded && p != this)) - // { - // node.IsExpanded = false; - // } - // } - //} } diff --git a/src/BootstrapBlazor/Components/TreeView/TreeViewRow.razor.cs b/src/BootstrapBlazor/Components/TreeView/TreeViewRow.razor.cs index d3f59b5c3ab..60e423bd731 100644 --- a/src/BootstrapBlazor/Components/TreeView/TreeViewRow.razor.cs +++ b/src/BootstrapBlazor/Components/TreeView/TreeViewRow.razor.cs @@ -8,133 +8,176 @@ namespace BootstrapBlazor.Components; /// -/// TreeViewRow component +/// TreeViewRow component +/// TreeViewRow component /// public partial class TreeViewRow { /// - /// Gets or sets whether the node is active. Default is false. + /// 获得/设置 是否 the node is active. 默认为 false. + /// Gets or sets whether the node is active. Default is false. + /// 10.2.2 /// [Parameter] public bool IsActive { get; set; } /// - /// Gets or sets the node index. Default is 0. + /// 获得/设置 the node 索引. 默认为 0. + /// Gets or sets the node index. Default is 0. + /// 10.2.2 /// [Parameter] public int Index { get; set; } /// - /// Gets or sets the tree node item. Default is null. + /// 获得/设置 the tree node item. 默认为 null. + /// Gets or sets the tree node item. Default is null. /// [Parameter, NotNull] public TreeViewItem? Item { get; set; } /// - /// Gets or sets the loading icon for tree nodes. + /// 获得/设置 the loading 图标 for tree nodes. + /// Gets or sets the loading icon for tree nodes. + /// 10.2.2 /// [Parameter] public string? LoadingIcon { get; set; } /// - /// Gets or sets the icon for tree nodes. + /// 获得/设置 the 图标 for tree nodes. + /// Gets or sets the icon for tree nodes. + /// 10.2.2 /// [Parameter] public string? NodeIcon { get; set; } /// - /// Gets or sets the icon for expanded tree nodes. + /// 获得/设置 the 图标 for expanded tree nodes. + /// Gets or sets the icon for expanded tree nodes. + /// 10.2.2 /// [Parameter] public string? ExpandNodeIcon { get; set; } /// - /// Gets or sets whether the entire component is disabled. Default is false. + /// 获得/设置 是否 the entire component is disabled. 默认为 false. + /// Gets or sets whether the entire component is disabled. Default is false. + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// Gets or sets whether to show checkboxes. Default is false. + /// 获得/设置 是否 to show checkboxes. 默认为 false. + /// Gets or sets whether to show checkboxes. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowCheckbox { get; set; } /// - /// Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. + /// 获得/设置 是否 nodes can be expanded or collapsed when the component is disabled. 默认为 false. + /// Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. + /// 10.2.2 /// [Parameter] public bool CanExpandWhenDisabled { get; set; } /// - /// Get or sets the node click event callback. + /// Get or sets the node click event 回调. + /// Get or sets the node click event callback. + /// 10.2.2 /// [Parameter] public Func, Task>? OnToggleNodeAsync { get; set; } /// - /// Get or sets the node checkbox state change event callback. + /// Get or sets the node checkbox state change event 回调. + /// Get or sets the node checkbox state change event callback. + /// 10.2.2 /// [Parameter] public Func, CheckboxState, Task>? OnCheckStateChanged { get; set; } /// - /// Gets or sets the maximum number of selected items. + /// 获得/设置 the maximum number of selected items. + /// Gets or sets the maximum number of selected items. + /// 10.2.2 /// [Parameter] public int MaxSelectedCount { get; set; } /// - /// Gets or sets the callback that is invoked before the node state changes. + /// 获得/设置 the 回调 that is invoked before the node state changes. + /// Gets or sets the callback that is invoked before the node state changes. + /// 10.2.2 /// [Parameter] public Func, CheckboxState, Task>? OnBeforeStateChangedCallback { get; set; } /// - /// Gets or sets whether to show icons. Default is false. + /// 获得/设置 是否 to show 图标s. 默认为 false. + /// Gets or sets whether to show icons. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowIcon { get; set; } /// - /// Gets or sets the click event callback. Default is null. + /// 获得/设置 the click event 回调. 默认为 null. + /// Gets or sets the click event callback. Default is null. + /// 10.2.2 /// [Parameter] public Func, Task>? OnClick { get; set; } /// - /// Gets or sets whether show the toolbar of tree view item. Default is false. + /// 获得/设置 是否 show the toolbar of tree view item. 默认为 false. + /// Gets or sets whether show the toolbar of tree view item. Default is false. + /// 10.2.2 /// [Parameter] public bool ShowToolbar { get; set; } /// - /// A callback method that determines whether to show the toolbar of the tree view item. + /// A 回调方法 that determines 是否 to show the toolbar of the tree view item. + /// A callback method that determines whether to show the toolbar of the tree view item. + /// 10.2.2 /// [Parameter] public Func, Task>? ShowToolbarCallback { get; set; } /// - /// Gets or sets the title of the popup-window. Default is null. + /// 获得/设置 the title of the popup-window. 默认为 null. + /// Gets or sets the title of the popup-window. Default is null. + /// 10.2.2 /// [Parameter] public string? ToolbarEditTitle { get; set; } /// - /// Gets or sets the title of the popup-window. Default is null. + /// 获得/设置 the title of the popup-window. 默认为 null. + /// Gets or sets the title of the popup-window. Default is null. + /// 10.2.2 /// [Parameter] public string? ToolbarEditLabelText { get; set; } /// - /// Gets or sets the toolbar content template. Default is null. + /// 获得/设置 the toolbar 内容 模板. 默认为 null. + /// Gets or sets the toolbar content template. Default is null. + /// 10.2.2 /// [Parameter] public RenderFragment? ToolbarTemplate { get; set; } /// - /// Gets or sets the update the tree text value callback. Default is null. - /// If return true will update the tree text value, otherwise will not update. + /// 获得/设置 the update the tree text value 回调. 默认为 null. If return true will update the tree text value, otherwise will not update. + /// + /// Gets or sets the update the tree text value callback. Default is null. If return true will update the tree text value, otherwise will not update. + /// + /// 10.2.2 /// [Parameter] public Func>? OnUpdateCallbackAsync { get; set; } diff --git a/src/BootstrapBlazor/Components/TreeView/TreeViewToolbarEditButton.razor.cs b/src/BootstrapBlazor/Components/TreeView/TreeViewToolbarEditButton.razor.cs index 015b1356dae..6608fab546d 100644 --- a/src/BootstrapBlazor/Components/TreeView/TreeViewToolbarEditButton.razor.cs +++ b/src/BootstrapBlazor/Components/TreeView/TreeViewToolbarEditButton.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,44 +6,57 @@ namespace BootstrapBlazor.Components; /// -/// TreeViewToolbarEditButton component +/// TreeViewToolbarEditButton component +/// TreeViewToolbarEditButton component /// /// public partial class TreeViewToolbarEditButton : ComponentBase { /// - /// Gets or sets the tree view item. Default is null. + /// 获得/设置 the tree view item. 默认为 null. + /// Gets or sets the tree view item. Default is null. /// [Parameter, NotNull] public TreeViewItem? Item { get; set; } /// - /// Gets or sets the item changed event callback. + /// 获得/设置 the item changed event 回调. + /// Gets or sets the item changed event callback. + /// 10.2.2 /// [Parameter] public EventCallback> ItemChanged { get; set; } /// - /// Gets or sets the update the tree text value callback. Default is null. - /// If return true will update the tree text value, otherwise will not update. + /// 获得/设置 the update the tree text value 回调. 默认为 null. If return true will update the tree text value, otherwise will not update. + /// + /// Gets or sets the update the tree text value callback. Default is null. If return true will update the tree text value, otherwise will not update. + /// + /// 10.2.2 /// [Parameter] public Func>? OnUpdateCallbackAsync { get; set; } /// - /// Gets or sets the title of the popup-window. Default is null. + /// 获得/设置 the title of the popup-window. 默认为 null. + /// Gets or sets the title of the popup-window. Default is null. + /// 10.2.2 /// [Parameter] public string? Title { get; set; } /// - /// Gets or sets the text of the popup-window label. Default is null. + /// 获得/设置 the text of the popup-window label. 默认为 null. + /// Gets or sets the text of the popup-window label. Default is null. + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// Gets or sets the icon of the edit button. Default is null. + /// 获得/设置 the 图标 of the edit 按钮. 默认为 null. + /// Gets or sets the icon of the edit button. Default is null. + /// 10.2.2 /// [Parameter] public string? Icon { get; set; } diff --git a/src/BootstrapBlazor/Components/Typed/Typed.razor.cs b/src/BootstrapBlazor/Components/Typed/Typed.razor.cs index 18dbcf91f73..505e76874fb 100644 --- a/src/BootstrapBlazor/Components/Typed/Typed.razor.cs +++ b/src/BootstrapBlazor/Components/Typed/Typed.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// TypedJs 组件类 +/// TypedJs 组件类 +/// TypedJs component类 /// public partial class Typed { /// - /// 获得/设置 组件显示文字 默认 null 未设置 + /// 获得/设置 组件显示文字 默认 null 未设置 + /// Gets or sets componentdisplay文字 Default is null 未Sets + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 组件配置 实例 默认 null + /// 获得/设置 组件配置 实例 默认 null + /// Gets or sets component配置 instance Default is null + /// 10.2.2 /// [Parameter] public TypedOptions? Options { get; set; } /// - /// 获得/设置 打字结束回调方法 默认 null + /// 获得/设置 打字结束回调方法 默认 null + /// Gets or sets 打字结束callback method Default is null + /// 10.2.2 /// [Parameter] public Func? OnCompleteAsync { get; set; } @@ -62,7 +69,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) }); /// - /// 打字结束方法 由 Javascript 触发 + /// 打字结束方法 由 Javascript 触发 + /// 打字结束方法 由 Javascript 触发 /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/Typed/TypedOptions.cs b/src/BootstrapBlazor/Components/Typed/TypedOptions.cs index 5f388fd3234..f04d6f3bb6e 100644 --- a/src/BootstrapBlazor/Components/Typed/TypedOptions.cs +++ b/src/BootstrapBlazor/Components/Typed/TypedOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,82 +8,94 @@ namespace BootstrapBlazor.Components; /// -/// TypedJs 组件配置类 +/// TypedJs 组件配置类 +/// TypedJs component配置类 /// public class TypedOptions : IEquatable { /// - /// 获得/设置 要打字的字符串数组 + /// 获得/设置 要打字的字符串数组 + /// Gets or sets 要打字的字符串数组 /// [JsonPropertyName("strings")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public List? Text { get; set; } /// - /// 获得/设置 打字速度 默认 null 未设置 单位毫秒 + /// 获得/设置 打字速度 默认 null 未设置 单位毫秒 + /// Gets or sets 打字速度 Default is null 未Sets 单位毫秒 /// [JsonPropertyName("typeSpeed")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? TypeSpeed { get; set; } /// - /// 获得/设置 退格速度 默认 null 未设置 单位毫秒 + /// 获得/设置 退格速度 默认 null 未设置 单位毫秒 + /// Gets or sets 退格速度 Default is null 未Sets 单位毫秒 /// [JsonPropertyName("backSpeed")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? BackSpeed { get; set; } /// - /// 获得/设置 smartBackspace only backspace what doesn't match the previous string default true + /// 获得/设置 smartBackspace only backspace what doesn't match the previous string default true + /// Gets or sets smartBackspace only backspace what doesn't match the previous string default true /// [JsonPropertyName("smartBackspace")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? SmartBackspace { get; set; } /// - /// 获得/设置 shuffle the strings default false + /// 获得/设置 shuffle the strings default false + /// Gets or sets shuffle the strings default false /// [JsonPropertyName("shuffle")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Shuffle { get; set; } /// - /// 获得/设置 backDelay time before backspacing in milliseconds default 700 + /// 获得/设置 backDelay time before backspacing in milliseconds default 700 + /// Gets or sets backDelay time before backspacing in milliseconds default 700 /// [JsonPropertyName("backDelay")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? BackDelay { get; set; } /// - /// 获得/设置 loop loop strings default false + /// 获得/设置 loop loop strings default false + /// Gets or sets loop loop strings default false /// [JsonPropertyName("loop")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Loop { get; set; } /// - /// 获得/设置 loopCount amount of loops default Infinity + /// 获得/设置 loopCount amount of loops default Infinity + /// Gets or sets loopCount amount of loops default Infinity /// [JsonPropertyName("loopCount")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? LoopCount { get; set; } /// - /// 获得/设置 showCursor show cursor default true + /// 获得/设置 showCursor show cursor default true + /// Gets or sets showCursor show cursor default true /// [JsonPropertyName("showCursor")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? ShowCursor { get; set; } /// - /// 获得/设置 cursorChar character for cursor default | + /// 获得/设置 cursorChar character for cursor default | + /// Gets or sets cursorChar character for cursor default | /// [JsonPropertyName("cursorChar")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? CursorChar { get; set; } /// - /// 获得/设置 contentType 'html' or 'null' for plaintext default html + /// 获得/设置 contentType 'html' or 'null' for plaintext default html + /// Gets or sets contentType 'html' or 'null' for plaintext default html /// [JsonPropertyName("contentType")] [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] diff --git a/src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs b/src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs index ce437af34e2..445a397317c 100644 --- a/src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs +++ b/src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs @@ -6,79 +6,105 @@ namespace BootstrapBlazor.Components; /// -/// 头像上传组件 -/// AvatarUpload Component +/// 头像上传组件 AvatarUpload Component +/// +/// 头像上传component AvatarUpload Component +/// /// public partial class AvatarUpload { /// - /// 获得/设置 文件预览框宽度 + /// 获得/设置 文件预览框宽度 + /// Gets or sets 文件预览框width + /// 10.2.2 /// [Parameter] public int Width { get; set; } = 100; /// - /// 获得/设置 文件预览框高度 + /// 获得/设置 文件预览框高度 + /// Gets or sets 文件预览框height + /// 10.2.2 /// [Parameter] public int Height { get; set; } = 100; /// - /// 获得/设置 是否圆形图片框 Avatar 模式时生效 默认为 false + /// 获得/设置 是否圆形图片框 Avatar 模式时生效 默认为 false + /// Gets or sets whether圆形图片框 Avatar 模式时生效 Default is为 false + /// 10.2.2 /// [Parameter] public bool IsCircle { get; set; } /// - /// Gets or sets the border radius. Default is null. + /// 获得/设置 the border radius. 默认为 null. + /// Gets or sets the border radius. Default is null. + /// 10.2.2 /// [Parameter] public string? BorderRadius { get; set; } /// - /// 获得/设置 图标文件扩展名集合 ".png" + /// 获得/设置 图标文件扩展名集合 ".png" + /// Gets or sets icon文件扩展名collection ".png" + /// 10.2.2 /// [Parameter] public List? AllowExtensions { get; set; } /// - /// 获得/设置 删除图标 + /// 获得/设置 删除图标 + /// Gets or sets 删除icon + /// 10.2.2 /// [Parameter] public string? DeleteIcon { get; set; } /// - /// 获得/设置 加载图标 + /// 获得/设置 加载图标 + /// Gets or sets 加载icon + /// 10.2.2 /// [Parameter] public string? LoadingIcon { get; set; } /// - /// 获得/设置 新建图标 + /// 获得/设置 新建图标 + /// Gets or sets 新建icon + /// 10.2.2 /// [Parameter] public string? AddIcon { get; set; } /// - /// 获得/设置 状态正常图标 + /// 获得/设置 状态正常图标 + /// Gets or sets 状态正常icon + /// 10.2.2 /// [Parameter] public string? ValidStatusIcon { get; set; } /// - /// 获得/设置 状态正常图标 + /// 获得/设置 状态正常图标 + /// Gets or sets 状态正常icon + /// 10.2.2 /// [Parameter] public string? InvalidStatusIcon { get; set; } /// - /// 获得/设置 继续上传按钮是否在列表前 默认 false + /// 获得/设置 继续上传按钮是否在列表前 默认 false + /// Gets or sets 继续上传buttonwhether在列表前 Default is false + /// 10.2.2 /// [Parameter] public bool IsUploadButtonAtFirst { get; set; } /// - /// 获得/设置 是否允许预览回调方法 默认 null + /// 获得/设置 是否允许预览回调方法 默认 null + /// Gets or sets whether允许预览callback method Default is null + /// 10.2.2 /// [Parameter] public Func? CanPreviewCallback { get; set; } @@ -98,7 +124,8 @@ public partial class AvatarUpload .Build(); /// - /// 获得/设置 预览框 Style 属性 + /// 获得/设置 预览框 Style 属性 + /// Gets or sets 预览框 Style property /// private string? ItemStyleString => CssBuilder.Default() .AddClass($"width: {Width}px;", Width > 0) @@ -151,7 +178,8 @@ protected override async Task TriggerOnChanged(UploadFile file) } /// - /// 预览当前头像方法 + /// 预览当前头像方法 + /// 预览当前头像方法 /// /// public async Task Preview() diff --git a/src/BootstrapBlazor/Components/Upload/ButtonUpload.razor.cs b/src/BootstrapBlazor/Components/Upload/ButtonUpload.razor.cs index acd69fdc868..281e8af3cec 100644 --- a/src/BootstrapBlazor/Components/Upload/ButtonUpload.razor.cs +++ b/src/BootstrapBlazor/Components/Upload/ButtonUpload.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,74 +8,98 @@ namespace BootstrapBlazor.Components; /// -/// 按钮上传组件 -/// ButtonUpload Component +/// 按钮上传组件 ButtonUpload Component +/// +/// button上传component ButtonUpload Component +/// /// public partial class ButtonUpload { /// - /// 获得/设置 浏览按钮加载中图标 + /// 获得/设置 浏览按钮加载中图标 + /// Gets or sets 浏览button加载中icon + /// 10.2.2 /// [Parameter] public string? LoadingIcon { get; set; } /// - /// 获得/设置 上传失败状态图标 + /// 获得/设置 上传失败状态图标 + /// Gets or sets 上传失败状态icon + /// 10.2.2 /// [Parameter] public string? InvalidStatusIcon { get; set; } /// - /// 获得/设置 上传成功状态图标 + /// 获得/设置 上传成功状态图标 + /// Gets or sets 上传成功状态icon + /// 10.2.2 /// [Parameter] public string? ValidStatusIcon { get; set; } /// - /// 获得/设置 浏览按钮图标 + /// 获得/设置 浏览按钮图标 + /// Gets or sets 浏览buttonicon + /// 10.2.2 /// [Parameter] public string? BrowserButtonIcon { get; set; } /// - /// 获得/设置 上传按钮样式 默认 null 使用 Button 默认 Color Primary + /// 获得/设置 上传按钮样式 默认 null 使用 Button 默认 Color Primary + /// Gets or sets 上传buttonstyle Default is null 使用 Button Default is Color Primary + /// 10.2.2 /// [Parameter] public string? BrowserButtonClass { get; set; } /// - /// 获得/设置 是否显示上传列表 默认 true + /// 获得/设置 是否显示上传列表 默认 true + /// Gets or sets whetherdisplay上传列表 Default is true + /// 10.2.2 /// [Parameter] public bool ShowUploadFileList { get; set; } = true; /// - /// 获得/设置 浏览按钮显示文字 + /// 获得/设置 浏览按钮显示文字 + /// Gets or sets 浏览buttondisplay文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? BrowserButtonText { get; set; } /// - /// 获得/设置 浏览按钮颜色 + /// 获得/设置 浏览按钮颜色 + /// Gets or sets 浏览buttoncolor + /// 10.2.2 /// [Parameter] public Color BrowserButtonColor { get; set; } = Color.Primary; /// - /// 获得/设置 Size 大小 + /// 获得/设置 Size 大小 + /// Gets or sets Size 大小 + /// 10.2.2 /// [Parameter] public Size Size { get; set; } /// - /// 获得/设置 子组件内容 + /// 获得/设置 子组件内容 + /// Gets or sets 子componentcontent + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 设置文件格式图标回调委托 + /// 获得/设置 设置文件格式图标回调委托 + /// Gets or sets Sets文件格式icon回调delegate + /// 10.2.2 /// [Parameter] public Func? OnGetFileFormat { get; set; } diff --git a/src/BootstrapBlazor/Components/Upload/CardUpload.razor.cs b/src/BootstrapBlazor/Components/Upload/CardUpload.razor.cs index 82685e0863b..8f86d72a6e3 100644 --- a/src/BootstrapBlazor/Components/Upload/CardUpload.razor.cs +++ b/src/BootstrapBlazor/Components/Upload/CardUpload.razor.cs @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// CardUpload component +/// CardUpload component +/// CardUpload component /// public partial class CardUpload { @@ -52,67 +53,89 @@ public partial class CardUpload private string PreviewerId => $"prev_{Id}"; /// - /// 获得/设置 是否允许预览回调方法 默认 null + /// 获得/设置 是否允许预览回调方法 默认 null + /// Gets or sets whether允许预览callback method Default is null + /// 10.2.2 /// [Parameter] public Func? CanPreviewCallback { get; set; } /// - /// 获得/设置 图标模板 + /// 获得/设置 图标模板 + /// Gets or sets icontemplate + /// 10.2.2 /// [Parameter] public RenderFragment? IconTemplate { get; set; } /// - /// 获得/设置 操作按钮模板 + /// 获得/设置 操作按钮模板 + /// Gets or sets 操作buttontemplate + /// 10.2.2 /// [Parameter] public RenderFragment? BeforeActionButtonTemplate { get; set; } /// - /// 获得/设置 操作按钮模板 + /// 获得/设置 操作按钮模板 + /// Gets or sets 操作buttontemplate + /// 10.2.2 /// [Parameter] public RenderFragment? ActionButtonTemplate { get; set; } /// - /// 获得/设置 是否显示文件尺寸,默认为 true 显示 + /// 获得/设置 是否显示文件尺寸,默认为 true 显示 + /// Gets or sets whetherdisplay文件尺寸,Default is为 true display + /// 10.2.2 /// [Parameter] public bool ShowFileSize { get; set; } = true; /// - /// 获得/设置 新建图标 + /// 获得/设置 新建图标 + /// Gets or sets 新建icon + /// 10.2.2 /// [Parameter] public string? AddIcon { get; set; } /// - /// 获得/设置 状态图标 + /// 获得/设置 状态图标 + /// Gets or sets 状态icon + /// 10.2.2 /// [Parameter] public string? StatusIcon { get; set; } /// - /// 获得/设置 移除图标 + /// 获得/设置 移除图标 + /// Gets or sets 移除icon + /// 10.2.2 /// [Parameter] public string? RemoveIcon { get; set; } /// - /// 获得/设置 放大图标 + /// 获得/设置 放大图标 + /// Gets or sets 放大icon + /// 10.2.2 /// [Parameter] public string? ZoomIcon { get; set; } /// - /// 获得/设置 是否显示放大按钮 默认 true + /// 获得/设置 是否显示放大按钮 默认 true + /// Gets or sets whetherdisplay放大button Default is true + /// 10.2.2 /// [Parameter] public bool ShowZoomButton { get; set; } = true; /// - /// 获得/设置 是否显示删除按钮 默认 true 显示 + /// 获得/设置 是否显示删除按钮 默认 true 显示 + /// Gets or sets whetherdisplay删除button Default is true display + /// 10.2.2 /// [Parameter] [Obsolete("已弃用,请使用 ShowDeleteButton 参数。Deprecated, please use the ShowDeleteButton parameter")] @@ -120,54 +143,72 @@ public partial class CardUpload public bool ShowDeletedButton { get; set; } = true; /// - /// 获得/设置 继续上传按钮是否在列表前 默认 false + /// 获得/设置 继续上传按钮是否在列表前 默认 false + /// Gets or sets 继续上传buttonwhether在列表前 Default is false + /// 10.2.2 /// [Parameter] public bool IsUploadButtonAtFirst { get; set; } /// - /// 获得/设置 点击 Zoom 图标回调方法 + /// 获得/设置 点击 Zoom 图标回调方法 + /// Gets or sets 点击 Zoom iconcallback method + /// 10.2.2 /// [Parameter] public Func? OnZoomAsync { get; set; } /// - /// 获得/设置 图标文件扩展名集合 ".png" + /// 获得/设置 图标文件扩展名集合 ".png" + /// Gets or sets icon文件扩展名collection ".png" + /// 10.2.2 /// [Parameter] public List? AllowExtensions { get; set; } /// - /// 获得/设置 删除前是否显示确认对话框,依赖 属性为 true 时有效 + /// 获得/设置 删除前是否显示确认对话框,依赖 属性为 true 时有效 + /// Gets or sets 删除前whetherdisplay确认对话框,依赖 property为 true 时有效 + /// 10.2.2 /// [Parameter] public bool ShowDeleteConfirmButton { get; set; } /// - /// 获得/设置 删除确认弹窗中确认按钮颜色 默认 + /// 获得/设置 删除确认弹窗中确认按钮颜色 默认 + /// Gets or sets 删除确认弹窗中确认buttoncolor Default is + /// 10.2.2 /// [Parameter] public Color DeleteConfirmButtonColor { get; set; } = Color.Danger; /// - /// 获得/设置 删除确认弹窗中确认按钮图标 默认 null 未设置 + /// 获得/设置 删除确认弹窗中确认按钮图标 默认 null 未设置 + /// Gets or sets 删除确认弹窗中确认buttonicon Default is null 未Sets + /// 10.2.2 /// [Parameter] public string? DeleteConfirmButtonIcon { get; set; } /// - /// 获得/设置 删除确认弹窗中确认文本内容 默认 null 未设置 使用资源文件中内置文字 + /// 获得/设置 删除确认弹窗中确认文本内容 默认 null 未设置 使用资源文件中内置文字 + /// Gets or sets 删除确认弹窗中确认文本content Default is null 未Sets 使用资源文件中内置文字 + /// 10.2.2 /// [Parameter] public string? DeleteConfirmContent { get; set; } /// - /// 获得/设置 删除确认弹窗中确认按钮显示文字 默认 null 未设置 + /// 获得/设置 删除确认弹窗中确认按钮显示文字 默认 null 未设置 + /// Gets or sets 删除确认弹窗中确认buttondisplay文字 Default is null 未Sets + /// 10.2.2 /// [Parameter] public string? DeleteConfirmButtonText { get; set; } /// - /// 获得/设置 删除确认弹窗中取消按钮显示文字 默认 null 未设置 + /// 获得/设置 删除确认弹窗中取消按钮显示文字 默认 null 未设置 + /// Gets or sets 删除确认弹窗中取消buttondisplay文字 Default is null 未Sets + /// 10.2.2 /// [Parameter] public string? DeleteCloseButtonText { get; set; } diff --git a/src/BootstrapBlazor/Components/Upload/DropUpload.razor.cs b/src/BootstrapBlazor/Components/Upload/DropUpload.razor.cs index 90ce8b9c0dc..cf5520b5c8b 100644 --- a/src/BootstrapBlazor/Components/Upload/DropUpload.razor.cs +++ b/src/BootstrapBlazor/Components/Upload/DropUpload.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,87 +8,115 @@ namespace BootstrapBlazor.Components; /// -/// DropUpload 组件 +/// DropUpload 组件 +/// DropUpload component /// public partial class DropUpload { /// - /// 获得/设置 Body 模板 默认 null - /// 设置 BodyTemplate 后 不生效 + /// 获得/设置 Body 模板 默认 null 设置 BodyTemplate 后 不生效 + /// + /// Gets or sets Body template Default is null Sets BodyTemplate 后 不生效 + /// + /// 10.2.2 /// [Parameter] public RenderFragment? BodyTemplate { get; set; } /// - ///获得/设置 图标模板 默认 null + /// 获得/设置 图标模板 默认 null + /// Gets or sets icontemplate Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? IconTemplate { get; set; } /// - /// 获得/设置 图标 默认 null + /// 获得/设置 图标 默认 null + /// Gets or sets icon Default is null + /// 10.2.2 /// [Parameter] public string? UploadIcon { get; set; } /// - /// 获得/设置 文字模板 默认 null + /// 获得/设置 文字模板 默认 null + /// Gets or sets 文字template Default is null + /// 10.2.2 /// [Parameter] public RenderFragment? TextTemplate { get; set; } /// - /// 获得/设置 上传文字 默认 null + /// 获得/设置 上传文字 默认 null + /// Gets or sets 上传文字 Default is null + /// 10.2.2 /// [Parameter] [NotNull] public string? UploadText { get; set; } /// - /// 获得/设置 是否显示 Footer 默认 false 不显示 + /// 获得/设置 是否显示 Footer 默认 false 不显示 + /// Gets or sets whetherdisplay Footer Default is false 不display + /// 10.2.2 /// [Parameter] public bool ShowFooter { get; set; } /// - /// 获得/设置 Footer 字符串模板 默认 null 未设置 + /// 获得/设置 Footer 字符串模板 默认 null 未设置 + /// Gets or sets Footer 字符串template Default is null 未Sets + /// 10.2.2 /// [Parameter] public RenderFragment? FooterTemplate { get; set; } /// - /// 获得/设置 Footer 字符串信息 默认 null 未设置 + /// 获得/设置 Footer 字符串信息 默认 null 未设置 + /// Gets or sets Footer 字符串信息 Default is null 未Sets + /// 10.2.2 /// [Parameter] [NotNull] public string? FooterText { get; set; } /// - /// 获得/设置 是否显示上传列表 默认 true + /// 获得/设置 是否显示上传列表 默认 true + /// Gets or sets whetherdisplay上传列表 Default is true + /// 10.2.2 /// [Parameter] public bool ShowUploadFileList { get; set; } = true; /// - /// 获得/设置 设置文件格式图标回调委托 + /// 获得/设置 设置文件格式图标回调委托 + /// Gets or sets Sets文件格式icon回调delegate + /// 10.2.2 /// [Parameter] public Func? OnGetFileFormat { get; set; } /// - /// 获得/设置 加载中图标 + /// 获得/设置 加载中图标 + /// Gets or sets 加载中icon + /// 10.2.2 /// [Parameter] public string? LoadingIcon { get; set; } /// - /// 获得/设置 上传失败状态图标 + /// 获得/设置 上传失败状态图标 + /// Gets or sets 上传失败状态icon + /// 10.2.2 /// [Parameter] public string? InvalidStatusIcon { get; set; } /// - /// 获得/设置 上传成功状态图标 + /// 获得/设置 上传成功状态图标 + /// Gets or sets 上传成功状态icon + /// 10.2.2 /// [Parameter] public string? ValidStatusIcon { get; set; } diff --git a/src/BootstrapBlazor/Components/Upload/FileListUploadBase.cs b/src/BootstrapBlazor/Components/Upload/FileListUploadBase.cs index c42e230eeb4..5e765048533 100644 --- a/src/BootstrapBlazor/Components/Upload/FileListUploadBase.cs +++ b/src/BootstrapBlazor/Components/Upload/FileListUploadBase.cs @@ -6,62 +6,79 @@ namespace BootstrapBlazor.Components; /// -/// FileListUploadBase 基类 +/// FileListUploadBase 基类 +/// FileListUploadBase 基类 /// /// public class FileListUploadBase : UploadBase { /// - /// 获得/设置 是否显示删除按钮 默认 false + /// 获得/设置 是否显示删除按钮 默认 false + /// Gets or sets whetherdisplay删除button Default is false + /// 10.2.2 /// [Parameter] public bool ShowDeleteButton { get; set; } /// - /// 获得/设置 删除按钮图标 + /// 获得/设置 删除按钮图标 + /// Gets or sets 删除buttonicon + /// 10.2.2 /// [Parameter] public string? DeleteIcon { get; set; } /// - /// 获得/设置 是否显示下载按钮 默认 false + /// 获得/设置 是否显示下载按钮 默认 false + /// Gets or sets whetherdisplay下载button Default is false + /// 10.2.2 /// [Parameter] public bool ShowDownloadButton { get; set; } /// - /// 获得/设置 下载按钮图标 + /// 获得/设置 下载按钮图标 + /// Gets or sets 下载buttonicon + /// 10.2.2 /// [Parameter] public string? DownloadIcon { get; set; } /// - /// 获得/设置 点击下载按钮回调方法 默认 null + /// 获得/设置 点击下载按钮回调方法 默认 null + /// Gets or sets 点击下载buttoncallback method Default is null + /// 10.2.2 /// [Parameter] public Func? OnDownload { get; set; } /// - /// 获得/设置 取消图标 + /// 获得/设置 取消图标 + /// Gets or sets 取消icon + /// 10.2.2 /// [Parameter] public string? CancelIcon { get; set; } /// - /// 获得/设置 点击取消按钮回调此方法 默认 null + /// 获得/设置 点击取消按钮回调此方法 默认 null + /// Gets or sets 点击取消button回调此方法 Default is null + /// 10.2.2 /// [Parameter] public Func? OnCancel { get; set; } /// - /// 服务实例 + /// 服务实例 + /// 服务instance /// [Inject] [NotNull] protected IIconTheme? IconTheme { get; set; } /// - /// + /// + /// /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Upload/IUpload.cs b/src/BootstrapBlazor/Components/Upload/IUpload.cs index 5ba6fad51da..b5f26aa0a0b 100644 --- a/src/BootstrapBlazor/Components/Upload/IUpload.cs +++ b/src/BootstrapBlazor/Components/Upload/IUpload.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// IUpload 接口 +/// IUpload 接口 +/// IUpload 接口 /// public interface IUpload { /// - /// 获得/设置 上传文件实例集合 + /// 获得/设置 上传文件实例集合 + /// Gets or sets 上传文件instancecollection /// List UploadFiles { get; } } diff --git a/src/BootstrapBlazor/Components/Upload/InputUpload.razor.cs b/src/BootstrapBlazor/Components/Upload/InputUpload.razor.cs index 9a3f43de1a1..f22421b847c 100644 --- a/src/BootstrapBlazor/Components/Upload/InputUpload.razor.cs +++ b/src/BootstrapBlazor/Components/Upload/InputUpload.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,56 +8,73 @@ namespace BootstrapBlazor.Components; /// -/// InputUpload 组件 +/// InputUpload 组件 +/// InputUpload component /// public partial class InputUpload { /// - /// 获得/设置 浏览按钮图标 + /// 获得/设置 浏览按钮图标 + /// Gets or sets 浏览buttonicon + /// 10.2.2 /// [Parameter] public string? BrowserButtonIcon { get; set; } /// - /// 获得/设置 上传按钮样式 默认 btn-primary + /// 获得/设置 上传按钮样式 默认 btn-primary + /// Gets or sets 上传buttonstyle Default is btn-primary + /// 10.2.2 /// [Parameter] public string BrowserButtonClass { get; set; } = "btn-primary"; /// - /// 获得/设置 浏览按钮显示文字 + /// 获得/设置 浏览按钮显示文字 + /// Gets or sets 浏览buttondisplay文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? BrowserButtonText { get; set; } /// - /// 获得/设置 删除按钮样式 默认 btn-danger + /// 获得/设置 删除按钮样式 默认 btn-danger + /// Gets or sets 删除buttonstyle Default is btn-danger + /// 10.2.2 /// [Parameter] public string DeleteButtonClass { get; set; } = "btn-danger"; /// - /// 获得/设置 删除按钮图标 + /// 获得/设置 删除按钮图标 + /// Gets or sets 删除buttonicon + /// 10.2.2 /// [Parameter] public string? DeleteButtonIcon { get; set; } /// - /// 获得/设置 重置按钮显示文字 + /// 获得/设置 重置按钮显示文字 + /// Gets or sets 重置buttondisplay文字 + /// 10.2.2 /// [Parameter] [NotNull] public string? DeleteButtonText { get; set; } /// - /// 获得/设置 是否显示删除按钮 默认为 false 不显示 + /// 获得/设置 是否显示删除按钮 默认为 false 不显示 + /// Gets or sets whetherdisplay删除button Default is为 false 不display + /// 10.2.2 /// [Parameter] public bool ShowDeleteButton { get; set; } /// - /// 获得/设置 PlaceHolder 占位符文本 + /// 获得/设置 PlaceHolder 占位符文本 + /// Gets or sets PlaceHolder 占位符文本 + /// 10.2.2 /// [Parameter] public string? PlaceHolder { get; set; } @@ -89,7 +106,8 @@ public partial class InputUpload .Build(); /// - /// + /// + /// /// protected override void OnParametersSet() { diff --git a/src/BootstrapBlazor/Components/Upload/UploadBase.cs b/src/BootstrapBlazor/Components/Upload/UploadBase.cs index acbf0d63373..fafcab9018e 100644 --- a/src/BootstrapBlazor/Components/Upload/UploadBase.cs +++ b/src/BootstrapBlazor/Components/Upload/UploadBase.cs @@ -8,13 +8,16 @@ namespace BootstrapBlazor.Components; /// -/// Upload 组件基类 +/// Upload 组件基类 +/// Upload component基类 /// [BootstrapModuleAutoLoader(ModuleName = "upload")] public abstract class UploadBase : ValidateBase, IUpload { /// - /// 获得/设置 是否仅上传一次 默认 false + /// 获得/设置 是否仅上传一次 默认 false + /// Gets or sets whether仅上传一次 Default is false + /// 10.2.2 /// [Parameter] [Obsolete("已弃用 通过 IsMultiple 参数实现此功能; Deprecated. please use IsMultiple parameter.")] @@ -22,7 +25,9 @@ public abstract class UploadBase : ValidateBase, IUpload public bool IsSingle { get; set; } /// - /// 获得/设置 最大上传个数 默认为最大值 + /// 获得/设置 最大上传个数 默认为最大值 + /// Gets or sets 最大上传个数 Default is为最大值 + /// 10.2.2 /// [Parameter] [Obsolete("已弃用 通过 MaxFileCount 参数实现此功能; Deprecated. please use MaxFileCount parameter.")] @@ -30,72 +35,94 @@ public abstract class UploadBase : ValidateBase, IUpload public int Max { get; set; } = int.MaxValue; /// - /// 获得/设置 最大上传个数 默认为 null + /// 获得/设置 最大上传个数 默认为 null + /// Gets or sets 最大上传个数 Default is为 null + /// 10.2.2 /// [Parameter] public int? MaxFileCount { get; set; } /// - /// 获得/设置 所有文件上传完毕回调方法 默认 null + /// 获得/设置 所有文件上传完毕回调方法 默认 null + /// Gets or sets 所有文件上传完毕callback method Default is null + /// 10.2.2 /// [Parameter] public Func, Task>? OnAllFileUploaded { get; set; } /// - /// 获得/设置 已上传文件集合,可用于组件初始化 + /// 获得/设置 已上传文件集合,可用于组件初始化 + /// Gets or sets 已上传文件collection,可用于component初始化 + /// 10.2.2 /// [Parameter] public List? DefaultFileList { get; set; } /// - /// 获得/设置 是否显示上传进度 默认为 false + /// 获得/设置 是否显示上传进度 默认为 false + /// Gets or sets whetherdisplay上传进度 Default is为 false + /// 10.2.2 /// [Parameter] public bool ShowProgress { get; set; } /// - /// 获得/设置 上传接收的文件格式 默认为 null 接收任意格式 + /// 获得/设置 上传接收的文件格式 默认为 null 接收任意格式 + /// Gets or sets 上传接收的文件格式 Default is为 null 接收任意格式 + /// 10.2.2 /// [Parameter] public string? Accept { get; set; } /// - /// 获得/设置 媒体捕获机制的首选面向模式,默认为 null + /// 获得/设置 媒体捕获机制的首选面向模式,默认为 null + /// Gets or sets 媒体捕获机制的首选面向模式,Default is为 null + /// 10.2.2 /// [Parameter] public string? Capture { get; set; } /// - /// 获得/设置 是否上传整个目录 默认为 false + /// 获得/设置 是否上传整个目录 默认为 false + /// Gets or sets whether上传整个目录 Default is为 false + /// 10.2.2 /// [Parameter] public bool IsDirectory { get; set; } /// - /// 获得/设置 是否允许多文件上传 默认 false 不允许 + /// 获得/设置 是否允许多文件上传 默认 false 不允许 + /// Gets or sets whether允许多文件上传 Default is false 不允许 + /// 10.2.2 /// [Parameter] public bool IsMultiple { get; set; } /// - /// 获得/设置 点击删除按钮时回调此方法 默认 null + /// 获得/设置 点击删除按钮时回调此方法 默认 null + /// Gets or sets 点击删除button时回调此方法 Default is null + /// 10.2.2 /// [Parameter] public Func>? OnDelete { get; set; } /// - /// 获得/设置 点击浏览按钮时回调此方法,如果多文件上传此回调会触发多次 默认 null + /// 获得/设置 点击浏览按钮时回调此方法,如果多文件上传此回调会触发多次 默认 null + /// Gets or sets 点击浏览button时回调此方法,如果多文件上传此回调会触发多次 Default is null + /// 10.2.2 /// [Parameter] public Func? OnChange { get; set; } /// - /// 获得/设置 已上传文件集合,此集合中数据是用户上传文件集合 + /// 获得/设置 已上传文件集合,此集合中数据是用户上传文件集合 + /// Gets or sets 已上传文件collection,此collection中data是用户上传文件collection /// public List UploadFiles { get; } = []; /// - /// Gets the collection of files to be uploaded. + /// 获得 the 集合 of files to be uploaded. + /// Gets the collection of files to be uploaded. /// protected List Files => GetUploadFiles(); @@ -137,7 +164,8 @@ protected override void OnParametersSet() } /// - /// User selects files callback method + /// User selects files 回调方法 + /// User selects files callback method /// /// /// @@ -218,7 +246,8 @@ private void UpdateValue(List items) } /// - /// 触发 OnChanged 事件回调方法 + /// 触发 OnChanged 事件回调方法 + /// 触发 OnChanged 事件callback method /// /// /// @@ -231,7 +260,8 @@ protected virtual async Task TriggerOnChanged(UploadFile file) } /// - /// Delete file method. + /// Delete file method. + /// Delete file method. /// /// /// @@ -261,14 +291,16 @@ protected virtual async Task OnFileDelete(UploadFile item) } /// - /// 是否显示进度条方法 + /// 是否显示进度条方法 + /// whetherdisplay进度条方法 /// /// /// protected bool GetShowProgress(UploadFile item) => ShowProgress && !item.Uploaded; /// - /// 更新上传进度方法 + /// 更新上传进度方法 + /// 更新上传进度方法 /// /// protected void Update(UploadFile file) @@ -281,8 +313,10 @@ protected void Update(UploadFile file) private List? _filesCache; /// - /// 获得当前文件集合 - /// Get the files collection. + /// 获得当前文件集合 Get the files collection. + /// + /// Gets当前文件collection Get the files collection. + /// /// /// protected List GetUploadFiles() @@ -306,8 +340,10 @@ protected List GetUploadFiles() } /// - /// 检查是否可以继续上传文件 - /// Check whether can upload file. + /// 检查是否可以继续上传文件 Check whether can upload file. + /// + /// 检查whether可以继续上传文件 Check whether can upload file. + /// /// /// protected bool CanUpload() @@ -323,13 +359,15 @@ protected bool CanUpload() } /// - /// 检查上传按钮是否可用方法 不可用时返回 true + /// 检查上传按钮是否可用方法 不可用时返回 true + /// 检查上传buttonwhether可用方法 不可用时返回 true /// /// protected bool CheckStatus() => IsDisabled || !CanUpload(); /// - /// 判断是否显示新建按钮 + /// 判断是否显示新建按钮 + /// 判断whetherdisplay新建button /// /// protected bool ShowAddButton() @@ -343,8 +381,10 @@ protected bool ShowAddButton() } /// - /// 清空上传列表方法 - /// Clear the upload files collection. + /// 清空上传列表方法 Clear the upload files collection. + /// + /// 清空上传列表方法 Clear the upload files collection. + /// /// public virtual void Reset() { @@ -356,7 +396,8 @@ public virtual void Reset() } /// - /// append html attribute method. + /// append html attribute method. + /// append html attribute method. /// /// protected IDictionary GetUploadAdditionalAttributes() diff --git a/src/BootstrapBlazor/Components/Upload/UploadFile.cs b/src/BootstrapBlazor/Components/Upload/UploadFile.cs index 8c985d92c83..8b5034607d4 100644 --- a/src/BootstrapBlazor/Components/Upload/UploadFile.cs +++ b/src/BootstrapBlazor/Components/Upload/UploadFile.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,78 +8,93 @@ namespace BootstrapBlazor.Components; /// -/// 上传组件返回类 +/// 上传组件返回类 +/// 上传component返回类 /// public class UploadFile { /// - /// 获得/设置 文件名 由用户指定 上传文件时此参数未设置 默认为 null + /// 获得/设置 文件名 由用户指定 上传文件时此参数未设置 默认为 null + /// Gets or sets 文件名 由用户指定 上传文件时此参数未Sets Default is为 null /// public string? FileName { get; set; } /// - /// 获得/设置 原始文件名(上传时 IBrowserFile.Name 实例赋值) + /// 获得/设置 原始文件名(上传时 IBrowserFile.Name 实例赋值) + /// Gets or sets 原始文件名(上传时 IBrowserFile.Name instance赋值) /// public string? OriginFileName { get; internal set; } /// - /// 获得/设置 文件大小 + /// 获得/设置 文件大小 + /// Gets or sets 文件大小 /// public long Size { get; set; } /// - /// 获得/设置 文件上传结果 0 表示成功 非零表示失败 + /// 获得/设置 文件上传结果 0 表示成功 非零表示失败 + /// Gets or sets 文件上传结果 0 表示成功 非零表示失败 /// public int Code { get; set; } /// - /// 获得/设置 文件预览地址 + /// 获得/设置 文件预览地址 + /// Gets or sets 文件预览地址 /// public string? PrevUrl { get; set; } /// - /// 获得/设置 错误信息 + /// 获得/设置 错误信息 + /// Gets or sets 错误信息 /// public string? Error { get; set; } /// - /// 获得/设置 上传文件实例 + /// 获得/设置 上传文件实例 + /// Gets or sets 上传文件instance /// public IBrowserFile? File { get; set; } /// - /// 获得/设置 上传文件总数量 + /// 获得/设置 上传文件总数量 + /// Gets or sets 上传文件总数量 /// public int FileCount { get; init; } = 1; /// - /// 获得/设置 更新进度回调委托 + /// 获得/设置 更新进度回调委托 + /// Gets or sets 更新进度回调delegate /// internal Action? UpdateCallback { get; set; } /// - /// 获得/设置 更新进度回调委托 + /// 获得/设置 更新进度回调委托 + /// Gets or sets 更新进度回调delegate /// internal int ProgressPercent { get; set; } /// - /// 获得/设置 文件是否上传处理完毕 + /// 获得/设置 文件是否上传处理完毕 + /// Gets or sets 文件whether上传处理完毕 /// internal bool Uploaded { get; set; } = true; /// - /// 获得/设置 用于客户端验证 Id + /// 获得/设置 用于客户端验证 Id + /// Gets or sets 用于客户端验证 Id /// internal string? ValidateId { get; set; } /// - /// 获得 UploadFile 文件名 + /// 获得 UploadFile 文件名 + /// Gets UploadFile 文件名 /// /// public string? GetFileName() => FileName ?? OriginFileName ?? File?.Name; /// - /// 获得 UploadFile 文件扩展名 + /// 获得 UploadFile 文件扩展名 + /// Gets UploadFile 文件扩展名 /// /// public string? GetExtension() => Path.GetExtension(GetFileName()); diff --git a/src/BootstrapBlazor/Components/Upload/UploadPreviewList.razor.cs b/src/BootstrapBlazor/Components/Upload/UploadPreviewList.razor.cs index 9dc247b2651..0adab279886 100644 --- a/src/BootstrapBlazor/Components/Upload/UploadPreviewList.razor.cs +++ b/src/BootstrapBlazor/Components/Upload/UploadPreviewList.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,158 +6,214 @@ namespace BootstrapBlazor.Components; /// -/// UploadPreviewList component +/// UploadPreviewList component +/// UploadPreviewList component /// public partial class UploadPreviewList { /// - /// Gets or sets the collection of files to be uploaded. + /// 获得/设置 the 集合 of files to be uploaded. + /// Gets or sets the collection of files to be uploaded. + /// 10.2.2 /// [Parameter] [NotNull] public List? Items { get; set; } /// - /// Gets or sets the disable status of the upload list. + /// 获得/设置 the disable status of the upload list. + /// Gets or sets the disable status of the upload list. + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// Gets or sets a value indicating whether progress should be displayed during the operation. + /// 获得/设置 a value indicating 是否 progress should be 显示ed during the operation. + /// Gets or sets a value indicating whether progress should be displayed during the operation. + /// 10.2.2 /// [Parameter] public bool ShowProgress { get; set; } /// - /// Gets or sets the upload file format callback method. + /// 获得/设置 the upload file format 回调方法. + /// Gets or sets the upload file format callback method. + /// 10.2.2 /// [Parameter] public Func? OnGetFileFormat { get; set; } /// - /// Gets or sets the callback method for the cancel button click event. Default is null + /// Gets or sets the callback method for the cancel button click event. Default is null /// 获得/设置 点击取消按钮回调此方法 默认 null + /// + /// Gets or sets the callback method for the cancel button click event. Default is null + /// Gets or sets 点击取消button回调此方法 Default is null + /// + /// 10.2.2 /// [Parameter] public Func? OnCancel { get; set; } /// - /// 获得/设置 取消图标 + /// 获得/设置 取消图标 + /// Gets or sets 取消icon + /// 10.2.2 /// [Parameter] public string? CancelIcon { get; set; } /// - /// 获得/设置 浏览按钮图标 + /// 获得/设置 浏览按钮图标 + /// + /// Gets or sets 浏览buttonicon + /// + /// 10.2.2 /// [Parameter] public string? LoadingIcon { get; set; } /// - /// 获得/设置 下载按钮图标 + /// 获得/设置 下载按钮图标 + /// Gets or sets 下载buttonicon + /// 10.2.2 /// [Parameter] public string? DownloadIcon { get; set; } /// - /// 获得/设置 上传失败状态图标 + /// 获得/设置 上传失败状态图标 + /// Gets or sets 上传失败状态icon + /// 10.2.2 /// [Parameter] public string? InvalidStatusIcon { get; set; } /// - /// 获得/设置 上传成功状态图标 + /// 获得/设置 上传成功状态图标 + /// Gets or sets 上传成功状态icon + /// 10.2.2 /// [Parameter] public string? ValidStatusIcon { get; set; } /// - /// 获得/设置 删除按钮图标 + /// 获得/设置 删除按钮图标 + /// Gets or sets 删除buttonicon + /// 10.2.2 /// [Parameter] public string? DeleteIcon { get; set; } /// - /// 获得/设置 是否显示下载按钮 默认 false + /// 获得/设置 是否显示下载按钮 默认 false + /// Gets or sets whetherdisplay下载button Default is false + /// 10.2.2 /// [Parameter] public bool ShowDownloadButton { get; set; } /// - /// 获得/设置 点击下载按钮回调方法 默认 null + /// 获得/设置 点击下载按钮回调方法 默认 null + /// Gets or sets 点击下载buttoncallback method Default is null + /// 10.2.2 /// [Parameter] public Func? OnDownload { get; set; } /// - /// 获得/设置 点击删除按钮时回调此方法 默认 null + /// 获得/设置 点击删除按钮时回调此方法 默认 null + /// Gets or sets 点击删除button时回调此方法 Default is null + /// 10.2.2 /// [Parameter] public Func>? OnDelete { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconExcel { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconDocx { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconPPT { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconAudio { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconVideo { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconCode { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconPdf { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconZip { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconArchive { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconImage { get; set; } /// - /// 获得/设置 Excel 类型文件图标 + /// 获得/设置 Excel 类型文件图标 + /// Gets or sets Excel type文件icon + /// 10.2.2 /// [Parameter] public string? FileIconFile { get; set; } diff --git a/src/BootstrapBlazor/Components/Validate/IValidateCollection.cs b/src/BootstrapBlazor/Components/Validate/IValidateCollection.cs index 0dae3b16d0b..ea5a40bf14d 100644 --- a/src/BootstrapBlazor/Components/Validate/IValidateCollection.cs +++ b/src/BootstrapBlazor/Components/Validate/IValidateCollection.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,25 +6,29 @@ namespace BootstrapBlazor.Components; /// -/// IValidateCollection 多个验证结果接口 支持组件间联动验证 +/// IValidateCollection 多个验证结果接口 支持组件间联动验证 +/// IValidateCollection 多个验证结果接口 支持component间联动验证 /// public interface IValidateCollection { /// - /// 验证方法 + /// 验证方法 + /// 验证方法 /// /// /// IEnumerable Validate(ValidationContext validationContext); /// - /// 返回合法成员集合 + /// 返回合法成员集合 + /// 返回合法成员collection /// /// List GetValidMemberNames(); /// - /// 返回非法成员集合 + /// 返回非法成员集合 + /// 返回非法成员collection /// /// List GetInvalidMemberNames(); diff --git a/src/BootstrapBlazor/Components/Validate/IValidateComponent.cs b/src/BootstrapBlazor/Components/Validate/IValidateComponent.cs index c00d08a52b1..bf375990586 100644 --- a/src/BootstrapBlazor/Components/Validate/IValidateComponent.cs +++ b/src/BootstrapBlazor/Components/Validate/IValidateComponent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,23 +6,27 @@ namespace BootstrapBlazor.Components; /// -/// IValidateComponent 接口 +/// IValidateComponent 接口 +/// IValidateComponent 接口 /// public interface IValidateComponent { /// - /// 获得/设置 是否不进行验证 默认为 false + /// 获得/设置 是否不进行验证 默认为 false + /// Gets or sets whether不进行验证 Default is为 false /// bool IsNeedValidate { get; } /// - /// 判断是否需要进行复杂类验证 + /// 判断是否需要进行复杂类验证 + /// 判断whether需要进行复杂类验证 /// /// bool IsComplexValue(object? value); /// - /// 数据验证方法 + /// 数据验证方法 + /// data验证方法 /// /// /// @@ -30,7 +34,8 @@ public interface IValidateComponent Task ValidatePropertyAsync(object? propertyValue, ValidationContext context, List results); /// - /// 显示或者隐藏提示信息方法 + /// 显示或者隐藏提示信息方法 + /// display或者隐藏提示信息方法 /// /// Task ToggleMessage(IReadOnlyCollection results); diff --git a/src/BootstrapBlazor/Components/Validate/ValidateBase.cs b/src/BootstrapBlazor/Components/Validate/ValidateBase.cs index d7ff994b2af..f1725bd1086 100644 --- a/src/BootstrapBlazor/Components/Validate/ValidateBase.cs +++ b/src/BootstrapBlazor/Components/Validate/ValidateBase.cs @@ -10,56 +10,66 @@ namespace BootstrapBlazor.Components; /// -/// 支持客户端验证的文本框基类 +/// 支持客户端验证的文本框基类 +/// 支持客户端验证的文本框基类 /// public abstract class ValidateBase : DisplayBase, IValidateComponent { private ValidationMessageStore? _parsingValidationMessages; /// - /// 获得/设置 上一次转化是否失败 为 true 时表示上一次转化失败 + /// 获得/设置 上一次转化是否失败 为 true 时表示上一次转化失败 + /// Gets or sets 上一次转化whether失败 为 true 时表示上一次转化失败 /// protected bool PreviousParsingAttemptFailed { get; set; } /// - /// 获得/设置 上一次转化失败错误描述信息 + /// 获得/设置 上一次转化失败错误描述信息 + /// Gets or sets 上一次转化失败错误描述信息 /// protected string? PreviousErrorMessage { get; set; } /// - /// Gets the associated + /// 获得 the associated + /// Gets the associated /// protected EditContext? EditContext { get; set; } /// - /// 获得/设置 错误描述信息 + /// 获得/设置 错误描述信息 + /// Gets or sets 错误描述信息 /// protected string? ErrorMessage { get; set; } /// - /// 获得/设置 数据合规样式 + /// 获得/设置 数据合规样式 + /// Gets or sets data合规style /// protected string? ValidCss => IsValid.HasValue ? GetValidString(IsValid.Value) : null; private static string GetValidString(bool valid) => valid ? "is-valid" : "is-invalid"; /// - /// 获得/设置 组件是否合规 默认为 null 未检查 + /// 获得/设置 组件是否合规 默认为 null 未检查 + /// Gets or sets componentwhether合规 Default is为 null 未检查 /// protected bool? IsValid { get; set; } /// - /// 获得 组件是否被禁用属性值 + /// 获得 组件是否被禁用属性值 + /// Gets componentwhether被禁用property值 /// protected string? Disabled => IsDisabled ? "disabled" : null; /// - /// 是否显示 必填项标记 + /// 是否显示 必填项标记 + /// whetherdisplay 必填项标记 /// protected string? Required { get; set; } /// - /// Gets or sets the current value of the input. + /// 获得/设置 the current value of the input. + /// Gets or sets the current value of the input. /// protected TValue? CurrentValue { @@ -92,7 +102,8 @@ protected TValue? CurrentValue } /// - /// Gets or sets the current value of the input, represented as a string. + /// 获得/设置 the current value of the input, represented as a string. + /// Gets or sets the current value of the input, represented as a string. /// protected string CurrentValueAsString { @@ -152,44 +163,57 @@ protected string CurrentValueAsString } /// - /// 获得/设置 Value 改变时回调方法 + /// 获得/设置 Value 改变时回调方法 + /// Gets or sets Value 改变时callback method + /// 10.2.2 /// [Parameter] public Func? OnValueChanged { get; set; } /// - /// 获得/设置 类型转化失败格式化字符串 默认为 null + /// 获得/设置 类型转化失败格式化字符串 默认为 null + /// Gets or sets type转化失败格式化字符串 Default is为 null + /// 10.2.2 /// [Parameter] [NotNull] public string? ParsingErrorMessage { get; set; } /// - /// 获得/设置 是否不进行验证 默认为 false + /// 获得/设置 是否不进行验证 默认为 false + /// Gets or sets whether不进行验证 Default is为 false + /// 10.2.2 /// [Parameter] public bool SkipValidate { get; set; } /// - /// 获得/设置 是否禁用 默认为 false + /// 获得/设置 是否禁用 默认为 false + /// Gets or sets whether禁用 Default is为 false + /// 10.2.2 /// [Parameter] public bool IsDisabled { get; set; } /// - /// 获得/设置 是否显示必填项标记 默认为 null 未设置 + /// 获得/设置 是否显示必填项标记 默认为 null 未设置 + /// Gets or sets whetherdisplay必填项标记 Default is为 null 未Sets + /// 10.2.2 /// [Parameter] public bool? ShowRequired { get; set; } /// - /// 获得/设置 必填项错误文本 默认为 null 未设置 + /// 获得/设置 必填项错误文本 默认为 null 未设置 + /// Gets or sets 必填项错误文本 Default is为 null 未Sets + /// 10.2.2 /// [Parameter] public string? RequiredErrorMessage { get; set; } /// - /// 获得 父组件的 EditContext 实例 + /// 获得 父组件的 EditContext 实例 + /// Gets 父component的 EditContext instance /// [CascadingParameter] protected EditContext? CascadedEditContext { get; set; } @@ -202,8 +226,8 @@ protected string CurrentValueAsString private IStringLocalizerFactory? LocalizerFactory { get; set; } /// - /// Parses a string to create an instance of . Derived classes can override this to change how - /// interprets incoming values. + /// Parses a string to create an 实例 of <类型paramref name="TValue"/>. Derived classes can override this to change how interprets incoming values. + /// Parses a string to create an instance of . Derived classes can override this to change how interprets incoming values. /// /// The string value to be parsed. /// An instance of . @@ -226,13 +250,15 @@ protected virtual bool TryParseValueFromString(string value, [MaybeNullWhen(fals } /// - /// + /// + /// /// /// protected virtual string? FormatParsingErrorMessage() => ParsingErrorMessage; /// - /// 判断是否为必填字段 + /// 判断是否为必填字段 + /// 判断whether为必填字段 /// /// protected virtual bool IsRequired() => ShowRequired ?? FieldIdentifier @@ -241,14 +267,14 @@ protected virtual bool IsRequired() => ShowRequired ?? FieldIdentifier || (ValidateRules?.OfType().Any() ?? false); /// - /// Gets a string that indicates the status of the field being edited. This will include - /// some combination of "modified", "valid", or "invalid", depending on the status of the field. + /// 获得 a string that indicates the status of the field being edited. This will include some combination of "modified", "valid", or "invalid", depending on the status of the field. + /// Gets a string that indicates the status of the field being edited. This will include some combination of "modified", "valid", or "invalid", depending on the status of the field. /// protected string FieldClass => (EditContext != null && FieldIdentifier != null) ? EditContext.FieldCssClass(FieldIdentifier.Value) : ""; /// - /// Gets a CSS class string that combines the class attribute and - /// properties. Derived components should typically use this value for the primary HTML element's class attribute. + /// 获得 a CSS class string that combines the class attribute and properties. Derived components should typically use this value for the primary HTML element's class attribute. + /// Gets a CSS class string that combines the class attribute and properties. Derived components should typically use this value for the primary HTML element's class attribute. /// protected string? CssClass => CssBuilder.Default() .AddClass(FieldClass, IsNeedValidate) @@ -388,18 +414,22 @@ private string GetDefaultRequiredErrorMessage() #region Validation /// - /// 获得 数据验证方法集合 + /// 获得 数据验证方法集合 + /// Gets data验证方法collection /// protected List Rules { get; } = []; /// - /// 获得/设置 自定义验证集合 + /// 获得/设置 自定义验证集合 + /// Gets or sets 自定义验证collection + /// 10.2.2 /// [Parameter] public List? ValidateRules { get; set; } /// - /// 获得/设置 是否不进行验证 默认为 false + /// 获得/设置 是否不进行验证 默认为 false + /// Gets or sets whether不进行验证 Default is为 false /// public bool IsNeedValidate => !IsDisabled && !SkipValidate; @@ -413,7 +443,8 @@ public virtual bool IsComplexValue(object? value) => value != null && value.GetType().IsClass; /// - /// 属性验证方法 + /// 属性验证方法 + /// property验证方法 /// /// /// @@ -489,7 +520,8 @@ private void ValidateType(ValidationContext context, List resu private bool? _shouldRender = null; /// - /// 显示/隐藏验证结果方法 + /// 显示/隐藏验证结果方法 + /// display/隐藏验证结果方法 /// /// public virtual Task ToggleMessage(IReadOnlyCollection results) @@ -518,18 +550,21 @@ public virtual Task ToggleMessage(IReadOnlyCollection results) } /// - /// Gets or sets the module of validate instance. + /// 获得/设置 the module of validate 实例. + /// Gets or sets the module of validate instance. /// protected JSModule? ValidateModule { get; set; } /// - /// 加载 validate 模块方法 + /// 加载 validate 模块方法 + /// 加载 validate 模块方法 /// /// protected Task LoadValidateModule() => JSRuntime.LoadModuleByName("validate"); /// - /// 增加客户端 Tooltip 方法 + /// 增加客户端 Tooltip 方法 + /// 增加客户端 Tooltip 方法 /// /// protected virtual async ValueTask ShowValidResult() @@ -543,7 +578,8 @@ protected virtual async ValueTask ShowValidResult() } /// - /// 移除客户端 Tooltip 方法 + /// 移除客户端 Tooltip 方法 + /// 移除客户端 Tooltip 方法 /// /// protected virtual async ValueTask RemoveValidResult(string? validateId = null) @@ -557,9 +593,10 @@ protected virtual async ValueTask RemoveValidResult(string? validateId = null) } /// - /// 客户端检查完成时调用此方法 + /// 客户端检查完成时调用此方法 + /// 客户端检查完成时调用此方法 /// - /// 检查结果 + /// 检查结果检查result protected virtual void OnValidate(bool? valid) { @@ -590,7 +627,8 @@ protected override async ValueTask DisposeAsync(bool disposing) } /// - /// 增加 方法 + /// 增加 方法 + /// 增加 方法 /// protected virtual void AddRequiredValidator() { @@ -606,7 +644,8 @@ protected virtual void AddRequiredValidator() #endregion /// - /// 设置是否可用状态 + /// 设置是否可用状态 + /// Setswhether可用状态 /// /// public void SetDisable(bool disable) @@ -616,7 +655,8 @@ public void SetDisable(bool disable) } /// - /// 设置 Value 值 + /// 设置 Value 值 + /// Sets Value 值 /// /// public void SetValue(TValue value) @@ -631,7 +671,8 @@ public void SetValue(TValue value) } /// - /// 设置 Label 值 + /// 设置 Label 值 + /// Sets Label 值 /// /// public void SetLabel(string label) diff --git a/src/BootstrapBlazor/Components/ValidateForm/BootstrapBlazorDataAnnotationsValidator.cs b/src/BootstrapBlazor/Components/ValidateForm/BootstrapBlazorDataAnnotationsValidator.cs index 095fb7503d6..49e52a64059 100644 --- a/src/BootstrapBlazor/Components/ValidateForm/BootstrapBlazorDataAnnotationsValidator.cs +++ b/src/BootstrapBlazor/Components/ValidateForm/BootstrapBlazorDataAnnotationsValidator.cs @@ -8,19 +8,22 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapBlazorDataAnnotationsValidator 验证组件 +/// BootstrapBlazorDataAnnotationsValidator 验证组件 +/// BootstrapBlazorDataAnnotationsValidator 验证component /// public class BootstrapBlazorDataAnnotationsValidator : ComponentBase, IDisposable { /// - /// 获得/设置 当前编辑数据上下文 + /// 获得/设置 当前编辑数据上下文 + /// Gets or sets 当前编辑data上下文 /// [CascadingParameter] [NotNull] private EditContext? CurrentEditContext { get; set; } /// - /// 获得/设置 当前编辑窗体上下文 + /// 获得/设置 当前编辑窗体上下文 + /// Gets or sets 当前编辑窗体上下文 /// [CascadingParameter] [NotNull] @@ -34,7 +37,8 @@ public class BootstrapBlazorDataAnnotationsValidator : ComponentBase, IDisposabl private ValidationMessageStore? _message = null; /// - /// 初始化方法 + /// 初始化方法 + /// 初始化方法 /// protected override void OnInitialized() { @@ -49,7 +53,8 @@ protected override void OnInitialized() private TaskCompletionSource? _tcs; /// - /// 手动验证表单方法 + /// 手动验证表单方法 + /// 手动验证表单方法 /// /// internal async Task ValidateAsync() @@ -61,7 +66,8 @@ internal async Task ValidateAsync() } /// - /// 手动验证表单方法 + /// 手动验证表单方法 + /// 手动验证表单方法 /// [ExcludeFromCodeCoverage] internal bool Validate() => CurrentEditContext.Validate(); @@ -140,7 +146,8 @@ private void Dispose(bool disposing) } /// - /// + /// + /// /// public void Dispose() { diff --git a/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs b/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs index 54133010822..4aa6f7fdeb4 100644 --- a/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs +++ b/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs @@ -13,91 +13,114 @@ namespace BootstrapBlazor.Components; /// -/// ValidateForm 组件类 +/// ValidateForm 组件类 +/// ValidateForm component类 /// public partial class ValidateForm { /// - /// A callback that will be invoked when the form is submitted and the - /// is determined to be valid. + /// A 回调 that will be invoked when the form is submitted and the is determined to be valid. + /// A callback that will be invoked when the form is submitted and the is determined to be valid. + /// 10.2.2 /// [Parameter] public Func? OnValidSubmit { get; set; } /// - /// A callback that will be invoked when the form is submitted and the - /// is determined to be invalid. + /// A 回调 that will be invoked when the form is submitted and the is determined to be invalid. + /// A callback that will be invoked when the form is submitted and the is determined to be invalid. + /// 10.2.2 /// [Parameter] public Func? OnInvalidSubmit { get; set; } /// - /// A callback that will be invoked when the field's value has been changed + /// A 回调 that will be invoked when the field's value has been changed + /// A callback that will be invoked when the field's value has been changed + /// 10.2.2 /// [Parameter] [NotNull] public Action? OnFieldValueChanged { get; set; } /// - /// 获得/设置 是否显示所有验证失败字段的提示信息 默认 false 仅显示第一个验证失败字段的提示信息 + /// 获得/设置 是否显示所有验证失败字段的提示信息 默认 false 仅显示第一个验证失败字段的提示信息 + /// Gets or sets whetherdisplay所有验证失败字段的提示信息 Default is false 仅display第一个验证失败字段的提示信息 + /// 10.2.2 /// [Parameter] public bool ShowAllInvalidResult { get; set; } /// - /// 获得/设置 是否验证所有字段 默认 false + /// 获得/设置 是否验证所有字段 默认 false + /// Gets or sets whether验证所有字段 Default is false + /// 10.2.2 /// [Parameter] public bool ValidateAllProperties { get; set; } /// - /// Specifies the top-level model object for the form. An edit context will - /// be constructed for this model. If using this parameter, do not also supply - /// a value for . + /// Specifies the top-level model object for the form. An edit context will be constructed for this model. If using this parameter, do not also supply a value for . + /// Specifies the top-level model object for the form. An edit context will be constructed for this model. If using this parameter, do not also supply a value for . + /// 10.2.2 /// [Parameter] [NotNull] public object? Model { get; set; } /// - /// Specifies the content to be rendered inside this + /// Specifies the 内容 to be rendered inside this + /// Specifies the content to be rendered inside this + /// 10.2.2 /// [Parameter] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 是否获取必填项标记 默认为 true 显示 + /// 获得/设置 是否获取必填项标记 默认为 true 显示 + /// Gets or sets whether获取必填项标记 Default is为 true display + /// 10.2.2 /// [Parameter] public bool ShowRequiredMark { get; set; } = true; /// - /// 获得/设置 是否显示验证表单内的 Label 默认为 null + /// 获得/设置 是否显示验证表单内的 Label 默认为 null + /// Gets or sets whetherdisplay验证表单内的 Label Default is为 null + /// 10.2.2 /// [Parameter] public bool? ShowLabel { get; set; } /// - /// 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null + /// 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null + /// Gets or sets whetherdisplay标签 Tooltip 多用于标签文字过长导致裁减时使用 Default is null + /// 10.2.2 /// [Parameter] public bool? ShowLabelTooltip { get; set; } /// - /// 获得/设置 是否为无表单模式 默认 false + /// 获得/设置 是否为无表单模式 默认 false + /// Gets or sets whether为无表单模式 Default is false + /// 10.2.2 /// /// 设置为 true 时不渲染 form 元素,仅级联 EditContext 用于 Table InCell 编辑模式 [Parameter] public bool IsFormless { get; set; } /// - /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 + /// Gets or sets whether禁用表单内回车自动提交功能 Default is null 未Sets + /// 10.2.2 /// [Parameter] public bool? DisableAutoSubmitFormByEnter { get; set; } /// - /// 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 + /// 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width + /// Gets or sets 标签width Default is null 未Sets使用全局Sets --bb-row-label-width + /// 10.2.2 /// [Parameter] public int? LabelWidth { get; set; } @@ -115,24 +138,28 @@ public partial class ValidateForm private IStringLocalizerFactory? LocalizerFactory { get; set; } /// - /// 验证组件缓存 + /// 验证组件缓存 + /// 验证component缓存 /// private readonly ConcurrentDictionary<(string FieldName, Type ModelType), (FieldIdentifier FieldIdentifier, IValidateComponent ValidateComponent)> _validatorCache = new(); /// - /// 验证组件验证结果缓存 + /// 验证组件验证结果缓存 + /// 验证component验证结果缓存 /// private readonly ConcurrentDictionary> _validateResults = new(); private string? DisableAutoSubmitString => (DisableAutoSubmitFormByEnter.HasValue && DisableAutoSubmitFormByEnter.Value) ? "true" : null; /// - /// 验证合法成员集合 + /// 验证合法成员集合 + /// 验证合法成员collection /// internal List ValidMemberNames { get; } = []; /// - /// 验证非法成员集合 + /// 验证非法成员集合 + /// 验证非法成员collection /// internal List InvalidMemberNames { get; } = []; @@ -143,7 +170,8 @@ public partial class ValidateForm .Build(); /// - /// OnParametersSet 方法 + /// OnParametersSet 方法 + /// OnParametersSet 方法 /// protected override void OnParametersSet() { @@ -162,7 +190,8 @@ protected override void OnParametersSet() } /// - /// 添加数据验证组件到 EditForm 中 + /// 添加数据验证组件到 EditForm 中 + /// 添加data验证component到 EditForm 中 /// /// /// @@ -172,17 +201,19 @@ internal void AddValidator((string FieldName, Type ModelType) key, (FieldIdentif } /// - /// 移除数据验证组件到 EditForm 中 + /// 移除数据验证组件到 EditForm 中 + /// 移除data验证component到 EditForm 中 /// /// /// internal bool TryRemoveValidator((string FieldName, Type ModelType) key, out (FieldIdentifier FieldIdentifier, IValidateComponent IValidateComponent) value) => _validatorCache.TryRemove(key, out value); /// - /// 设置指定字段错误信息 + /// 设置指定字段错误信息 + /// Sets指定字段错误信息 /// /// - /// 错误描述信息,可为空,为空时查找资源文件 + /// 错误描述信息,可为空,为空时查找资源文件错误描述info,可为空,为空时查找资源文件 public async Task SetError(Expression> expression, string errorMessage) { switch (expression.Body) @@ -217,10 +248,11 @@ private async Task InternalSetError(MemberExpression exp, string errorMessage) } /// - /// 设置指定字段错误信息 + /// 设置指定字段错误信息 + /// Sets指定字段错误信息 /// - /// 字段名,可以使用多层,如 a.b.c - /// 错误描述信息,可为空,为空时查找资源文件 + /// 字段名,可以使用多层,如 a.b.c字段名,可以使用多层,如 a.b.c + /// 错误描述信息,可为空,为空时查找资源文件错误描述info,可为空,为空时查找资源文件 public async Task SetError(string propertyName, string errorMessage) { if (TryGetModelField(propertyName, out var modelType, out var fieldName) && TryGetValidator(modelType, fieldName, out var validator)) @@ -264,7 +296,8 @@ private bool TryGetValidator(Type modelType, string fieldName, out IValidateComp private static bool IsPublic(PropertyInfo p) => p.GetMethod != null && p.SetMethod != null && p.GetMethod.IsPublic && p.SetMethod.IsPublic; /// - /// EditModel 数据模型验证方法 + /// EditModel 数据模型验证方法 + /// EditModel data模型验证方法 /// /// /// @@ -350,7 +383,8 @@ internal async Task ValidateObject(ValidationContext context, List - /// 通过表单内绑定的字段验证方法 + /// 通过表单内绑定的字段验证方法 + /// 通过表单内绑定的字段验证方法 /// /// /// @@ -375,7 +409,8 @@ internal async Task ValidateFieldAsync(ValidationContext context, List - /// 通过属性设置的 DataAnnotation 进行数据验证 + /// 通过属性设置的 DataAnnotation 进行数据验证 + /// 通过propertySets的 DataAnnotation 进行data验证 /// /// /// @@ -458,7 +493,8 @@ private void ValidateDataAnnotations(object? value, ValidationContext context, L } /// - /// 验证整个模型时验证属性方法 + /// 验证整个模型时验证属性方法 + /// 验证整个模型时验证property方法 /// /// /// @@ -570,7 +606,8 @@ private async Task ValidateAsync(IValidateComponent validator, ValidationContext private List AsyncSubmitButtons { get; } = []; /// - /// 注册提交按钮 + /// 注册提交按钮 + /// 注册提交button /// /// internal void RegisterAsyncSubmitButton(ButtonBase button) @@ -644,25 +681,29 @@ private async Task OnInvalidSubmitForm(EditContext context) private BootstrapBlazorDataAnnotationsValidator? Validator { get; set; } /// - /// 获得/设置 无表单模式下的 EditContext 实例 + /// 获得/设置 无表单模式下的 EditContext 实例 + /// Gets or sets 无表单模式下的 EditContext instance /// private EditContext? _formlessEditContext; /// - /// 同步验证方法 用于代码调用触发表单验证(不支持某些组件的异步验证) + /// 同步验证方法 用于代码调用触发表单验证(不支持某些组件的异步验证) + /// 同步验证方法 用于代码调用触发表单验证(不支持某些component的异步验证) /// [Obsolete("已弃用,请使用 ValidateAsync 方法。Deprecated. Please use the ValidateAsync method.")] [ExcludeFromCodeCoverage] public bool Validate() => Validator.Validate(); /// - /// 异步验证方法 用于代码调用触发表单验证(支持异步验证) + /// 异步验证方法 用于代码调用触发表单验证(支持异步验证) + /// 异步验证方法 用于代码调用触发表单验证(支持异步验证) /// /// public Task ValidateAsync() => Validator.ValidateAsync(); /// - /// 通知属性改变方法 + /// 通知属性改变方法 + /// 通知property改变方法 /// /// /// @@ -673,13 +714,15 @@ public void NotifyFieldChanged(in FieldIdentifier fieldIdentifier, object? value } /// - /// 获取 当前表单值改变的属性集合 + /// 获取 当前表单值改变的属性集合 + /// 获取 当前表单值改变的propertycollection /// /// public ConcurrentDictionary ValueChangedFields { get; } = new(); /// - /// 获取 当前表单值改变的属性集合 + /// 获取 当前表单值改变的属性集合 + /// 获取 当前表单值改变的propertycollection /// /// [Obsolete("已弃用,单词拼写错误,请使用 ValueChangedFields,Deprecated Please use ValueChangedFields instead. wrong typo")] diff --git a/src/BootstrapBlazor/Components/Waterfall/Waterfall.razor.cs b/src/BootstrapBlazor/Components/Waterfall/Waterfall.razor.cs index 24b1fed4450..6de63fa9fc4 100644 --- a/src/BootstrapBlazor/Components/Waterfall/Waterfall.razor.cs +++ b/src/BootstrapBlazor/Components/Waterfall/Waterfall.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,37 +6,48 @@ namespace BootstrapBlazor.Components; /// -/// Waterfall 组件 +/// Waterfall 组件 +/// Waterfall component /// public partial class Waterfall { /// - /// 获得/设置 点击列表项回调方法 + /// 获得/设置 点击列表项回调方法 + /// Gets or sets 点击列表项callback method + /// 10.2.2 /// [Parameter] public Func? OnClickItemAsync { get; set; } /// - /// 获得/设置 请求数据回调方法 + /// 获得/设置 请求数据回调方法 + /// Gets or sets 请求datacallback method + /// 10.2.2 /// [Parameter] [NotNull] public Func>>? OnRequestAsync { get; set; } /// - /// 获得/设置 模板 默认为 null + /// 获得/设置 模板 默认为 null + /// Gets or sets template Default is为 null + /// 10.2.2 /// [Parameter] public RenderFragment<(WaterfallItem Item, RenderFragment Context)>? Template { get; set; } /// - /// 获得/设置 图片模板 默认为 null + /// 获得/设置 图片模板 默认为 null + /// Gets or sets 图片template Default is为 null + /// 10.2.2 /// [Parameter] public RenderFragment? ItemTemplate { get; set; } /// - /// 获得/设置 加载模板 + /// 获得/设置 加载模板 + /// Gets or sets 加载template + /// 10.2.2 /// [Parameter] public RenderFragment? LoadTemplate { get; set; } @@ -44,13 +55,17 @@ public partial class Waterfall private readonly List _items = []; /// - /// 获得/设置 每一项宽度 默认 216 + /// 获得/设置 每一项宽度 默认 216 + /// Gets or sets 每一项width Default is 216 + /// 10.2.2 /// [Parameter] public int ItemWidth { get; set; } = 216; /// - /// 获得/设置 每一项最小宽度 默认 316 用于显示 loading 图标 + /// 获得/设置 每一项最小宽度 默认 316 用于显示 loading 图标 + /// Gets or sets 每一项最小width Default is 316 用于display loading icon + /// 10.2.2 /// [Parameter] public int ItemMinHeight { get; set; } = 316; @@ -89,7 +104,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender) protected override Task InvokeInitAsync() => InvokeVoidAsync("init", Id, Interop, nameof(OnloadAsync)); /// - /// 请求数据回调方法 + /// 请求数据回调方法 + /// 请求datacallback method /// [JSInvokable] public async Task OnloadAsync(WaterfallItem? item) @@ -104,7 +120,8 @@ public async Task OnloadAsync(WaterfallItem? item) } /// - /// 点击图片回调方法 + /// 点击图片回调方法 + /// 点击图片callback method /// /// /// diff --git a/src/BootstrapBlazor/Components/Waterfall/WaterfallItem.cs b/src/BootstrapBlazor/Components/Waterfall/WaterfallItem.cs index bf337dcc5f8..3d22d4e28b2 100644 --- a/src/BootstrapBlazor/Components/Waterfall/WaterfallItem.cs +++ b/src/BootstrapBlazor/Components/Waterfall/WaterfallItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// Waterfall 组件数据类 +/// Waterfall 组件数据类 +/// Waterfall componentdata类 /// public class WaterfallItem { /// - /// 获得/设置 id + /// 获得/设置 id + /// Gets or sets id /// public string? Id { get; set; } /// - /// the url of image element + /// the url of image element + /// the url of image element /// public string? Url { get; set; } } diff --git a/src/BootstrapBlazor/Components/Watermark/Watermark.razor.cs b/src/BootstrapBlazor/Components/Watermark/Watermark.razor.cs index fb7fb15002e..cc1ebc6f4bc 100644 --- a/src/BootstrapBlazor/Components/Watermark/Watermark.razor.cs +++ b/src/BootstrapBlazor/Components/Watermark/Watermark.razor.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,55 +6,72 @@ namespace BootstrapBlazor.Components; /// -/// Watermark 组件 +/// Watermark 组件 +/// Watermark component /// public partial class Watermark { /// - /// 获得/设置 组件内容 + /// 获得/设置 组件内容 + /// Gets or sets componentcontent + /// 10.2.2 /// [Parameter] [EditorRequired] public RenderFragment? ChildContent { get; set; } /// - /// 获得/设置 水印文本 默认 BootstrapBlazor + /// 获得/设置 水印文本 默认 BootstrapBlazor + /// Gets or sets 水印文本 Default is BootstrapBlazor + /// 10.2.2 /// [Parameter] public string? Text { get; set; } /// - /// 获得/设置 字体大小 默认 null 未设置 默认使用 16px 字体大小 单位 px + /// 获得/设置 字体大小 默认 null 未设置 默认使用 16px 字体大小 单位 px + /// Gets or sets 字体大小 Default is null 未Sets Default is使用 16px 字体大小 单位 px + /// 10.2.2 /// [Parameter] public int? FontSize { get; set; } /// - /// 获得/设置 颜色 默认 null 未设置 + /// 获得/设置 颜色 默认 null 未设置 + /// Gets or sets color Default is null 未Sets + /// 10.2.2 /// [Parameter] public string? Color { get; set; } /// - /// 获得/设置 水印的旋转角度 默认 null 45° + /// 获得/设置 水印的旋转角度 默认 null 45° + /// Gets or sets 水印的旋转角度 Default is null 45° + /// 10.2.2 /// [Parameter] public int? Rotate { get; set; } /// - /// 获得/设置 水印元素的 z-index 值 默认 null + /// 获得/设置 水印元素的 z-index 值 默认 null + /// Gets or sets 水印元素的 z-index 值 Default is null + /// 10.2.2 /// [Parameter] public int? ZIndex { get; set; } /// - /// 获得/设置 水印之间的间距 值 默认 null + /// 获得/设置 水印之间的间距 值 默认 null + /// Gets or sets 水印之间的间距 值 Default is null + /// 10.2.2 /// [Parameter] public int? Gap { get; set; } /// - /// 获得/设置 是否为整页面水印 默认 false + /// 获得/设置 是否为整页面水印 默认 false + /// Gets or sets whether为整页面水印 Default is false + /// 10.2.2 /// [Parameter] public bool IsPage { get; set; } @@ -73,7 +90,7 @@ protected override void OnParametersSet() Text ??= "BootstrapBlazor"; - if(IsPage && ChildContent is not null) + if (IsPage && ChildContent is not null) { throw new InvalidOperationException($"{nameof(IsPage)} is true, {nameof(ChildContent)} cannot be set."); } diff --git a/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognition.cs b/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognition.cs index e2dc059f794..69abdb6b9ef 100644 --- a/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognition.cs +++ b/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognition.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// WebSpeechRecognition 类 +/// WebSpeechRecognition 类 +/// WebSpeechRecognition 类 /// public class WebSpeechRecognition(JSModule module, IComponentIdGenerator componentIdGenerator) { @@ -15,47 +16,56 @@ public class WebSpeechRecognition(JSModule module, IComponentIdGenerator compone private string? _id; /// - /// fired when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition. + /// fired when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition. + /// fired when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition. /// public Func? OnStartAsync { get; set; } /// - /// fired when the speech recognition service has disconnected. + /// fired when the speech recognition service has disconnected. + /// fired when the speech recognition service has disconnected. /// public Func? OnEndAsync { get; set; } /// - /// fired when sound recognized by the speech recognition service as speech has been detected. + /// fired when sound recognized by the speech recognition service as speech has been detected. + /// fired when sound recognized by the speech recognition service as speech has been detected. /// public Func? OnSpeechStartAsync { get; set; } /// - /// fired when speech recognized by the speech recognition service has stopped being detected. + /// fired when speech recognized by the speech recognition service has stopped being detected. + /// fired when speech recognized by the speech recognition service has stopped being detected. /// public Func? OnSpeechEndAsync { get; set; } /// - /// fired when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app + /// fired when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app + /// fired when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app /// public Func? OnResultAsync { get; set; } /// - /// fired when a speech recognition error occurs. + /// fired when a speech recognition error occurs. + /// fired when a speech recognition error occurs. /// public Func? OnErrorAsync { get; set; } /// - /// fired when the speech recognition service returns a final result with no significant recognition. + /// fired when the speech recognition service returns a final result with no significant recognition. + /// fired when the speech recognition service returns a final result with no significant recognition. /// public Func? OnNoMatchAsync { get; set; } /// - /// 开始识别方法 + /// 开始识别方法 + /// 开始识别方法 /// public Task StartAsync(string lang) => StartAsync(new WebSpeechRecognitionOption() { Lang = lang }); /// - /// 开始识别方法 + /// 开始识别方法 + /// 开始识别方法 /// public async Task StartAsync(WebSpeechRecognitionOption option) { @@ -73,7 +83,8 @@ public async Task StartAsync(WebSpeechRecognitionOption option) } /// - /// 结束识别方法 + /// 结束识别方法 + /// 结束识别方法 /// /// public async Task StopAsync() @@ -82,7 +93,8 @@ public async Task StopAsync() } /// - /// 中断识别方法 + /// 中断识别方法 + /// 中断识别方法 /// /// public async Task AbortAsync() @@ -91,7 +103,8 @@ public async Task AbortAsync() } /// - /// 开始识别回调方法由 Javascript 调用 + /// 开始识别回调方法由 Javascript 调用 + /// 开始识别callback method由 Javascript 调用 /// /// [JSInvokable] @@ -104,7 +117,8 @@ public async Task TriggerStartCallback() } /// - /// 语音开始回调方法由 Javascript 调用 + /// 语音开始回调方法由 Javascript 调用 + /// 语音开始callback method由 Javascript 调用 /// /// [JSInvokable] @@ -117,7 +131,8 @@ public async Task TriggerSpeechStartCallback() } /// - /// 语音结束回调方法由 Javascript 调用 + /// 语音结束回调方法由 Javascript 调用 + /// 语音结束callback method由 Javascript 调用 /// /// [JSInvokable] @@ -130,7 +145,8 @@ public async Task TriggerSpeechEndCallback() } /// - /// 异常回调方法由 Javascript 调用 + /// 异常回调方法由 Javascript 调用 + /// exceptioncallback method由 Javascript 调用 /// /// [JSInvokable] @@ -143,7 +159,8 @@ public async Task TriggerErrorCallback(WebSpeechRecognitionError error) } /// - /// 识别结果回调方法由 Javascript 调用 + /// 识别结果回调方法由 Javascript 调用 + /// 识别结果callback method由 Javascript 调用 /// /// [JSInvokable] @@ -156,7 +173,8 @@ public async Task TriggerResultCallback(WebSpeechRecognitionEvent @event) } /// - /// 无识别结果回调方法由 Javascript 调用 + /// 无识别结果回调方法由 Javascript 调用 + /// 无识别结果callback method由 Javascript 调用 /// /// [JSInvokable] @@ -169,7 +187,8 @@ public async Task TriggerNoMatchCallback(WebSpeechRecognitionError error) } /// - /// 朗读结束回调方法由 Javascript 调用 + /// 朗读结束回调方法由 Javascript 调用 + /// 朗读结束callback method由 Javascript 调用 /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionError.cs b/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionError.cs index 5dc6034f25d..0260f13e172 100644 --- a/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionError.cs +++ b/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionError.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// WebSpeechRecognitionError 类 +/// WebSpeechRecognitionError 类 +/// WebSpeechRecognitionError 类 /// public class WebSpeechRecognitionError { /// - /// A string naming the type of error. no-speech aborted audio-capture network not-allowed service-not-allowed bad-grammar language-not-supported. + /// A string naming the 类型 of error. no-speech aborted audio-capture network not-allowed service-not-allowed bad-grammar language-not-supported. + /// A string naming the type of error. no-speech aborted audio-capture network not-allowed service-not-allowed bad-grammar language-not-supported. /// public string? Error { get; set; } /// - /// A string containing more details about the error that was raised. Note that the spec does not define the exact wording of these messages — this is up to the implementors to decide upon. + /// A string containing more details about the error that was raised. Note that the spec does not define the exact wording of these messages — this is up to the implementors to decide upon. + /// A string containing more details about the error that was raised. Note that the spec does not define the exact wording of these messages — this is up to the implementors to decide upon. /// public string? Message { get; set; } } diff --git a/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionEvent.cs b/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionEvent.cs index dbfe3339526..2199b8b148f 100644 --- a/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionEvent.cs +++ b/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionEvent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// WebSpeechRecognitionEvent 类 +/// WebSpeechRecognitionEvent 类 +/// WebSpeechRecognitionEvent 类 /// public class WebSpeechRecognitionEvent { /// - /// 获得/设置 识别文本内容 + /// 获得/设置 识别文本内容 + /// Gets or sets 识别文本content /// public string? Transcript { get; set; } /// - /// 获得/设置 是否已经结束 + /// 获得/设置 是否已经结束 + /// Gets or sets whether已经结束 /// public bool IsFinal { get; set; } } diff --git a/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionOption.cs b/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionOption.cs index 6ec98eac813..36896d36edb 100644 --- a/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionOption.cs +++ b/src/BootstrapBlazor/Components/WebSpeech/Recognition/WebSpeechRecognitionOption.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,30 +8,35 @@ namespace BootstrapBlazor.Components; /// -/// WebSpeechRecognitionOption 配置类 +/// WebSpeechRecognitionOption 配置类 +/// WebSpeechRecognitionOption 配置类 /// public class WebSpeechRecognitionOption { /// - /// sets the maximum number of SpeechRecognitionAlternatives provided per SpeechRecognitionResult. + /// sets the maximum number of SpeechRecognitionAlternatives provided per SpeechRecognitionResult. + /// sets the maximum number of SpeechRecognitionAlternatives provided per SpeechRecognitionResult. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public float? MaxAlternatives { get; set; } /// - /// whether continuous results are returned for each recognition, or only a single result. + /// 是否 continuous results are returned for each recognition, or only a single result. + /// whether continuous results are returned for each recognition, or only a single result. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? Continuous { get; set; } /// - /// whether interim results should be returned (true) or not (false). Interim results are results that are not yet final (e.g. the SpeechRecognitionResult.isFinal property is false). + /// 是否 interim results should be returned (true) or not (false). Interim results are results that are not yet final (e.g. the SpeechRecognitionResult.isFinal 属性 is false). + /// whether interim results should be returned (true) or not (false). Interim results are results that are not yet final (e.g. the SpeechRecognitionResult.isFinal property is false). /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public bool? InterimResults { get; set; } /// - /// sets the language of the current SpeechRecognition. If not specified, this defaults to the HTML lang attribute value, or the user agent's language setting if that isn't set either. + /// sets the language of the current SpeechRecognition. If not specified, this defaults to the HTML lang attribute value, or the user agent's language setting if that isn't set either. + /// sets the language of the current SpeechRecognition. If not specified, this defaults to the HTML lang attribute value, or the user agent's language setting if that isn't set either. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Lang { get; set; } diff --git a/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisError.cs b/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisError.cs index 0e777d0958f..4683168c2cd 100644 --- a/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisError.cs +++ b/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisError.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// WebSpeechSynthesisError 类 +/// WebSpeechSynthesisError 类 +/// WebSpeechSynthesisError 类 /// public class WebSpeechSynthesisError { /// - /// Returns the index position of the character in the SpeechSynthesisUtterance.text that was being spoken when the event was triggered. + /// Returns the 索引 position of the character in the SpeechSynthesisUtterance.text that was being spoken when the event was triggered. + /// Returns the index position of the character in the SpeechSynthesisUtterance.text that was being spoken when the event was triggered. /// public int CharIndex { get; set; } /// - /// Returns the elapsed time in seconds after the SpeechSynthesisUtterance.text started being spoken that the event was triggered at. + /// Returns the elapsed time in seconds after the SpeechSynthesisUtterance.text started being spoken that the event was triggered at. + /// Returns the elapsed time in seconds after the SpeechSynthesisUtterance.text started being spoken that the event was triggered at. /// public float ElapsedTime { get; set; } /// - /// Returns an error code indicating what has gone wrong with a speech synthesis attempt. + /// Returns an error code indicating what has gone wrong with a speech synthesis attempt. + /// Returns an error code indicating what has gone wrong with a speech synthesis attempt. /// public string? Error { get; set; } } diff --git a/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisUtterance.cs b/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisUtterance.cs index 20bba13ee4e..4741046f663 100644 --- a/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisUtterance.cs +++ b/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisUtterance.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,42 +8,49 @@ namespace BootstrapBlazor.Components; /// -/// WebSpeechSynthesisUtterance 类 +/// WebSpeechSynthesisUtterance 类 +/// WebSpeechSynthesisUtterance 类 /// public class WebSpeechSynthesisUtterance { /// - /// gets and sets the text that will be synthesized when the utterance is spoken. + /// gets and sets the text that will be synthesized when the utterance is spoken. + /// gets and sets the text that will be synthesized when the utterance is spoken. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Text { get; set; } /// - /// gets and sets A string representing a BCP 47 language tag + /// gets and sets A string representing a BCP 47 language tag + /// gets and sets A string representing a BCP 47 language tag /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Lang { get; set; } /// - /// gets and sets the pitch at which the utterance will be spoken at. + /// gets and sets the pitch at which the utterance will be spoken at. + /// gets and sets the pitch at which the utterance will be spoken at. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public float? Pitch { get; set; } /// - /// gets and sets the speed at which the utterance will be spoken at. + /// gets and sets the speed at which the utterance will be spoken at. + /// gets and sets the speed at which the utterance will be spoken at. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public float? Rate { get; set; } /// - /// gets and sets the voice that will be used to speak the utterance. + /// gets and sets the voice that will be used to speak the utterance. + /// gets and sets the voice that will be used to speak the utterance. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public WebSpeechSynthesisVoice? Voice { get; set; } /// - /// gets and sets the volume that the utterance will be spoken at. + /// gets and sets the volume that the utterance will be spoken at. + /// gets and sets the volume that the utterance will be spoken at. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public float? Volume { get; set; } diff --git a/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisVoice.cs b/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisVoice.cs index 328d6a03343..4adf895fdfa 100644 --- a/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisVoice.cs +++ b/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesisVoice.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,38 @@ namespace BootstrapBlazor.Components; /// -/// WebSpeechSynthesisVoice 类 +/// WebSpeechSynthesisVoice 类 +/// WebSpeechSynthesisVoice 类 /// public class WebSpeechSynthesisVoice { /// - /// 获得/设置 是否为默认 + /// 获得/设置 是否为默认 + /// Gets or sets whether为Default is /// public bool Default { get; set; } /// - /// 获得/设置 indicating the language of the voice. + /// 获得/设置 indicating the language of the voice. + /// Gets or sets indicating the language of the voice. /// public string? Lang { get; set; } /// - /// 获得/设置 human-readable name that represents the voice. + /// 获得/设置 human-readable name that represents the voice. + /// Gets or sets human-readable name that represents the voice. /// public string? Name { get; set; } /// - /// 获得/设置 indicating whether the voice is supplied by a local speech synthesizer service + /// 获得/设置 indicating whether the voice is supplied by a local speech synthesizer service + /// Gets or sets indicating whether the voice is supplied by a local speech synthesizer service /// public bool LocalService { get; set; } /// - /// 获得/设置 the type of URI and location of the speech synthesis service for this voice. + /// 获得/设置 the type of URI and location of the speech synthesis service for this voice. + /// Gets or sets the type of URI and location of the speech synthesis service for this voice. /// public string? VoiceURI { get; set; } } diff --git a/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesizer.cs b/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesizer.cs index b50466c4769..4f584225799 100644 --- a/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesizer.cs +++ b/src/BootstrapBlazor/Components/WebSpeech/Synthesizer/WebSpeechSynthesizer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// WebSpeechSynthesizer 类 +/// WebSpeechSynthesizer 类 +/// WebSpeechSynthesizer 类 /// public class WebSpeechSynthesizer(JSModule module, IComponentIdGenerator componentIdGenerator) { @@ -15,23 +16,27 @@ public class WebSpeechSynthesizer(JSModule module, IComponentIdGenerator compone private string? _id; /// - /// 获得/设置 朗读结束回调方法 默认 null + /// 获得/设置 朗读结束回调方法 默认 null + /// Gets or sets 朗读结束callback method Default is null /// public Func? OnEndAsync { get; set; } /// - /// 获得/设置 发生错误回调方法 默认 null + /// 获得/设置 发生错误回调方法 默认 null + /// Gets or sets 发生错误callback method Default is null /// public Func? OnErrorAsync { get; set; } /// - /// 获得 语音包方法 + /// 获得 语音包方法 + /// Gets 语音包方法 /// /// public async Task GetVoices() => await module.InvokeAsync("getVoices"); /// - /// 开始朗读方法 + /// 开始朗读方法 + /// 开始朗读方法 /// /// public async Task SpeakAsync(WebSpeechSynthesisUtterance utterance) @@ -42,7 +47,8 @@ public async Task SpeakAsync(WebSpeechSynthesisUtterance utterance) } /// - /// 开始朗读方法 + /// 开始朗读方法 + /// 开始朗读方法 /// /// /// @@ -53,7 +59,8 @@ public Task SpeakAsync(string? text, string? lang) => SpeakAsync(new WebSpeechSy }); /// - /// 开始朗读方法 + /// 开始朗读方法 + /// 开始朗读方法 /// /// /// @@ -64,7 +71,8 @@ public Task SpeakAsync(string? text, WebSpeechSynthesisVoice? voice = null) => S }); /// - /// 暂停朗读方法 + /// 暂停朗读方法 + /// 暂停朗读方法 /// /// public async Task PauseAsync() @@ -73,7 +81,8 @@ public async Task PauseAsync() } /// - /// 恢复朗读方法 + /// 恢复朗读方法 + /// 恢复朗读方法 /// /// public async Task ResumeAsync() @@ -82,7 +91,8 @@ public async Task ResumeAsync() } /// - /// 取消朗读方法 + /// 取消朗读方法 + /// 取消朗读方法 /// /// public async Task CancelAsync() @@ -91,7 +101,8 @@ public async Task CancelAsync() } /// - /// 朗读异常回调方法由 Javascript 调用 + /// 朗读异常回调方法由 Javascript 调用 + /// 朗读exceptioncallback method由 Javascript 调用 /// /// [JSInvokable] @@ -104,7 +115,8 @@ public async Task TriggerErrorCallback(WebSpeechSynthesisError error) } /// - /// 朗读结束回调方法由 Javascript 调用 + /// 朗读结束回调方法由 Javascript 调用 + /// 朗读结束callback method由 Javascript 调用 /// /// [JSInvokable] @@ -117,7 +129,8 @@ public async Task TriggerEndCallback() } /// - /// 正在朗读回调方法由 Javascript 调用 + /// 正在朗读回调方法由 Javascript 调用 + /// 正在朗读callback method由 Javascript 调用 /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Components/WebSpeech/WebSpeechService.cs b/src/BootstrapBlazor/Components/WebSpeech/WebSpeechService.cs index f027a7e82c9..82e728229b6 100644 --- a/src/BootstrapBlazor/Components/WebSpeech/WebSpeechService.cs +++ b/src/BootstrapBlazor/Components/WebSpeech/WebSpeechService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Web Speech 服务 +/// Web Speech 服务 +/// Web Speech 服务 /// public class WebSpeechService(IJSRuntime runtime, IComponentIdGenerator ComponentIdGenerator) { @@ -15,7 +16,8 @@ public class WebSpeechService(IJSRuntime runtime, IComponentIdGenerator Componen private JSModule? RecognitionModule { get; set; } /// - /// 语音合成方法 + /// 语音合成方法 + /// 语音合成方法 /// /// public async Task CreateSynthesizerAsync() @@ -28,7 +30,8 @@ public async Task CreateSynthesizerAsync() } /// - /// 语音识别方法 + /// 语音识别方法 + /// 语音识别方法 /// /// public async Task CreateRecognitionAsync() diff --git a/src/BootstrapBlazor/Converter/ColumnVisibleItemConverter.cs b/src/BootstrapBlazor/Converter/ColumnVisibleItemConverter.cs index cbbbb565090..b5caaa16e6c 100644 --- a/src/BootstrapBlazor/Converter/ColumnVisibleItemConverter.cs +++ b/src/BootstrapBlazor/Converter/ColumnVisibleItemConverter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// ColumnVisibleItem 序列化转化器 +/// ColumnVisibleItem 序列化转化器 +/// ColumnVisibleItem 序列化转化器 /// public class ColumnVisibleItemConverter : JsonConverter { diff --git a/src/BootstrapBlazor/Converter/JsonDescriptionEnumConverter.cs b/src/BootstrapBlazor/Converter/JsonDescriptionEnumConverter.cs index 31e500b7c26..6bc094d6bf3 100644 --- a/src/BootstrapBlazor/Converter/JsonDescriptionEnumConverter.cs +++ b/src/BootstrapBlazor/Converter/JsonDescriptionEnumConverter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,13 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// Enum type converter that serializes the [Description] attribute of enum values to strings. -/// It is recommended to use instead. +/// Enum 类型 converter that serializes the [Description] attribute of 枚举 values to strings. It is recommended to use instead. +/// Enum type converter that serializes the [Description] attribute of enum values to strings. It is recommended to use instead. /// public class JsonDescriptionEnumConverter : JsonConverter where T : struct, Enum { /// - /// Reads and converts the JSON to the specified enum type. + /// Reads and converts the JSON to the specified 枚举 类型. + /// Reads and converts the JSON to the specified enum type. /// /// The reader. /// The type to convert. @@ -37,7 +38,8 @@ public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerial } /// - /// Writes the specified enum value as a string using its [Description] attribute. + /// Writes the specified 枚举 value as a string using its [Description] attribute. + /// Writes the specified enum value as a string using its [Description] attribute. /// /// The writer. /// The value to write. diff --git a/src/BootstrapBlazor/Converter/JsonEnumConverter.cs b/src/BootstrapBlazor/Converter/JsonEnumConverter.cs index 1c5f3df4aa3..83ce7ff7448 100644 --- a/src/BootstrapBlazor/Converter/JsonEnumConverter.cs +++ b/src/BootstrapBlazor/Converter/JsonEnumConverter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,14 +9,16 @@ namespace BootstrapBlazor.Components; /// -/// JsonEnumConverter is an enum converter that allows customization of enum serialization. +/// JsonEnumConverter is an 枚举 converter that allows customization of 枚举 serialization. +/// JsonEnumConverter is an enum converter that allows customization of enum serialization. /// /// Optional naming policy for writing enum values. /// True to allow undefined enum values. When true, if an enum value isn't defined it will output as a number rather than a string. public class JsonEnumConverter(bool camelCase = false, bool allowIntegerValues = true) : JsonConverterAttribute { /// - /// Creates a JsonConverter for the specified type. + /// Creates a JsonConverter for the specified 类型. + /// Creates a JsonConverter for the specified type. /// /// The type to convert. /// A JsonConverter for the specified type. diff --git a/src/BootstrapBlazor/Converter/JsonFilterKeyValueActionConverter.cs b/src/BootstrapBlazor/Converter/JsonFilterKeyValueActionConverter.cs index fea2215cc4c..51b7e9b7bc9 100644 --- a/src/BootstrapBlazor/Converter/JsonFilterKeyValueActionConverter.cs +++ b/src/BootstrapBlazor/Converter/JsonFilterKeyValueActionConverter.cs @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// 转换器 +/// 转换器 +/// 转换器 /// public sealed class JsonFilterKeyValueActionConverter : JsonConverter { diff --git a/src/BootstrapBlazor/Converter/JsonQueryPageOptionConverter.cs b/src/BootstrapBlazor/Converter/JsonQueryPageOptionConverter.cs index 6e0df37d4ca..193fcbec80a 100644 --- a/src/BootstrapBlazor/Converter/JsonQueryPageOptionConverter.cs +++ b/src/BootstrapBlazor/Converter/JsonQueryPageOptionConverter.cs @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// QueryPageOptions json converter +/// QueryPageOptions json converter +/// QueryPageOptions json converter /// public sealed class JsonQueryPageOptionsConverter : JsonConverter { diff --git a/src/BootstrapBlazor/Dynamic/DataTableDynamicContext.cs b/src/BootstrapBlazor/Dynamic/DataTableDynamicContext.cs index 4d1df8a63af..32c984933eb 100644 --- a/src/BootstrapBlazor/Dynamic/DataTableDynamicContext.cs +++ b/src/BootstrapBlazor/Dynamic/DataTableDynamicContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,12 +10,14 @@ namespace BootstrapBlazor.Components; /// -/// DataTable 动态数据上下文实现类 +/// DataTable 动态数据上下文实现类 +/// DataTable 动态data上下文实现类 /// public class DataTableDynamicContext : DynamicObjectContext { /// - /// 获得/设置 相关联的 DataTable 实例 + /// 获得/设置 相关联的 DataTable 实例 + /// Gets or sets 相关联的 DataTable instance /// [NotNull] public DataTable? DataTable { get; set; } @@ -29,33 +31,38 @@ public class DataTableDynamicContext : DynamicObjectContext private Action? AddAttributesCallback { get; set; } /// - /// 获得/设置 是否启用内部缓存 默认 true 启用 + /// 获得/设置 是否启用内部缓存 默认 true 启用 + /// Gets or sets whether启用内部缓存 Default is true 启用 /// public bool UseCache { get; set; } = true; /// - /// 负责将 DataRow 与 Items 关联起来方便查找提高效率 + /// 负责将 DataRow 与 Items 关联起来方便查找提高效率 + /// 负责将 DataRow 与 Items 关联起来方便查找提高效率 /// private ConcurrentDictionary Caches { get; } = new(); /// - /// 添加行回调委托 + /// 添加行回调委托 + /// 添加行回调delegate /// public Func, Task>? OnAddAsync { get; set; } /// - /// 删除行回调委托 + /// 删除行回调委托 + /// 删除行回调delegate /// public Func, Task>? OnDeleteAsync { get; set; } /// - /// 构造函数 + /// 构造函数 + /// 构造函数 /// /// /// - /// 永远不显示的列集合 默认为 null 全部显示 - /// 显示列集合 默认为 null 全部显示 - /// 隐藏列集合 默认为 null 无隐藏列 + /// 永远不显示的列集合 默认为 null 全部显示永远不display的列collection default is为 null 全部display + /// 显示列集合 默认为 null 全部显示display列collection default is为 null 全部display + /// 隐藏列集合 默认为 null 无隐藏列隐藏列collection default is为 null 无隐藏列 public DataTableDynamicContext(DataTable table, Action? addAttributesCallback = null, IEnumerable? invisibleColumns = null, IEnumerable? shownColumns = null, IEnumerable? hiddenColumns = null) { DataTable = table; @@ -104,7 +111,8 @@ private static bool GetShownColumns(ITableColumn col, IEnumerable? invis } /// - /// GetItems 方法 + /// GetItems 方法 + /// GetItems 方法 /// /// public override IEnumerable GetItems() @@ -150,13 +158,15 @@ private List BuildItems() } /// - /// GetItems 方法 + /// GetItems 方法 + /// GetItems 方法 /// /// public override IEnumerable GetColumns() => Columns; /// - /// 获得列信息方法 + /// 获得列信息方法 + /// Gets列信息方法 /// /// private List InternalGetColumns() @@ -170,7 +180,8 @@ private List InternalGetColumns() } /// - /// + /// + /// /// /// /// @@ -182,9 +193,10 @@ protected internal override IEnumerable OnColumnCreating #region Add Save Delete /// - /// 新建方法 + /// 新建方法 + /// 新建方法 /// - /// 当前选中行 + /// 当前选中行当前选中行 /// public override async Task AddAsync(IEnumerable selectedItems) { @@ -232,7 +244,8 @@ public override async Task AddAsync(IEnumerable selectedItems) } /// - /// 删除方法 + /// 删除方法 + /// 删除方法 /// /// /// @@ -277,7 +290,8 @@ public override async Task DeleteAsync(IEnumerable items) } /// - /// 动态类型变更回调方法 + /// 动态类型变更回调方法 + /// 动态type变更callback method /// /// /// diff --git a/src/BootstrapBlazor/Dynamic/DataTableDynamicObject.cs b/src/BootstrapBlazor/Dynamic/DataTableDynamicObject.cs index 343443cac83..9b6fb30d224 100644 --- a/src/BootstrapBlazor/Dynamic/DataTableDynamicObject.cs +++ b/src/BootstrapBlazor/Dynamic/DataTableDynamicObject.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// DataTable 动态类实例 +/// DataTable 动态类实例 +/// DataTable 动态类instance /// public class DataTableDynamicObject : DynamicObject { /// - /// 获得/设置 DataRow 实例 + /// 获得/设置 DataRow 实例 + /// Gets or sets DataRow instance /// internal DataRow? Row { get; set; } diff --git a/src/BootstrapBlazor/Dynamic/DynamicColumnsObject.cs b/src/BootstrapBlazor/Dynamic/DynamicColumnsObject.cs index 76177a39631..536cff4830e 100644 --- a/src/BootstrapBlazor/Dynamic/DynamicColumnsObject.cs +++ b/src/BootstrapBlazor/Dynamic/DynamicColumnsObject.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 动态列类 +/// 动态列类 +/// 动态列类 /// public class DynamicColumnsObject : IDynamicColumnsObject { @@ -16,12 +17,14 @@ public class DynamicColumnsObject : IDynamicColumnsObject public Dictionary Columns { get; set; } /// - /// 获得/设置 行主键 + /// 获得/设置 行主键 + /// Gets or sets 行主键 /// public Guid DynamicObjectPrimaryKey { get; set; } /// - /// 构造函数 + /// 构造函数 + /// 构造函数 /// /// public DynamicColumnsObject(Dictionary columnsData) @@ -30,7 +33,8 @@ public DynamicColumnsObject(Dictionary columnsData) } /// - /// 构造函数 + /// 构造函数 + /// 构造函数 /// public DynamicColumnsObject() : this([]) { } diff --git a/src/BootstrapBlazor/Dynamic/DynamicItemChangedType.cs b/src/BootstrapBlazor/Dynamic/DynamicItemChangedType.cs index dcef3a92eb8..99d258c3d24 100644 --- a/src/BootstrapBlazor/Dynamic/DynamicItemChangedType.cs +++ b/src/BootstrapBlazor/Dynamic/DynamicItemChangedType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// DynamicItemChangedType 类型 +/// DynamicItemChangedType 类型 +/// DynamicItemChangedType type /// public enum DynamicItemChangedType { /// - /// 新建 + /// 新建 + /// 新建 /// Add, /// - /// 删除 + /// 删除 + /// 删除 /// Delete } diff --git a/src/BootstrapBlazor/Dynamic/DynamicObject.cs b/src/BootstrapBlazor/Dynamic/DynamicObject.cs index 15f574e094d..e70a6034356 100644 --- a/src/BootstrapBlazor/Dynamic/DynamicObject.cs +++ b/src/BootstrapBlazor/Dynamic/DynamicObject.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 动态类型实体类 实例 +/// 动态类型实体类 实例 +/// 动态type实体类 instance /// public class DynamicObject : IDynamicObject { @@ -17,14 +18,16 @@ public class DynamicObject : IDynamicObject public Guid DynamicObjectPrimaryKey { get; set; } /// - /// 获得指定属性值方法 + /// 获得指定属性值方法 + /// Gets指定property值方法 /// /// /// public virtual object? GetValue(string propertyName) => Utility.GetPropertyValue(this, propertyName); /// - /// 给指定属性设置值方法 + /// 给指定属性设置值方法 + /// 给指定propertySets值方法 /// /// /// diff --git a/src/BootstrapBlazor/Dynamic/DynamicObjectContext.cs b/src/BootstrapBlazor/Dynamic/DynamicObjectContext.cs index 0c53f21347e..e790e1ac8d4 100644 --- a/src/BootstrapBlazor/Dynamic/DynamicObjectContext.cs +++ b/src/BootstrapBlazor/Dynamic/DynamicObjectContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,32 +10,37 @@ namespace BootstrapBlazor.Components; /// -/// 动态类型上下文基类 +/// 动态类型上下文基类 +/// 动态type上下文基类 /// public abstract class DynamicObjectContext : IDynamicObjectContext { /// - /// 获取动态类型各列信息 + /// 获取动态类型各列信息 + /// 获取动态type各列信息 /// /// public abstract IEnumerable GetColumns(); /// - /// 获得动态类数据方法 + /// 获得动态类数据方法 + /// Gets动态类data方法 /// /// public abstract IEnumerable GetItems(); /// - /// + /// + /// /// protected ConcurrentDictionary> CustomerAttributeBuilderCache { get; } = new(); /// - /// 添加标签到指定列 + /// 添加标签到指定列 + /// 添加标签到指定列 /// - /// 指定列名称 - /// Attribute 实例 + /// 指定列名称指定列name + /// Attribute 实例Attribute instance /// /// /// @@ -56,40 +61,46 @@ public void AddAttribute(string columnName, Type attributeType, Type[] types, ob } /// - /// 列创建回调方法 入口参数为 ITableColumn 实例 返回值为 CustomAttributeBuilder 集合 + /// 列创建回调方法 入口参数为 ITableColumn 实例 返回值为 CustomAttributeBuilder 集合 + /// 列创建callback method 入口参数为 ITableColumn instance 返回值为 CustomAttributeBuilder collection /// protected internal virtual IEnumerable OnColumnCreating(ITableColumn col) => CustomerAttributeBuilderCache.TryGetValue(col.GetFieldName(), out var builders) ? builders : Enumerable.Empty(); /// - /// 动态类型新建回调委托 + /// 动态类型新建回调委托 + /// 动态type新建回调delegate /// - /// 当前选中行 + /// 当前选中行当前选中行 /// public abstract Task AddAsync(IEnumerable selectedItems); /// - /// 动态类型删除回调委托 + /// 动态类型删除回调委托 + /// 动态type删除回调delegate /// /// /// public abstract Task DeleteAsync(IEnumerable items); /// - /// 动态类型集合变化时回调方法 + /// 动态类型集合变化时回调方法 + /// 动态typecollection变化时callback method /// /// public Func? OnValueChanged { get; set; } /// - /// 动态类型属性值变化时回调方法 + /// 动态类型属性值变化时回调方法 + /// 动态typeproperty值变化时callback method /// /// public Func? OnChanged { get; set; } /// - /// 获得选中行比对回调方法 + /// 获得选中行比对回调方法 + /// Gets选中行比对callback method /// public Func? EqualityComparer { get; set; } diff --git a/src/BootstrapBlazor/Dynamic/DynamicObjectContextArgs.cs b/src/BootstrapBlazor/Dynamic/DynamicObjectContextArgs.cs index eabce1224be..d08d51d3f45 100644 --- a/src/BootstrapBlazor/Dynamic/DynamicObjectContextArgs.cs +++ b/src/BootstrapBlazor/Dynamic/DynamicObjectContextArgs.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// DynamicObjectContextArgs 类 +/// DynamicObjectContextArgs 类 +/// DynamicObjectContextArgs 类 /// public class DynamicObjectContextArgs { /// - /// + /// + /// /// public DynamicObjectContextArgs(IEnumerable items, DynamicItemChangedType changedType = DynamicItemChangedType.Add) { @@ -20,12 +22,14 @@ public DynamicObjectContextArgs(IEnumerable items, DynamicItemCh } /// - /// 获得 编辑数据集合 + /// 获得 编辑数据集合 + /// Gets 编辑datacollection /// public IEnumerable Items { get; } /// - /// 获得 数据改变类型 默认 Add + /// 获得 数据改变类型 默认 Add + /// Gets data改变type Default is Add /// public DynamicItemChangedType ChangedType { get; } } diff --git a/src/BootstrapBlazor/Dynamic/IDynamicColumnsObject.cs b/src/BootstrapBlazor/Dynamic/IDynamicColumnsObject.cs index 9539b5105c9..9d66a3f7c6e 100644 --- a/src/BootstrapBlazor/Dynamic/IDynamicColumnsObject.cs +++ b/src/BootstrapBlazor/Dynamic/IDynamicColumnsObject.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 动态对象接口 +/// 动态对象接口 +/// 动态对象接口 /// public interface IDynamicColumnsObject : IDynamicObject { /// - /// 获得设置 列与列数值集合 + /// 获得设置 列与列数值集合 + /// GetsSets 列与列数值collection /// public Dictionary Columns { get; set; } } diff --git a/src/BootstrapBlazor/Dynamic/IDynamicObject.cs b/src/BootstrapBlazor/Dynamic/IDynamicObject.cs index 207037e6206..ae4bf822c19 100644 --- a/src/BootstrapBlazor/Dynamic/IDynamicObject.cs +++ b/src/BootstrapBlazor/Dynamic/IDynamicObject.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,26 +6,30 @@ namespace BootstrapBlazor.Components; /// -/// 动态对象接口 +/// 动态对象接口 +/// 动态对象接口 /// public interface IDynamicObject { /// - /// 通过指定属性名获取属性值方法 + /// 通过指定属性名获取属性值方法 + /// 通过指定property名获取property值方法 /// - /// 属性名称 + /// 属性名称propertyname /// object? GetValue(string propertyName); /// - /// 通过指定属性名设置属性值方法 + /// 通过指定属性名设置属性值方法 + /// 通过指定property名Setsproperty值方法 /// - /// 属性名称 - /// 属性值 + /// 属性名称propertyname + /// 属性值propertyvalue void SetValue(string propertyName, object? value); /// - /// 获得/设置 数据主键 + /// 获得/设置 数据主键 + /// Gets or sets data主键 /// Guid DynamicObjectPrimaryKey { get; set; } } diff --git a/src/BootstrapBlazor/Dynamic/IDynamicObjectContext.cs b/src/BootstrapBlazor/Dynamic/IDynamicObjectContext.cs index 85e1b0c253b..a76f6ac7e2e 100644 --- a/src/BootstrapBlazor/Dynamic/IDynamicObjectContext.cs +++ b/src/BootstrapBlazor/Dynamic/IDynamicObjectContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,54 +6,63 @@ namespace BootstrapBlazor.Components; /// -/// 动态类型上下文接口 +/// 动态类型上下文接口 +/// 动态type上下文接口 /// public interface IDynamicObjectContext { /// - /// 获取动态类型各列信息 + /// 获取动态类型各列信息 + /// 获取动态type各列信息 /// /// IEnumerable GetColumns(); /// - /// 获得动态数据方法 + /// 获得动态数据方法 + /// Gets动态data方法 /// /// IEnumerable GetItems(); /// - /// 新建方法 + /// 新建方法 + /// 新建方法 /// - /// 当前选中行 + /// 当前选中行当前选中行 /// Task AddAsync(IEnumerable selectedItems); /// - /// 删除方法 + /// 删除方法 + /// 删除方法 /// /// /// Task DeleteAsync(IEnumerable items); /// - /// 获得/设置 动态类型属性值变化时回调方法 默认为 null + /// 获得/设置 动态类型属性值变化时回调方法 默认为 null + /// Gets or sets 动态typeproperty值变化时callback method Default is为 null /// /// Func? OnValueChanged { get; set; } /// - /// 获得/设置 动态类型数据集过滤回调委托 默认为 null + /// 获得/设置 动态类型数据集过滤回调委托 默认为 null + /// Gets or sets 动态typedata集过滤回调delegate Default is为 null /// Func, IEnumerable>? OnFilterCallback { get; set; } /// - /// 获得/设置 动态类型集合变化时回调方法 默认为 null + /// 获得/设置 动态类型集合变化时回调方法 默认为 null + /// Gets or sets 动态typecollection变化时callback method Default is为 null /// Func? OnChanged { get; set; } /// - /// 获得/设置 选中行是否相等判断逻辑 默认为 null + /// 获得/设置 选中行是否相等判断逻辑 默认为 null + /// Gets or sets 选中行whether相等判断逻辑 Default is为 null /// Func? EqualityComparer { get; set; } } diff --git a/src/BootstrapBlazor/Enums/AffixPosition.cs b/src/BootstrapBlazor/Enums/AffixPosition.cs index ec8efed0218..181fea70127 100644 --- a/src/BootstrapBlazor/Enums/AffixPosition.cs +++ b/src/BootstrapBlazor/Enums/AffixPosition.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,18 +8,21 @@ namespace BootstrapBlazor.Components; /// -/// AffixPosition 枚举 +/// AffixPosition 枚举 +/// AffixPosition Enum /// public enum AffixPosition { /// - /// 固定在顶部 + /// 固定在顶部 + /// Fixed at the top /// [Description("top")] Top, /// - /// 固定在底部 + /// 固定在底部 + /// Fixed at the bottom /// [Description("bottom")] Bottom diff --git a/src/BootstrapBlazor/Enums/AggregateType.cs b/src/BootstrapBlazor/Enums/AggregateType.cs index cbf4c2822de..f3be0c455b4 100644 --- a/src/BootstrapBlazor/Enums/AggregateType.cs +++ b/src/BootstrapBlazor/Enums/AggregateType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,39 @@ namespace BootstrapBlazor.Components; /// -/// 函数枚举 +/// 函数枚举 +/// Aggregate Functions Enum /// public enum AggregateType { /// - /// 合计 + /// 合计 + /// Sum /// Sum, /// - /// 平均数 + /// 平均数 + /// Average /// Average, /// - /// 数量 + /// 数量 + /// Count /// Count, /// - /// 最小值 + /// 最小值 + /// Min /// Min, /// - /// 最大值 + /// 最大值 + /// Max /// Max, /// - /// 自定义 + /// 自定义 + /// Custom /// Customer } diff --git a/src/BootstrapBlazor/Enums/Alignment.cs b/src/BootstrapBlazor/Enums/Alignment.cs index dc8f1bfa817..0e07c837e95 100644 --- a/src/BootstrapBlazor/Enums/Alignment.cs +++ b/src/BootstrapBlazor/Enums/Alignment.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,29 +8,34 @@ namespace BootstrapBlazor.Components; /// -/// 对齐方式枚举类型 +/// 对齐方式枚举类型 +/// Alignment Enum /// public enum Alignment { /// - /// 未设置 + /// 未设置 + /// Not Set /// None, /// - /// 左对齐 + /// 左对齐 + /// Left Align /// [Description("start")] Left, /// - /// 居中对齐 + /// 居中对齐 + /// Center Align /// [Description("center")] Center, /// - /// 右对齐 + /// 右对齐 + /// Right Align /// [Description("end")] Right diff --git a/src/BootstrapBlazor/Enums/BreakPoint.cs b/src/BootstrapBlazor/Enums/BreakPoint.cs index 6e494d526b3..789e55bd79d 100644 --- a/src/BootstrapBlazor/Enums/BreakPoint.cs +++ b/src/BootstrapBlazor/Enums/BreakPoint.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,48 +6,57 @@ namespace BootstrapBlazor.Components; /// -/// BreakPoint 枚举 +/// BreakPoint 枚举 +/// BreakPoint Enum /// [JsonEnumConverter(true)] public enum BreakPoint { /// - /// 未设置 + /// 未设置 + /// Not Set /// None, /// - /// 超小屏幕 小于 375px + /// 超小屏幕 小于 375px + /// Extra extra small screen < 375px /// ExtraExtraSmall, /// - /// 超小屏幕 大于等于 375px + /// 超小屏幕 大于等于 375px + /// Extra small screen >= 375px /// ExtraSmall, /// - /// 小屏幕 大于等于 576px + /// 小屏幕 大于等于 576px + /// Small screen >= 576px /// Small, /// - /// 中屏幕 大于等于 768px + /// 中屏幕 大于等于 768px + /// Medium screen >= 768px /// Medium, /// - /// 大屏幕 大于等于 992px + /// 大屏幕 大于等于 992px + /// Large screen >= 992px /// Large, /// - /// 超大屏幕 大于等于 1200px + /// 超大屏幕 大于等于 1200px + /// Extra large screen >= 1200px /// ExtraLarge, /// - /// 超大屏幕 大于等于 1400px + /// 超大屏幕 大于等于 1400px + /// Extra extra large screen >= 1400px /// ExtraExtraLarge } diff --git a/src/BootstrapBlazor/Enums/ButtonStyle.cs b/src/BootstrapBlazor/Enums/ButtonStyle.cs index b6a04ce1714..25e3e3986bd 100644 --- a/src/BootstrapBlazor/Enums/ButtonStyle.cs +++ b/src/BootstrapBlazor/Enums/ButtonStyle.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,20 +6,24 @@ namespace BootstrapBlazor.Components; /// -/// 按钮样式枚举 +/// 按钮样式枚举 +/// Button Style Enum /// public enum ButtonStyle { /// - /// 默认风格 + /// 默认风格 + /// Default Style /// None = 0, /// - /// 圆角按钮 + /// 圆角按钮 + /// Round Button /// Round, /// - /// 圆形胶囊按钮 + /// 圆形胶囊按钮 + /// Circle Button /// Circle, } diff --git a/src/BootstrapBlazor/Enums/ButtonType.cs b/src/BootstrapBlazor/Enums/ButtonType.cs index f8607c422b9..de301580c72 100644 --- a/src/BootstrapBlazor/Enums/ButtonType.cs +++ b/src/BootstrapBlazor/Enums/ButtonType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,24 +8,28 @@ namespace BootstrapBlazor.Components; /// -/// 按钮类型枚举 +/// 按钮类型枚举 +/// Button Type Enum /// public enum ButtonType { /// - /// 正常按钮 + /// 正常按钮 + /// Button /// [Description("button")] Button, /// - /// 提交按钮 + /// 提交按钮 + /// Submit /// [Description("submit")] Submit, /// - /// 重置按钮 + /// 重置按钮 + /// Reset /// [Description("reset")] Reset diff --git a/src/BootstrapBlazor/Enums/CalendarType.cs b/src/BootstrapBlazor/Enums/CalendarType.cs index e385e5e821c..4d5748b139a 100644 --- a/src/BootstrapBlazor/Enums/CalendarType.cs +++ b/src/BootstrapBlazor/Enums/CalendarType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 日历组件显示模式枚举类型 +/// 日历组件显示模式枚举类型 +/// Calendar View Mode Enum /// public enum CalendarViewMode { /// - /// 月视图 + /// 月视图 + /// Month View /// Month, /// - /// 周视图 + /// 周视图 + /// Week View /// Week } diff --git a/src/BootstrapBlazor/Enums/CarouselPlayMode.cs b/src/BootstrapBlazor/Enums/CarouselPlayMode.cs index 4ac01983805..4ae3e63bcc0 100644 --- a/src/BootstrapBlazor/Enums/CarouselPlayMode.cs +++ b/src/BootstrapBlazor/Enums/CarouselPlayMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,24 +8,28 @@ namespace BootstrapBlazor.Components; /// -/// Carousel 组件播放方式枚举 +/// Carousel 组件播放方式枚举 +/// Carousel Play Mode Enum /// public enum CarouselPlayMode { /// - /// 加载后自动播放 + /// 加载后自动播放 + /// Auto Play On Load /// [Description("carousel")] AutoPlayOnload, /// - /// 用户点击按钮后自动播放 + /// 用户点击按钮后自动播放 + /// Auto Play After Manually Click /// [Description("true")] AutoPlayAfterManually, /// - /// 用户控制 + /// 用户控制 + /// Manually /// [Description("false")] Manually diff --git a/src/BootstrapBlazor/Enums/CheckboxState.cs b/src/BootstrapBlazor/Enums/CheckboxState.cs index 50bc785d8e3..9db28fff9c4 100644 --- a/src/BootstrapBlazor/Enums/CheckboxState.cs +++ b/src/BootstrapBlazor/Enums/CheckboxState.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// CheckBox 组件状态枚举值 +/// CheckBox 组件状态枚举值 +/// CheckBox State Enum /// public enum CheckboxState { /// - /// 未选中 + /// 未选中 + /// UnChecked /// UnChecked, /// - /// 选中 + /// 选中 + /// Checked /// Checked, /// - /// 不确定 + /// 不确定 + /// Indeterminate /// Indeterminate } diff --git a/src/BootstrapBlazor/Enums/Color.cs b/src/BootstrapBlazor/Enums/Color.cs index 8e9cb36dfaf..4dd910b143c 100644 --- a/src/BootstrapBlazor/Enums/Color.cs +++ b/src/BootstrapBlazor/Enums/Color.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,72 +8,84 @@ namespace BootstrapBlazor.Components; /// -/// 颜色枚举类型 +/// 颜色枚举类型 +/// Color Enum /// public enum Color { /// - /// 无颜色 + /// 无颜色 + /// None /// [Description("none")] None, /// - /// active + /// active + /// active /// [Description("active")] Active, /// - /// primary + /// primary + /// primary /// [Description("primary")] Primary, /// - /// secondary + /// secondary + /// secondary /// [Description("secondary")] Secondary, /// - /// success + /// success + /// success /// [Description("success")] Success, /// - /// danger + /// danger + /// danger /// [Description("danger")] Danger, /// - /// warning + /// warning + /// warning /// [Description("warning")] Warning, /// - /// info + /// info + /// info /// [Description("info")] Info, /// - /// light + /// light + /// light /// [Description("light")] Light, /// - /// dark + /// dark + /// dark /// [Description("dark")] Dark, /// - /// link + /// link + /// link /// [Description("link")] Link diff --git a/src/BootstrapBlazor/Enums/ComponentIcons.cs b/src/BootstrapBlazor/Enums/ComponentIcons.cs index 8ef0f1b76ed..54e3ff03c10 100644 --- a/src/BootstrapBlazor/Enums/ComponentIcons.cs +++ b/src/BootstrapBlazor/Enums/ComponentIcons.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,872 +6,1046 @@ namespace BootstrapBlazor.Components; /// -/// 组件内置图标枚举 +/// 组件内置图标枚举 +/// Component Built-in Icons Enum /// public enum ComponentIcons { /// - /// AnchorLink 组件 Icon 属性图标 + /// AnchorLink 组件 Icon 属性图标 + /// AnchorLink Component Icon /// AnchorLinkIcon, /// - /// Avatar 组件 Icon 属性图标 + /// Avatar 组件 Icon 属性图标 + /// Avatar Component Icon /// AvatarIcon, /// - /// AvatarUpload 组件 DeleteIcon 属性图标 + /// AvatarUpload 组件 DeleteIcon 属性图标 + /// AvatarUpload Component Delete Icon /// AvatarUploadDeleteIcon, /// - /// AvatarUpload 组件 LoadingIcon 属性图标 + /// AvatarUpload 组件 LoadingIcon 属性图标 + /// AvatarUpload Component Loading Icon /// AvatarUploadLoadingIcon, /// - /// AvatarUpload 组件 AddIcon 属性图标 + /// AvatarUpload 组件 AddIcon 属性图标 + /// AvatarUpload Component Add Icon /// AvatarUploadAddIcon, /// - /// AvatarUpload 组件 ValidStatusIcon 属性图标 + /// AvatarUpload 组件 ValidStatusIcon 属性图标 + /// AvatarUpload Component Valid Status Icon /// AvatarUploadValidStatusIcon, /// - /// AvatarUpload 组件 InvalidStatusIcon 属性图标 + /// AvatarUpload 组件 InvalidStatusIcon 属性图标 + /// AvatarUpload Component Invalid Status Icon /// AvatarUploadInvalidStatusIcon, /// - /// AutoComplete 组件 Icon 属性图标 + /// AutoComplete 组件 Icon 属性图标 + /// AutoComplete component Icon propertyicon /// AutoCompleteIcon, /// - /// AutoComplete 组件 Icon 属性图标 + /// AutoComplete 组件 Icon 属性图标 + /// AutoComplete component Icon propertyicon /// AutoFillIcon, /// - /// ButtonUpload 组件 BrowserButtonIcon 属性图标 + /// ButtonUpload 组件 BrowserButtonIcon 属性图标 + /// ButtonUpload Component Browser Button Icon /// ButtonUploadBrowserButtonIcon, /// - /// Camera 组件 PlayIcon 属性图标 + /// Camera 组件 PlayIcon 属性图标 + /// Camera Component Play Icon /// CameraPlayIcon, /// - /// Camera 组件 StopIcon 属性图标 + /// Camera 组件 StopIcon 属性图标 + /// Camera Component Stop Icon /// CameraStopIcon, /// - /// Camera 组件 PhotoIcon 属性图标 + /// Camera 组件 PhotoIcon 属性图标 + /// Camera Component Photo Icon /// CameraPhotoIcon, /// - /// Card 组件 CollapseIcon 属性图标 + /// Card 组件 CollapseIcon 属性图标 + /// Card Component Collapse Icon /// CardCollapseIcon, /// - /// CardUpload 组件 AddIcon 图标 + /// CardUpload 组件 AddIcon 图标 + /// CardUpload Component Add Icon /// CardUploadAddIcon, /// - /// CardUpload 组件 StatusIcon 图标 + /// CardUpload 组件 StatusIcon 图标 + /// CardUpload Component Status Icon /// CardUploadStatusIcon, /// - /// CardUpload 组件 RemoveIcon 图标 + /// CardUpload 组件 RemoveIcon 图标 + /// CardUpload Component Remove Icon /// CardUploadRemoveIcon, /// - /// CardUpload 组件 ZoomIcon 图标 + /// CardUpload 组件 ZoomIcon 图标 + /// CardUpload Component Zoom Icon /// CardUploadZoomIcon, /// - /// ButtonUpload 组件 LoadingIcon 属性图标 + /// ButtonUpload 组件 LoadingIcon 属性图标 + /// ButtonUpload Component Loading Icon /// UploadLoadingIcon, /// - /// ButtonUpload 组件 FailedInvalidIcon 属性图标 + /// ButtonUpload 组件 FailedInvalidIcon 属性图标 + /// ButtonUpload Component Failed Invalid Icon /// UploadInvalidStatusIcon, /// - /// ButtonUpload 组件 FailedValidIcon 属性图标 + /// ButtonUpload 组件 FailedValidIcon 属性图标 + /// ButtonUpload Component Failed Valid Icon /// UploadValidStatusIcon, /// - /// Upload 组件 CancelIcon 图标 + /// Upload 组件 CancelIcon 图标 + /// Upload Component Cancel Icon /// UploadCancelIcon, /// - /// CardUpload 组件 DeleteIcon 图标 + /// CardUpload 组件 DeleteIcon 图标 + /// CardUpload Component Delete Icon /// UploadDeleteIcon, /// - /// CardUpload 组件 DownloadIcon 图标 + /// CardUpload 组件 DownloadIcon 图标 + /// CardUpload Component Download Icon /// UploadDownloadIcon, /// - /// Upload 组件 UploadIcon 图标 + /// Upload 组件 UploadIcon 图标 + /// Upload Component Upload Icon /// DropUploadIcon, /// - /// Cascader 组件 Icon 属性图标 + /// Cascader 组件 Icon 属性图标 + /// Cascader Component Icon /// CascaderIcon, /// - /// Cascader 组件 SubMenuIcon 属性图标 + /// Cascader 组件 SubMenuIcon 属性图标 + /// Cascader Component SubMenu Icon /// CascaderSubMenuIcon, /// - /// Console 组件 ClearButtonIcon 属性图标 + /// Console 组件 ClearButtonIcon 属性图标 + /// Console Component Clear Button Icon /// ConsoleClearButtonIcon, /// - /// Button 组件 LoadingIcon 属性图标 + /// Button 组件 LoadingIcon 属性图标 + /// Button Component Loading Icon /// ButtonLoadingIcon, /// - /// Captcha 组件 RefreshIcon 属性图标 + /// Captcha 组件 RefreshIcon 属性图标 + /// Captcha Component Refresh Icon /// CaptchaRefreshIcon, /// - /// Captcha 组件 BarIcon 属性图标 + /// Captcha 组件 BarIcon 属性图标 + /// Captcha Component Bar Icon /// CaptchaBarIcon, /// - /// Carousel 组件 PreviousIcon 属性图标 + /// Carousel 组件 PreviousIcon 属性图标 + /// Carousel Component Previous Icon /// CarouselPreviousIcon, /// - /// Carousel 组件 NextIcon 属性图标 + /// Carousel 组件 NextIcon 属性图标 + /// Carousel Component Next Icon /// CarouselNextIcon, /// - /// DateTimeBody 组件 上一年属性图标 + /// DateTimeBody 组件 上一年属性图标 + /// DateTimeBody Component Previous Year Icon /// DatePickBodyPreviousYearIcon, /// - /// DateTimeBody 组件 上一月属性图标 + /// DateTimeBody 组件 上一月属性图标 + /// DateTimeBody Component Previous Month Icon /// DatePickBodyPreviousMonthIcon, /// - /// DateTimeBody 组件 下一月属性图标 + /// DateTimeBody 组件 下一月属性图标 + /// DateTimeBody Component Next Month Icon /// DatePickBodyNextMonthIcon, /// - /// DateTimeBody 组件 下一年属性图标 + /// DateTimeBody 组件 下一年属性图标 + /// DateTimeBody Component Next Year Icon /// DatePickBodyNextYearIcon, /// - /// DateTimePicker 组件 Icon 属性图标 + /// DateTimePicker 组件 Icon 属性图标 + /// DateTimePicker Component Icon /// DateTimePickerIcon, /// - /// Dialog 组件 CloseButtonIcon 属性图标 + /// Dialog 组件 CloseButtonIcon 属性图标 + /// Dialog Component Close Button Icon /// DialogCloseButtonIcon, /// - /// Dialog 组件 SaveButtonIcon 属性图标 + /// Dialog 组件 SaveButtonIcon 属性图标 + /// Dialog Component Save Button Icon /// DialogSaveButtonIcon, /// - /// Dialog 组件 MaximizeIcon 属性图标 + /// Dialog 组件 MaximizeIcon 属性图标 + /// Dialog Component Maximize Icon /// DialogMaximizeWindowIcon, /// - /// Dialog 组件 MaximizeIcon 属性图标 + /// Dialog 组件 MaximizeIcon 属性图标 + /// Dialog Component Maximize Icon /// DialogRestoreWindowIcon, /// - /// ResultDialog 组件 YesIcon 属性图标 + /// ResultDialog 组件 YesIcon 属性图标 + /// ResultDialog Component Yes Icon /// ResultDialogYesIcon, /// - /// ResultDialog 组件 NoIcon 属性图标 + /// ResultDialog 组件 NoIcon 属性图标 + /// ResultDialog Component No Icon /// ResultDialogNoIcon, /// - /// ResultDialog 组件 CloseIcon 属性图标 + /// ResultDialog 组件 CloseIcon 属性图标 + /// ResultDialog Component Close Icon /// ResultDialogCloseIcon, /// - /// SearchDialog 组件 ClearIcon 属性图标 + /// SearchDialog 组件 ClearIcon 属性图标 + /// SearchDialog Component Clear Icon /// SearchDialogClearIcon, /// - /// SearchDialog 组件 SearchIcon 属性图标 + /// SearchDialog 组件 SearchIcon 属性图标 + /// SearchDialog Component Search Icon /// SearchDialogSearchIcon, /// - /// TimePickerCell 组件 UpIcon 属性图标 + /// TimePickerCell 组件 UpIcon 属性图标 + /// TimePickerCell Component Up Icon /// TimePickerCellUpIcon, /// - /// TimePickerCell 组件 DownIcon 属性图标 + /// TimePickerCell 组件 DownIcon 属性图标 + /// TimePickerCell Component Down Icon /// TimePickerCellDownIcon, /// - /// DateTimeRange 组件 Icon 属性图标 + /// DateTimeRange 组件 Icon 属性图标 + /// DateTimeRange Component Icon /// DateTimeRangeIcon, /// - /// DateTimeRange 组件 ClearIcon 属性图标 + /// DateTimeRange 组件 ClearIcon 属性图标 + /// DateTimeRange Component Clear Icon /// DateTimeRangeClearIcon, /// - /// FilterButton 组件 FilterIcon 图标 + /// FilterButton 组件 FilterIcon 图标 + /// FilterButton Component Filter Icon /// FilterButtonFilterIcon, /// - /// FilterButton 组件 ClearIcon 图标 + /// FilterButton 组件 ClearIcon 图标 + /// FilterButton Component Clear Icon /// FilterButtonClearIcon, /// - /// SideMenu 组件 DropdownIcon 图标 + /// SideMenu 组件 DropdownIcon 图标 + /// SideMenu Component Dropdown Icon /// SideMenuDropdownIcon, /// - /// TopMenu 组件 DropdownIcon 图标 + /// TopMenu 组件 DropdownIcon 图标 + /// TopMenu Component Dropdown Icon /// TopMenuDropdownIcon, /// - /// MenuLink 组件 ArrowIcon 图标 + /// MenuLink 组件 ArrowIcon 图标 + /// MenuLink Component Arrow Icon /// MenuLinkArrowIcon, /// - /// TableFilter 组件 PlusIcon 图标 + /// TableFilter 组件 PlusIcon 图标 + /// TableFilter Component Plus Icon /// TableFilterPlusIcon, /// - /// TableFilter 组件 MinusIcon 图标 + /// TableFilter 组件 MinusIcon 图标 + /// TableFilter Component Minus Icon /// TableFilterMinusIcon, /// - /// ImagePreviewer 组件 PreviousIcon 图标 + /// ImagePreviewer 组件 PreviousIcon 图标 + /// ImagePreviewer Component Previous Icon /// ImagePreviewPreviousIcon, /// - /// ImagePreviewer 组件 NextIcon 图标 + /// ImagePreviewer 组件 NextIcon 图标 + /// ImagePreviewer Component Next Icon /// ImagePreviewNextIcon, /// - /// ImagePreviewer 组件 MinusIcon 图标 + /// ImagePreviewer 组件 MinusIcon 图标 + /// ImagePreviewer Component Minus Icon /// ImagePreviewMinusIcon, /// - /// ImagePreviewer 组件 PlusIcon 图标 + /// ImagePreviewer 组件 PlusIcon 图标 + /// ImagePreviewer Component Plus Icon /// ImagePreviewPlusIcon, /// - /// ImagePreviewer 组件 RotateLeftIcon 图标 + /// ImagePreviewer 组件 RotateLeftIcon 图标 + /// ImagePreviewer Component Rotate Left Icon /// ImagePreviewRotateLeftIcon, /// - /// ImagePreviewer 组件 RotateRightIcon 图标 + /// ImagePreviewer 组件 RotateRightIcon 图标 + /// ImagePreviewer Component Rotate Right Icon /// ImagePreviewRotateRightIcon, /// - /// ImageViewer 组件 FileIcon 图标 + /// ImageViewer 组件 FileIcon 图标 + /// ImageViewer Component File Icon /// ImageViewerFileIcon, /// - /// InputNumber 组件 MinusIcon 图标 + /// InputNumber 组件 MinusIcon 图标 + /// InputNumber Component Minus Icon /// InputNumberMinusIcon, /// - /// InputNumber 组件 PlusIcon 图标 + /// InputNumber 组件 PlusIcon 图标 + /// InputNumber Component Plus Icon /// InputNumberPlusIcon, /// - /// InputUpload 组件 BrowserIcon 图标 + /// InputUpload 组件 BrowserIcon 图标 + /// InputUpload Component Browser Icon /// InputUploadBrowserButtonIcon, /// - /// InputUpload 组件 BrowserIcon 图标 + /// InputUpload 组件 BrowserIcon 图标 + /// InputUpload Component Browser Icon /// InputUploadDeleteButtonIcon, /// - /// Layout 组件 MenuBarIcon 图标 + /// Layout 组件 MenuBarIcon 图标 + /// Layout Component MenuBar Icon /// LayoutMenuBarIcon, /// - /// LogoutLink 组件 Icon 图标 + /// LogoutLink 组件 Icon 图标 + /// LogoutLink Component Icon /// LogoutLinkIcon, /// - /// Button 组件 LoadingIcon 图标 + /// Button 组件 LoadingIcon 图标 + /// Button Component Loading Icon /// LoadingIcon, /// - /// GoTop 组件 Icon 图标 + /// GoTop 组件 Icon 图标 + /// GoTop Component Icon /// GoTopIcon, /// - /// Pagination 组件 PrevPageIcon 图标 + /// Pagination 组件 PrevPageIcon 图标 + /// Pagination Component Prev Page Icon /// PaginationPrevPageIcon, /// - /// Pagination 组件 NextPageIcon 图标 + /// Pagination 组件 NextPageIcon 图标 + /// Pagination Component Next Page Icon /// PaginationNextPageIcon, /// - /// Pagination 组件 PrevEllipsisPageIcon 图标 + /// Pagination 组件 PrevEllipsisPageIcon 图标 + /// Pagination Component Prev Ellipsis Page Icon /// PaginationPrevEllipsisPageIcon, /// - /// Pagination 组件 NextEllipsisPageIcon 图标 + /// Pagination 组件 NextEllipsisPageIcon 图标 + /// Pagination Component Next Ellipsis Page Icon /// PaginationNextEllipsisPageIcon, /// - /// PopConfirmButton 组件 ConfirmIcon 图标 + /// PopConfirmButton 组件 ConfirmIcon 图标 + /// PopConfirmButton Component Confirm Icon /// PopConfirmButtonConfirmIcon, /// - /// PopConfirmButton 组件弹窗中 CloseButtonIcon 图标 + /// PopConfirmButton 组件弹窗中 CloseButtonIcon 图标 + /// PopConfirmButton Component Dialog Close Button Icon /// PopConfirmButtonContentCloseButtonIcon, /// - /// PopConfirmButton 组件弹窗中 ConfirmButtonIcon 图标 + /// PopConfirmButton 组件弹窗中 ConfirmButtonIcon 图标 + /// PopConfirmButton Component Dialog Confirm Button Icon /// PopConfirmButtonContentConfirmButtonIcon, /// - /// Rate 组件 StarIcon 图标 + /// Rate 组件 StarIcon 图标 + /// Rate Component Star Icon /// RateStarIcon, /// - /// Rate 组件 UnStarIcon 图标 + /// Rate 组件 UnStarIcon 图标 + /// Rate Component UnStar Icon /// RateUnStarIcon, /// - /// RibbonTab 组件 ArrowUpIcon 图标 + /// RibbonTab 组件 ArrowUpIcon 图标 + /// RibbonTab Component Arrow Up Icon /// RibbonTabArrowUpIcon, /// - /// RibbonTab 组件 ArrowDownIcon 图标 + /// RibbonTab 组件 ArrowDownIcon 图标 + /// RibbonTab Component Arrow Down Icon /// RibbonTabArrowDownIcon, /// - /// RibbonTab 组件 ArrowPinIcon 图标 + /// RibbonTab 组件 ArrowPinIcon 图标 + /// RibbonTab Component Arrow Pin Icon /// RibbonTabArrowPinIcon, /// - /// MultiSelect 组件 DropdownIcon 图标 + /// MultiSelect 组件 DropdownIcon 图标 + /// MultiSelect Component Dropdown Icon /// MultiSelectDropdownIcon, /// - /// MultiSelect 组件 CloseButtonIcon 图标 + /// MultiSelect 组件 CloseButtonIcon 图标 + /// MultiSelect Component Close Button Icon /// MultiSelectCloseIcon, /// - /// MultiSelect 组件 ClearIcon 图标 + /// MultiSelect 组件 ClearIcon 图标 + /// MultiSelect Component Clear Icon /// MultiSelectClearIcon, /// - /// SelectTree 组件 DropdownIcon 图标 + /// SelectTree 组件 DropdownIcon 图标 + /// SelectTree Component Dropdown Icon /// SelectTreeDropdownIcon, /// - /// Step 组件 Icon 图标 + /// Step 组件 Icon 图标 + /// Step Component Icon /// StepIcon, /// - /// Step 组件 ErrorIcon 图标 + /// Step 组件 ErrorIcon 图标 + /// Step Component Error Icon /// StepErrorIcon, /// - /// Table 组件 ColumnToolboxIcon 属性图标 + /// Table 组件 ColumnToolboxIcon 属性图标 + /// Table Component Column Toolbox Icon /// TableColumnToolboxIcon, /// - /// Table 组件 SortIconAsc 属性图标 + /// Table 组件 SortIconAsc 属性图标 + /// Table Component Sort Icon Asc /// TableSortIconAsc, /// - /// Table 组件 SortDesc 属性图标 + /// Table 组件 SortDesc 属性图标 + /// Table Component Sort Desc /// TableSortDesc, /// - /// Table 组件 SortIcon 属性图标 + /// Table 组件 SortIcon 属性图标 + /// Table Component Sort Icon /// TableSortIcon, /// - /// Table 组件 FilterIcon 属性图标 + /// Table 组件 FilterIcon 属性图标 + /// Table Component Filter Icon /// TableFilterIcon, /// - /// Table 组件 ExportButtonIcon 属性图标 + /// Table 组件 ExportButtonIcon 属性图标 + /// Table Component Export Button Icon /// TableExportButtonIcon, /// - /// Search 组件 ClearButtonIcon 属性图标 + /// Search 组件 ClearButtonIcon 属性图标 + /// Search Component Clear Button Icon /// SearchClearButtonIcon, /// - /// Search 组件 SearchButtonIcon 属性图标 + /// Search 组件 SearchButtonIcon 属性图标 + /// Search Component Search Button Icon /// SearchButtonIcon, /// - /// Search 组件 SearchButtonLoadingIcon 属性图标 + /// Search 组件 SearchButtonLoadingIcon 属性图标 + /// Search Component Search Button Loading Icon /// SearchButtonLoadingIcon, /// - /// Select 组件 DropdownIcon 属性图标 + /// Select 组件 DropdownIcon 属性图标 + /// Select Component Dropdown Icon /// SelectDropdownIcon, /// - /// Select 组件 ClearIcon 属性图标 + /// Select 组件 ClearIcon 属性图标 + /// Select Component Clear Icon /// SelectClearIcon, /// - /// Select 组件 SearchIcon 属性图标 + /// Select 组件 SearchIcon 属性图标 + /// Select Component Search Icon /// SelectSearchIcon, /// - /// FullScreenButton 组件 Icon 属性图标 + /// FullScreenButton 组件 Icon 属性图标 + /// FullScreenButton Component Icon /// FullScreenButtonIcon, /// - /// FullScreenButton 组件 FullScreenExitButtonIcon 属性图标 + /// FullScreenButton 组件 FullScreenExitButtonIcon 属性图标 + /// FullScreenButton Component FullScreenExitButton Icon /// FullScreenExitButtonIcon, /// - /// Print 组件 ButtonIcon 属性图标 + /// Print 组件 ButtonIcon 属性图标 + /// Print Component Button Icon /// PrintButtonIcon, /// - /// SweetAlertBody 组件 CloseButtonIcon 属性图标 + /// SweetAlertBody 组件 CloseButtonIcon 属性图标 + /// SweetAlertBody Component Close Button Icon /// SweetAlertCloseIcon, /// - /// SweetAlertBody 组件 SweetAlertConfirmIcon 属性图标 + /// SweetAlertBody 组件 SweetAlertConfirmIcon 属性图标 + /// SweetAlertBody Component SweetAlertConfirm Icon /// SweetAlertConfirmIcon, /// - /// Table 组件 AddButtonIcon 属性图标 + /// Table 组件 AddButtonIcon 属性图标 + /// Table Component Add Button Icon /// TableAddButtonIcon, /// - /// Table 组件 EditButtonIcon 属性图标 + /// Table 组件 EditButtonIcon 属性图标 + /// Table Component Edit Button Icon /// TableEditButtonIcon, /// - /// Table 组件 MoreButtonIcon 属性图标 + /// Table 组件 MoreButtonIcon 属性图标 + /// Table Component More Button Icon /// TableMoreButtonIcon, /// - /// Table 组件 DeleteButtonIcon 属性图标 + /// Table 组件 DeleteButtonIcon 属性图标 + /// Table Component Delete Button Icon /// TableDeleteButtonIcon, /// - /// Table 组件 RefreshButtonIcon 属性图标 + /// Table 组件 RefreshButtonIcon 属性图标 + /// Table Component Refresh Button Icon /// TableRefreshButtonIcon, /// - /// Table 组件 CardViewButtonIcon 属性图标 + /// Table 组件 CardViewButtonIcon 属性图标 + /// Table Component CardView Button Icon /// TableCardViewButtonIcon, /// - /// Table 组件 ColumnListButtonIcon 属性图标 + /// Table 组件 ColumnListButtonIcon 属性图标 + /// Table Component ColumnList Button Icon /// TableColumnListButtonIcon, /// - /// Table 组件 ExportExcelIcon 属性图标 + /// Table 组件 ExportExcelIcon 属性图标 + /// Table Component Export Excel Icon /// TableExportExcelIcon, /// - /// Table 组件 ExportCsvIcon 属性图标 + /// Table 组件 ExportCsvIcon 属性图标 + /// Table Component Export Csv Icon /// TableExportCsvIcon, /// - /// Table 组件 ExportPdfIcon 属性图标 + /// Table 组件 ExportPdfIcon 属性图标 + /// Table Component Export Pdf Icon /// TableExportPdfIcon, /// - /// Table 组件 SearchButtonIcon 属性图标 + /// Table 组件 SearchButtonIcon 属性图标 + /// Table Component Search Button Icon /// TableSearchButtonIcon, /// - /// Table 组件 ResetSearchButtonIcon 属性图标 + /// Table 组件 ResetSearchButtonIcon 属性图标 + /// Table Component Reset Search Button Icon /// TableResetSearchButtonIcon, /// - /// Table 组件 CloseButtonIcon 属性图标 + /// Table 组件 CloseButtonIcon 属性图标 + /// Table Component Close Button Icon /// TableCloseButtonIcon, /// - /// Table 组件 SaveButtonIcon 属性图标 + /// Table 组件 SaveButtonIcon 属性图标 + /// Table Component Save Button Icon /// TableSaveButtonIcon, /// - /// Table 组件 AdvanceButtonIcon 属性图标 + /// Table 组件 AdvanceButtonIcon 属性图标 + /// Table Component Advance Button Icon /// TableAdvanceButtonIcon, /// - /// Table 组件 CancelButtonIcon 属性图标 + /// Table 组件 CancelButtonIcon 属性图标 + /// Table Component Cancel Button Icon /// TableCancelButtonIcon, /// - /// Table 组件 TreeNodeLoadingIcon 属性图标 + /// Table 组件 TreeNodeLoadingIcon 属性图标 + /// Table Component TreeNode Loading Icon /// TableTreeNodeLoadingIcon, /// - /// Table 组件 TreeIcon 属性图标 + /// Table 组件 TreeIcon 属性图标 + /// Table Component Tree Icon /// TableTreeIcon, /// - /// Table 组件 TreeExpandIcon 属性图标 + /// Table 组件 TreeExpandIcon 属性图标 + /// Table Component TreeExpand Icon /// TableTreeExpandIcon, /// - /// Table 组件 CopyColumnButtonIcon 属性图标 + /// Table 组件 CopyColumnButtonIcon 属性图标 + /// Table Component CopyColumn Button Icon /// TableCopyColumnButtonIcon, /// - /// Table 组件 GearIcon 属性图标 + /// Table 组件 GearIcon 属性图标 + /// Table Component Gear Icon /// TableGearIcon, /// - /// Table 组件 AdvancedSortButtonIcon 属性图标 + /// Table 组件 AdvancedSortButtonIcon 属性图标 + /// Table Component Advanced Sort Button Icon /// TableAdvancedSortButtonIcon, /// - /// Tab 组件 PreviousIcon 属性图标 + /// Tab 组件 PreviousIcon 属性图标 + /// Tab Component Previous Icon /// TabPreviousIcon, /// - /// Tab 组件 NextIcon 属性图标 + /// Tab 组件 NextIcon 属性图标 + /// Tab Component Next Icon /// TabNextIcon, /// - /// ToastOption SuccessIcon 属性图标 + /// ToastOption SuccessIcon 属性图标 + /// ToastOption Success Icon /// ToastSuccessIcon, /// - /// ToastOption InformationIcon 属性图标 + /// ToastOption InformationIcon 属性图标 + /// ToastOption Information Icon /// ToastInformationIcon, /// - /// ToastOption WarningIcon 属性图标 + /// ToastOption WarningIcon 属性图标 + /// ToastOption Warning Icon /// ToastWarningIcon, /// - /// ToastOption ErrorIcon 属性图标 + /// ToastOption ErrorIcon 属性图标 + /// ToastOption Error Icon /// ToastErrorIcon, /// - /// Tab 组件 DropdownIcon 属性图标 + /// Tab 组件 DropdownIcon 属性图标 + /// Tab Component Dropdown Icon /// TabDropdownIcon, /// - /// Tab 组件 CloseIcon 属性图标 + /// Tab 组件 CloseIcon 属性图标 + /// Tab Component Close Icon /// TabCloseIcon, /// - /// Tab 组件 RefreshToolbarButtonIcon 属性图标 + /// Tab 组件 RefreshToolbarButtonIcon 属性图标 + /// Tab Component Refresh Toolbar Button Icon /// TabRefreshButtonIcon, /// - /// Tab 组件 TabContextMenuRefreshIcon 属性图标 + /// Tab 组件 TabContextMenuRefreshIcon 属性图标 + /// Tab Component ContextMenu Refresh Icon /// TabContextMenuRefreshIcon, /// - /// Tab 组件 TabContextMenuCloseIcon 属性图标 + /// Tab 组件 TabContextMenuCloseIcon 属性图标 + /// Tab Component ContextMenu Close Icon /// TabContextMenuCloseIcon, /// - /// Tab 组件 TabContextMenuCloseOtherIcon 属性图标 + /// Tab 组件 TabContextMenuCloseOtherIcon 属性图标 + /// Tab Component ContextMenu Close Other Icon /// TabContextMenuCloseOtherIcon, /// - /// Tab 组件 TabContextMenuCloseAllIcon 属性图标 + /// Tab 组件 TabContextMenuCloseAllIcon 属性图标 + /// Tab Component ContextMenu Close All Icon /// TabContextMenuCloseAllIcon, /// - /// Tab 组件 TabContextMenuFullScreenIcon 属性图标 + /// Tab 组件 TabContextMenuFullScreenIcon 属性图标 + /// Tab Component ContextMenu FullScreen Icon /// TabContextMenuFullScreenIcon, /// - /// Timer 组件 Icon 属性图标 + /// Timer 组件 Icon 属性图标 + /// Timer Component Icon /// TimerIcon, /// - /// Transfer 组件 LeftIcon 属性图标 + /// Transfer 组件 LeftIcon 属性图标 + /// Transfer Component Left Icon /// TransferLeftIcon, /// - /// Transfer 组件 RightIcon 属性图标 + /// Transfer 组件 RightIcon 属性图标 + /// Transfer Component Right Icon /// TransferRightIcon, /// - /// TransferPanel 组件 SearchIcon 属性图标 + /// TransferPanel 组件 SearchIcon 属性图标 + /// TransferPanel Component Search Icon /// TransferPanelSearchIcon, /// - /// TreeView 组件 ExpandNodeIcon 属性图标 + /// TreeView 组件 ExpandNodeIcon 属性图标 + /// TreeView Component Expand Node Icon /// TreeViewExpandNodeIcon, /// - /// TreeView 组件 SearchIcon 属性图标 + /// TreeView 组件 SearchIcon 属性图标 + /// TreeView Component Search Icon /// TreeViewSearchIcon, /// - /// TreeView 组件 ClearSearchIcon 属性图标 + /// TreeView 组件 ClearSearchIcon 属性图标 + /// TreeView Component Clear Search Icon /// TreeViewResetSearchIcon, /// - /// TreeView 组件 LoadingIcon 属性图标 + /// TreeView 组件 LoadingIcon 属性图标 + /// TreeView Component Loading Icon /// TreeViewLoadingIcon, /// - /// TreeView 组件 ToolbarEditButton 属性图标 + /// TreeView 组件 ToolbarEditButton 属性图标 + /// TreeView Component Toolbar Edit Button /// TreeViewToolbarEditButton, /// - /// TreeView 组件 NodeIcon 属性图标 + /// TreeView 组件 NodeIcon 属性图标 + /// TreeView Component Node Icon /// TreeViewNodeIcon, /// - /// Upload 组件 Excel 文件类型图标 + /// Upload 组件 Excel 文件类型图标 + /// Upload Component Excel File Icon /// FileIconExcel, /// - /// Upload 组件 Word 文件类型图标 + /// Upload 组件 Word 文件类型图标 + /// Upload Component Word File Icon /// FileIconDocx, /// - /// Upload 组件 PPT 文件类型图标 + /// Upload 组件 PPT 文件类型图标 + /// Upload Component PPT File Icon /// FileIconPPT, /// - /// Upload 组件 音频文件类型图标 + /// Upload 组件 音频文件类型图标 + /// Upload Component Audio File Icon /// FileIconAudio, /// - /// Upload 组件 视频文件类型图标 + /// Upload 组件 视频文件类型图标 + /// Upload Component Video File Icon /// FileIconVideo, /// - /// Upload 组件 代码文件类型图标 + /// Upload 组件 代码文件类型图标 + /// Upload Component Code File Icon /// FileIconCode, /// - /// Upload 组件 PDF 文件类型图标 + /// Upload 组件 PDF 文件类型图标 + /// Upload Component PDF File Icon /// FileIconPdf, /// - /// Upload 组件 Zip 文件类型图标 + /// Upload 组件 Zip 文件类型图标 + /// Upload Component Zip File Icon /// FileIconZip, /// - /// Upload 组件 文档文件类型图标 + /// Upload 组件 文档文件类型图标 + /// Upload Component Document File Icon /// FileIconArchive, /// - /// Upload 组件 Image 文件类型图标 + /// Upload 组件 Image 文件类型图标 + /// Upload Component Image File Icon /// FileIconImage, /// - /// Upload 组件 File 文件类型图标 + /// Upload 组件 File 文件类型图标 + /// Upload Component File Icon /// FileIconFile, /// - /// QueryBuilder 组件 减少按钮图标 + /// QueryBuilder 组件 减少按钮图标 + /// QueryBuilder Component Minus Button Icon /// QueryBuilderMinusIcon, /// - /// QueryBuilder 组件 增加按钮图标 + /// QueryBuilder 组件 增加按钮图标 + /// QueryBuilder Component Plus Button Icon /// QueryBuilderPlusIcon, /// - /// QueryBuilder 组件 移除按钮图标 + /// QueryBuilder 组件 移除按钮图标 + /// QueryBuilder Component Remove Button Icon /// QueryBuilderRemoveIcon, /// - /// ThemeProvider 组件 自动模式图标 + /// ThemeProvider 组件 自动模式图标 + /// ThemeProvider Component Auto Mode Icon /// ThemeProviderAutoModeIcon, /// - /// ThemeProvider 组件 暗黑模式图标 + /// ThemeProvider 组件 暗黑模式图标 + /// ThemeProvider Component Dark Mode Icon /// ThemeProviderDarkModeIcon, /// - /// ThemeProvider 组件 明亮模式图标 + /// ThemeProvider 组件 明亮模式图标 + /// ThemeProvider Component Light Mode Icon /// ThemeProviderLightModeIcon, /// - /// ThemeProvider 组件 明亮模式图标 + /// ThemeProvider 组件 明亮模式图标 + /// ThemeProvider Component Light Mode Icon /// ThemeProviderActiveModeIcon, /// - /// Input 组件 ClearIcon 图标 + /// Input 组件 ClearIcon 图标 + /// Input Component Clear Icon /// InputClearIcon } diff --git a/src/BootstrapBlazor/Enums/DOMEvents.cs b/src/BootstrapBlazor/Enums/DOMEvents.cs index b2f451023e9..540277029b1 100644 --- a/src/BootstrapBlazor/Enums/DOMEvents.cs +++ b/src/BootstrapBlazor/Enums/DOMEvents.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,238 +9,285 @@ namespace BootstrapBlazor.Components; /// -/// 浏览器event事件枚举 +/// 浏览器event事件枚举 +/// Browser Event Enum /// [JsonConverter(typeof(DOMEventsConverter))] public enum DOMEvents { /// - /// Click 事件枚举 + /// Click 事件枚举 + /// Click Event /// [Description("click")] Click, /// - /// Dblclick 事件枚举 + /// Dblclick 事件枚举 + /// Dblclick Event /// [Description("dblclick")] Dblclick, /// - /// Mouseup 事件枚举 + /// Mouseup 事件枚举 + /// Mouseup Event /// [Description("mouseup")] Mouseup, /// - /// Mousedown 事件枚举 + /// Mousedown 事件枚举 + /// Mousedown Event /// [Description("mousedown")] Mousedown, /// - /// Contextmenu 事件枚举 + /// Contextmenu 事件枚举 + /// Contextmenu Event /// [Description("contextmenu")] Contextmenu, /// - /// Mousewheel 事件枚举 + /// Mousewheel 事件枚举 + /// Mousewheel Event /// [Description("mousewheel")] Mousewheel, /// - /// DOMMouseScroll 事件枚举 + /// DOMMouseScroll 事件枚举 + /// DOMMouseScroll Event /// [Description("dOMMouseScroll")] DOMMouseScroll, /// - /// Mouseover 事件枚举 + /// Mouseover 事件枚举 + /// Mouseover Event /// [Description("mouseover")] Mouseover, /// - /// Mouseout 事件枚举 + /// Mouseout 事件枚举 + /// Mouseout Event /// [Description("mouseout")] Mouseout, /// - /// Mousemove 事件枚举 + /// Mousemove 事件枚举 + /// Mousemove Event /// [Description("mousemove")] Mousemove, /// - /// Selectstart 事件枚举 + /// Selectstart 事件枚举 + /// Selectstart Event /// [Description("selectstart")] Selectstart, /// - /// Selectend 事件枚举 + /// Selectend 事件枚举 + /// Selectend Event /// [Description("selectend")] Selectend, /// - /// Keydown 事件枚举 + /// Keydown 事件枚举 + /// Keydown Event /// [Description("keydown")] Keydown, /// - /// Keypress 事件枚举 + /// Keypress 事件枚举 + /// Keypress Event /// [Description("keypress")] Keypress, /// - /// Keyup 事件枚举 + /// Keyup 事件枚举 + /// Keyup Event /// [Description("keyup")] Keyup, /// - /// Orientationchange 事件枚举 + /// Orientationchange 事件枚举 + /// Orientationchange Event /// [Description("orientationchange")] Orientationchange, /// - /// Touchstart 事件枚举 + /// Touchstart 事件枚举 + /// Touchstart Event /// [Description("touchstart")] Touchstart, /// - /// Touchmove 事件枚举 + /// Touchmove 事件枚举 + /// Touchmove Event /// [Description("touchmove")] Touchmove, /// - /// Touchend 事件枚举 + /// Touchend 事件枚举 + /// Touchend Event /// [Description("touchend")] Touchend, /// - /// Touchcancel 事件枚举 + /// Touchcancel 事件枚举 + /// Touchcancel Event /// [Description("touchcancel")] Touchcancel, /// - /// Pointerdown 事件枚举 + /// Pointerdown 事件枚举 + /// Pointerdown Event /// [Description("pointerdown")] Pointerdown, /// - /// Pointermove 事件枚举 + /// Pointermove 事件枚举 + /// Pointermove Event /// [Description("pointermove")] Pointermove, /// - /// Pointerup 事件枚举 + /// Pointerup 事件枚举 + /// Pointerup Event /// [Description("pointerup")] Pointerup, /// - /// Pointerleave 事件枚举 + /// Pointerleave 事件枚举 + /// Pointerleave Event /// [Description("pointerleave")] Pointerleave, /// - /// Pointercancel 事件枚举 + /// Pointercancel 事件枚举 + /// Pointercancel Event /// [Description("pointercancel")] Pointercancel, /// - /// Gesturestart 事件枚举 + /// Gesturestart 事件枚举 + /// Gesturestart Event /// [Description("gesturestart")] Gesturestart, /// - /// Gesturechange 事件枚举 + /// Gesturechange 事件枚举 + /// Gesturechange Event /// [Description("gesturechange")] Gesturechange, /// - /// Gestureend 事件枚举 + /// Gestureend 事件枚举 + /// Gestureend Event /// [Description("gestureend")] Gestureend, /// - /// Focus 事件枚举 + /// Focus 事件枚举 + /// Focus Event /// [Description("focus")] Focus, /// - /// Blur 事件枚举 + /// Blur 事件枚举 + /// Blur Event /// [Description("blur")] Blur, /// - /// Change 事件枚举 + /// Change 事件枚举 + /// Change Event /// [Description("change")] Change, /// - /// Reset 事件枚举 + /// Reset 事件枚举 + /// Reset Event /// [Description("reset")] Reset, /// - /// Select 事件枚举 + /// Select 事件枚举 + /// Select Event /// [Description("select")] Select, /// - /// Submit 事件枚举 + /// Submit 事件枚举 + /// Submit Event /// [Description("submit")] Submit, /// - /// Focusin 事件枚举 + /// Focusin 事件枚举 + /// Focusin Event /// [Description("focusin")] Focusin, /// - /// Focusout 事件枚举 + /// Focusout 事件枚举 + /// Focusout Event /// [Description("focusout")] Focusout, /// - /// Load 事件枚举 + /// Load 事件枚举 + /// Load Event /// [Description("load")] Load, /// - /// Unload 事件枚举 + /// Unload 事件枚举 + /// Unload Event /// [Description("unload")] Unload, /// - /// Beforeunload 事件枚举 + /// Beforeunload 事件枚举 + /// Beforeunload Event /// [Description("beforeunload")] Beforeunload, /// - /// Resize 事件枚举 + /// Resize 事件枚举 + /// Resize Event /// [Description("resize")] Resize, /// - /// Move 事件枚举 + /// Move 事件枚举 + /// Move Event /// [Description("move")] Move, /// - /// DOMContentLoaded 事件枚举 + /// DOMContentLoaded 事件枚举 + /// DOMContentLoaded Event /// [Description("dOMContentLoaded")] DOMContentLoaded, /// - /// Readystatechange 事件枚举 + /// Readystatechange 事件枚举 + /// Readystatechange Event /// [Description("readystatechange")] Readystatechange, /// - /// Error 事件枚举 + /// Error 事件枚举 + /// Error Event /// [Description("error")] Error, /// - /// Abort 事件枚举 + /// Abort 事件枚举 + /// Abort Event /// [Description("abort")] Abort, /// - /// Scroll 事件枚举 + /// Scroll 事件枚举 + /// Scroll Event /// [Description("scroll")] Scroll diff --git a/src/BootstrapBlazor/Enums/DatePickerViewMode.cs b/src/BootstrapBlazor/Enums/DatePickerViewMode.cs index 1896cfdb55a..0d7b747e1d5 100644 --- a/src/BootstrapBlazor/Enums/DatePickerViewMode.cs +++ b/src/BootstrapBlazor/Enums/DatePickerViewMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,27 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// DateTimePicker 组件视图显示模式 +/// DateTimePicker 组件视图显示模式 +/// DateTimePicker Components View Mode /// public enum DatePickerViewMode { /// - /// 年月日时分秒模式 + /// 年月日时分秒模式 + /// DateTime Mode /// DateTime, /// - /// 年月日模式 + /// 年月日模式 + /// Date Mode /// Date, /// - /// 月视图 + /// 月视图 + /// Month Mode /// Month, /// - /// 年视图 + /// 年视图 + /// Year Mode /// Year } diff --git a/src/BootstrapBlazor/Enums/DateTimeRangeRenderMode.cs b/src/BootstrapBlazor/Enums/DateTimeRangeRenderMode.cs index a835f2cad03..53e5791102b 100644 --- a/src/BootstrapBlazor/Enums/DateTimeRangeRenderMode.cs +++ b/src/BootstrapBlazor/Enums/DateTimeRangeRenderMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// DateTimeRangeRenderMode 组件视图显示模式 +/// DateTimeRangeRenderMode 组件视图显示模式 +/// DateTimeRangeRenderMode Enum /// public enum DateTimeRangeRenderMode { /// - /// Single Component Mode + /// Single Component Mode + /// Single Component Mode /// Single, /// - /// Double Panel Mode + /// Double Panel Mode + /// Double Panel Mode /// Double } diff --git a/src/BootstrapBlazor/Enums/DialMode.cs b/src/BootstrapBlazor/Enums/DialMode.cs index 219cea10b39..87353257418 100644 --- a/src/BootstrapBlazor/Enums/DialMode.cs +++ b/src/BootstrapBlazor/Enums/DialMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// DialButton 呈现方式枚举 +/// DialButton 呈现方式枚举 +/// DialButton Render Mode Enum /// public enum DialMode { /// - /// 线性分布 + /// 线性分布 + /// Linear /// Linear, /// - /// 辐射分布 + /// 辐射分布 + /// Radial /// Radial } diff --git a/src/BootstrapBlazor/Enums/Direction.cs b/src/BootstrapBlazor/Enums/Direction.cs index f78a694ac2c..5816828f12b 100644 --- a/src/BootstrapBlazor/Enums/Direction.cs +++ b/src/BootstrapBlazor/Enums/Direction.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,30 +8,35 @@ namespace BootstrapBlazor.Components; /// -/// 下拉框枚举类 +/// 下拉框枚举类 +/// Dropdown Direction Enum /// public enum Direction { /// - /// + /// + /// /// [Description("dropdown")] Dropdown, /// - /// Dropup + /// Dropup + /// Dropup /// [Description("dropup")] Dropup, /// - /// Dropleft + /// Dropleft + /// Dropleft /// [Description("dropstart")] Dropleft, /// - /// Dropright + /// Dropright + /// Dropright /// [Description("dropend")] Dropright diff --git a/src/BootstrapBlazor/Enums/EditMode.cs b/src/BootstrapBlazor/Enums/EditMode.cs index f9edcbbb579..abaf23a77a5 100644 --- a/src/BootstrapBlazor/Enums/EditMode.cs +++ b/src/BootstrapBlazor/Enums/EditMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,27 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件编辑模式枚举类型 +/// Table 组件编辑模式枚举类型 +/// Table Edit Mode Enum /// public enum EditMode { /// - /// 弹窗式编辑模式 + /// 弹窗式编辑模式 + /// Popup Edit Mode /// Popup, /// - /// 行内编辑模式 + /// 行内编辑模式 + /// Edit Form Mode /// EditForm, /// - /// 单元格内编辑模式 + /// 单元格内编辑模式 + /// In Cell Edit Mode /// InCell, /// - /// 抽屉编辑模式 + /// 抽屉编辑模式 + /// Drawer Edit Mode /// Drawer } diff --git a/src/BootstrapBlazor/Enums/EditSubmitKey.cs b/src/BootstrapBlazor/Enums/EditSubmitKey.cs index a0c74b00c2a..b2754b5ba9e 100644 --- a/src/BootstrapBlazor/Enums/EditSubmitKey.cs +++ b/src/BootstrapBlazor/Enums/EditSubmitKey.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,18 +8,21 @@ namespace BootstrapBlazor.Components; /// -/// EditSubmitKeys 枚举 +/// EditSubmitKeys 枚举 +/// EditSubmitKeys Enum /// public enum EditSubmitKey { /// - /// Enter 键 + /// Enter 键 + /// Enter Key /// [Description("enter")] Enter, /// - /// Space 键 + /// Space 键 + /// Space Key /// [Description("space")] Space diff --git a/src/BootstrapBlazor/Enums/FilterAction.cs b/src/BootstrapBlazor/Enums/FilterAction.cs index d84f8150630..cc1ab681ed7 100644 --- a/src/BootstrapBlazor/Enums/FilterAction.cs +++ b/src/BootstrapBlazor/Enums/FilterAction.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,60 +8,70 @@ namespace BootstrapBlazor.Components; /// -/// 关系运算符 +/// 关系运算符 +/// Relational Operator /// public enum FilterAction { /// - /// 等于 + /// 等于 + /// Equal to /// [Description("等于")] Equal, /// - /// 不等于 + /// 不等于 + /// Not equal to /// [Description("不等于")] NotEqual, /// - /// 大于 + /// 大于 + /// Greater than /// [Description("大于")] GreaterThan, /// - /// 大于等于 + /// 大于等于 + /// Greater than or equal to /// [Description("大于等于")] GreaterThanOrEqual, /// - /// 小于 + /// 小于 + /// Less than /// [Description("小于")] LessThan, /// - /// 小于等于 + /// 小于等于 + /// Less than or equal to /// [Description("小于等于")] LessThanOrEqual, /// - /// 包含 + /// 包含 + /// Contains /// [Description("包含")] Contains, /// - /// 不包含 + /// 不包含 + /// Not contains /// [Description("不包含")] NotContains, /// - /// 自定义条件 + /// 自定义条件 + /// Custom Predicate /// [Description("自定义条件")] CustomPredicate diff --git a/src/BootstrapBlazor/Enums/FilterLogic.cs b/src/BootstrapBlazor/Enums/FilterLogic.cs index 6327dbe2ef9..f35a49c2910 100644 --- a/src/BootstrapBlazor/Enums/FilterLogic.cs +++ b/src/BootstrapBlazor/Enums/FilterLogic.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,18 +8,21 @@ namespace BootstrapBlazor.Components; /// -/// 逻辑运算符 +/// 逻辑运算符 +/// 逻辑运算符 /// public enum FilterLogic { /// - /// 并且 + /// 并且 + /// 并且 /// [Description("并且")] And, /// - /// 或者 + /// 或者 + /// 或者 /// [Description("或者")] Or diff --git a/src/BootstrapBlazor/Enums/FlipClockViewMode.cs b/src/BootstrapBlazor/Enums/FlipClockViewMode.cs index 7db9959f84e..e00c8de60ff 100644 --- a/src/BootstrapBlazor/Enums/FlipClockViewMode.cs +++ b/src/BootstrapBlazor/Enums/FlipClockViewMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,20 +6,24 @@ namespace BootstrapBlazor.Components; /// -/// 显示模式 +/// 显示模式 +/// display模式 /// public enum FlipClockViewMode { /// - /// 时间 + /// 时间 + /// 时间 /// DateTime, /// - /// 计数 + /// 计数 + /// 计数 /// Count, /// - /// 倒计时 + /// 倒计时 + /// 倒计时 /// CountDown } diff --git a/src/BootstrapBlazor/Enums/FullScreenSize.cs b/src/BootstrapBlazor/Enums/FullScreenSize.cs index 5b376c2f18b..cadf550e211 100644 --- a/src/BootstrapBlazor/Enums/FullScreenSize.cs +++ b/src/BootstrapBlazor/Enums/FullScreenSize.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,47 +8,55 @@ namespace BootstrapBlazor.Components; /// -/// Size 枚举类型 +/// Size 枚举类型 +/// Size enumtype /// public enum FullScreenSize { /// - /// 无设置 + /// 无设置 + /// 无Sets /// None, /// - /// 始终全屏 + /// 始终全屏 + /// 始终全屏 /// [Description("fullscreen")] Always, /// - /// sm 小设置小于 576px + /// sm 小设置小于 576px + /// sm 小Sets小于 576px /// [Description("fullscreen-sm-down")] Small, /// - /// md 中等设置小于 768px + /// md 中等设置小于 768px + /// md 中等Sets小于 768px /// [Description("fullscreen-md-down")] Medium, /// - /// lg 大设置小于 992px + /// lg 大设置小于 992px + /// lg 大Sets小于 992px /// [Description("fullscreen-lg-down")] Large, /// - /// xl 超大设置小于 1200px + /// xl 超大设置小于 1200px + /// xl 超大Sets小于 1200px /// [Description("fullscreen-xl-down")] ExtraLarge, /// - /// xxl 超大设置小于 1400px + /// xxl 超大设置小于 1400px + /// xxl 超大Sets小于 1400px /// [Description("fullscreen-xxl-down")] ExtraExtraLarge diff --git a/src/BootstrapBlazor/Enums/HorizontalAlignment.cs b/src/BootstrapBlazor/Enums/HorizontalAlignment.cs index 68e88a126a6..6c7f8499446 100644 --- a/src/BootstrapBlazor/Enums/HorizontalAlignment.cs +++ b/src/BootstrapBlazor/Enums/HorizontalAlignment.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public enum HorizontalAlignment { /// - /// + /// + /// /// Left, /// - /// + /// + /// /// Center, /// - /// + /// + /// /// Right } diff --git a/src/BootstrapBlazor/Enums/InsertRowMode.cs b/src/BootstrapBlazor/Enums/InsertRowMode.cs index 3697de1049d..fc8cd91c15d 100644 --- a/src/BootstrapBlazor/Enums/InsertRowMode.cs +++ b/src/BootstrapBlazor/Enums/InsertRowMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件 为非弹窗模式时新建行模式 +/// Table 组件 为非弹窗模式时新建行模式 +/// Table component 为非弹窗模式时新建行模式 /// public enum InsertRowMode { /// - /// 第一行 + /// 第一行 + /// 第一行 /// First, /// - /// 最后一行 + /// 最后一行 + /// 最后一行 /// Last } diff --git a/src/BootstrapBlazor/Enums/ItemsPerRow.cs b/src/BootstrapBlazor/Enums/ItemsPerRow.cs index 9228861b495..ecd2a4ab587 100644 --- a/src/BootstrapBlazor/Enums/ItemsPerRow.cs +++ b/src/BootstrapBlazor/Enums/ItemsPerRow.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,42 +8,49 @@ namespace BootstrapBlazor.Components; /// -/// 每行显示多少组件的枚举 +/// 每行显示多少组件的枚举 +/// 每行display多少component的enum /// public enum ItemsPerRow { /// - /// 每行一个 + /// 每行一个 + /// 每行一个 /// [Description("12")] One, /// - /// 每行两个 + /// 每行两个 + /// 每行两个 /// [Description("6")] Two, /// - /// 每行三个 + /// 每行三个 + /// 每行三个 /// [Description("4")] Three, /// - /// 每行四个 + /// 每行四个 + /// 每行四个 /// [Description("3")] Four, /// - /// 每行六个 + /// 每行六个 + /// 每行六个 /// [Description("2")] Six, /// - /// 每行12个 + /// 每行12个 + /// 每行12个 /// [Description("1")] Twelve diff --git a/src/BootstrapBlazor/Enums/MarqueeDirection.cs b/src/BootstrapBlazor/Enums/MarqueeDirection.cs index 8be8b6ad307..1e56852c46d 100644 --- a/src/BootstrapBlazor/Enums/MarqueeDirection.cs +++ b/src/BootstrapBlazor/Enums/MarqueeDirection.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,35 +8,37 @@ namespace BootstrapBlazor.Components; /// -/// Marquee组件,文本滚动方向枚举类型 -/// Marquee component, Text scrolling direction enumeration +/// Marquee组件,文本滚动方向枚举类型 Marquee component, Text scrolling direction enumeration +/// +/// Marqueecomponent,文本滚动方向enumtype Marquee component, Text scrolling direction enumeration +/// /// public enum MarqueeDirection { /// - /// 文本从左向右滚动 - /// scrolling text from left to right + /// 文本从左向右滚动 scrolling text from left to right + /// 文本从左向右滚动 scrolling text from left to right /// [Description("LeftToRight")] LeftToRight, /// - /// 文本从右向左滚动 - /// scrolling text from right to left + /// 文本从右向左滚动 scrolling text from right to left + /// 文本从右向左滚动 scrolling text from right to left /// [Description("RightToLeft")] RightToLeft, /// - /// Marquee组件,从上到下滚动文本 - /// scrolling text from top to bottom + /// Marquee组件,从上到下滚动文本 scrolling text from top to bottom + /// Marqueecomponent,从上到下滚动文本 scrolling text from top to bottom /// [Description("TopToBottom")] TopToBottom, /// - /// 从下至上滚动文本> - /// Scroll text from bottom to top + /// 从下至上滚动文本> Scroll text from bottom to top + /// 从下至上滚动文本> Scroll text from bottom to top /// [Description("BottomToTop")] BottomToTop diff --git a/src/BootstrapBlazor/Enums/MessageShowMode.cs b/src/BootstrapBlazor/Enums/MessageShowMode.cs index 214c08c8440..967cab68718 100644 --- a/src/BootstrapBlazor/Enums/MessageShowMode.cs +++ b/src/BootstrapBlazor/Enums/MessageShowMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 消息显示模式 +/// 消息显示模式 +/// 消息display模式 /// public enum MessageShowMode { /// - /// 单个模式,始终显示一个消息弹窗 + /// 单个模式,始终显示一个消息弹窗 + /// 单个模式,始终display一个消息弹窗 /// Single, /// - /// 多个模式,消息均显示 + /// 多个模式,消息均显示 + /// 多个模式,消息均display /// Multiple } diff --git a/src/BootstrapBlazor/Enums/ObjectFitMode.cs b/src/BootstrapBlazor/Enums/ObjectFitMode.cs index 3e37f879bc8..f6650e31528 100644 --- a/src/BootstrapBlazor/Enums/ObjectFitMode.cs +++ b/src/BootstrapBlazor/Enums/ObjectFitMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,36 +8,42 @@ namespace BootstrapBlazor.Components; /// -/// Image 组件图片填充模式 +/// Image 组件图片填充模式 +/// Image component图片填充模式 /// public enum ObjectFitMode { /// - /// 填充 内容拉伸填满 + /// 填充 内容拉伸填满 + /// 填充 content拉伸填满 /// [Description("fill")] Fill, /// - /// 保持原有尺寸比例 会留白 + /// 保持原有尺寸比例 会留白 + /// 保持原有尺寸比例 会留白 /// [Description("contain")] Contain, /// - /// 覆盖 保持原有尺寸比例 宽度和高度至少有一个和容器一致 + /// 覆盖 保持原有尺寸比例 宽度和高度至少有一个和容器一致 + /// 覆盖 保持原有尺寸比例 width和height至少有一个和容器一致 /// [Description("cover")] Cover, /// - /// 保持原有尺寸比例 + /// 保持原有尺寸比例 + /// 保持原有尺寸比例 /// [Description("none")] None, /// - /// 依次设置了 none 或 contain, 最终呈现的是尺寸比较小的那个 + /// 依次设置了 none 或 contain, 最终呈现的是尺寸比较小的那个 + /// 依次Sets了 none 或 contain, 最终呈现的是尺寸比较小的那个 /// [Description("scale-down")] ScaleDown diff --git a/src/BootstrapBlazor/Enums/OtpInputType.cs b/src/BootstrapBlazor/Enums/OtpInputType.cs index 4eabeedef4a..97e534d002a 100644 --- a/src/BootstrapBlazor/Enums/OtpInputType.cs +++ b/src/BootstrapBlazor/Enums/OtpInputType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// OTP input type +/// OTP input 类型 +/// OTP input type /// public enum OtpInputType { /// - /// Number OTP Input + /// Number OTP Input + /// Number OTP Input /// Number, /// - /// Text OTP Input + /// Text OTP Input + /// Text OTP Input /// Text, /// - /// Password OTP Input + /// Password OTP Input + /// Password OTP Input /// Password } diff --git a/src/BootstrapBlazor/Enums/Placement.cs b/src/BootstrapBlazor/Enums/Placement.cs index 9664c54e618..5313ab4f508 100644 --- a/src/BootstrapBlazor/Enums/Placement.cs +++ b/src/BootstrapBlazor/Enums/Placement.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,120 +8,140 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public enum Placement { /// - /// + /// + /// /// [Description("auto")] Auto, /// - /// + /// + /// /// [Description("top")] Top, /// - /// + /// + /// /// [Description("top-start")] TopStart, /// - /// + /// + /// /// [Description("top-center")] TopCenter, /// - /// + /// + /// /// [Description("top-end")] TopEnd, /// - /// + /// + /// /// [Description("middle")] Middle, /// - /// + /// + /// /// [Description("middle-start")] MiddleStart, /// - /// + /// + /// /// [Description("middle-center")] MiddleCenter, /// - /// + /// + /// /// [Description("middle-end")] MiddleEnd, /// - /// + /// + /// /// [Description("bottom")] Bottom, /// - /// + /// + /// /// [Description("bottom-start")] BottomStart, /// - /// + /// + /// /// [Description("bottom-center")] BottomCenter, /// - /// + /// + /// /// [Description("bottom-end")] BottomEnd, /// - /// + /// + /// /// [Description("left")] Left, /// - /// + /// + /// /// [Description("left-start")] LeftStart, /// - /// + /// + /// /// [Description("left-end")] LeftEnd, /// - /// + /// + /// /// [Description("right")] Right, /// - /// + /// + /// /// [Description("right-start")] RightStart, /// - /// + /// + /// /// [Description("right-end")] RightEnd, diff --git a/src/BootstrapBlazor/Enums/PopoverType.cs b/src/BootstrapBlazor/Enums/PopoverType.cs index ad769f0ea68..297f8cd069b 100644 --- a/src/BootstrapBlazor/Enums/PopoverType.cs +++ b/src/BootstrapBlazor/Enums/PopoverType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 弹出框类型枚举 +/// 弹出框类型枚举 +/// 弹出框typeenum /// public enum PopoverType { /// - /// 工具条 + /// 工具条 + /// 工具条 /// Tooltip, /// - /// 弹出层 + /// 弹出层 + /// 弹出层 /// Popover } diff --git a/src/BootstrapBlazor/Enums/RecognizerStatus.cs b/src/BootstrapBlazor/Enums/RecognizerStatus.cs index 73664aa4c15..9b238021e66 100644 --- a/src/BootstrapBlazor/Enums/RecognizerStatus.cs +++ b/src/BootstrapBlazor/Enums/RecognizerStatus.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,28 +8,33 @@ namespace BootstrapBlazor.Components; /// -/// 语音合成状态枚举 +/// 语音合成状态枚举 +/// 语音合成状态enum /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum RecognizerStatus { /// - /// 正在识别 + /// 正在识别 + /// 正在识别 /// Start, /// - /// 识别完毕 + /// 识别完毕 + /// 识别完毕 /// Finished, /// - /// 关闭 + /// 关闭 + /// 关闭 /// Close, /// - /// 出错 + /// 出错 + /// 出错 /// Error } diff --git a/src/BootstrapBlazor/Enums/RowType.cs b/src/BootstrapBlazor/Enums/RowType.cs index 2e779b7fe61..fd99eca0336 100644 --- a/src/BootstrapBlazor/Enums/RowType.cs +++ b/src/BootstrapBlazor/Enums/RowType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,18 +8,21 @@ namespace BootstrapBlazor.Components; /// -/// 行内格式枚举 +/// 行内格式枚举 +/// 行内格式enum /// public enum RowType { /// - /// 默认格式 + /// 默认格式 + /// Default is格式 /// [Description("row")] Normal, /// - /// 表单中使用 label 在左,控件不充满 + /// 表单中使用 label 在左,控件不充满 + /// 表单中使用 label 在左,控件不充满 /// [Description("inline")] Inline diff --git a/src/BootstrapBlazor/Enums/ScrollMode.cs b/src/BootstrapBlazor/Enums/ScrollMode.cs index 4976a0dd8bc..baf7f58fc00 100644 --- a/src/BootstrapBlazor/Enums/ScrollMode.cs +++ b/src/BootstrapBlazor/Enums/ScrollMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 数据滚动模式枚举类型 +/// 数据滚动模式枚举类型 +/// data滚动模式enumtype /// public enum ScrollMode { /// - /// 未设置 + /// 未设置 + /// 未Sets /// None, /// - /// 虚拟滚动 + /// 虚拟滚动 + /// 虚拟滚动 /// Virtual } diff --git a/src/BootstrapBlazor/Enums/ScrollToViewAlign.cs b/src/BootstrapBlazor/Enums/ScrollToViewAlign.cs index 0dcd0c2c894..985024ea0a6 100644 --- a/src/BootstrapBlazor/Enums/ScrollToViewAlign.cs +++ b/src/BootstrapBlazor/Enums/ScrollToViewAlign.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,30 +8,35 @@ namespace BootstrapBlazor.Components; /// -/// 垂直滚动对齐方式 +/// 垂直滚动对齐方式 +/// 垂直滚动对齐方式 /// public enum ScrollToViewAlign { /// - /// + /// + /// /// [Description("start")] Start, /// - /// + /// + /// /// [Description("center")] Center, /// - /// + /// + /// /// [Description("end")] End, /// - /// + /// + /// /// [Description("nearest")] Nearest diff --git a/src/BootstrapBlazor/Enums/SearchMode.cs b/src/BootstrapBlazor/Enums/SearchMode.cs index 94dc1c0f6b8..0f8bb68dba1 100644 --- a/src/BootstrapBlazor/Enums/SearchMode.cs +++ b/src/BootstrapBlazor/Enums/SearchMode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 搜索栏渲染模式 默认 Popup 弹窗形式 +/// 搜索栏渲染模式 默认 Popup 弹窗形式 +/// 搜索栏渲染模式 Default is Popup 弹窗形式 /// public enum SearchMode { /// - /// 弹窗模式 + /// 弹窗模式 + /// 弹窗模式 /// Popup, /// - /// Table 组件上方 + /// Table 组件上方 + /// Table component上方 /// Top } diff --git a/src/BootstrapBlazor/Enums/Size.cs b/src/BootstrapBlazor/Enums/Size.cs index 33ac7c1269a..705f2674464 100644 --- a/src/BootstrapBlazor/Enums/Size.cs +++ b/src/BootstrapBlazor/Enums/Size.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,47 +8,55 @@ namespace BootstrapBlazor.Components; /// -/// Size 枚举类型 +/// Size 枚举类型 +/// Size enumtype /// public enum Size { /// - /// 无设置 + /// 无设置 + /// 无Sets /// None, /// - /// xs 超小设置小于 576px + /// xs 超小设置小于 576px + /// xs 超小Sets小于 576px /// [Description("xs")] ExtraSmall, /// - /// sm 小设置大于等于 576px + /// sm 小设置大于等于 576px + /// sm 小Sets大于等于 576px /// [Description("sm")] Small, /// - /// md 中等设置大于等于 768px + /// md 中等设置大于等于 768px + /// md 中等Sets大于等于 768px /// [Description("md")] Medium, /// - /// lg 大设置大于等于 992px + /// lg 大设置大于等于 992px + /// lg 大Sets大于等于 992px /// [Description("lg")] Large, /// - /// xl 超大设置大于等于 1200px + /// xl 超大设置大于等于 1200px + /// xl 超大Sets大于等于 1200px /// [Description("xl")] ExtraLarge, /// - /// xl 超大设置大于等于 1400px + /// xl 超大设置大于等于 1400px + /// xl 超大Sets大于等于 1400px /// [Description("xxl")] ExtraExtraLarge diff --git a/src/BootstrapBlazor/Enums/SortOrder.cs b/src/BootstrapBlazor/Enums/SortOrder.cs index 60894cffd83..d9a002b2b72 100644 --- a/src/BootstrapBlazor/Enums/SortOrder.cs +++ b/src/BootstrapBlazor/Enums/SortOrder.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,20 +6,24 @@ namespace BootstrapBlazor.Components; /// -/// 排序顺序枚举类型 +/// 排序顺序枚举类型 +/// 排序顺序enumtype /// public enum SortOrder { /// - /// 未设置 + /// 未设置 + /// 未Sets /// Unset, /// - /// 升序 0-9 A-Z + /// 升序 0-9 A-Z + /// 升序 0-9 A-Z /// Asc, /// - /// 降序 9-0 Z-A + /// 降序 9-0 Z-A + /// 降序 9-0 Z-A /// Desc, } diff --git a/src/BootstrapBlazor/Enums/SpinnerType.cs b/src/BootstrapBlazor/Enums/SpinnerType.cs index 9be57104c49..8215ae0e8fc 100644 --- a/src/BootstrapBlazor/Enums/SpinnerType.cs +++ b/src/BootstrapBlazor/Enums/SpinnerType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,18 +8,21 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public enum SpinnerType { /// - /// + /// + /// /// [Description("border")] Border, /// - /// + /// + /// /// [Description("grow")] Grow, diff --git a/src/BootstrapBlazor/Enums/StackAlignItems .cs b/src/BootstrapBlazor/Enums/StackAlignItems .cs index b6e6a98205d..77be39661b6 100644 --- a/src/BootstrapBlazor/Enums/StackAlignItems .cs +++ b/src/BootstrapBlazor/Enums/StackAlignItems .cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,36 +8,42 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public enum StackAlignItems { /// - /// + /// + /// /// [Description("align-items-stretch")] Stretch, /// - /// + /// + /// /// [Description("align-items-start")] Start, /// - /// + /// + /// /// [Description("align-items-center")] Center, /// - /// + /// + /// /// [Description("align-items-end")] End, /// - /// + /// + /// /// [Description("align-items-baseline")] Baseline, diff --git a/src/BootstrapBlazor/Enums/StackJustify.cs b/src/BootstrapBlazor/Enums/StackJustify.cs index 47fc70cc2bd..d63e1655ce4 100644 --- a/src/BootstrapBlazor/Enums/StackJustify.cs +++ b/src/BootstrapBlazor/Enums/StackJustify.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,42 +8,49 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public enum StackJustifyContent { /// - /// + /// + /// /// [Description("justify-content-start")] Start, /// - /// + /// + /// /// [Description("justify-content-center")] Center, /// - /// + /// + /// /// [Description("justify-content-end")] End, /// - /// + /// + /// /// [Description("justify-content-between")] Between, /// - /// + /// + /// /// [Description("justify-content-around")] Around, /// - /// + /// + /// /// [Description("justify-content-evenly")] Evenly, diff --git a/src/BootstrapBlazor/Enums/StepStatus.cs b/src/BootstrapBlazor/Enums/StepStatus.cs index 5e99e7a92ba..dce8011a4b2 100644 --- a/src/BootstrapBlazor/Enums/StepStatus.cs +++ b/src/BootstrapBlazor/Enums/StepStatus.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,36 +8,42 @@ namespace BootstrapBlazor.Components; /// -/// 步骤状态枚举 +/// 步骤状态枚举 +/// 步骤状态enum /// public enum StepStatus { /// - /// 未开始 + /// 未开始 + /// 未开始 /// [Description("wait")] Wait, /// - /// 进行中 + /// 进行中 + /// 进行中 /// [Description("process")] Process, /// - /// + /// + /// /// [Description("finish")] Finish, /// - /// 已完成 + /// 已完成 + /// 已完成 /// [Description("success")] Success, /// - /// + /// + /// /// [Description("error")] Error, diff --git a/src/BootstrapBlazor/Enums/SwalCategory.cs b/src/BootstrapBlazor/Enums/SwalCategory.cs index 17bb94a5308..698b39ed6a8 100644 --- a/src/BootstrapBlazor/Enums/SwalCategory.cs +++ b/src/BootstrapBlazor/Enums/SwalCategory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,38 @@ namespace BootstrapBlazor.Components; /// -/// SweetAlert 提示类型枚举 +/// SweetAlert 提示类型枚举 +/// SweetAlert 提示typeenum /// public enum SwalCategory { /// - /// 成功信息 + /// 成功信息 + /// 成功信息 /// Success, /// - /// 错误信息 + /// 错误信息 + /// 错误信息 /// Error, /// - /// 警告信息 + /// 警告信息 + /// 警告信息 /// Warning, /// - /// 提示信息 + /// 提示信息 + /// 提示信息 /// Information, /// - /// 疑问信息 + /// 疑问信息 + /// 疑问信息 /// Question } diff --git a/src/BootstrapBlazor/Enums/SynthesizerStatus.cs b/src/BootstrapBlazor/Enums/SynthesizerStatus.cs index e58c046d4cb..91face669fe 100644 --- a/src/BootstrapBlazor/Enums/SynthesizerStatus.cs +++ b/src/BootstrapBlazor/Enums/SynthesizerStatus.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,28 +8,33 @@ namespace BootstrapBlazor.Components; /// -/// 语音合成状态枚举 +/// 语音合成状态枚举 +/// 语音合成状态enum /// [JsonConverter(typeof(JsonStringEnumConverter))] public enum SynthesizerStatus { /// - /// 正在合成 + /// 正在合成 + /// 正在合成 /// Synthesizer, /// - /// 朗读完毕 + /// 朗读完毕 + /// 朗读完毕 /// Finished, /// - /// 取消 + /// 取消 + /// 取消 /// Cancel, /// - /// 出错 + /// 出错 + /// 出错 /// Error } diff --git a/src/BootstrapBlazor/Enums/TabStyle.cs b/src/BootstrapBlazor/Enums/TabStyle.cs index ff2286bd950..6795897cc91 100644 --- a/src/BootstrapBlazor/Enums/TabStyle.cs +++ b/src/BootstrapBlazor/Enums/TabStyle.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// Tab style emnu +/// Tab 样式 emnu +/// Tab style emnu /// public enum TabStyle { /// - /// The default style + /// default 样式 + /// The default style /// Default, /// - /// The Chrome style + /// Chrome 样式 + /// The Chrome style /// Chrome, /// - /// The Capsule style + /// Capsule 样式 + /// The Capsule style /// Capsule } diff --git a/src/BootstrapBlazor/Enums/TableExportType.cs b/src/BootstrapBlazor/Enums/TableExportType.cs index 34c90659aed..689e14e74bc 100644 --- a/src/BootstrapBlazor/Enums/TableExportType.cs +++ b/src/BootstrapBlazor/Enums/TableExportType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,29 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件导出类型枚举 +/// Table 组件导出类型枚举 +/// Table component导出typeenum /// public enum TableExportType { /// - /// 未知格式 + /// 未知格式 + /// 未知格式 /// Unknown, /// - /// Excel 格式 + /// Excel 格式 + /// Excel 格式 /// Excel, /// - /// Csv 格式 + /// Csv 格式 + /// Csv 格式 /// Csv, /// - /// Pdf 格式 + /// Pdf 格式 + /// Pdf 格式 /// Pdf } diff --git a/src/BootstrapBlazor/Enums/TableHeaderStyle.cs b/src/BootstrapBlazor/Enums/TableHeaderStyle.cs index 1a795c4a3bb..81f0b4cf910 100644 --- a/src/BootstrapBlazor/Enums/TableHeaderStyle.cs +++ b/src/BootstrapBlazor/Enums/TableHeaderStyle.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,22 +8,26 @@ namespace BootstrapBlazor.Components; /// -/// 表格 thead 样式枚举 +/// 表格 thead 样式枚举 +/// 表格 thead styleenum /// public enum TableHeaderStyle { /// - /// 未设置 + /// 未设置 + /// 未Sets /// None, /// - /// 浅色 + /// 浅色 + /// 浅色 /// [Description("table-light")] Light, /// - /// 深色 + /// 深色 + /// 深色 /// [Description("table-dark")] Dark diff --git a/src/BootstrapBlazor/Enums/TableRenderModel.cs b/src/BootstrapBlazor/Enums/TableRenderModel.cs index 7810532038f..8e6e2720a5d 100644 --- a/src/BootstrapBlazor/Enums/TableRenderModel.cs +++ b/src/BootstrapBlazor/Enums/TableRenderModel.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,24 +8,28 @@ namespace BootstrapBlazor.Components; /// -/// Table 视图枚举类型 +/// Table 视图枚举类型 +/// Table 视图enumtype /// public enum TableRenderMode { /// - /// 自动 + /// 自动 + /// 自动 /// [Description("自动")] Auto, /// - /// Table 布局适用于大屏幕 + /// Table 布局适用于大屏幕 + /// Table 布局适用于大屏幕 /// [Description("表格布局")] Table, /// - /// 卡片式布局适用于小屏幕 + /// 卡片式布局适用于小屏幕 + /// 卡片式布局适用于小屏幕 /// [Description("卡片布局")] CardView diff --git a/src/BootstrapBlazor/Enums/TimePickerCellViewModel.cs b/src/BootstrapBlazor/Enums/TimePickerCellViewModel.cs index a6754138366..eedfae6e23e 100644 --- a/src/BootstrapBlazor/Enums/TimePickerCellViewModel.cs +++ b/src/BootstrapBlazor/Enums/TimePickerCellViewModel.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 时间选择组件视图 +/// 时间选择组件视图 +/// 时间选择component视图 /// public enum TimePickerCellViewMode { /// - /// 小时 + /// 小时 + /// 小时 /// Hour, /// - /// 分钟 + /// 分钟 + /// 分钟 /// Minute, /// - /// 秒 + /// + /// /// Second, } diff --git a/src/BootstrapBlazor/Enums/ToastCategory.cs b/src/BootstrapBlazor/Enums/ToastCategory.cs index 5a0d1ba88a0..7c755c63c9d 100644 --- a/src/BootstrapBlazor/Enums/ToastCategory.cs +++ b/src/BootstrapBlazor/Enums/ToastCategory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,30 +8,35 @@ namespace BootstrapBlazor.Components; /// -/// Toast 组件类型 +/// Toast 组件类型 +/// Toast componenttype /// public enum ToastCategory { /// - /// 成功信息 + /// 成功信息 + /// 成功信息 /// [Description("success")] Success, /// - /// 提示信息 + /// 提示信息 + /// 提示信息 /// [Description("info")] Information, /// - /// 错误信息 + /// 错误信息 + /// 错误信息 /// [Description("danger")] Error, /// - /// 警告信息 + /// 警告信息 + /// 警告信息 /// [Description("warning")] Warning diff --git a/src/BootstrapBlazor/Enums/TransitionType.cs b/src/BootstrapBlazor/Enums/TransitionType.cs index 3f6eaf6f163..c7010f9cd48 100644 --- a/src/BootstrapBlazor/Enums/TransitionType.cs +++ b/src/BootstrapBlazor/Enums/TransitionType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,576 +8,672 @@ namespace BootstrapBlazor.Components; /// -/// TransitionType 枚举类型 +/// TransitionType 枚举类型 +/// TransitionType enumtype /// public enum TransitionType { /// - /// 淡入效果 + /// 淡入效果 + /// 淡入效果 /// [Description("animate__fadeIn")] FadeIn, /// - /// 淡出效果 + /// 淡出效果 + /// 淡出效果 /// [Description("animate__fadeOut")] FadeOut, /// - /// + /// + /// /// [Description("animate__bounce")] Bounce, /// - /// + /// + /// /// [Description("animate__flash")] Flash, /// - /// + /// + /// /// [Description("animate__pulse")] Pulse, /// - /// + /// + /// /// [Description("animate__rubberBand")] RubberBand, /// - /// + /// + /// /// [Description("animate__shake")] Shake, /// - /// + /// + /// /// [Description("animate__shakeX")] ShakeX, /// - /// + /// + /// /// [Description("animate__shakeY")] ShakeY, /// - /// + /// + /// /// [Description("animate__headShake")] HeadShake, /// - /// + /// + /// /// [Description("animate__swing")] Swing, /// - /// + /// + /// /// [Description("animate__tada")] Tada, /// - /// + /// + /// /// [Description("animate__wobble")] Wobble, /// - /// + /// + /// /// [Description("animate__jello")] Jello, /// - /// + /// + /// /// [Description("animate__bounceIn")] BounceIn, /// - /// + /// + /// /// [Description("animate__bounceInDown")] BounceInDown, /// - /// + /// + /// /// [Description("animate__bounceInLeft")] BounceInLeft, /// - /// + /// + /// /// [Description("animate__bounceInRight")] BounceInRight, /// - /// + /// + /// /// [Description("animate__bounceInUp")] BounceInUp, /// - /// + /// + /// /// [Description("animate__bounceOut")] BounceOut, /// - /// + /// + /// /// [Description("animate__bounceOutDown")] BounceOutDown, /// - /// + /// + /// /// [Description("animate__bounceOutLeft")] BounceOutLeft, /// - /// + /// + /// /// [Description("animate__bounceOutRight")] BounceOutRight, /// - /// + /// + /// /// [Description("animate__bounceOutUp")] BounceOutUp, /// - /// + /// + /// /// [Description("animate__fadeInDown")] FadeInDown, /// - /// + /// + /// /// [Description("animate__fadeInDownBig")] FadeInDownBig, /// - /// + /// + /// /// [Description("animate__fadeInLeft")] FadeInLeft, /// - /// + /// + /// /// [Description("animate__fadeInLeftBig")] FadeInLeftBig, /// - /// + /// + /// /// [Description("animate__fadeInRight")] FadeInRight, /// - /// + /// + /// /// [Description("animate__fadeInRightBig")] FadeInRightBig, /// - /// + /// + /// /// [Description("animate__fadeInUp")] FadeInUp, /// - /// + /// + /// /// [Description("animate__fadeInUpBig")] FadeInUpBig, /// - /// + /// + /// /// [Description("animate__fadeOutDown")] FadeOutDown, /// - /// + /// + /// /// [Description("animate__fadeOutDownBig")] FadeOutDownBig, /// - /// + /// + /// /// [Description("animate__fadeOutLeft")] FadeOutLeft, /// - /// + /// + /// /// [Description("animate__fadeOutLeftBig")] FadeOutLeftBig, /// - /// + /// + /// /// [Description("animate__fadeOutRight")] FadeOutRight, /// - /// + /// + /// /// [Description("animate__fadeOutRightBig")] FadeOutRightBig, /// - /// + /// + /// /// [Description("animate__fadeOutUp")] FadeOutUp, /// - /// + /// + /// /// [Description("animate__fadeOutUpBig")] FadeOutUpBig, /// - /// + /// + /// /// [Description("animate__flipInX")] FlipInX, /// - /// + /// + /// /// [Description("animate__flipInY")] FlipInY, /// - /// + /// + /// /// [Description("animate__flipOutX")] FlipOutX, /// - /// + /// + /// /// [Description("animate__flipOutY")] FlipOutY, /// - /// + /// + /// /// [Description("animate__lightSpeedIn")] LightSpeedIn, /// - /// + /// + /// /// [Description("animate__lightSpeedOut")] LightSpeedOut, /// - /// + /// + /// /// [Description("animate__lightSpeedInRight")] LightSpeedInRight, /// - /// + /// + /// /// [Description("animate__lightSpeedInLeft")] LightSpeedInLeft, /// - /// + /// + /// /// [Description("animate__lightSpeedOutRight")] LightSpeedOutRight, /// - /// + /// + /// /// [Description("animate__lightSpeedOutLeft")] LightSpeedOutLeft, /// - /// + /// + /// /// [Description("animate__rotateIn")] RotateIn, /// - /// + /// + /// /// [Description("animate__rotateInDownLeft")] RotateInDownLeft, /// - /// + /// + /// /// [Description("animate__rotateInDownRight")] RotateInDownRight, /// - /// + /// + /// /// [Description("animate__rotateInUpLeft")] RotateInUpLeft, /// - /// + /// + /// /// [Description("animate__rotateInUpRight")] RotateInUpRight, /// - /// + /// + /// /// [Description("animate__rotateOut")] RotateOut, /// - /// + /// + /// /// [Description("animate__rotateOutDownLeft")] RotateOutDownLeft, /// - /// + /// + /// /// [Description("animate__rotateOutDownRight")] RotateOutDownRight, /// - /// + /// + /// /// [Description("animate__rotateOutUpLeft")] RotateOutUpLeft, /// - /// + /// + /// /// [Description("animate__rotateOutUpRight")] RotateOutUpRight, /// - /// + /// + /// /// [Description("animate__hinge")] Hinge, /// - /// + /// + /// /// [Description("animate__jackInTheBox")] JackInTheBox, /// - /// + /// + /// /// [Description("animate__rollIn")] RollIn, /// - /// + /// + /// /// [Description("animate__rollOut")] RollOut, /// - /// + /// + /// /// [Description("animate__zoomIn")] ZoomIn, /// - /// + /// + /// /// [Description("animate__zoomInDown")] ZoomInDown, /// - /// + /// + /// /// [Description("animate__zoomInLeft")] ZoomInLeft, /// - /// + /// + /// /// [Description("animate__zoomInRight")] ZoomInRight, /// - /// + /// + /// /// [Description("animate__zoomInUp")] ZoomInUp, /// - /// + /// + /// /// [Description("animate__zoomOut")] ZoomOut, /// - /// + /// + /// /// [Description("animate__zoomOutDown")] ZoomOutDown, /// - /// + /// + /// /// [Description("animate__zoomOutLeft")] ZoomOutLeft, /// - /// + /// + /// /// [Description("animate__zoomOutRight")] ZoomOutRight, /// - /// + /// + /// /// [Description("animate__zoomOutUp")] ZoomOutUp, /// - /// + /// + /// /// [Description("animate__slideInDown")] SlideInDown, /// - /// + /// + /// /// [Description("animate__slideInLeft")] SlideInLeft, /// - /// + /// + /// /// [Description("animate__slideInRight")] SlideInRight, /// - /// + /// + /// /// [Description("animate__slideInUp")] SlideInUp, /// - /// + /// + /// /// [Description("animate__slideOutDown")] SlideOutDown, /// - /// + /// + /// /// [Description("animate__slideOutLeft")] SlideOutLeft, /// - /// + /// + /// /// [Description("animate__slideOutRight")] SlideOutRight, /// - /// + /// + /// /// [Description("animate__slideOutUp")] SlideOutUp, /// - /// + /// + /// /// [Description("animate__heartBeat")] HeartBeat, /// - /// + /// + /// /// [Description("animate__fadeInTopLeft")] FadeInTopLeft, /// - /// + /// + /// /// [Description("animate__fadeInTopRight")] FadeInTopRight, /// - /// + /// + /// /// [Description("animate__fadeInBottomLeft")] FadeInBottomLeft, /// - /// + /// + /// /// [Description("animate__fadeInBottomRight")] FadeInBottomRight, /// - /// + /// + /// /// [Description("animate__fadeOutTopLeft")] FadeOutTopLeft, /// - /// + /// + /// /// [Description("animate__fadeOutTopRight")] FadeOutTopRight, /// - /// + /// + /// /// [Description("animate__fadeOutBottomRight")] FadeOutBottomRight, /// - /// + /// + /// /// [Description("animate__fadeOutBottomLeft")] FadeOutBottomLeft, /// - /// + /// + /// /// [Description("animate__backOutDown")] BackOutDown, /// - /// + /// + /// /// [Description("animate__backOutLeft")] BackOutLeft, /// - /// + /// + /// /// [Description("animate__backOutRight")] BackOutRight, /// - /// + /// + /// /// [Description("animate__backOutU")] BackOutUp diff --git a/src/BootstrapBlazor/Enums/UploadStyle.cs b/src/BootstrapBlazor/Enums/UploadStyle.cs index 5acd9e5e53a..8e4c15642c7 100644 --- a/src/BootstrapBlazor/Enums/UploadStyle.cs +++ b/src/BootstrapBlazor/Enums/UploadStyle.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,27 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// 上传组件模式枚举类型 +/// 上传组件模式枚举类型 +/// 上传component模式enumtype /// public enum UploadStyle { /// - /// 正常模式 + /// 正常模式 + /// 正常模式 /// Normal, /// - /// 点击上传 + /// 点击上传 + /// 点击上传 /// ClickToUpload, /// - /// 上传头像模式 + /// 上传头像模式 + /// 上传头像模式 /// Avatar, /// - /// 预览卡片模式 + /// 预览卡片模式 + /// 预览卡片模式 /// Card } diff --git a/src/BootstrapBlazor/Enums/WebClientDeviceType.cs b/src/BootstrapBlazor/Enums/WebClientDeviceType.cs index 7b853c951c2..fa1a1367089 100644 --- a/src/BootstrapBlazor/Enums/WebClientDeviceType.cs +++ b/src/BootstrapBlazor/Enums/WebClientDeviceType.cs @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 客户端设备类型 +/// 客户端设备类型 +/// 客户端设备type /// public enum WebClientDeviceType { /// - /// + /// + /// /// Desktop, /// - /// + /// + /// /// Mobile, /// - /// + /// + /// /// Tablet } diff --git a/src/BootstrapBlazor/Extensions/AssemblyExtensions.cs b/src/BootstrapBlazor/Extensions/AssemblyExtensions.cs index 6f6557a1b86..f4f6f012f00 100644 --- a/src/BootstrapBlazor/Extensions/AssemblyExtensions.cs +++ b/src/BootstrapBlazor/Extensions/AssemblyExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,7 +10,8 @@ namespace BootstrapBlazor.Components; static class AssemblyExtensions { /// - /// 获得唯一类型名称方法 + /// 获得唯一类型名称方法 + /// Get Unique Type Name /// /// /// diff --git a/src/BootstrapBlazor/Extensions/BluetoothExtensions.cs b/src/BootstrapBlazor/Extensions/BluetoothExtensions.cs index f83e9ef1277..f3f3a91c298 100644 --- a/src/BootstrapBlazor/Extensions/BluetoothExtensions.cs +++ b/src/BootstrapBlazor/Extensions/BluetoothExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,12 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// Bluetooth 扩展方法 +/// Bluetooth 扩展方法 +/// Bluetooth Extensions /// public static class BluetoothExtensions { /// - /// 获得指定蓝牙服务字符串集合 + /// 获得指定蓝牙服务字符串集合 + /// Get Bluetooth Service List /// /// /// diff --git a/src/BootstrapBlazor/Extensions/BootstrapBlazorOptionsExtensions.cs b/src/BootstrapBlazor/Extensions/BootstrapBlazorOptionsExtensions.cs index 802e9606ba9..5b1f5efa854 100644 --- a/src/BootstrapBlazor/Extensions/BootstrapBlazorOptionsExtensions.cs +++ b/src/BootstrapBlazor/Extensions/BootstrapBlazorOptionsExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapBlazorOptions configuration class extension methods +/// BootstrapBlazorOptions configuration class extension methods +/// BootstrapBlazorOptions configuration class extension methods /// public static class BootstrapBlazorOptionsExtensions { /// - /// Get step size generic method + /// Get step size generic method + /// Get step size generic method /// /// The type parameter /// The BootstrapBlazorOptions instance @@ -19,7 +21,8 @@ public static class BootstrapBlazorOptionsExtensions public static string? GetStep(this BootstrapBlazorOptions options) => options.GetStep(typeof(TType)); /// - /// Get step size method + /// Get step size method + /// Get step size method /// /// The BootstrapBlazorOptions instance /// The data type @@ -31,7 +34,8 @@ public static class BootstrapBlazorOptionsExtensions } /// - /// Get Modal IsFade value + /// Get Modal IsFade value + /// Get Modal IsFade value /// /// The BootstrapBlazorOptions instance /// The default value diff --git a/src/BootstrapBlazor/Extensions/BootstrapBlazorServiceCollectionExtensions.cs b/src/BootstrapBlazor/Extensions/BootstrapBlazorServiceCollectionExtensions.cs index a1af23b7c10..385e45da661 100644 --- a/src/BootstrapBlazor/Extensions/BootstrapBlazorServiceCollectionExtensions.cs +++ b/src/BootstrapBlazor/Extensions/BootstrapBlazorServiceCollectionExtensions.cs @@ -10,12 +10,14 @@ namespace Microsoft.Extensions.DependencyInjection; /// -/// BootstrapBlazor 服务扩展类 +/// BootstrapBlazor 服务扩展类 +/// BootstrapBlazor Service Extensions /// public static class BootstrapBlazorServiceCollectionExtensions { /// - /// 增加 BootstrapBlazor 服务 + /// 增加 BootstrapBlazor 服务 + /// Add BootstrapBlazor Service /// /// /// @@ -36,28 +38,36 @@ public static IServiceCollection AddBootstrapBlazor(this IServiceCollection serv services.TryAddSingleton(); services.TryAddSingleton(typeof(IDispatchService<>), typeof(DefaultDispatchService<>)); - // 增加 OtpOptions 配置支持 + // 增加 OtpOptions 配置支持 + // Add OtpOptions support services.AddOptionsMonitor(); - // 增加 ITotpService + // 增加 ITotpService + // Add ITotpService services.TryAddSingleton(); - // BootstrapBlazorRootRegisterService 服务 + // BootstrapBlazorRootRegisterService 服务 + // BootstrapBlazorRootRegisterService Service services.AddScoped(); - // Html2Pdf 服务 + // Html2Pdf 服务 + // Html2Pdf Service services.TryAddSingleton(); - // Html2Image 服务 + // Html2Image 服务 + // Html2Image Service services.TryAddScoped(); - // Table 导出服务 + // Table 导出服务 + // Table Export Service services.TryAddScoped(); - // 主题服务 + // 主题服务 + // Theme Service services.TryAddScoped(); - // IP 地理位置定位服务 + // IP 地理位置定位服务 + // IP Locator Service services.TryAddSingleton(); services.AddSingleton(); services.AddSingleton(); @@ -67,19 +77,24 @@ public static IServiceCollection AddBootstrapBlazor(this IServiceCollection serv services.AddKeyedSingleton(nameof(BaiduIpLocatorProviderV2)); #endif - // 节日服务 + // 节日服务 + // Festival Service services.TryAddSingleton(); - // 假日服务 + // 假日服务 + // Holiday Service services.TryAddSingleton(); - // 在线连接服务 + // 在线连接服务 + // Connection Service services.TryAddSingleton(); - // 限流器服务 + // 限流器服务 + // Throttle Dispatcher Service services.TryAddSingleton(); - // 汉字拼音服务 + // 汉字拼音服务 + // Pinyin Service services.TryAddSingleton(); services.TryAddScoped(typeof(IDataService<>), typeof(NullDataService<>)); @@ -120,7 +135,8 @@ public static IServiceCollection AddBootstrapBlazor(this IServiceCollection serv } /// - /// BootstrapBlazorOptions 扩展配置方法 + /// BootstrapBlazorOptions 扩展配置方法 + /// BootstrapBlazorOptions Configuration Extension /// /// /// @@ -132,7 +148,8 @@ private static IServiceCollection ConfigureBootstrapBlazorOption(this IServiceCo { configureOptions?.Invoke(op); - // 设置默认文化信息 + // 设置默认文化信息 + // Set default culture info if (op.DefaultCultureInfo != null) { var culture = new CultureInfo(op.DefaultCultureInfo); @@ -140,7 +157,8 @@ private static IServiceCollection ConfigureBootstrapBlazorOption(this IServiceCo CultureInfo.DefaultThreadCurrentUICulture = culture; } - // 设置 FallbackCulture + // 设置 FallbackCulture + // Set FallbackCulture SetFallbackCulture(); [ExcludeFromCodeCoverage] @@ -158,7 +176,8 @@ void SetFallbackCulture() } /// - /// IPLocatorOption 扩展配置方法 + /// IPLocatorOption 扩展配置方法 + /// IPLocatorOption Configuration Extension /// /// /// @@ -176,7 +195,8 @@ public static IServiceCollection ConfigureIPLocatorOption(this IServiceCollectio } /// - /// JsonLocalizationOptions 扩展配置方法 + /// JsonLocalizationOptions 扩展配置方法 + /// JsonLocalizationOptions Configuration Extension /// /// /// @@ -187,7 +207,8 @@ public static IServiceCollection ConfigureJsonLocalizationOptions(this IServiceC } /// - /// 增加支持热更新配置类 + /// 增加支持热更新配置类 + /// Add Options Monitor Support /// /// /// @@ -200,7 +221,8 @@ public static IServiceCollection AddOptionsMonitor(this IServiceCollec } /// - /// 增加 菜单与标签捆绑类配置项服务 + /// 增加 菜单与标签捆绑类配置项服务 + /// Add TabItem Bind Options Service /// /// /// @@ -211,7 +233,8 @@ static IServiceCollection AddTabItemBindOptions(this IServiceCollection services } /// - /// 配置第三方菜单路由与 Tab 标签页捆绑字典扩展方法 + /// 配置第三方菜单路由与 Tab 标签页捆绑字典扩展方法 + /// Configure TabItem Menu Bind Options Extension /// /// /// @@ -223,7 +246,8 @@ public static IServiceCollection ConfigureTabItemMenuBindOptions(this IServiceCo } /// - /// 增加 图标映射配置项服务 + /// 增加 图标映射配置项服务 + /// Add Icon Theme Options Service /// /// /// @@ -235,7 +259,8 @@ static IServiceCollection AddIconTheme(this IServiceCollection services) } /// - /// 配置 扩展方法 + /// 配置 扩展方法 + /// Configure IconThemeOptions Extension /// /// /// diff --git a/src/BootstrapBlazor/Extensions/BootstrapModuleAutoLoaderAttributeExtensions.cs b/src/BootstrapBlazor/Extensions/BootstrapModuleAutoLoaderAttributeExtensions.cs index a65d4917a21..394c896f7cb 100644 --- a/src/BootstrapBlazor/Extensions/BootstrapModuleAutoLoaderAttributeExtensions.cs +++ b/src/BootstrapBlazor/Extensions/BootstrapModuleAutoLoaderAttributeExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -16,7 +16,8 @@ string LoadPath() { string? path; - // 通过类名设置路径 + // 通过类名设置路径 + // Set path by class name if (string.IsNullOrEmpty(loader.Path)) { var moduleName = type.GetTypeModuleName(); diff --git a/src/BootstrapBlazor/Extensions/ConfigurationExtensions.cs b/src/BootstrapBlazor/Extensions/ConfigurationExtensions.cs index b976a0d2539..59b47a1d9e5 100644 --- a/src/BootstrapBlazor/Extensions/ConfigurationExtensions.cs +++ b/src/BootstrapBlazor/Extensions/ConfigurationExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -11,7 +11,8 @@ namespace Microsoft.Extensions.Configuration; /// -/// IConfiguration 扩展类 +/// IConfiguration 扩展类 +/// IConfiguration Extensions /// internal static class ConfigurationExtensions { @@ -34,35 +35,40 @@ public static NameValueCollection GetEnvironmentInformation(this IConfiguration ["MachineName"] = Environment.MachineName, ["AppDomainName"] = AppDomain.CurrentDomain.FriendlyName, - // 收集环境变量信息 + // 收集环境变量信息 + // Collect environment variables ["OS"] = GetOS(), ["OSArchitecture"] = RuntimeInformation.OSArchitecture.ToString(), ["ProcessArchitecture"] = RuntimeInformation.ProcessArchitecture.ToString(), ["Framework"] = RuntimeInformation.FrameworkDescription }; - // 当前用户 + // 当前用户 + // Current User var userName = configuration.GetUserName(); if (!string.IsNullOrEmpty(userName)) { nv["UserName"] = userName; } - // 当前环境 + // 当前环境 + // Current Environment var env = configuration.GetEnvironmentName(); if (!string.IsNullOrEmpty(env)) { nv["EnvironmentName"] = env; } - // IIS Root 路径 + // IIS Root 路径 + // IIS Root Path var iis = configuration.GetIISPath(); if (!string.IsNullOrEmpty(iis)) { nv["IISRootPath"] = iis; } - // VisualStudio Version + // VisualStudio Version + // VisualStudio Version var vs = configuration.GetVisualStudioVersion(); if (!string.IsNullOrEmpty(vs)) { @@ -72,7 +78,8 @@ public static NameValueCollection GetEnvironmentInformation(this IConfiguration } /// - /// 获得 环境变量中的 OS 属性值 + /// 获得 环境变量中的 OS 属性值 + /// Get OS Property Value /// [ExcludeFromCodeCoverage] public static string GetOS() @@ -101,7 +108,8 @@ public static string GetOS() } /// - /// 获得 环境变量中的 UserName 属性值 + /// 获得 环境变量中的 UserName 属性值 + /// Get UserName Property Value /// /// /// @@ -110,7 +118,8 @@ public static string GetOS() { var userName = config.GetValue("USERNAME"); - // Mac CentOS 系统 + // Mac CentOS 系统 + // Mac CentOS System if (string.IsNullOrEmpty(userName)) { userName = config.GetValue("LOGNAME"); @@ -119,7 +128,8 @@ public static string GetOS() } /// - /// 获得 环境变量中的 ASPNETCORE_ENVIRONMENT 属性值 + /// 获得 环境变量中的 ASPNETCORE_ENVIRONMENT 属性值 + /// Get ASPNETCORE_ENVIRONMENT Property Value /// /// /// @@ -130,7 +140,8 @@ public static string GetOS() } /// - /// 获得 环境变量中的 ASPNETCORE_IIS_PHYSICAL_PATH 属性值 + /// 获得 环境变量中的 ASPNETCORE_IIS_PHYSICAL_PATH 属性值 + /// Get ASPNETCORE_IIS_PHYSICAL_PATH Property Value /// /// /// @@ -141,7 +152,8 @@ public static string GetOS() } /// - /// 获得 环境变量中的 VisualStudioEdition 属性值 + /// 获得 环境变量中的 VisualStudioEdition 属性值 + /// Get VisualStudioEdition Property Value /// /// /// diff --git a/src/BootstrapBlazor/Extensions/ConsoleItemMessageExtensions.cs b/src/BootstrapBlazor/Extensions/ConsoleItemMessageExtensions.cs index 6530361f887..8b234adb92b 100644 --- a/src/BootstrapBlazor/Extensions/ConsoleItemMessageExtensions.cs +++ b/src/BootstrapBlazor/Extensions/ConsoleItemMessageExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; static class ConsoleMessageItemExtensions { /// - /// 渲染消息方法 + /// 渲染消息方法 + /// Render Message /// /// /// diff --git a/src/BootstrapBlazor/Extensions/DateTimeExtensions.cs b/src/BootstrapBlazor/Extensions/DateTimeExtensions.cs index 03046640cfd..11de57d0aec 100644 --- a/src/BootstrapBlazor/Extensions/DateTimeExtensions.cs +++ b/src/BootstrapBlazor/Extensions/DateTimeExtensions.cs @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// DateTime 扩展方法 +/// DateTime 扩展方法 +/// DateTime Extensions /// internal static class DateTimeExtensions { /// - /// 获得安全的月份时间 + /// 获得安全的月份时间 + /// Get Safe Month DateTime /// /// /// @@ -49,7 +51,8 @@ public static DateTime GetSafeMonthDateTime(this DateTime dt, int month) private static readonly ChineseLunisolarCalendar calendar = new(); /// - /// 获得阴历时间方法 + /// 获得阴历时间方法 + /// Get Lunar DateTime /// /// /// @@ -69,7 +72,8 @@ public static (int Year, int Month, int Day) ToLunarDateTime(this DateTime dt) } /// - /// 获得阴历信息 + /// 获得阴历信息 + /// Get Lunar Text /// /// /// @@ -129,7 +133,8 @@ static string GetLunisolarDay(int day) static int GetSolarTermDay(int year, int n) { - //1900年1月6日:小寒 + //1900年1月6日:小寒 + //January 6, 1900: Minor Cold var minutes = 525948.766245 * (year - 1900) + SolarTermOffset[n - 1]; var baseDate = new DateTime(1900, 1, 6, 2, 5, 0); var veryDate = baseDate.AddMinutes(minutes); diff --git a/src/BootstrapBlazor/Extensions/DialogServiceExtensions.cs b/src/BootstrapBlazor/Extensions/DialogServiceExtensions.cs index 3a3d6f77480..16cc62767e2 100644 --- a/src/BootstrapBlazor/Extensions/DialogServiceExtensions.cs +++ b/src/BootstrapBlazor/Extensions/DialogServiceExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,17 +8,19 @@ namespace BootstrapBlazor.Components; /// -/// DialogService extensions method +/// DialogService 扩展方法 +/// DialogService extensions method /// public static class DialogServiceExtensions { /// - /// Show dialog with generic type. + /// Show 对话框泛型方法 + /// Show dialog with generic type. /// - /// DialogService 服务实例 - /// 对话框标题,优先级高于 - /// TComponent 组件所需要的参数集合 - /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件 + /// DialogService 服务实例DialogService instance + /// 对话框标题,优先级高于 Dialog title, priority higher than + /// TComponent 组件所需要的参数集合TComponent parameters + /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件Specify the dialog component, default is null, use built-in dialog component public static Task Show(this DialogService service, string title, IDictionary? parameters = null, Dialog? dialog = null) where TComponent : IComponent { var option = new DialogOption(); @@ -32,11 +34,12 @@ public static Task Show(this DialogService service, string title, ID } /// - /// 弹出搜索对话框 + /// 弹出搜索对话框 + /// Show search dialog /// - /// DialogService 服务实例 - /// SearchDialogOption 配置类实例 - /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件 + /// DialogService 服务实例DialogService instance + /// SearchDialogOption 配置类实例SearchDialogOption instance + /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件Specify the dialog component, default is null, use built-in dialog component public static async Task ShowSearchDialog(this DialogService service, SearchDialogOption option, Dialog? dialog = null) { var parameters = new Dictionary @@ -71,10 +74,11 @@ public static async Task ShowSearchDialog(this DialogService service, Se } /// - /// 弹出编辑对话框 + /// 弹出编辑对话框 + /// Show edit dialog /// - /// 服务实例 - /// 配置类实例 + /// 服务实例Instance + /// 配置类实例Option Instance /// public static async Task ShowEditDialog(this DialogService service, EditDialogOption option, Dialog? dialog = null) { @@ -83,11 +87,12 @@ public static async Task ShowEditDialog(this DialogService service, Edit } /// - /// 弹出带结果的对话框 + /// 弹出带结果的对话框 + /// Show dialog with result /// - /// DialogService 服务实例 - /// 对话框参数 - /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件 + /// DialogService 服务实例DialogService instance + /// 对话框参数Dialog option + /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件Specify the dialog component, default is null, use built-in dialog component /// public static async Task ShowModal(this DialogService service, ResultDialogOption option, Dialog? dialog = null) where TDialog : IComponent, IResultDialog @@ -129,13 +134,14 @@ public static async Task ShowModal(this DialogService ser } /// - /// 弹出带结果的对话框 + /// 弹出带结果的对话框 + /// Show dialog with result /// - /// DialogService 服务实例 - /// 对话框标题,优先级高于 - /// 对话框 文本参数 - /// 对话框参数实例 - /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件 + /// DialogService 服务实例DialogService instance + /// 对话框标题,优先级高于 Dialog title, priority higher than + /// 对话框 文本参数Dialog content parameter + /// 对话框参数实例Dialog option instance + /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件Specify the dialog component, default is null, use built-in dialog component public static Task ShowModal(this DialogService service, string title, string content, ResultDialogOption? option = null, Dialog? dialog = null) { option ??= new(); @@ -175,14 +181,15 @@ public Task OnClose(DialogResult result) } /// - /// 弹出带保存按钮对话窗方法 + /// 弹出带保存按钮对话窗方法 + /// Show dialog with save button /// /// - /// DialogService 服务实例 - /// 弹窗标题 - /// 点击保存按钮回调委托方法 返回 true 时关闭弹窗 - /// TComponent 组件所需参数 - /// 实例配置回调方法 + /// DialogService 服务实例DialogService instance + /// 弹窗标题Dialog title + /// 点击保存按钮回调委托方法 返回 true 时关闭弹窗Save button callback delegate, return true to close dialog + /// TComponent 组件所需参数TComponent parameters + /// 实例配置回调方法 configuration callback /// /// public static async Task ShowSaveDialog(this DialogService service, string title, Func>? saveCallback = null, Action>? parametersFactory = null, Action? configureOption = null, Dialog? dialog = null) where TComponent : ComponentBase @@ -201,7 +208,8 @@ public static async Task ShowSaveDialog(this DialogService service, } /// - /// 弹出带关闭按钮对话窗方法 + /// 弹出带关闭按钮对话窗方法 + /// Show dialog with close button /// /// /// @@ -224,13 +232,14 @@ public static async Task ShowCloseDialog(this DialogService service, } /// - /// 弹出表单对话窗方法 + /// 弹出表单对话窗方法 + /// Show validate form dialog /// /// - /// DialogService 服务实例 - /// 弹窗标题 - /// TComponent 组件所需参数 - /// 实例配置回调方法 + /// DialogService 服务实例DialogService instance + /// 弹窗标题Dialog title + /// TComponent 组件所需参数TComponent parameters + /// 实例配置回调方法 configuration callback /// /// public static async Task ShowValidateFormDialog(this DialogService service, string title, Func>? parametersFactory = null, Action? configureOption = null, Dialog? dialog = null) where TComponent : ComponentBase @@ -247,7 +256,8 @@ public static async Task ShowValidateFormDialog(this DialogService s } /// - /// 显示异常信息对话框扩展方法 + /// 显示异常信息对话框扩展方法 + /// Show error handler dialog /// /// /// @@ -265,7 +275,8 @@ public static async Task ShowErrorHandlerDialog(this DialogService service, Rend } /// - /// 显示异常信息对话框扩展方法 + /// 显示异常信息对话框扩展方法 + /// Show exception dialog /// /// /// diff --git a/src/BootstrapBlazor/Extensions/DirectoryInfoExtensions.cs b/src/BootstrapBlazor/Extensions/DirectoryInfoExtensions.cs index 03be03dcec3..c5e9dca22c3 100644 --- a/src/BootstrapBlazor/Extensions/DirectoryInfoExtensions.cs +++ b/src/BootstrapBlazor/Extensions/DirectoryInfoExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// DirectoryInfo 扩展方法 +/// DirectoryInfo 扩展方法 +/// DirectoryInfo 扩展方法 /// public static class DirectoryInfoExtensions { /// - /// Copies the contents of the current directory to a specified destination directory. + /// Copies the 内容s of the current directory to a specified destination directory. + /// Copies the contents of the current directory to a specified destination directory. /// /// This method creates the destination directory if it does not already exist. Files in the /// source directory are copied to the destination directory, and if is -/// 扩展类 +/// 扩展类 +/// Extensions /// public static class DownloadServiceExtensions { /// - /// 下载文件方法 + /// 下载文件方法 + /// Download file /// /// - /// 文件名 - /// 文件流 + /// 文件名File name + /// 文件流File stream /// public static Task DownloadFromStreamAsync(this DownloadService download, string downloadFileName, Stream stream) => download.DownloadFromStreamAsync(new DownloadOption() { FileName = downloadFileName, FileStream = stream }); /// - /// 下载文件方法 + /// 下载文件方法 + /// Download file /// /// - /// 文件名 - /// Byte[] 数组 + /// 文件名File name + /// Byte[] 数组Byte array /// public static Task DownloadFromByteArrayAsync(this DownloadService download, string downloadFileName, byte[] data) => download.DownloadFromStreamAsync(new DownloadOption() { FileName = downloadFileName, FileStream = new MemoryStream(data) }); /// - /// 下载文件夹方法 + /// 下载文件夹方法 + /// Download folder /// /// - /// 文件名 - /// 文件夹路径 + /// 文件名File name + /// 文件夹路径Folder path /// public static async Task DownloadFolderAsync(this DownloadService download, string downloadFileName, string folder) { @@ -44,7 +48,8 @@ public static async Task DownloadFolderAsync(this DownloadService download, stri throw new DirectoryNotFoundException($"Couldn't be not found {folder}"); } - // 打包文件 + // 打包文件 + // Zip folder var directoryName = folder.TrimEnd('\\', '\r', '\n'); var destZipFile = $"{directoryName}.zip"; ZipFile.CreateFromDirectory(folder, destZipFile); @@ -54,16 +59,18 @@ public static async Task DownloadFolderAsync(this DownloadService download, stri } /// - /// 获取文件连接方法 + /// 获取文件连接方法 + /// Get file url /// /// - /// 文件名 - /// 文件地址 + /// 文件名File name + /// 文件地址File url /// public static Task DownloadFromUrlAsync(this DownloadService download, string downloadFileName, string url) => download.DownloadFromUrlAsync(new DownloadOption() { FileName = downloadFileName, Url = url }); /// - /// 下载文件扩展方法 + /// 下载文件扩展方法 + /// Download file extension /// /// /// diff --git a/src/BootstrapBlazor/Extensions/DrawerExtensions.cs b/src/BootstrapBlazor/Extensions/DrawerExtensions.cs index 82e0bfa04d7..b2db7727322 100644 --- a/src/BootstrapBlazor/Extensions/DrawerExtensions.cs +++ b/src/BootstrapBlazor/Extensions/DrawerExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,16 +6,18 @@ namespace BootstrapBlazor.Components; /// -/// 抽屉服务扩展方法 +/// 抽屉服务扩展方法 +/// Drawer Service Extensions /// public static class DrawerExtensions { /// - /// 弹出编辑抽屉 + /// 弹出编辑抽屉 + /// Show edit drawer /// - /// 服务实例 - /// 配置类实例 - /// 配置类实例 + /// 服务实例 instance + /// 配置类实例 option instance + /// 配置类实例 option instance public static async Task ShowEditDrawer(this DrawerService service, TableEditDrawerOption editDialogOption, DrawerOption option) { var parameters = editDialogOption.ToParameter(); diff --git a/src/BootstrapBlazor/Extensions/DrawerOptionExtensions.cs b/src/BootstrapBlazor/Extensions/DrawerOptionExtensions.cs index 6fdc6a00171..021738cf8dc 100644 --- a/src/BootstrapBlazor/Extensions/DrawerOptionExtensions.cs +++ b/src/BootstrapBlazor/Extensions/DrawerOptionExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 扩展方法 +/// 扩展方法 +/// Extensions /// public static class DrawerOptionExtensions { /// - /// 获得 组件渲染块 + /// 获得 组件渲染块 + /// Get component render fragment /// /// /// diff --git a/src/BootstrapBlazor/Extensions/DrawerServiceExtensions.cs b/src/BootstrapBlazor/Extensions/DrawerServiceExtensions.cs index 9db04b0bd9d..6ab72d6cd40 100644 --- a/src/BootstrapBlazor/Extensions/DrawerServiceExtensions.cs +++ b/src/BootstrapBlazor/Extensions/DrawerServiceExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,16 +6,18 @@ namespace BootstrapBlazor.Components; /// -/// 抽屉服务扩展方法 +/// 抽屉服务扩展方法 +/// Drawer Service Extensions /// public static class DrawerServiceExtensions { /// - /// 弹出搜索对话框 + /// 弹出搜索对话框 + /// Show search dialog /// - /// DrawerService 服务实例 + /// DrawerService 服务实例DrawerService instance /// - /// DrawerOption 配置类实例 + /// DrawerOption 配置类实例DrawerOption instance public static async Task Show(this DrawerService service, DrawerOption? option = null, IDictionary? parameters = null) where TComponent : IComponent { option ??= new DrawerOption(); @@ -24,12 +26,13 @@ public static async Task Show(this DrawerService service, DrawerOpti } /// - /// 弹出搜索对话框 + /// 弹出搜索对话框 + /// Show search dialog /// - /// DrawerService 服务实例 + /// DrawerService 服务实例DrawerService instance /// /// - /// DrawerOption 配置类实例 + /// DrawerOption 配置类实例DrawerOption instance public static async Task Show(this DrawerService service, Type type, DrawerOption? option = null, IDictionary? parameters = null) { option ??= new DrawerOption(); diff --git a/src/BootstrapBlazor/Extensions/DynamicObjectContextExtensions.cs b/src/BootstrapBlazor/Extensions/DynamicObjectContextExtensions.cs index 61c30de3589..b86c57c2ff3 100644 --- a/src/BootstrapBlazor/Extensions/DynamicObjectContextExtensions.cs +++ b/src/BootstrapBlazor/Extensions/DynamicObjectContextExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,12 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// DynamicObjectContext 扩展方法辅助类 +/// DynamicObjectContext 扩展方法辅助类 +/// DynamicObjectContext Extension Methods Helper /// public static class DynamicObjectContextExtensions { /// - /// 增加 RequiredAttribute 扩展方法 + /// 增加 RequiredAttribute 扩展方法 + /// Add RequiredAttribute Extension /// /// /// @@ -31,7 +33,8 @@ public static void AddRequiredAttribute(this DynamicObjectContext context, strin } /// - /// 增加 AutoGenerateColumnAttribute 扩展方法 + /// 增加 AutoGenerateColumnAttribute 扩展方法 + /// Add AutoGenerateColumnAttribute Extension /// /// /// @@ -39,7 +42,8 @@ public static void AddRequiredAttribute(this DynamicObjectContext context, strin public static void AddAutoGenerateColumnAttribute(this DynamicObjectContext context, string columnName, IEnumerable> parameters) => context.AddMultipleParameterAttribute(columnName, parameters); /// - /// 增加 DisplayAttribute 扩展方法 + /// 增加 DisplayAttribute 扩展方法 + /// Add DisplayAttribute Extension /// /// /// @@ -47,7 +51,8 @@ public static void AddRequiredAttribute(this DynamicObjectContext context, strin public static void AddDisplayAttribute(this DynamicObjectContext context, string columnName, IEnumerable> parameters) => context.AddMultipleParameterAttribute(columnName, parameters); /// - /// 增加多参数自定义标签泛型方法 + /// 增加多参数自定义标签泛型方法 + /// Add multiple reference custom labels common method /// /// /// @@ -71,7 +76,8 @@ public static void AddMultipleParameterAttribute(this DynamicObjectC } /// - /// 增加 DisplayNameAttribute 扩展方法 + /// 增加 DisplayNameAttribute 扩展方法 + /// Add DisplayNameAttribute Extension /// /// /// @@ -79,7 +85,8 @@ public static void AddMultipleParameterAttribute(this DynamicObjectC public static void AddDisplayNameAttribute(this DynamicObjectContext context, string columnName, string displayName) => context.AddAttribute(columnName, [typeof(string)], [displayName]); /// - /// 增加 DescriptionAttribute 扩展方法 + /// 增加 DescriptionAttribute 扩展方法 + /// Add DescriptionAttribute Extension /// /// /// @@ -87,7 +94,8 @@ public static void AddMultipleParameterAttribute(this DynamicObjectC public static void AddDescriptionAttribute(this DynamicObjectContext context, string columnName, string description) => context.AddAttribute(columnName, [typeof(string)], [description]); /// - /// 增加自定义标签泛型方法 + /// 增加自定义标签泛型方法 + /// Add Custom Attribute Generic Method /// /// /// @@ -103,10 +111,11 @@ public static void AddAttribute(this DynamicObjectContext context, s } /// - /// 扩展方法将指定模型赋值给 context 实例 + /// 扩展方法将指定模型赋值给 context 实例 + /// Extension method allows assigning a specified model to a context instance /// - /// DynamicObjectContext 实例 - /// 模型实例 + /// DynamicObjectContext 实例DynamicObjectContext instance + /// 模型实例Model instance public static async Task SetValue(this IDynamicObjectContext context, object model) { if (model is IDynamicObject v) diff --git a/src/BootstrapBlazor/Extensions/EnumExtensions.cs b/src/BootstrapBlazor/Extensions/EnumExtensions.cs index 127f4269a11..edf0d336e17 100644 --- a/src/BootstrapBlazor/Extensions/EnumExtensions.cs +++ b/src/BootstrapBlazor/Extensions/EnumExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,19 +9,22 @@ namespace BootstrapBlazor.Components; /// -/// 枚举类型扩展方法 +/// 枚举类型扩展方法 +/// Enum Extensions /// public static class EnumExtensions { /// - /// 获取 DescriptionAttribute 标签方法 + /// 获取 DescriptionAttribute 标签方法 + /// Get DescriptionAttribute method /// /// /// public static string ToDescriptionString(this TEnum val) where TEnum : Enum => typeof(TEnum).ToDescriptionString(val.ToString()); /// - /// 通过字段名称获取 DescriptionAttribute 标签值 + /// 通过字段名称获取 DescriptionAttribute 标签值 + /// Get DescriptionAttribute value by field name /// /// /// @@ -39,7 +42,8 @@ public static string ToDescriptionString(this Type? type, string? fieldName) } /// - /// 通过字段名称获取 DisplayAttribute/DescriptionAttribute 标签值 + /// 通过字段名称获取 DisplayAttribute/DescriptionAttribute 标签值 + /// Get DisplayAttribute/DescriptionAttribute value by field name /// /// /// @@ -47,7 +51,8 @@ public static string ToDescriptionString(this Type? type, string? fieldName) public static string ToDisplayName(this TEnum @enum) where TEnum : Enum => Utility.GetDisplayName(@enum.ToString()); /// - /// 获取指定枚举类型的枚举值集合,默认通过 DisplayAttribute DescriptionAttribute 标签显示 DisplayName 支持资源文件 回退机制显示字段名称 + /// 获取指定枚举类型的枚举值集合,默认通过 DisplayAttribute DescriptionAttribute 标签显示 DisplayName 支持资源文件 回退机制显示字段名称 + /// 获取指定enumtype的enum值collection,Default is通过 DisplayAttribute DescriptionAttribute 标签display DisplayName 支持资源文件 回退机制display字段名称 /// /// /// @@ -69,7 +74,8 @@ public static List ToSelectList(this Type type, SelectedItem? addi } /// - /// 获取指定枚举类型的枚举值集合,默认通过 DisplayAttribute DescriptionAttribute 标签显示 DisplayName 支持资源文件 回退机制显示字段名称 + /// 获取指定枚举类型的枚举值集合,默认通过 DisplayAttribute DescriptionAttribute 标签显示 DisplayName 支持资源文件 回退机制显示字段名称 + /// 获取指定enumtype的enum值collection,Default is通过 DisplayAttribute DescriptionAttribute 标签display DisplayName 支持资源文件 回退机制display字段名称 /// /// /// @@ -96,7 +102,8 @@ public static List> ToSelectList(this Type type, Se } /// - /// 判断类型是否为枚举类型 + /// 判断类型是否为枚举类型 + /// Determine whether the type is an enumeration type /// /// /// @@ -112,14 +119,16 @@ public static bool IsEnum(this Type? type) } /// - /// 判断类型是否为 Flag 枚举类型 + /// 判断类型是否为 Flag 枚举类型 + /// Determine whether the type is a Flag enumeration type /// /// /// public static bool IsFlagEnum(this Type? type) => type != null && IsEnum(type) && type.GetCustomAttribute() != null; /// - /// 将 集合转换为 Flag 枚举值 + /// 集合转换为 Flag 枚举值 + /// Convert collection to Flag enumeration value /// /// /// diff --git a/src/BootstrapBlazor/Extensions/ExceptionExtensions.cs b/src/BootstrapBlazor/Extensions/ExceptionExtensions.cs index b97cbc66e7b..50ec1f6b644 100644 --- a/src/BootstrapBlazor/Extensions/ExceptionExtensions.cs +++ b/src/BootstrapBlazor/Extensions/ExceptionExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,12 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// public static class ExceptionExtensions { /// - /// 格式化异常信息 + /// 格式化异常信息 + /// 格式化exception信息 /// /// /// @@ -42,7 +44,8 @@ public static string Format(this Exception exception, NameValueCollection? colle } /// - /// 格式化异常信息 + /// 格式化异常信息 + /// 格式化exception信息 /// /// /// diff --git a/src/BootstrapBlazor/Extensions/ExpandableNodeExtensions.cs b/src/BootstrapBlazor/Extensions/ExpandableNodeExtensions.cs index ead5ae7bfb0..ed33acd7b0d 100644 --- a/src/BootstrapBlazor/Extensions/ExpandableNodeExtensions.cs +++ b/src/BootstrapBlazor/Extensions/ExpandableNodeExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 树状结构获取所有项目扩展方法类 +/// 树状结构获取所有项目扩展方法类 +/// Tree structure gets all item extension method class /// public static class ExpandableNodeExtensions { /// - /// 获得所有节点集合 + /// 获得所有节点集合 + /// Gets所有节点collection /// /// /// @@ -19,7 +21,8 @@ public static class ExpandableNodeExtensions public static List GetAllItems(this IEnumerable> items) => items.GetAllItems([]); /// - /// 获得所有节点集合 + /// 获得所有节点集合 + /// Gets所有节点collection /// /// /// @@ -45,7 +48,8 @@ private static List GetAllItems(this IEnumerable - /// 获得 所有子项集合 + /// 获得 所有子项集合 + /// Get all sub items collection /// /// public static IEnumerable> GetAllSubItems(this IExpandableNode item) => item.Items.Concat(GetSubItems(item.Items)); @@ -53,7 +57,8 @@ private static List GetAllItems(this IEnumerable> GetSubItems(IEnumerable> items) => items.SelectMany(i => i.Items.Any() ? i.Items.Concat(GetSubItems(i.Items)) : i.Items); /// - /// 获得 所有 TreeItem 子项集合 + /// 获得 所有 TreeItem 子项集合 + /// Get all TreeItem sub items collection /// /// /// @@ -61,7 +66,8 @@ private static List GetAllItems(this IEnumerable> GetAllTreeSubItems(this IExpandableNode item) => item.GetAllSubItems().OfType>(); /// - /// 向下级联设置复选状态 + /// 向下级联设置复选状态 + /// Cascade set check state downwards /// public static void SetChildrenCheck(this TNode node, TreeNodeCache cache) where TNode : ICheckableNode { @@ -75,7 +81,8 @@ public static void SetChildrenCheck(this TNode node, TreeNodeCache item.CheckedState = node.CheckedState; cache.ToggleCheck(item); - // 设置子节点 + // 设置子节点 + // Set child nodes if (item.Items.Any()) { item.SetChildrenCheck(cache); @@ -84,7 +91,8 @@ public static void SetChildrenCheck(this TNode node, TreeNodeCache } /// - /// 向上级联设置复选状态 + /// 向上级联设置复选状态 + /// Cascade set check state upwards /// public static void SetParentCheck(this TNode node, TreeNodeCache cache) where TNode : ICheckableNode { @@ -133,7 +141,8 @@ public static void SetParentCheck(this TNode node, TreeNodeCache - /// 向上级联设置展开状态 + /// 向上级联设置展开状态 + /// Cascade set expand state upwards /// public static void SetParentExpand(this TNode node, bool expand) where TNode : IExpandableNode { @@ -146,13 +155,14 @@ public static void SetParentExpand(this TNode node, bool expand) w } /// - /// 树状数据层次化方法 + /// 树状数据层次化方法 + /// Tree data hierarchical method /// - /// 数据集合 - /// 父级节点 - /// 查找子节点 Lambda 表达式 + /// 数据集合Data collection + /// 父级节点Parent node + /// 查找子节点 Lambda 表达式Find child node Lambda expression /// - /// 节点是否展开回调方法 默认 null 未设置 + /// 节点是否展开回调方法 默认 null 未设置Node expand callback method default is null public static List> CascadingTree(this IEnumerable items, TreeViewItem? parent, Func?, bool> predicate, Func> valueFactory, Action>? treeViewItemCallback = null) => [.. items.Where(i => predicate(i, parent)).Select(i => { var item = valueFactory(i); diff --git a/src/BootstrapBlazor/Extensions/FieldIdentifierExtensions.cs b/src/BootstrapBlazor/Extensions/FieldIdentifierExtensions.cs index 5a7213d49c9..1f33914e5f7 100644 --- a/src/BootstrapBlazor/Extensions/FieldIdentifierExtensions.cs +++ b/src/BootstrapBlazor/Extensions/FieldIdentifierExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,33 +10,38 @@ namespace BootstrapBlazor.Components; /// -/// FieldIdentifier 扩展操作类 +/// FieldIdentifier 扩展操作类 +/// FieldIdentifier Extension Operation Class /// public static class FieldIdentifierExtensions { /// - /// 获取显示名称方法 + /// 获取显示名称方法 + /// 获取display名称方法 /// /// /// public static string GetDisplayName(this FieldIdentifier fieldIdentifier) => Utility.GetDisplayName(fieldIdentifier.Model, fieldIdentifier.FieldName); /// - /// 获取 PlaceHolder 方法 + /// 获取 PlaceHolder 方法 + /// Get PlaceHolder method /// /// /// public static string? GetPlaceHolder(this FieldIdentifier fieldIdentifier) => Utility.GetPlaceHolder(fieldIdentifier.Model, fieldIdentifier.FieldName); /// - /// 获取显示名称方法 + /// 获取显示名称方法 + /// 获取display名称方法 /// /// /// public static RangeAttribute? GetRange(this FieldIdentifier fieldIdentifier) => Utility.GetRange(fieldIdentifier.Model, fieldIdentifier.FieldName); /// - /// 获得 实例 + /// 获得 实例 + /// Get instance /// /// /// diff --git a/src/BootstrapBlazor/Extensions/FullScreenServiceExtensions.cs b/src/BootstrapBlazor/Extensions/FullScreenServiceExtensions.cs index 308a7b95d6a..162ef9e7f6c 100644 --- a/src/BootstrapBlazor/Extensions/FullScreenServiceExtensions.cs +++ b/src/BootstrapBlazor/Extensions/FullScreenServiceExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// FullScreenService 服务扩展方法 +/// FullScreenService 服务扩展方法 +/// FullScreenService Service Extension Methods /// public static class FullScreenServiceExtensions { /// - /// 通过 ElementReference 将指定元素进行全屏 + /// 通过 ElementReference 将指定元素进行全屏 + /// FullScreen by ElementReference /// /// /// @@ -19,7 +21,8 @@ public static class FullScreenServiceExtensions public static Task ToggleByElement(this FullScreenService service, ElementReference element) => service.Toggle(new() { Element = element }); /// - /// 通过元素 Id 将指定元素进行全屏 + /// 通过元素 Id 将指定元素进行全屏 + /// FullScreen by Element Id /// /// /// diff --git a/src/BootstrapBlazor/Extensions/ICacheEntryExtensions.cs b/src/BootstrapBlazor/Extensions/ICacheEntryExtensions.cs index 6bde1aaf3ca..9bb82436319 100644 --- a/src/BootstrapBlazor/Extensions/ICacheEntryExtensions.cs +++ b/src/BootstrapBlazor/Extensions/ICacheEntryExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,12 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// 扩展方法 +/// 扩展方法 +/// extension methods /// public static class ICacheEntryExtensions { /// - /// 获得缓存项 最后访问时间 + /// 获得缓存项 最后访问时间 + /// Get the last access time of the cache entry /// /// /// @@ -42,7 +44,8 @@ public static class ICacheEntryExtensions private static PropertyInfo? _lastAccessedProperty = null; /// - /// Sets default sliding expiration if no expiration is configured + /// 设置 default sliding expiration if no expiration is configured + /// Sets default sliding expiration if no expiration is configured /// internal static void SetDefaultSlidingExpiration(this ICacheEntry entry, TimeSpan offset) { diff --git a/src/BootstrapBlazor/Extensions/IEditorItemExtensions.cs b/src/BootstrapBlazor/Extensions/IEditorItemExtensions.cs index 29b81570756..011d856d3ae 100644 --- a/src/BootstrapBlazor/Extensions/IEditorItemExtensions.cs +++ b/src/BootstrapBlazor/Extensions/IEditorItemExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// IEditorItem 扩展方法 +/// IEditorItem 扩展方法 +/// IEditorItem extension methods /// public static class IEditorItemExtensions { /// - /// 判断当前 IEditorItem 实例是否可以编辑 + /// 判断当前 IEditorItem 实例是否可以编辑 + /// Determine whether the current IEditorItem instance is editable /// /// /// @@ -36,7 +38,8 @@ private static bool IsReadonly(this IEditorItem item, ItemChangedType changedTyp } /// - /// 判断当前 IEditorItem 实例是否显示 + /// 判断当前 IEditorItem 实例是否显示 + /// Determine whether the current IEditorItem instance is visible /// /// /// @@ -46,7 +49,8 @@ private static bool IsReadonly(this IEditorItem item, ItemChangedType changedTyp private static bool IsVisible(this IEditorItem item, ItemChangedType changedType) { - // IEditorItem 无 Visible 属性 + // IEditorItem 无 Visible 属性 + // IEditorItem has no Visible property bool ret = !item.GetIgnore(); if (item is ITableColumn col) { @@ -60,7 +64,8 @@ private static bool IsVisible(this IEditorItem item, ItemChangedType changedType } /// - /// 判断当前 IEditorItem 示例是否可以编辑 + /// 判断当前 IEditorItem 示例是否可以编辑 + /// Determine whether the current IEditorItem instance is editable /// /// /// @@ -70,7 +75,8 @@ private static bool IsVisible(this IEditorItem item, ItemChangedType changedType public static bool CanWrite(this IEditorItem item, Type modelType, ItemChangedType changedType, bool search = false) => item.CanWrite(modelType) && item.IsEditable(changedType, search); /// - /// 判断模型是否可写 + /// 判断模型是否可写 + /// Determine whether the model is writable /// /// /// diff --git a/src/BootstrapBlazor/Extensions/IIconThemeExtensions.cs b/src/BootstrapBlazor/Extensions/IIconThemeExtensions.cs index 4c28a23ec49..c40e145f69d 100644 --- a/src/BootstrapBlazor/Extensions/IIconThemeExtensions.cs +++ b/src/BootstrapBlazor/Extensions/IIconThemeExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// FontAwesome 图标库扩展方法 +/// FontAwesome 图标库扩展方法 +/// FontAwesome Icon Theme Extensions /// public static class IIconThemeExtensions { /// - /// 通过指定 Key 获得 Icon 字符串方法 + /// 通过指定 Key 获得 Icon 字符串方法 + /// Get Icon string by key /// /// /// diff --git a/src/BootstrapBlazor/Extensions/ILooupExtensions.cs b/src/BootstrapBlazor/Extensions/ILooupExtensions.cs index 8399a4dd50b..c2566a942db 100644 --- a/src/BootstrapBlazor/Extensions/ILooupExtensions.cs +++ b/src/BootstrapBlazor/Extensions/ILooupExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,19 +6,22 @@ namespace BootstrapBlazor.Components; /// -/// 扩展方法 +/// 扩展方法 +/// extension methods /// public static class ILooupExtensions { /// - /// 判断当前 实例是否配置 Lookup 数据 + /// 判断当前 实例是否配置 Lookup 数据 + /// Determine whether the current instance is configured with Lookup data /// /// /// public static bool IsLookup(this ILookup lookup) => lookup.Lookup != null || !string.IsNullOrEmpty(lookup.LookupServiceKey); /// - /// 获得 ILookupService 实例 + /// 获得 ILookupService 实例 + /// Get ILookupService instance /// /// /// @@ -26,7 +29,8 @@ public static class ILooupExtensions public static ILookupService GetLookupService(this ILookup lookup, ILookupService service) => lookup.LookupService ?? service; /// - /// + /// + /// /// /// /// @@ -36,7 +40,8 @@ public static class ILooupExtensions public static async Task?> GetItemsAsync(this ILookup lookup, ILookupService service, string? key, object? data) => lookup.Lookup ?? await lookup.GetLookupService(service).GetItemsAsync(key, data); /// - /// 根据指定键值获取 Lookup 集合扩展方法,先调用同步方法,如果返回 null 则调用异步方法 + /// 根据指定键值获取 Lookup 集合扩展方法,先调用同步方法,如果返回 null 则调用异步方法 + /// Get Lookup collection extension method based on specified key value, call synchronous method first, if return null then call asynchronous method /// /// /// diff --git a/src/BootstrapBlazor/Extensions/IModelEqualityComparerExtensions.cs b/src/BootstrapBlazor/Extensions/IModelEqualityComparerExtensions.cs index 4d8dc593ad0..ad96785dcd9 100644 --- a/src/BootstrapBlazor/Extensions/IModelEqualityComparerExtensions.cs +++ b/src/BootstrapBlazor/Extensions/IModelEqualityComparerExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// IModelEqualComparer 扩展方法类 +/// IModelEqualComparer 扩展方法类 +/// IModelEqualComparer extension methods /// public static class IModelEqualityComparerExtensions { /// - /// Equals 扩展方法 + /// Equals 扩展方法 + /// Equals extension method /// /// /// @@ -42,12 +44,14 @@ bool EqualityComparer() bool ret; if (x is IEqualityComparer comparer) { - // 显式调用 IEqualityComparer 接口的 Equals 方法 + // 显式调用 IEqualityComparer 接口的 Equals 方法 + // Explicitly call the Equals method of the IEqualityComparer interface ret = comparer.Equals(x, y); } else { - // 调用 Object 对象的 Equals 方法 + // 调用 Object 对象的 Equals 方法 + // Call the Equals method of the Object object ret = x.Equals(y); } return ret; diff --git a/src/BootstrapBlazor/Extensions/IQueryableExtensions.cs b/src/BootstrapBlazor/Extensions/IQueryableExtensions.cs index a22ce8d74fb..c3680d0b571 100644 --- a/src/BootstrapBlazor/Extensions/IQueryableExtensions.cs +++ b/src/BootstrapBlazor/Extensions/IQueryableExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,47 +8,52 @@ namespace BootstrapBlazor.Components; /// -/// IQueryable 扩展方法 +/// IQueryable 扩展方法 +/// IQueryable extension methods /// public static class IQueryableExtensions { /// - /// BootstrapBlazor 扩展 Where 方法 + /// BootstrapBlazor 扩展 Where 方法 + /// BootstrapBlazor Where extension method /// - /// 泛型 - /// 数据源 - /// 过滤条件 - /// 是否查询条件 + /// 泛型Generic type + /// 数据源Data source + /// 过滤条件Filter condition + /// 是否查询条件Whether to query condition /// public static IQueryable Where(this IQueryable queryable, Expression> predicate, bool condition) => condition ? queryable.Where(predicate) : queryable; /// - /// BootstrapBlazor 扩展 Sort 方法 + /// BootstrapBlazor 扩展 Sort 方法 + /// BootstrapBlazor Sort extension method /// - /// 泛型 - /// 数据源 - /// 排序名称 - /// 排序策略 - /// 是否排序 + /// 泛型Generic type + /// 数据源Data source + /// 排序名称Sort name + /// 排序策略Sort order + /// 是否排序Whether to sort /// public static IQueryable Sort(this IQueryable queryable, string sortName, SortOrder sortOrder, bool condition) => condition ? queryable.Sort(sortName, sortOrder) : queryable; /// - /// BootstrapBlazor 扩展 Page 方法 + /// BootstrapBlazor 扩展 Page 方法 + /// BootstrapBlazor Page extension method /// - /// 泛型 - /// 数据源 - /// Skip 数量 - /// Take 数量 + /// 泛型Generic type + /// 数据源Data source + /// Skip 数量Skip count + /// Take 数量Take count /// public static IQueryable Page(this IQueryable queryable, int skipCount, int maxResultCount) => queryable.Skip(skipCount).Take(maxResultCount); /// - /// BootstrapBlazor 扩展 Count 方法 + /// BootstrapBlazor 扩展 Count 方法 + /// BootstrapBlazor Count extension method /// - /// 泛型 - /// 数据源 - /// 结果数量 + /// 泛型Generic type + /// 数据源Data source + /// 结果数量Total count /// public static IQueryable Count(this IQueryable queryable, out int totalCount) { diff --git a/src/BootstrapBlazor/Extensions/IStringLocalizerExtensions.cs b/src/BootstrapBlazor/Extensions/IStringLocalizerExtensions.cs index 4f87f485532..a931ddd423d 100644 --- a/src/BootstrapBlazor/Extensions/IStringLocalizerExtensions.cs +++ b/src/BootstrapBlazor/Extensions/IStringLocalizerExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// IStringLocalizer 实例扩展类 +/// IStringLocalizer 实例扩展类 +/// IStringLocalizer Instance Extensions /// internal static class IStringLocalizerExtensions { /// - /// 获取指定 Type 的资源文件 + /// 获取指定 Type 的资源文件 + /// Get the resource file of the specified Type /// /// /// diff --git a/src/BootstrapBlazor/Extensions/ITableColumnExtensions.cs b/src/BootstrapBlazor/Extensions/ITableColumnExtensions.cs index 8144afa70c2..ddc7c50c2be 100644 --- a/src/BootstrapBlazor/Extensions/ITableColumnExtensions.cs +++ b/src/BootstrapBlazor/Extensions/ITableColumnExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// IEditItem 扩展方法 +/// IEditItem 扩展方法 +/// IEditItem extension methods /// public static class IEditItemExtensions { /// - /// 继承 class 标签中设置的参数值 + /// 继承 class 标签中设置的参数值 + /// Inherit the parameter value set in the class tag /// /// /// @@ -33,7 +35,8 @@ public static void InheritValue(this ITableColumn dest, AutoGenerateClassAttribu } /// - /// 属性赋值方法 + /// 属性赋值方法 + /// Property assignment method /// /// /// @@ -115,7 +118,8 @@ private static void CopyValue(this ITableColumn col, ITableColumn dest) } /// - /// 将 ITableColumn 集合转化为 IFilterAction 集合 + /// 将 ITableColumn 集合转化为 IFilterAction 集合 + /// Convert attributes to IFilterAction collection /// /// /// @@ -175,7 +179,8 @@ public static List ToSearches(this IEnumerable colu } /// - /// 当前单元格方法 + /// 当前单元格方法 + /// Render cell method /// /// /// @@ -197,7 +202,8 @@ public static RenderFragment RenderValue(this ITableColumn col, TItem ite string? content; if (col.Formatter != null) { - // 格式化回调委托 + // 格式化回调委托 + // Format callback delegate builder.OpenComponent(40); builder.AddAttribute(45, nameof(TableFormatContent.Formatter), col.Formatter); builder.AddAttribute(46, nameof(TableFormatContent.Item), new TableColumnContext(item, val)); @@ -207,7 +213,8 @@ public static RenderFragment RenderValue(this ITableColumn col, TItem ite { if (!string.IsNullOrEmpty(col.FormatString)) { - // 格式化字符串 + // 格式化字符串 + // Format string content = Utility.Format(val, col.FormatString); } else if (col.PropertyType.IsDateTime()) @@ -229,7 +236,8 @@ public static RenderFragment RenderValue(this ITableColumn col, TItem ite private static RenderFragment RenderSwitch(this bool value) => builder => { - // 自动化处理 bool 值 + // 自动化处理 bool 值 + // Automated processing of bool values builder.OpenComponent(0, typeof(Switch)); builder.AddAttribute(1, "Value", value); builder.AddAttribute(2, "IsDisabled", true); @@ -320,7 +328,8 @@ private static RenderFragment RenderContent(this ITableColumn col, string? text) var t = ret.GetType(); if (t.IsEnum) { - // 如果是枚举这里返回 枚举的描述信息 + // 如果是枚举这里返回 枚举的描述信息 + // If it is an enumeration, return the description information of the enumeration here var itemName = ret.ToString(); if (!string.IsNullOrEmpty(itemName)) { diff --git a/src/BootstrapBlazor/Extensions/JSModuleExtensions.cs b/src/BootstrapBlazor/Extensions/JSModuleExtensions.cs index 97f70b823b5..7c6121b4fd6 100644 --- a/src/BootstrapBlazor/Extensions/JSModuleExtensions.cs +++ b/src/BootstrapBlazor/Extensions/JSModuleExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// JSModule extensions class +/// JSModule extensions class +/// JSModule extensions class /// public static class JSModuleExtensions { /// - /// Load utility js module + /// Load utility js module + /// Load utility js module /// /// The instance /// The version of the module @@ -19,7 +21,8 @@ public static class JSModuleExtensions public static Task LoadUtility(this IJSRuntime jsRuntime, string? version = null) => LoadModuleByName(jsRuntime, "utility", version); /// - /// Load built-in script module by name + /// Load built-in script module by name + /// Load built-in script module by name /// /// The instance /// The name of the module @@ -32,7 +35,8 @@ public static Task LoadModuleByName(this IJSRuntime jsRuntime, string } /// - /// IJSRuntime extension method to dynamically load scripts + /// IJSRuntime extension method to dynamically load scripts + /// IJSRuntime extension method to dynamically load scripts /// /// The instance /// The file name of the script @@ -64,7 +68,8 @@ public static async Task LoadModule(this IJSRuntime jsRuntime, string } /// - /// Get the module name of the specified type + /// Get the module name of the specified 类型 + /// Get the module name of the specified type /// /// The type /// The module name @@ -80,7 +85,8 @@ public static string GetTypeModuleName(this Type type) } /// - /// Open the specified URL in a new tab + /// Open the specified URL in a new tab + /// Open the specified URL in a new tab /// /// instance /// The URL to open @@ -90,7 +96,8 @@ public static string GetTypeModuleName(this Type type) public static ValueTask OpenUrl(this JSModule module, string url, string? target = "_blank", string? features = null) => module.InvokeVoidAsync("openUrl", url, target, features); /// - /// Dynamically run js code + /// Dynamically run js code + /// Dynamically run js code /// /// instance /// The script to run @@ -98,7 +105,8 @@ public static string GetTypeModuleName(this Type type) public static async ValueTask Eval(this JSModule module, string script) => await module.InvokeVoidAsync("runEval", script); /// - /// Dynamically run JavaScript code via Eval + /// Dynamically run JavaScript code via Eval + /// Dynamically run JavaScript code via Eval /// /// instance /// The script to run @@ -106,7 +114,8 @@ public static string GetTypeModuleName(this Type type) public static ValueTask Eval(this JSModule module, string script) => module.InvokeAsync("runEval", script); /// - /// Dynamically run JavaScript code via Function + /// Dynamically run JavaScript code via Function + /// Dynamically run JavaScript code via Function /// /// instance /// The script to run @@ -115,7 +124,8 @@ public static string GetTypeModuleName(this Type type) public static ValueTask Function(this JSModule module, string script, params object?[]? args) => module.InvokeVoidAsync("runFunction", script, args); /// - /// Dynamically run js code + /// Dynamically run js code + /// Dynamically run js code /// /// The return type /// instance @@ -133,14 +143,16 @@ public static string GetTypeModuleName(this Type type) } /// - /// Check if the current terminal is a mobile device + /// Check if the current terminal is a mobile device + /// Check if the current terminal is a mobile device /// /// instance /// A that represents the asynchronous invocation operation. public static ValueTask IsMobile(this JSModule module) => module.InvokeAsync("isMobile"); /// - /// Get a unique element ID on a page + /// Get a unique element ID on a page + /// Get a unique element ID on a page /// /// An instance of /// A prefix of type @@ -148,7 +160,8 @@ public static string GetTypeModuleName(this Type type) public static ValueTask GenerateId(this JSModule module, string? prefix = null) => module.InvokeAsync("getUID", prefix); /// - /// Get the HTML string of a specified element on a page + /// Get the HTML string of a specified element on a page + /// Get the HTML string of a specified element on a page /// /// An instance of /// The ID of the element @@ -157,7 +170,8 @@ public static string GetTypeModuleName(this Type type) public static ValueTask GetHtml(this JSModule module, string? id = null, string? selector = null) => module.InvokeAsync("getHtml", new { id, selector }); /// - /// Set the theme method + /// Set the theme method + /// Set the theme method /// /// An instance of /// The name of the theme @@ -165,14 +179,16 @@ public static string GetTypeModuleName(this Type type) public static ValueTask SetThemeAsync(this JSModule module, string themeName) => module.InvokeVoidAsync("setTheme", themeName, true); /// - /// Get the theme method + /// Get the theme method + /// Get the theme method /// /// An instance of /// public static ValueTask GetThemeAsync(this JSModule module) => module.InvokeAsync("getTheme"); /// - /// Set memorial mode + /// Set memorial mode + /// Set memorial mode /// /// An instance of /// Whether it is memorial mode diff --git a/src/BootstrapBlazor/Extensions/LambdaExtensions.cs b/src/BootstrapBlazor/Extensions/LambdaExtensions.cs index 9433ffe8367..c8cfaa18083 100644 --- a/src/BootstrapBlazor/Extensions/LambdaExtensions.cs +++ b/src/BootstrapBlazor/Extensions/LambdaExtensions.cs @@ -11,18 +11,21 @@ namespace System.Linq; /// -/// Lambda 表达式扩展类 +/// Lambda 表达式扩展类 +/// Lambda expression extension class /// public static class LambdaExtensions { /// - /// Expression 统一 node 变量 + /// Expression 统一 node 变量 + /// Expression unified node variable /// /// private class ComboExpressionVisitor(ParameterExpression parameter) : ExpressionVisitor { /// /// + /// /// /// /// @@ -30,19 +33,21 @@ private class ComboExpressionVisitor(ParameterExpression parameter) : Expression } /// - /// 指定 FilterKeyValueAction 获取委托 + /// 指定 FilterKeyValueAction 获取委托 + /// Specify FilterKeyValueAction to get delegate /// /// /// - /// 实例,此方法不支持 EFCore Where 查询 + /// 实例,此方法不支持 EFCore Where 查询 instance,此method不支持 EFCore Where 查询 public static Func GetFilterFunc(this FilterKeyValueAction filter, StringComparison? comparison = null) => filter.GetFilterLambda(comparison).Compile(); /// - /// 指定 FilterKeyValueAction 获取 Lambda 表达式 + /// 指定 FilterKeyValueAction 获取 Lambda 表达式 + /// Specify FilterKeyValueAction to get Lambda expression /// /// /// - /// 实例,此方法不支持 EFCore Where 查询 + /// 实例,此方法不支持 EFCore Where 查询 instance,此method不支持 EFCore Where 查询 public static Expression> GetFilterLambda(this FilterKeyValueAction filter, StringComparison? comparison = null) { var express = new List>>(); @@ -60,7 +65,8 @@ public static Expression> GetFilterLambda(this FilterKe } /// - /// 指定 IFilter 集合获取委托 + /// 指定 IFilter 集合获取委托 + /// Specify IFilter collection to get delegate /// /// /// @@ -69,7 +75,8 @@ public static Expression> GetFilterLambda(this FilterKe public static Func GetFilterFunc(this IEnumerable filters, FilterLogic logic = FilterLogic.And) => filters.GetFilterLambda(logic).Compile(); /// - /// 指定 IFilter 集合获取 Lambda 表达式 + /// 指定 IFilter 集合获取 Lambda 表达式 + /// 指定 IFilter collection获取 Lambda 表达式 /// /// /// @@ -78,12 +85,13 @@ public static Expression> GetFilterLambda(this FilterKe public static Expression> GetFilterLambda(this IEnumerable filters, FilterLogic logic = FilterLogic.And) => filters.Select(i => i.GetFilterConditions()).GetFilterLambda(logic); /// - /// 指定 IFilter 集合获取 Lambda 表达式 + /// 指定 IFilter 集合获取 Lambda 表达式 + /// 指定 IFilter collection获取 Lambda 表达式 /// /// /// /// - /// 实例 + /// 实例 instance /// private static Expression> GetFilterLambda(this IEnumerable filters, FilterLogic logic, StringComparison? comparison = null) { @@ -95,7 +103,8 @@ private static Expression> GetFilterLambda(this IEnumer } /// - /// 表达式取 and 逻辑操作方法 + /// 表达式取 and 逻辑操作方法 + /// Expression get and logic operation method /// /// /// @@ -139,7 +148,8 @@ private static Expression> GetInnerFilterLambda(this Fi Expression> GetSimpleFilterExpression() { - // 根据 Filters 集合获取 Lambda 表达式 + // 根据 Filters 集合获取 Lambda 表达式 + // Get Lambda expression based on Filters collection var prop = typeof(TItem).GetPropertyByName(filter.FieldKey) ?? throw new InvalidOperationException($"the model {type.Name} not found the property {filter.FieldKey}"); var parameter = Expression.Parameter(type); var fieldExpression = Expression.Property(parameter, prop); @@ -183,13 +193,15 @@ private static Expression> GetFilterExpression(this Fil if (prop != null) { - // 可为空类型转化为具体类型 + // 可为空类型转化为具体类型 + // Nullable type converted to specific type if (prop.PropertyType.IsGenericType && prop.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>)) { isNullable = true; eq = Expression.Convert(fieldExpression, prop.PropertyType.GenericTypeArguments[0]); } - // 处理类型不一致的情况 + // 处理类型不一致的情况 + // Handle inconsistent types if (filter.FilterAction != FilterAction.CustomPredicate && filter.FieldValue != null && prop.PropertyType != filter.FieldValue.GetType() && filter.FieldValue.ToString().TryConvertTo(prop.PropertyType, out var v)) { filter.FieldValue = v; @@ -242,14 +254,16 @@ private static BinaryExpression ContainsWidthComparison(this Expression left, Ex #region Count /// - /// Count 方法内部使用 Lambda 表达式做通用适配 可接受 IEnumerable 与 Array 子类 + /// Count 方法内部使用 Lambda 表达式做通用适配 可接受 IEnumerable 与 Array 子类 + /// Count method uses Lambda expression internally for universal adaptation, accepts IEnumerable and Array subclasses /// /// /// public static int ElementCount(object? value) => CacheManager.ElementCount(value); /// - /// Count 方法内部使用 Lambda 表达式做通用适配 可接受 IEnumerable 与 Array 子类 + /// Count 方法内部使用 Lambda 表达式做通用适配 可接受 IEnumerable 与 Array 子类 + /// Count method uses Lambda expression internally for universal adaptation, accepts IEnumerable and Array subclasses /// /// /// @@ -274,7 +288,8 @@ public static Expression> CountLambda(Type type) #region Sort /// - /// 获得排序 Expression 表达式 + /// 获得排序 Expression 表达式 + /// Gets排序 Expression 表达式 /// /// /// @@ -289,7 +304,8 @@ public static Expression, List, IEnumerable - /// IEnumerable 排序扩展方法 + /// IEnumerable 排序扩展方法 + /// IEnumerable Sort extension method /// /// /// @@ -320,7 +336,8 @@ public static IEnumerable Sort(this IEnumerable items, List } /// - /// IQueryable 排序扩展方法 + /// IQueryable 排序扩展方法 + /// IQueryable Sort extension method /// /// /// @@ -348,7 +365,8 @@ public static IQueryable Sort(this IQueryable items, List - /// 获得排序 Expression 表达式 + /// 获得排序 Expression 表达式 + /// Get sort Expression expression /// /// /// @@ -364,7 +382,8 @@ public static Expression, string, SortOrder, IEnumerable } /// - /// IEnumerable 排序扩展方法 + /// IEnumerable 排序扩展方法 + /// IEnumerable Sort extension method /// /// /// @@ -377,7 +396,8 @@ public static IEnumerable Sort(this IEnumerable items, stri } /// - /// IQueryable 排序扩展方法 + /// IQueryable 排序扩展方法 + /// IQueryable Sort extension method /// /// /// @@ -620,7 +640,8 @@ private static Expression> GetPropertyLambdaByName - /// 获取属性方法 Lambda 表达式 + /// 获取属性方法 Lambda 表达式 + /// Get property method Lambda expression /// /// /// @@ -696,7 +717,8 @@ private static ConditionalExpression BuildPropertyAccess(Expression instance, Ty } /// - /// 给指定模型属性赋值 Lambda 表达式 + /// 给指定模型属性赋值 Lambda 表达式 + /// Assign value to specified model property Lambda expression /// /// /// @@ -750,7 +772,8 @@ Expression> SetComplexPropertyExpression() } /// - /// 获得 指定模型标记 的属性值 + /// 获得 指定模型标记 的属性值 + /// Get the property value of the designated model marked with /// /// /// @@ -768,13 +791,15 @@ public static Expression> GetKeyValue(Type? var valueType = typeof(TValue); if (properties.Count == 1) { - // 单主键 + // 单主键 + // Single primary key var body = Expression.Property(Expression.Convert(param, type), properties.First()); ret = Expression.Lambda>(Expression.Convert(body, valueType), param); } else if (properties.Count < 9) { - // 联合主键 + // 联合主键 + // Composite primary key var tupleType = Type.GetType($"System.Tuple`{properties.Count}")!; var keyPropertyTypes = properties.Select(x => x.PropertyType).ToArray(); var tupleConstructor = tupleType.MakeGenericType(keyPropertyTypes).GetConstructor(keyPropertyTypes); @@ -790,7 +815,8 @@ public static Expression> GetKeyValue(Type? } /// - /// 数组转成字符串表达式 + /// 数组转成字符串表达式 + /// 数组转成字符串表达式 /// /// /// @@ -806,7 +832,8 @@ public static Expression> EnumerableConvertToStringLambda - /// 泛型集合转换成 ]]> 方法 + /// 泛型集合转换成 ]]> 方法 + /// Generic collection convert to ]]> method /// /// /// ]]> to ]]> @@ -826,7 +853,8 @@ public static Expression>> ConvertToStringEnume private static IEnumerable Cast(IEnumerable source) => source.Select(i => i?.ToString() ?? string.Empty); /// - /// 数组转成字符串表达式 + /// 数组转成字符串表达式 + /// 数组转成字符串表达式 /// /// /// @@ -839,7 +867,8 @@ public static Expression> ArrayConvertToStringLambda(",", IEnumerable) 方法 + // 调用 string.Join<T>(",", IEnumerable<T>) 方法 + // Call string.Join<T>(",", IEnumerable<T>) method var method = typeof(string).GetMethods().First(m => m is { Name: "Join", IsGenericMethod: true } && m.GetParameters()[0].ParameterType == typeof(string)).MakeGenericMethod(methodType); var body = Expression.Call(method, Expression.Constant(","), Expression.Convert(param, targetType)); ret = Expression.Lambda>(body, param); diff --git a/src/BootstrapBlazor/Extensions/LocalizationOptionsExtensions.cs b/src/BootstrapBlazor/Extensions/LocalizationOptionsExtensions.cs index 18609c782ae..76eff44ef1a 100644 --- a/src/BootstrapBlazor/Extensions/LocalizationOptionsExtensions.cs +++ b/src/BootstrapBlazor/Extensions/LocalizationOptionsExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,12 +10,14 @@ namespace BootstrapBlazor.Components; /// -/// JsonLocalizationOptions 扩展方法 +/// JsonLocalizationOptions 扩展方法 +/// JsonLocalizationOptions extension methods /// internal static class LocalizationOptionsExtensions { /// - /// 通过系统 JsonLocalizationOptions 获取当前 Json 格式资源配置集合 + /// 通过系统 JsonLocalizationOptions 获取当前 Json 格式资源配置集合 + /// Get the current Json format resource configuration collection through the system JsonLocalizationOptions /// /// /// @@ -23,14 +25,18 @@ internal static class LocalizationOptionsExtensions /// public static IEnumerable GetJsonStringFromAssembly(this JsonLocalizationOptions option, Assembly assembly, string cultureName) { - // 创建配置 ConfigurationBuilder + // 创建配置 ConfigurationBuilder + // Create configuration ConfigurationBuilder var builder = new ConfigurationBuilder(); - // 获取程序集中的资源文件 + // 获取程序集中的资源文件 + // Get the resource file in the assembly var assemblies = new List() { assembly }; - // 获得主程序集资源文件 - // 支持合并操作 + // 获得主程序集资源文件 + // Get the main assembly resource file + // 支持合并操作 + // Support merge operation var entryAssembly = GetEntryAssembly(); if (assembly != entryAssembly) { @@ -44,13 +50,15 @@ public static IEnumerable GetJsonStringFromAssembly(this var streams = assemblies.SelectMany(i => option.GetResourceStream(i, cultureName)).ToList(); - // 添加 Json 文件流到配置 + // 添加 Json 文件流到配置 + // Add Json file stream to configuration foreach (var s in streams) { builder.AddJsonStream(s); } - // 获得配置外置资源文件 + // 获得配置外置资源文件 + // Get configuration external resource file if (option.AdditionalJsonFiles != null) { var files = option.AdditionalJsonFiles.Where(f => @@ -64,7 +72,8 @@ public static IEnumerable GetJsonStringFromAssembly(this } } - // 生成 IConfigurationRoot + // 生成 IConfigurationRoot + // Generate IConfigurationRoot var config = builder.Build(); // dispose json stream @@ -84,20 +93,23 @@ private static List GetResourceStream(this JsonLocalizationOptions optio var resourceNames = assembly.GetManifestResourceNames(); var ret = new List(); - // 如果开启回落机制优先增加回落语言 + // 如果开启回落机制优先增加回落语言 + // If the fallback mechanism is enabled, priority is given to increasing the fallback language if (option.EnableFallbackCulture) { AddStream(option.FallbackCulture); } - // 查找父资源 + // 查找父资源 + // Find parent resources var parentName = GetParentCultureName(cultureName).Value; if (!string.IsNullOrEmpty(parentName) && !EqualFallbackCulture(parentName)) { AddStream(parentName); } - // 当前文化资源 + // 当前文化资源 + // Current culture resources if (!EqualFallbackCulture(cultureName)) { AddStream(cultureName); @@ -118,7 +130,8 @@ void AddStream(string name) } } - // 开启回落机制并且当前文化信息与回落语言相同 + // 开启回落机制并且当前文化信息与回落语言相同 + // Open the fallback mechanism and the current cultural information is the same as the fallback language bool EqualFallbackCulture(string name) => option.EnableFallbackCulture && option.FallbackCulture == name; } diff --git a/src/BootstrapBlazor/Extensions/MaskServiceExtensions.cs b/src/BootstrapBlazor/Extensions/MaskServiceExtensions.cs index 9afdd8e223c..6185b158bf7 100644 --- a/src/BootstrapBlazor/Extensions/MaskServiceExtensions.cs +++ b/src/BootstrapBlazor/Extensions/MaskServiceExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// MaskService 扩展方法 +/// MaskService 扩展方法 +/// MaskService extension methods /// public static class MaskServiceExtensions { + /// - /// Show 扩展方法 + /// Show 扩展方法 + /// Show extension method /// /// /// @@ -30,8 +33,10 @@ public static Task Show(this MaskService maskService, IDictionary(parameters).Render() }, mask); + /// - /// Show 扩展方法 + /// Show 扩展方法 + /// Show extension method /// /// /// diff --git a/src/BootstrapBlazor/Extensions/MenuItemExtensions.cs b/src/BootstrapBlazor/Extensions/MenuItemExtensions.cs index b63ef5c94e7..4489d7171fd 100644 --- a/src/BootstrapBlazor/Extensions/MenuItemExtensions.cs +++ b/src/BootstrapBlazor/Extensions/MenuItemExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// MenuItem 扩展操作类 +/// MenuItem 扩展操作类 +/// MenuItem extension operation class /// public static class MenuItemExtensions { /// - /// 级联设置 Active 状态 + /// 级联设置 Active 状态 + /// Cascade set Active state /// /// /// @@ -28,14 +30,16 @@ public static void CascadingSetActive(this MenuItem item, bool active = true) } /// - /// 获取全部节点 + /// 获取全部节点 + /// Get all items /// /// /// public static IEnumerable? GetAllItems(this IEnumerable? source) => source == null ? null : GetAllSubItems(source).Union(source); /// - /// 获取全部子节点 + /// 获取全部子节点 + /// Get all sub items /// /// /// diff --git a/src/BootstrapBlazor/Extensions/NavigationManagerExtensions.cs b/src/BootstrapBlazor/Extensions/NavigationManagerExtensions.cs index a1895cc0568..39ef2d2749e 100644 --- a/src/BootstrapBlazor/Extensions/NavigationManagerExtensions.cs +++ b/src/BootstrapBlazor/Extensions/NavigationManagerExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// NavigationManager 扩展方法 +/// NavigationManager 扩展方法 +/// NavigationManager extension methods /// public static class NavigationManagerExtensions { /// - /// 导航并添加 TabItem 方法 + /// 导航并添加 TabItem 方法 + /// Navigate and add TabItem method /// /// /// @@ -31,7 +33,8 @@ public static void NavigateTo(this NavigationManager navigation, IServiceProvide } /// - /// 获得当前 Url 的相对路径,不包含 QueryString 和 Fragment(Hash) + /// 获得当前 Url 的相对路径,不包含 QueryString 和 Fragment(Hash) + /// Get the relative path of the current Url, excluding QueryString and Fragment (Hash) /// /// /// diff --git a/src/BootstrapBlazor/Extensions/ObjectExtensions.cs b/src/BootstrapBlazor/Extensions/ObjectExtensions.cs index a644209337e..ef7aabe617d 100644 --- a/src/BootstrapBlazor/Extensions/ObjectExtensions.cs +++ b/src/BootstrapBlazor/Extensions/ObjectExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,12 +9,14 @@ namespace BootstrapBlazor.Components; /// -/// Object 扩展方法 +/// Object 扩展方法 +/// Object extension methods /// public static class ObjectExtensions { /// - /// 转化为带单位的字符串 [% px] => [% px] [int] => [int]px + /// 转化为带单位的字符串 [% px] => [% px] [int] => [int]px + /// Convert to string with unit [% px] => [% px] [int] => [int]px /// /// /// @@ -44,7 +46,8 @@ public static string ConvertToPercentString(this string? val) } /// - /// 检查是否为 Number 数据类型 + /// 检查是否为 Number 数据类型 + /// Check if it is a Number data type /// /// /// @@ -56,7 +59,8 @@ public static bool IsNumber(this Type t) } /// - /// 检查是否应该渲染成 + /// 检查是否应该渲染成 + /// Check if it should be rendered as /// /// /// @@ -71,7 +75,8 @@ public static bool IsNumberWithDotSeparator(this Type t) } /// - /// 检查是否为 Boolean 数据类型 + /// 检查是否为 Boolean 数据类型 + /// Check if it is a Boolean data type /// /// /// @@ -82,7 +87,8 @@ public static bool IsBoolean(this Type t) } /// - /// 检查是否为 DateTime 数据类型 + /// 检查是否为 DateTime 数据类型 + /// Check if it is a DateTime data type /// /// /// @@ -94,7 +100,8 @@ public static bool IsDateTime(this Type t) } /// - /// 检查是否为 TimeSpan 数据类型 + /// 检查是否为 TimeSpan 数据类型 + /// Check if it is a TimeSpan data type /// /// /// @@ -106,7 +113,8 @@ public static bool IsTimeSpan(this Type t) } /// - /// 通过类型获取类型描述文字 + /// 通过类型获取类型描述文字 + /// Get type description text by type /// /// /// @@ -134,7 +142,8 @@ public static string GetTypeDesc(this Type t) } /// - /// 字符串类型转换为其他数据类型 + /// 字符串类型转换为其他数据类型 + /// String type converted to other data types /// /// public static bool TryConvertTo(this string? source, Type type, out object? val) @@ -159,7 +168,8 @@ public static bool TryConvertTo(this string? source, Type type, out object? val) } /// - /// Tries to convert the string representation of a value to a specified type. + /// Tries to convert the string representation of a value to a specified 类型. + /// Tries to convert the string representation of a value to a specified type. /// /// /// @@ -203,7 +213,8 @@ public static bool TryConvertTo(this string? source, [MaybeNullWhen(fals } /// - /// Formats the file size into a string with appropriate units + /// Formats the file size into a string with appropriate units + /// Formats the file size into a string with appropriate units /// /// /// @@ -221,7 +232,8 @@ internal static void Clone(this TModel source, TModel item) { var type = typeof(TModel); - // 20200608 tian_teng@outlook.com 支持字段和只读属性 + // 20200608 tian_teng@outlook.com 支持字段和只读属性 + // 20200608 tian_teng@outlook.com Support fields and read-only properties foreach (var f in type.GetFields()) { var v = f.GetValue(item); @@ -239,14 +251,15 @@ internal static void Clone(this TModel source, TModel item) } /// - /// Creates an instance of a type and ensures all class-type properties are initialized. + /// Creates an 实例 of a 类型 and ensures all class-类型 properties are initialized. + /// Creates an instance of a type and ensures all class-type properties are initialized. /// /// The type to create an instance of. /// Whether to automatically initialize model properties default value is false. /// An instance of the specified type with initialized properties. public static TItem? CreateInstance(bool isAutoInitializeModelProperty = false) { - if(typeof(TItem).IsInterface) + if (typeof(TItem).IsInterface) { return default; } @@ -270,7 +283,8 @@ internal static void Clone(this TModel source, TModel item) } /// - /// Ensures that all class-type properties of the instance are initialized. + /// Ensures that all class-类型 properties of the 实例 are initialized. + /// Ensures that all class-type properties of the instance are initialized. /// /// Whether to automatically initialize model properties default value is false. /// The instance to initialize properties for. diff --git a/src/BootstrapBlazor/Extensions/PrintServiceExtensions.cs b/src/BootstrapBlazor/Extensions/PrintServiceExtensions.cs index 2ed5541e972..83c9be1868d 100644 --- a/src/BootstrapBlazor/Extensions/PrintServiceExtensions.cs +++ b/src/BootstrapBlazor/Extensions/PrintServiceExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// PrintService 扩展方法 +/// PrintService 扩展方法 +/// PrintService 扩展方法 /// public static class PrintServiceExtensions { /// - /// 打印方法 + /// 打印方法 + /// 打印方法 /// /// /// diff --git a/src/BootstrapBlazor/Extensions/PropertyInfoExtensions.cs b/src/BootstrapBlazor/Extensions/PropertyInfoExtensions.cs index 9def7ceb7da..65bbbcb2054 100644 --- a/src/BootstrapBlazor/Extensions/PropertyInfoExtensions.cs +++ b/src/BootstrapBlazor/Extensions/PropertyInfoExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// PropertyInfo 扩展方法 +/// PropertyInfo 扩展方法 +/// PropertyInfo 扩展方法 /// public static class PropertyInfoExtensions { /// - /// 判断属性是否为静态属性 + /// 判断属性是否为静态属性 + /// 判断propertywhether为静态property /// /// /// @@ -24,14 +26,16 @@ public static bool IsStatic(this PropertyInfo p) } /// - /// 判断属性是否只读扩展方法 + /// 判断属性是否只读扩展方法 + /// 判断propertywhether只读扩展方法 /// /// /// public static bool IsCanWrite(this PropertyInfo p) => p.CanWrite && !p.IsInit(); /// - /// 判断是否为 Init 扩展方法 + /// 判断是否为 Init 扩展方法 + /// 判断whether为 Init 扩展方法 /// /// /// diff --git a/src/BootstrapBlazor/Extensions/QueryPageOptionsExtensions.cs b/src/BootstrapBlazor/Extensions/QueryPageOptionsExtensions.cs index da3346c2fbc..dbef9e6daa3 100644 --- a/src/BootstrapBlazor/Extensions/QueryPageOptionsExtensions.cs +++ b/src/BootstrapBlazor/Extensions/QueryPageOptionsExtensions.cs @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// QueryPageOptions 扩展方法 +/// QueryPageOptions 扩展方法 +/// QueryPageOptions 扩展方法 /// public static class QueryPageOptionsExtensions { /// - /// 将 QueryPageOptions 过滤条件转换为 + /// 将 QueryPageOptions 过滤条件转换为 + /// 将 QueryPageOptions 过滤条件转换为 /// /// /// @@ -53,23 +55,26 @@ public static FilterKeyValueAction ToFilter(this QueryPageOptions option) } /// - /// 将 QueryPageOptions 过滤条件转换为 where 条件中的参数 "/> 推荐 Linq 使用 + /// 将 QueryPageOptions 过滤条件转换为 where 条件中的参数 "/> 推荐 Linq 使用 + /// 将 QueryPageOptions 过滤条件转换为 where 条件中的参数 "/> 推荐 Linq 使用 /// /// - /// 实例,此方法不支持 EFCore Where 查询 + /// 实例,此方法不支持 EFCore Where 查询 instance,此method不支持 EFCore Where 查询 /// public static Func ToFilterFunc(this QueryPageOptions option, StringComparison? comparison = null) => option.ToFilterLambda(comparison).Compile(); /// - /// 将 QueryPageOptions 过滤条件转换为 表达式"/> 推荐 EFCore 使用 + /// 将 QueryPageOptions 过滤条件转换为 表达式"/> 推荐 EFCore 使用 + /// 将 QueryPageOptions 过滤条件转换为 表达式"/> 推荐 EFCore 使用 /// /// - /// 实例,此方法不支持 EFCore Where 查询 + /// 实例,此方法不支持 EFCore Where 查询 instance,此method不支持 EFCore Where 查询 /// public static Expression> ToFilterLambda(this QueryPageOptions option, StringComparison? comparison = null) => option.ToFilter().GetFilterLambda(comparison); /// - /// 是否包含过滤条件 + /// 是否包含过滤条件 + /// whether包含过滤条件 /// /// /// diff --git a/src/BootstrapBlazor/Extensions/SwalExtensions.cs b/src/BootstrapBlazor/Extensions/SwalExtensions.cs index 4a30d1308a7..b016184d6d1 100644 --- a/src/BootstrapBlazor/Extensions/SwalExtensions.cs +++ b/src/BootstrapBlazor/Extensions/SwalExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,16 +6,18 @@ namespace BootstrapBlazor.Components; /// -/// Swal 扩展类 +/// Swal 扩展类 +/// Swal 扩展类 /// public static class SwalExtensions { /// - /// 异步回调方法 + /// 异步回调方法 + /// 异步callback method /// /// /// - /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件 + /// 指定弹窗组件 默认为 null 使用 组件内置弹窗组件指定弹窗component default is为 null 使用 component内置弹窗component /// public static async Task ShowModal(this SwalService service, SwalOption option, SweetAlert? swal = null) { @@ -25,7 +27,8 @@ public static async Task ShowModal(this SwalService service, SwalOption op } /// - /// 将配置信息转化为参数集合 + /// 将配置信息转化为参数集合 + /// 将配置信息转化为参数collection /// /// /// diff --git a/src/BootstrapBlazor/Extensions/TabItemExtensions.cs b/src/BootstrapBlazor/Extensions/TabItemExtensions.cs index d4236a96051..03ae0f5c697 100644 --- a/src/BootstrapBlazor/Extensions/TabItemExtensions.cs +++ b/src/BootstrapBlazor/Extensions/TabItemExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// TabItem Extension +/// TabItem Extension +/// TabItem Extension /// internal static class TabItemExtensions { diff --git a/src/BootstrapBlazor/Extensions/TableColumnFilterExtensions.cs b/src/BootstrapBlazor/Extensions/TableColumnFilterExtensions.cs index 417b9c839ce..9d4900478b2 100644 --- a/src/BootstrapBlazor/Extensions/TableColumnFilterExtensions.cs +++ b/src/BootstrapBlazor/Extensions/TableColumnFilterExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// TableFilter extensions methods +/// TableFilter extensions methods +/// TableFilter extensions methods /// public static class TableColumnFilterExtensions { /// - /// Whether has filter + /// Whether has filter + /// Whether has filter /// /// /// @@ -25,7 +27,8 @@ public static bool HasFilter(this TableColumnFilter? filter) } /// - /// Whether is header row + /// Whether is header row + /// Whether is header row /// /// /// @@ -39,7 +42,8 @@ public static bool IsHeaderRow(this TableColumnFilter? filter) } /// - /// Gets the field key for the filter. + /// 获得 the field key for the filter. + /// Gets the field key for the filter. /// /// /// @@ -53,7 +57,8 @@ public static string GetFieldKey(this TableColumnFilter? filter) } /// - /// Gets the filter title. + /// 获得 the filter title. + /// Gets the filter title. /// /// /// diff --git a/src/BootstrapBlazor/Extensions/TableEditDialogOptionExtensions.cs b/src/BootstrapBlazor/Extensions/TableEditDialogOptionExtensions.cs index 9c175b737e6..119cb6e993b 100644 --- a/src/BootstrapBlazor/Extensions/TableEditDialogOptionExtensions.cs +++ b/src/BootstrapBlazor/Extensions/TableEditDialogOptionExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// 扩展类方法 +/// 扩展类方法 +/// 扩展类方法 /// public static class TableEditDialogOptionExtensions { /// - /// 将 配置类转化为参数集合扩展方法 + /// 配置类转化为参数集合扩展方法 + /// 配置类转化为参数collection扩展方法 /// /// /// diff --git a/src/BootstrapBlazor/Extensions/ToastServiceExtensions.cs b/src/BootstrapBlazor/Extensions/ToastServiceExtensions.cs index 5c85c34108c..b14a2c7ef75 100644 --- a/src/BootstrapBlazor/Extensions/ToastServiceExtensions.cs +++ b/src/BootstrapBlazor/Extensions/ToastServiceExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,29 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// ToastService 扩展方法 +/// ToastService 扩展方法 +/// ToastService 扩展方法 /// public static class ToastServiceExtensions { // 特别备注:此处方法使用三个参数被 UniLite 插件系统使用,请勿删除 /// - /// Toast 调用成功快捷方法 + /// Toast 调用成功快捷方法 + /// Toast 调用成功快捷方法 /// /// - /// Title 属性 - /// Content 属性 - /// 自动隐藏属性默认为 true + /// Title 属性Title property + /// Content 属性Content property + /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true public static Task Success(this ToastService service, string? title = null, string? content = null, bool autoHide = true) => Success(service, title, content, autoHide, true); /// - /// Toast 调用成功快捷方法 + /// Toast 调用成功快捷方法 + /// Toast 调用成功快捷方法 /// /// - /// Title 属性 - /// Content 属性 - /// 自动隐藏属性默认为 true - /// 是否显示关闭按钮 默认 true + /// Title 属性Title property + /// Content 属性Content property + /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true + /// 是否显示关闭按钮 默认 truewhetherdisplay关闭button default is true public static Task Success(this ToastService service, string? title, string? content, bool autoHide, bool showClose) => service.Show(new ToastOption() { Category = ToastCategory.Success, @@ -39,22 +42,24 @@ public static Task Success(this ToastService service, string? title, string? con }); /// - /// Toast 调用错误快捷方法 + /// Toast 调用错误快捷方法 + /// Toast 调用错误快捷方法 /// /// - /// Title 属性 - /// Content 属性 - /// 自动隐藏属性默认为 true + /// Title 属性Title property + /// Content 属性Content property + /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true public static Task Error(this ToastService service, string? title = null, string? content = null, bool autoHide = true) => Error(service, title, content, autoHide, true); /// - /// Toast 调用错误快捷方法 + /// Toast 调用错误快捷方法 + /// Toast 调用错误快捷方法 /// /// - /// Title 属性 - /// Content 属性 - /// 自动隐藏属性默认为 true - /// 是否显示关闭按钮 默认 true + /// Title 属性Title property + /// Content 属性Content property + /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true + /// 是否显示关闭按钮 默认 truewhetherdisplay关闭button default is true public static Task Error(this ToastService service, string? title, string? content, bool autoHide, bool showClose) => service.Show(new ToastOption() { Category = ToastCategory.Error, @@ -65,22 +70,24 @@ public static Task Error(this ToastService service, string? title, string? conte }); /// - /// Toast 调用提示信息快捷方法 + /// Toast 调用提示信息快捷方法 + /// Toast 调用提示信息快捷方法 /// /// - /// Title 属性 - /// Content 属性 - /// 自动隐藏属性默认为 true + /// Title 属性Title property + /// Content 属性Content property + /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true public static Task Information(this ToastService service, string? title = null, string? content = null, bool autoHide = true) => Information(service, title, content, autoHide, true); /// - /// Toast 调用提示信息快捷方法 + /// Toast 调用提示信息快捷方法 + /// Toast 调用提示信息快捷方法 /// /// - /// Title 属性 - /// Content 属性 - /// 自动隐藏属性默认为 true - /// 是否显示关闭按钮 默认 true + /// Title 属性Title property + /// Content 属性Content property + /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true + /// 是否显示关闭按钮 默认 truewhetherdisplay关闭button default is true public static Task Information(this ToastService service, string? title, string? content, bool autoHide, bool showClose) => service.Show(new ToastOption() { Category = ToastCategory.Information, @@ -91,22 +98,24 @@ public static Task Information(this ToastService service, string? title, string? }); /// - /// Toast 调用警告信息快捷方法 + /// Toast 调用警告信息快捷方法 + /// Toast 调用警告信息快捷方法 /// /// - /// Title 属性 - /// Content 属性 - /// 自动隐藏属性默认为 true + /// Title 属性Title property + /// Content 属性Content property + /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true public static Task Warning(this ToastService service, string? title = null, string? content = null, bool autoHide = true) => Warning(service, title, content, autoHide, true); /// - /// Toast 调用警告信息快捷方法 + /// Toast 调用警告信息快捷方法 + /// Toast 调用警告信息快捷方法 /// /// - /// Title 属性 - /// Content 属性 - /// 自动隐藏属性默认为 true - /// 是否显示关闭按钮 默认 true + /// Title 属性Title property + /// Content 属性Content property + /// 自动隐藏属性默认为 true自动隐藏propertydefault is为 true + /// 是否显示关闭按钮 默认 truewhetherdisplay关闭button default is true public static Task Warning(this ToastService service, string? title, string? content, bool autoHide, bool showClose) => service.Show(new ToastOption() { Category = ToastCategory.Warning, diff --git a/src/BootstrapBlazor/Extensions/TreeViewExtensions.cs b/src/BootstrapBlazor/Extensions/TreeViewExtensions.cs index e5581df3983..022381aa079 100644 --- a/src/BootstrapBlazor/Extensions/TreeViewExtensions.cs +++ b/src/BootstrapBlazor/Extensions/TreeViewExtensions.cs @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 树状结构获取所有项目扩展方法类 +/// 树状结构获取所有项目扩展方法类 +/// 树状结构获取所有项目扩展方法类 /// public static class TreeViewExtensions { /// - /// 在全部树状结构 中寻找第一个 Active 节点/> + /// 在全部树状结构 中寻找第一个 Active 节点/> + /// 在全部树状结构 中寻找第一个 Active 节点/> /// /// public static TreeViewItem? FirstOrDefaultActiveItem(this IEnumerable> source) @@ -29,7 +31,8 @@ public static class TreeViewExtensions } /// - /// 获取全部节点 + /// 获取全部节点 + /// 获取全部节点 /// /// /// @@ -37,7 +40,8 @@ public static class TreeViewExtensions public static IEnumerable> GetAllItems(this IEnumerable> source) => GetAllSubItems(source).Union(source); /// - /// 获取全部子节点 + /// 获取全部子节点 + /// 获取全部子节点 /// /// /// @@ -45,7 +49,8 @@ public static class TreeViewExtensions public static IEnumerable> GetAllSubItems(this IEnumerable> source) => source.SelectMany(i => i.Items.Count > 0 ? i.Items.Concat(GetAllSubItems(i.Items)) : i.Items); /// - /// 将带层次结构的树状数据转换为扁平数据集合 + /// 将带层次结构的树状数据转换为扁平数据集合 + /// 将带层次结构的树状data转换为扁平datacollection /// /// /// diff --git a/src/BootstrapBlazor/Extensions/TypeExtensions.cs b/src/BootstrapBlazor/Extensions/TypeExtensions.cs index 1e3cd853e53..c01b549ef1f 100644 --- a/src/BootstrapBlazor/Extensions/TypeExtensions.cs +++ b/src/BootstrapBlazor/Extensions/TypeExtensions.cs @@ -57,7 +57,8 @@ void EnsureNoAuthenticationSchemeSpecified() } /// - /// 获得唯一类型名称方法 + /// 获得唯一类型名称方法 + /// Gets唯一type名称方法 /// /// /// @@ -67,7 +68,8 @@ public static string GetUniqueTypeName(this Type type) => type.IsCollectible /// - /// 通过 typeName 参数安全获取 Type 实例 + /// 通过 typeName 参数安全获取 Type 实例 + /// 通过 typeName 参数安全获取 Type instance /// /// /// diff --git a/src/BootstrapBlazor/Extensions/UploadFileExtensions.cs b/src/BootstrapBlazor/Extensions/UploadFileExtensions.cs index fe299bf266f..e1478daf0c4 100644 --- a/src/BootstrapBlazor/Extensions/UploadFileExtensions.cs +++ b/src/BootstrapBlazor/Extensions/UploadFileExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// UploadFile 扩展方法类 +/// UploadFile 扩展方法类 +/// UploadFile 扩展方法类 /// public static class UploadFileExtensions { /// - /// 获取 base64 格式图片字符串 + /// 获取 base64 格式图片字符串 + /// 获取 base64 格式图片字符串 /// /// /// @@ -52,7 +54,8 @@ public static async Task RequestBase64ImageFileAsync(this UploadFile upload, str } /// - /// 保存到文件方法 + /// 保存到文件方法 + /// 保存到文件方法 /// /// /// @@ -127,7 +130,8 @@ public static async Task SaveToFileAsync(this UploadFile upload, string fi } /// - /// 获得图片字节数组方法 + /// 获得图片字节数组方法 + /// Gets图片字节数组方法 /// /// /// @@ -161,7 +165,8 @@ public static async Task SaveToFileAsync(this UploadFile upload, string fi } /// - /// 获得图片字节数组方法 + /// 获得图片字节数组方法 + /// Gets图片字节数组方法 /// /// /// @@ -191,7 +196,8 @@ public static async Task SaveToFileAsync(this UploadFile upload, string fi } /// - /// Check item whether is image extension method. + /// Check item 是否 is image extension method. + /// Check item whether is image extension method. /// /// /// @@ -216,14 +222,16 @@ public static bool IsImage(this UploadFile item, List? allowExtensions = } /// - /// Check item whether is base64 format image extension method. + /// Check item 是否 is base64 format image extension method. + /// Check item whether is base64 format image extension method. /// /// /// public static bool IsBase64Format(this UploadFile item) => !string.IsNullOrEmpty(item.PrevUrl) && item.PrevUrl.StartsWith("data:image/", StringComparison.OrdinalIgnoreCase); /// - /// Check the extension whether in the allowExtensions list. + /// Check the extension 是否 in the allowExtensions list. + /// Check the extension whether in the allowExtensions list. /// /// /// diff --git a/src/BootstrapBlazor/Extensions/ValidateContextExtensions.cs b/src/BootstrapBlazor/Extensions/ValidateContextExtensions.cs index 83aab3ad6cb..eb5074b12d1 100644 --- a/src/BootstrapBlazor/Extensions/ValidateContextExtensions.cs +++ b/src/BootstrapBlazor/Extensions/ValidateContextExtensions.cs @@ -9,16 +9,18 @@ namespace BootstrapBlazor.Components; /// -/// ValidationContext 扩展方法 +/// ValidationContext 扩展方法 +/// ValidationContext 扩展方法 /// public static class ValidationContextExtensions { /// - /// 从 中获取指定类型实例 + /// 中获取指定类型实例 + /// 中获取指定typeinstance /// - /// 验证接口类型 + /// 验证接口类型验证接口type /// - /// 没有实现 接口,则返回 + /// 没有实现 接口,则返回 没有实现 接口,则返回 public static T? GetInstanceFromMetadataType(this ValidationContext context) where T : class { T? ret = default; @@ -32,7 +34,8 @@ public static class ValidationContextExtensions } /// - /// 获得 实例 + /// 获得 实例 + /// Gets instance /// /// /// diff --git a/src/BootstrapBlazor/Icons/BootstrapIcons.cs b/src/BootstrapBlazor/Icons/BootstrapIcons.cs index ffa6d833680..df56db0f572 100644 --- a/src/BootstrapBlazor/Icons/BootstrapIcons.cs +++ b/src/BootstrapBlazor/Icons/BootstrapIcons.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Icons/FontAwesomeIcons.cs b/src/BootstrapBlazor/Icons/FontAwesomeIcons.cs index f33a480d8e1..60f54fbd195 100644 --- a/src/BootstrapBlazor/Icons/FontAwesomeIcons.cs +++ b/src/BootstrapBlazor/Icons/FontAwesomeIcons.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Icons/MaterialDesignIcons.cs b/src/BootstrapBlazor/Icons/MaterialDesignIcons.cs index 593c68fe11a..e9a906513ad 100644 --- a/src/BootstrapBlazor/Icons/MaterialDesignIcons.cs +++ b/src/BootstrapBlazor/Icons/MaterialDesignIcons.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Localization/ILocalizationMissingItemHandler.cs b/src/BootstrapBlazor/Localization/ILocalizationMissingItemHandler.cs index 467817b75fc..aeec946d18f 100644 --- a/src/BootstrapBlazor/Localization/ILocalizationMissingItemHandler.cs +++ b/src/BootstrapBlazor/Localization/ILocalizationMissingItemHandler.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// The handler to handle the items that cannot be localized by any localizer or LocalizationResolver +/// handler to handle the items that cannot be localized by any localizer or LocalizationResolver +/// The handler to handle the items that cannot be localized by any localizer or LocalizationResolver /// public interface ILocalizationMissingItemHandler { /// - /// Handle the item that cannot be localized by any localizer or + /// Handle the item that cannot be localized by any localizer or + /// Handle the item that cannot be localized by any localizer or /// /// the item name for localization /// the type name that uses the item diff --git a/src/BootstrapBlazor/Localization/ILocalizationResolve.cs b/src/BootstrapBlazor/Localization/ILocalizationResolve.cs index ed7a04174cd..5f17206e91e 100644 --- a/src/BootstrapBlazor/Localization/ILocalizationResolve.cs +++ b/src/BootstrapBlazor/Localization/ILocalizationResolve.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,22 +8,25 @@ namespace BootstrapBlazor.Components; /// -/// ILocalizationResolve 服务 +/// ILocalizationResolve 服务 +/// ILocalizationResolve service /// public interface ILocalizationResolve { /// - /// 获得所有文化信息集合 + /// 获得所有文化信息集合 + /// Get all culture info collection /// /// /// IEnumerable GetAllStringsByCulture(bool includeParentCultures); /// - /// 获得所有文化信息集合 + /// 获得所有文化信息集合 + /// Get all culture info collection /// /// - /// 类型名称 + /// 类型名称Type name /// IEnumerable GetAllStringsByType(string typeName, bool includeParentCultures); } diff --git a/src/BootstrapBlazor/Localization/Json/JsonLocalizationOptions.cs b/src/BootstrapBlazor/Localization/Json/JsonLocalizationOptions.cs index 53f4271d99a..480ac6b5dfb 100644 --- a/src/BootstrapBlazor/Localization/Json/JsonLocalizationOptions.cs +++ b/src/BootstrapBlazor/Localization/Json/JsonLocalizationOptions.cs @@ -9,64 +9,76 @@ namespace BootstrapBlazor.Components; /// -/// LocalizationOptions 配置类 +/// LocalizationOptions 配置类 +/// LocalizationOptions configuration class /// public class JsonLocalizationOptions : LocalizationOptions { /// - /// 获得/设置 微软 resx 格式指定类型 + /// 获得/设置 微软 resx 格式指定类型 + /// Get/Set Microsoft resx format specified type /// public Type? ResourceManagerStringLocalizerType { get; set; } /// - /// 获得/设置 外置资源文件程序集集合 + /// 获得/设置 外置资源文件程序集集合 + /// Get/Set external resource file assembly collection /// public IEnumerable? AdditionalJsonAssemblies { get; set; } /// - /// 获得/设置 外置资源文件路径集合 + /// 获得/设置 外置资源文件路径集合 + /// Get/Set external resource file path collection /// public IEnumerable? AdditionalJsonFiles { get; set; } /// - /// 获得/设置 回落默认文化 默认为 en 英文 + /// 获得/设置 回落默认文化 默认为 en 英文 + /// Get/Set fallback default culture default is en English /// internal string FallbackCulture { get; set; } = "en"; /// - /// 获得/设置 是否回落到 UI 父文化 默认为 true + /// 获得/设置 是否回落到 UI 父文化 默认为 true + /// Get/Set whether to fallback to UI parent culture default is true /// internal bool EnableFallbackCulture { get; set; } = true; /// - /// 获得/设置 是否忽略丢失文化日志信息 默认 false 不忽略 + /// 获得/设置 是否忽略丢失文化日志信息 默认 false 不忽略 + /// Get/Set whether to ignore missing culture log info default false not ignore /// public bool IgnoreLocalizerMissing { get; set; } /// - /// 获得/设置 如果 Value 值为 null 时使用 Key 代替 默认 false + /// 获得/设置 如果 Value 值为 null 时使用 Key 代替 默认 false + /// Get/Set whether to use Key when Value is null default false /// public bool UseKeyWhenValueIsNull { get; set; } /// - /// 获得/设置 是否禁用从服务中获取本地化资源 默认 false 未禁用 + /// 获得/设置 是否禁用从服务中获取本地化资源 默认 false 未禁用 + /// Get/Set whether to disable getting localized resources from service default false not disabled /// public bool DisableGetLocalizerFromService { get; set; } /// - /// 获得/设置 是否禁用获取 类型本地化资源 默认 false 未禁用 + /// 获得/设置 是否禁用获取 类型本地化资源 默认 false 未禁用 + /// Get/Set whether to disable getting type localized resources default false not disabled /// public bool DisableGetLocalizerFromResourceManager { get; set; } /// - /// 获得/设置 资源文件是否热加载 默认 false + /// 获得/设置 资源文件是否热加载 默认 false + /// Get/Set whether resource file is hot reloaded default false /// [Obsolete("已弃用 Deprecated")] [ExcludeFromCodeCoverage] public bool ReloadOnChange { get; set; } /// - /// 构造方法 + /// 构造方法 + /// Constructor /// public JsonLocalizationOptions() { diff --git a/src/BootstrapBlazor/Localization/Json/JsonLocalizationServiceCollectionExtensions.cs b/src/BootstrapBlazor/Localization/Json/JsonLocalizationServiceCollectionExtensions.cs index e170195a4cc..9fb8f810621 100644 --- a/src/BootstrapBlazor/Localization/Json/JsonLocalizationServiceCollectionExtensions.cs +++ b/src/BootstrapBlazor/Localization/Json/JsonLocalizationServiceCollectionExtensions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,19 +9,22 @@ namespace Microsoft.Extensions.DependencyInjection; /// -/// 多语言支持注入服务扩展类 +/// 多语言支持注入服务扩展类 +/// Multi-language support injection service extension class /// internal static class JsonLocalizationServiceCollectionExtensions { /// - /// 注入 Json 格式多语言服务 + /// 注入 Json 格式多语言服务 + /// Inject Json format multi-language service /// - /// IServiceCollection 实例 - /// JsonLocalizationOptions 配置回调方法 + /// IServiceCollection 实例IServiceCollection instance + /// JsonLocalizationOptions 配置回调方法JsonLocalizationOptions configuration callback method /// public static IServiceCollection AddJsonLocalization(this IServiceCollection services, Action? localizationConfigure = null) { - // 防止被 AddLocalization 覆盖掉 + // 防止被 AddLocalization 覆盖掉 + // Prevent being overwritten by AddLocalization services.AddSingleton(); services.TryAddTransient(typeof(IStringLocalizer<>), typeof(StringLocalizer<>)); services.TryAddTransient(); diff --git a/src/BootstrapBlazor/Localization/Json/JsonStringLocalizer.cs b/src/BootstrapBlazor/Localization/Json/JsonStringLocalizer.cs index dec2d53af79..f743c5cf415 100644 --- a/src/BootstrapBlazor/Localization/Json/JsonStringLocalizer.cs +++ b/src/BootstrapBlazor/Localization/Json/JsonStringLocalizer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -13,7 +13,8 @@ namespace BootstrapBlazor.Components; /// -/// JsonStringLocalizer 实现类 +/// JsonStringLocalizer 实现类 +/// JsonStringLocalizer implementation class /// /// /// @@ -29,7 +30,8 @@ internal class JsonStringLocalizer(Assembly assembly, string typeName, string ba private ILogger Logger { get; } = logger; /// - /// 通过指定键值获取多语言值信息索引 + /// 通过指定键值获取多语言值信息索引 + /// Get multi-language value info index by specified key /// /// /// @@ -43,7 +45,8 @@ public override LocalizedString this[string name] } /// - /// 带格式化参数的通过指定键值获取多语言值信息索引 + /// 带格式化参数的通过指定键值获取多语言值信息索引 + /// Get multi-language value info index by specified key with format arguments /// /// /// @@ -76,7 +79,8 @@ public override LocalizedString this[string name] private string? GetStringFromService(string name) { - // get string from inject service + // get string from inject service + // get string from inject service string? ret = null; if (jsonLocalizationOptions.DisableGetLocalizerFromService == false) { @@ -106,7 +110,8 @@ public override LocalizedString this[string name] private readonly ConcurrentDictionary _missingManifestCache = []; private string? GetStringFromJson(string name) { - // get string from json localization file + // 从 json 本地化文件中获取字符串 + // get string from json localization file var localizerStrings = MergeResolveLocalizers(CacheManager.GetAllStringsByTypeName(Assembly, typeName)); var cacheKey = $"name={name}&culture={CultureInfo.CurrentUICulture.Name}"; string? ret = null; @@ -119,12 +124,14 @@ public override LocalizedString this[string name] } else { - // 如果没有找到资源信息则尝试从父类中查找 + // 如果没有找到资源信息则尝试从父类中查找 + // If resource info not found, try to find from base class ret ??= GetStringFromBaseType(name); if (ret is null) { - // 加入缺失资源信息缓存中 + // 加入缺失资源信息缓存中 + // Add to missing resource info cache HandleMissingResourceItem(name); } } @@ -177,7 +184,8 @@ private void HandleMissingResourceItem(string name) private List? _allLocalizedStrings; /// - /// 获取当前语言的所有资源信息 + /// 获取当前语言的所有资源信息 + /// Get all resource info of current culture /// /// /// @@ -193,7 +201,8 @@ public override IEnumerable GetAllStrings(bool includeParentCul } return _allLocalizedStrings; - // 1. 从注入服务中获取所有资源信息 + // 1. 从注入服务中获取所有资源信息 + // 1. Get all resource info from injected service // get all strings from the other inject service IEnumerable? GetAllStringsFromService() { @@ -209,7 +218,8 @@ public override IEnumerable GetAllStrings(bool includeParentCul return ret; } - // 2. 从父类 ResourceManagerStringLocalizer 中获取微软格式资源信息 + // 2. 从父类 ResourceManagerStringLocalizer 中获取微软格式资源信息 + // 2. Get Microsoft format resource info from base class ResourceManagerStringLocalizer // get all strings from base json localization factory IEnumerable? GetAllStringsFromBase() { @@ -232,7 +242,8 @@ public override IEnumerable GetAllStrings(bool includeParentCul void CheckMissing() => _ = ret.Any(); } - // 3. 从 Json 文件中获取资源信息 + // 3. 从 Json 文件中获取资源信息 + // 3. Get resource info from Json file // get all strings from json localization file IEnumerable? GetAllStringsFromJson() => CacheManager.GetAllStringsByTypeName(Assembly, typeName); } diff --git a/src/BootstrapBlazor/Localization/Json/JsonStringLocalizerFactory.cs b/src/BootstrapBlazor/Localization/Json/JsonStringLocalizerFactory.cs index 7a5c270db53..5cd4057e6e7 100644 --- a/src/BootstrapBlazor/Localization/Json/JsonStringLocalizerFactory.cs +++ b/src/BootstrapBlazor/Localization/Json/JsonStringLocalizerFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,7 +10,8 @@ namespace BootstrapBlazor.Components; /// -/// IStringLocalizerFactory 实现类 +/// IStringLocalizerFactory 实现类 +/// IStringLocalizerFactory implementation class /// internal class JsonStringLocalizerFactory : ResourceManagerStringLocalizerFactory { @@ -20,7 +21,8 @@ internal class JsonStringLocalizerFactory : ResourceManagerStringLocalizerFactor private string? _typeName; /// - /// 构造函数 + /// 构造函数 + /// Constructor /// /// /// @@ -36,8 +38,10 @@ public JsonStringLocalizerFactory( IOptions localizationOptions, ILoggerFactory loggerFactory) : base(localizationOptions, loggerFactory) { - // 由于某些应用场景如 (WTM) Blazor 还未加载时 Localizer 模块先开始工作了 - // 为了保证 CacheManager 内部 Instance 可用这里需要使 ICacheManager 先实例化 + // 由于某些应用场景如 (WTM) Blazor 还未加载时 Localizer 模块先开始工作了 + // Because in some application scenarios such as (WTM) Blazor, Localizer module starts working before loading + // 为了保证 CacheManager 内部 Instance 可用这里需要使 ICacheManager 先实例化 + // In order to ensure that the internal Instance of CacheManager is available, ICacheManager needs to be instantiated first cacheManager.SetStartTime(); jsonLocalizationOptions.Value.FallbackCulture = options.Value.FallbackCulture; @@ -60,7 +64,8 @@ public JsonStringLocalizerFactory( } /// - /// GetResourcePrefix 方法 + /// GetResourcePrefix 方法 + /// GetResourcePrefix method /// /// /// @@ -83,7 +88,8 @@ protected override string GetResourcePrefix(TypeInfo typeInfo) } /// - /// GetResourcePrefix 方法 + /// GetResourcePrefix 方法 + /// GetResourcePrefix method /// /// /// @@ -102,8 +108,8 @@ protected override string GetResourcePrefix(string baseResourceName, string base /// /// Creates a for the given input /// - /// The assembly to create a for - /// The base name of the resource to search for + /// The assembly to create a forThe assembly to create a for + /// The base name of the resource to search forThe base name of the resource to search for /// protected override ResourceManagerStringLocalizer CreateResourceManagerStringLocalizer(Assembly assembly, string baseName) => new JsonStringLocalizer(assembly, _typeName!, baseName, _jsonLocalizationOptions, _loggerFactory.CreateLogger(), ResourceNamesCache, _localizationMissingItemHandler); } diff --git a/src/BootstrapBlazor/Localization/Json/StringLocalizer.cs b/src/BootstrapBlazor/Localization/Json/StringLocalizer.cs index 87fb980eb2c..9a691a98d39 100644 --- a/src/BootstrapBlazor/Localization/Json/StringLocalizer.cs +++ b/src/BootstrapBlazor/Localization/Json/StringLocalizer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// IStringLocalizer 实现类 +/// IStringLocalizer 实现类 +/// IStringLocalizer implementation class /// internal class StringLocalizer : IStringLocalizer { diff --git a/src/BootstrapBlazor/Localization/NullLocalizationMissingItemHandler.cs b/src/BootstrapBlazor/Localization/NullLocalizationMissingItemHandler.cs index eeccf057878..59555670d15 100644 --- a/src/BootstrapBlazor/Localization/NullLocalizationMissingItemHandler.cs +++ b/src/BootstrapBlazor/Localization/NullLocalizationMissingItemHandler.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Localization/NullLocalizationResolve.cs b/src/BootstrapBlazor/Localization/NullLocalizationResolve.cs index c68cc460a71..dfb58b689c9 100644 --- a/src/BootstrapBlazor/Localization/NullLocalizationResolve.cs +++ b/src/BootstrapBlazor/Localization/NullLocalizationResolve.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,16 +10,18 @@ namespace BootstrapBlazor.Components; internal class NullLocalizationResolve : ILocalizationResolve { /// - /// 获得所有文化信息集合 + /// 获得所有文化信息集合 + /// Get all culture info collection /// /// /// public IEnumerable GetAllStringsByCulture(bool includeParentCultures) => []; /// - /// 获得指定类型文化信息集合 + /// 获得指定类型文化信息集合 + /// Get specified type culture info collection /// - /// 类型名称 + /// 类型名称Type name /// /// public IEnumerable GetAllStringsByType(string typeName, bool includeParentCultures) => []; diff --git a/src/BootstrapBlazor/Misc/DispatchEntry.cs b/src/BootstrapBlazor/Misc/DispatchEntry.cs index 6545f237ad4..ca9deaa200b 100644 --- a/src/BootstrapBlazor/Misc/DispatchEntry.cs +++ b/src/BootstrapBlazor/Misc/DispatchEntry.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// 分发项类 +/// 分发项类 +/// Dispatch entry class /// /// public class DispatchEntry { /// - /// 获得/设置 Entry 名称 默认 null + /// 获得/设置 Entry 名称 默认 null + /// Get/Set Entry name default null /// public string? Name { get; set; } /// - /// 获得/设置 Entry 实例 不为空 + /// 获得/设置 Entry 实例 不为空 + /// Get/Set Entry instance not null /// public TEntry? Entry { get; set; } } diff --git a/src/BootstrapBlazor/Misc/ExpandableNodeCache.cs b/src/BootstrapBlazor/Misc/ExpandableNodeCache.cs index 409e3380932..4ddcc140e35 100644 --- a/src/BootstrapBlazor/Misc/ExpandableNodeCache.cs +++ b/src/BootstrapBlazor/Misc/ExpandableNodeCache.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,29 +6,34 @@ namespace BootstrapBlazor.Components; /// -/// 节点缓存类 +/// 节点缓存类 +/// Node cache class /// /// /// public class ExpandableNodeCache where TNode : IExpandableNode { /// - /// 所有已展开行集合 作为缓存使用 + /// 所有已展开行集合 作为缓存使用 + /// All expanded row collection used as cache /// protected HashSet ExpandedNodeCache { get; } /// - /// 所有已收缩行集合 作为缓存使用 + /// 所有已收缩行集合 作为缓存使用 + /// All collapsed row collection used as cache /// protected HashSet CollapsedNodeCache { get; } /// - /// 对象比较器 + /// 对象比较器 + /// Object comparer /// protected IEqualityComparer EqualityComparer { get; } /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public ExpandableNodeCache(IModelEqualityComparer comparer) { @@ -37,7 +42,8 @@ public ExpandableNodeCache(IModelEqualityComparer comparer) CollapsedNodeCache = new(50, EqualityComparer); } /// - /// 节点展开收缩状态切换方法 + /// 节点展开收缩状态切换方法 + /// Node expand/collapse state toggle method /// /// /// @@ -75,7 +81,8 @@ public virtual async Task ToggleNodeAsync(TNode node, Func - /// 检查当前节点是否展开 + /// 检查当前节点是否展开 + /// Check whether current node is expanded /// /// /// @@ -123,13 +130,14 @@ public async Task CheckExpandAsync(TNode node, Func - /// 尝试在全部树状结构 中寻找指定 + /// 尝试在全部树状结构 中寻找指定 + /// Try to find specified in all tree structures /// /// /// - /// 查询结果 查无资料时为 null - /// 是否存在 - /// 采广度优先搜寻 + /// 查询结果 查无资料时为 nullQuery result null when not found + /// 是否存在 Whether exists + /// 采广度优先搜寻Uses breadth-first search public bool TryFind(List items, TItem target, [MaybeNullWhen(false)] out TNode ret) { ret = Find(items, target); @@ -137,22 +145,24 @@ public bool TryFind(List items, TItem target, [MaybeNullWhen(false)] out } /// - /// 在全部树状结构 中寻找指定 + /// 在全部树状结构 中寻找指定 + /// Find specified in all tree structures /// /// /// - /// 查询结果 查无资料时为 null - /// 采广度优先搜寻 + /// 查询结果 查无资料时为 nullQuery result null when not found + /// 采广度优先搜寻Uses breadth-first search private TNode? Find(List items, TItem target) => Find(items, target, out _); /// - /// 在全部树状结构 中寻找指定 + /// 在全部树状结构 中寻找指定 + /// Find specified in all tree structures /// /// /// - /// 树状阶层,起始为0 - /// 查询结果 查无资料时为 null - /// 采广度优先搜寻 + /// 树状阶层,起始为0Tree level, starting from 0 + /// 查询结果 查无资料时为 nullQuery result null when not found + /// 采广度优先搜寻Uses breadth-first search public TNode? Find(List source, TItem target, out int degree) { degree = -1; diff --git a/src/BootstrapBlazor/Misc/ICheckableNode.cs b/src/BootstrapBlazor/Misc/ICheckableNode.cs index 0f62d0a4953..41f55d1c3a6 100644 --- a/src/BootstrapBlazor/Misc/ICheckableNode.cs +++ b/src/BootstrapBlazor/Misc/ICheckableNode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// +/// +/// /// /// public interface ICheckableNode : IExpandableNode { /// - /// 获得/设置 是否被选中 + /// 获得/设置 是否被选中 + /// Get/Set whether checked /// CheckboxState CheckedState { get; set; } } diff --git a/src/BootstrapBlazor/Misc/IExpandableNode.cs b/src/BootstrapBlazor/Misc/IExpandableNode.cs index c54d765cbba..e23d528351e 100644 --- a/src/BootstrapBlazor/Misc/IExpandableNode.cs +++ b/src/BootstrapBlazor/Misc/IExpandableNode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,36 +6,42 @@ namespace BootstrapBlazor.Components; /// -/// 可扩展节点接口 +/// 可扩展节点接口 +/// Expandable node interface /// public interface IExpandableNode { /// - /// 获得/设置 是否展开 默认 false + /// 获得/设置 是否展开 默认 false + /// Get/Set whether expand default false /// public bool IsExpand { get; set; } /// - /// 获得/设置 是否有子节点 默认 false 用于判断是否有子节点 + /// 获得/设置 是否有子节点 默认 false 用于判断是否有子节点 + /// Get/Set whether has children default false used to determine whether there are children /// public bool HasChildren { get; set; } /// - /// 获得/设置 子节点 + /// 获得/设置 子节点 + /// Get/Set children /// [DisallowNull] [NotNull] IEnumerable>? Items { get; set; } /// - /// 获得/设置 TItem 泛型值 + /// 获得/设置 TItem 泛型值 + /// Get/Set TItem generic value /// [DisallowNull] [NotNull] TItem? Value { get; set; } /// - /// 获得/设置 父级节点 + /// 获得/设置 父级节点 + /// Get/Set parent node /// IExpandableNode? Parent { get; set; } } diff --git a/src/BootstrapBlazor/Misc/ILookup.cs b/src/BootstrapBlazor/Misc/ILookup.cs index dba0e82ae4b..167c660be43 100644 --- a/src/BootstrapBlazor/Misc/ILookup.cs +++ b/src/BootstrapBlazor/Misc/ILookup.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,35 +6,44 @@ namespace BootstrapBlazor.Components; /// -/// Lookup 接口定义 +/// Lookup 接口定义 +/// Lookup interface definition /// public interface ILookup { /// - /// 获得/设置 数据集用于 CheckboxList Select 组件 通过 Value 显示 Text 使用 默认 null - /// 设置 参收后, 两个参数均失效 + /// 获得/设置 数据集用于 CheckboxList Select 组件 通过 Value 显示 Text 使用 默认 null + /// Get/Set data set for CheckboxList Select component display Text via Value default null + /// 设置 参收后, 两个参数均失效 + /// After setting parameter, and parameters are invalid /// IEnumerable? Lookup { get; set; } /// - /// 获得/设置 字典数据源字符串比较规则 默认 大小写不敏感 + /// 获得/设置 字典数据源字符串比较规则 默认 大小写不敏感 + /// Get/Set dictionary data source string comparison rule default case insensitive /// StringComparison LookupStringComparison { get; set; } /// - /// 获得/设置 服务获取 Lookup 数据集合键值 常用于外键自动转换为名称操作,可以通过 传递自定义数据 - /// 未设置 时生效 + /// 获得/设置 服务获取 Lookup 数据集合键值 常用于外键自动转换为名称操作,可以通过 传递自定义数据 + /// Get/Set service get Lookup data collection key value often used for foreign key automatic conversion to name operation, can pass custom data through + /// 未设置 时生效 + /// Effective when is not set /// string? LookupServiceKey { get; set; } /// - /// 获得/设置 服务获取 Lookup 数据集合键值自定义数据,通过 指定键值 - /// 未设置 时生效 + /// 获得/设置 服务获取 Lookup 数据集合键值自定义数据,通过 指定键值 + /// Get/Set service get Lookup data collection key value custom data, specify key value through + /// 未设置 时生效 + /// Effective when is not set /// object? LookupServiceData { get; set; } /// - /// 获得/设置 服务实例 + /// 获得/设置 服务实例 + /// Get/Set service instance /// ILookupService? LookupService { get; set; } } diff --git a/src/BootstrapBlazor/Misc/IModelEqualityComparer.cs b/src/BootstrapBlazor/Misc/IModelEqualityComparer.cs index ab27e7dbbc0..04fcb48cc7d 100644 --- a/src/BootstrapBlazor/Misc/IModelEqualityComparer.cs +++ b/src/BootstrapBlazor/Misc/IModelEqualityComparer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 模型比较接口 +/// 模型比较接口 +/// Model equality comparer interface /// public interface IModelEqualityComparer { /// - /// 获得/设置 模型比对回调方法 + /// 获得/设置 模型比对回调方法 + /// Get/Set model comparison callback method /// Func? ModelEqualityComparer { get; set; } /// - /// 获得/设置 模型键值标签 + /// 获得/设置 模型键值标签 + /// Get/Set model key attribute /// Type CustomKeyAttribute { get; set; } /// - /// 相等判定方法 + /// 相等判定方法 + /// Equality determination method /// /// /// diff --git a/src/BootstrapBlazor/Misc/IPopoverBaseComponent.cs b/src/BootstrapBlazor/Misc/IPopoverBaseComponent.cs index 1c5cc268569..602ba0f1580 100644 --- a/src/BootstrapBlazor/Misc/IPopoverBaseComponent.cs +++ b/src/BootstrapBlazor/Misc/IPopoverBaseComponent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,33 +6,39 @@ namespace BootstrapBlazor.Components; /// -/// 可悬浮弹窗组件接口 +/// 可悬浮弹窗组件接口 +/// Popover base component interface /// internal interface IPopoverBaseComponent { /// - /// 获得/设置 弹窗位置 默认为 Bottom + /// 获得/设置 弹窗位置 默认为 Bottom + /// Get/Set popover placement default Bottom /// Placement Placement { get; set; } /// - /// 获得/设置 自定义样式 参数 默认 null + /// 获得/设置 自定义样式 参数 默认 null + /// Get/Set custom style parameter default null /// /// 由 data-bs-custom-class 实现 string? CustomClass { get; set; } /// - /// 获得/设置 是否显示阴影 默认 true + /// 获得/设置 是否显示阴影 默认 true + /// Get/Set whether show shadow default true /// bool ShowShadow { get; set; } /// - /// 获得/设置 是否使用 Popover 渲染下拉框 默认 false + /// 获得/设置 是否使用 Popover 渲染下拉框 默认 false + /// Get/Set whether to use Popover to render dropdown default false /// public bool IsPopover { get; set; } /// - /// 获得/设置 弹窗偏移量 默认 [0, 10] + /// 获得/设置 弹窗偏移量 默认 [0, 10] + /// Get/Set popover offset default [0, 10] /// public string? Offset { get; set; } } diff --git a/src/BootstrapBlazor/Misc/Internal/ComponentProperties.cs b/src/BootstrapBlazor/Misc/Internal/ComponentProperties.cs index d305d0629b1..834fd34ca7c 100644 --- a/src/BootstrapBlazor/Misc/Internal/ComponentProperties.cs +++ b/src/BootstrapBlazor/Misc/Internal/ComponentProperties.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Misc/Internal/LinkerFlags.cs b/src/BootstrapBlazor/Misc/Internal/LinkerFlags.cs index 7981ea8d8df..b04cb343ea1 100644 --- a/src/BootstrapBlazor/Misc/Internal/LinkerFlags.cs +++ b/src/BootstrapBlazor/Misc/Internal/LinkerFlags.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,12 +10,14 @@ namespace Microsoft.AspNetCore.Internal; internal static class LinkerFlags { /// - /// Flags for a member that is JSON (de)serialized. + /// Flags for a member that is JSON (de)serialized. + /// Flags for a member that is JSON (de)serialized. /// public const DynamicallyAccessedMemberTypes JsonSerialized = DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.PublicProperties; /// - /// Flags for a component + /// Flags for a component + /// Flags for a component /// public const DynamicallyAccessedMemberTypes Component = DynamicallyAccessedMemberTypes.All; } diff --git a/src/BootstrapBlazor/Misc/Internal/MemberAssignment.cs b/src/BootstrapBlazor/Misc/Internal/MemberAssignment.cs index 009836b9355..70c07767983 100644 --- a/src/BootstrapBlazor/Misc/Internal/MemberAssignment.cs +++ b/src/BootstrapBlazor/Misc/Internal/MemberAssignment.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Misc/Internal/PropertySetter.cs b/src/BootstrapBlazor/Misc/Internal/PropertySetter.cs index ecee4f7a932..56a99a559f9 100644 --- a/src/BootstrapBlazor/Misc/Internal/PropertySetter.cs +++ b/src/BootstrapBlazor/Misc/Internal/PropertySetter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Misc/Internal/QueryParameterNameComparer.cs b/src/BootstrapBlazor/Misc/Internal/QueryParameterNameComparer.cs index ccf03e3afe8..921eee9cacc 100644 --- a/src/BootstrapBlazor/Misc/Internal/QueryParameterNameComparer.cs +++ b/src/BootstrapBlazor/Misc/Internal/QueryParameterNameComparer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Misc/Internal/QueryParameterValueSupplier.cs b/src/BootstrapBlazor/Misc/Internal/QueryParameterValueSupplier.cs index 36a0fac6db2..916ba86b799 100644 --- a/src/BootstrapBlazor/Misc/Internal/QueryParameterValueSupplier.cs +++ b/src/BootstrapBlazor/Misc/Internal/QueryParameterValueSupplier.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Misc/Internal/QueryStringEnumerable.cs b/src/BootstrapBlazor/Misc/Internal/QueryStringEnumerable.cs index 4b94a71809c..6e5d092ab45 100644 --- a/src/BootstrapBlazor/Misc/Internal/QueryStringEnumerable.cs +++ b/src/BootstrapBlazor/Misc/Internal/QueryStringEnumerable.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -7,7 +7,8 @@ namespace Microsoft.AspNetCore.Internal; /// -/// An enumerable that can supply the name/value pairs from a URI query string. +/// An 枚举erable that can supply the name/value pairs from a URI query string. +/// An enumerable that can supply the name/value pairs from a URI query string. /// [ExcludeFromCodeCoverage] internal readonly struct QueryStringEnumerable @@ -15,7 +16,8 @@ internal readonly struct QueryStringEnumerable private readonly ReadOnlyMemory _queryString; /// - /// Constructs an instance of . + /// Constructs an 实例 of . + /// Constructs an instance of . /// /// The query string. public QueryStringEnumerable(string? queryString) @@ -24,7 +26,8 @@ public QueryStringEnumerable(string? queryString) } /// - /// Constructs an instance of . + /// Constructs an 实例 of . + /// Constructs an instance of . /// /// The query string. public QueryStringEnumerable(ReadOnlyMemory queryString) @@ -33,25 +36,27 @@ public QueryStringEnumerable(ReadOnlyMemory queryString) } /// - /// Retrieves an object that can iterate through the name/value pairs in the query string. + /// Retrieves an object that can iterate through the name/value pairs in the query string. + /// Retrieves an object that can iterate through the name/value pairs in the query string. /// /// An object that can iterate through the name/value pairs in the query string. public Enumerator GetEnumerator() => new(_queryString); /// - /// Represents a single name/value pair extracted from a query string during enumeration. + /// Represents a single name/value pair extracted from a query string during 枚举eration. + /// Represents a single name/value pair extracted from a query string during enumeration. /// public readonly struct EncodedNameValuePair { /// - /// Gets the name from this name/value pair in its original encoded form. - /// To get the decoded string, call . + /// 获得 the name from this name/value pair in its original encoded form. To get the decoded string, call . + /// Gets the name from this name/value pair in its original encoded form. To get the decoded string, call . /// public readonly ReadOnlyMemory EncodedName { get; } /// - /// Gets the value from this name/value pair in its original encoded form. - /// To get the decoded string, call . + /// 获得 the value from this name/value pair in its original encoded form. To get the decoded string, call . + /// Gets the value from this name/value pair in its original encoded form. To get the decoded string, call . /// public readonly ReadOnlyMemory EncodedValue { get; } @@ -62,14 +67,16 @@ internal EncodedNameValuePair(ReadOnlyMemory encodedName, ReadOnlyMemory - /// Decodes the name from this name/value pair. + /// Decodes the name from this name/value pair. + /// Decodes the name from this name/value pair. /// /// Characters representing the decoded name. public ReadOnlyMemory DecodeName() => Decode(EncodedName); /// - /// Decodes the value from this name/value pair. + /// Decodes the value from this name/value pair. + /// Decodes the value from this name/value pair. /// /// Characters representing the decoded value. public ReadOnlyMemory DecodeValue() @@ -88,7 +95,8 @@ private static ReadOnlyMemory Decode(ReadOnlyMemory chars) } /// - /// An enumerator that supplies the name/value pairs from a URI query string. + /// An 枚举erator that supplies the name/value pairs from a URI query string. + /// An enumerator that supplies the name/value pairs from a URI query string. /// public struct Enumerator { @@ -103,12 +111,14 @@ internal Enumerator(ReadOnlyMemory query) } /// - /// Gets the currently referenced key/value pair in the query string being enumerated. + /// 获得 the currently referenced key/value pair in the query string being 枚举erated. + /// Gets the currently referenced key/value pair in the query string being enumerated. /// public EncodedNameValuePair Current { get; private set; } /// - /// Moves to the next key/value pair in the query string being enumerated. + /// Moves to the next key/value pair in the query string being 枚举erated. + /// Moves to the next key/value pair in the query string being enumerated. /// /// True if there is another key/value pair, otherwise false. public bool MoveNext() diff --git a/src/BootstrapBlazor/Misc/ModelHashSetComparer.cs b/src/BootstrapBlazor/Misc/ModelHashSetComparer.cs index ad0bec7fb30..8caa2141be3 100644 --- a/src/BootstrapBlazor/Misc/ModelHashSetComparer.cs +++ b/src/BootstrapBlazor/Misc/ModelHashSetComparer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// 模型比较器 +/// 模型比较器 +/// Model comparer /// /// public class ModelHashSetComparer(IModelEqualityComparer comparer) : IEqualityComparer { /// - /// Equals 方法 + /// Equals 方法 + /// Equals method /// /// /// @@ -20,7 +22,8 @@ public class ModelHashSetComparer(IModelEqualityComparer comparer) public bool Equals(TItem? x, TItem? y) => comparer.Equals(x, y); /// - /// GetHashCode 方法 + /// GetHashCode 方法 + /// GetHashCode method /// /// /// diff --git a/src/BootstrapBlazor/Misc/NodeBase.cs b/src/BootstrapBlazor/Misc/NodeBase.cs index c9378e36d52..03362366443 100644 --- a/src/BootstrapBlazor/Misc/NodeBase.cs +++ b/src/BootstrapBlazor/Misc/NodeBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,29 +6,34 @@ namespace BootstrapBlazor.Components; /// -/// 节点类基类 +/// 节点类基类 +/// Node base class /// public abstract class NodeBase { /// - /// 获得/设置 是否展开 默认 false + /// 获得/设置 是否展开 默认 false + /// Get/Set whether expand default false /// public bool IsExpand { get; set; } /// - /// 获得/设置 是否有子节点 默认 false 用于判断是否有子节点 + /// 获得/设置 是否有子节点 默认 false 用于判断是否有子节点 + /// Get/Set whether has children default false used to determine whether there are children /// public bool HasChildren { get; set; } } /// -/// NodeBase 泛型基类 +/// NodeBase 泛型基类 +/// NodeBase generic base class /// /// public abstract class NodeBase : NodeBase { /// - /// 获得/设置 当前节点值 + /// 获得/设置 当前节点值 + /// Get/Set current node value /// [NotNull] public TItem? Value { get; set; } diff --git a/src/BootstrapBlazor/Misc/NodeItem.cs b/src/BootstrapBlazor/Misc/NodeItem.cs index 9609943ea96..4dd8e609da9 100644 --- a/src/BootstrapBlazor/Misc/NodeItem.cs +++ b/src/BootstrapBlazor/Misc/NodeItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,54 +6,64 @@ namespace BootstrapBlazor.Components; /// -/// 节点类组件基类 +/// 节点类组件基类 +/// Node component base class /// public abstract class NodeItem { /// - /// 获得/设置 当前节点 Id 默认为 null + /// 获得/设置 当前节点 Id 默认为 null + /// Get/Set current node Id default null /// /// 一般配合数据库使用 public string? Id { get; set; } /// - /// 获得/设置 父级节点 Id 默认为 null + /// 获得/设置 父级节点 Id 默认为 null + /// Get/Set parent node Id default null /// /// 一般配合数据库使用 public string? ParentId { get; set; } /// - /// 获得/设置 显示文字 + /// 获得/设置 显示文字 + /// Get/Set display text /// public string? Text { get; set; } /// - /// 获得/设置 图标 + /// 获得/设置 图标 + /// Get/Set icon /// public string? Icon { get; set; } /// - /// 获得/设置 自定义样式名 + /// 获得/设置 自定义样式名 + /// Get/Set custom css class /// public string? CssClass { get; set; } /// - /// 获得/设置 是否被禁用 默认 false + /// 获得/设置 是否被禁用 默认 false + /// Get/Set whether disabled default false /// public bool IsDisabled { get; set; } /// - /// 获得/设置 是否选中当前节点 默认 false + /// 获得/设置 是否选中当前节点 默认 false + /// Get/Set whether active default false /// public bool IsActive { get; set; } /// - /// 获得/设置 是否收缩 默认 true 收缩 + /// 获得/设置 是否收缩 默认 true 收缩 + /// Get/Set whether collapsed default true /// public bool IsCollapsed { get; set; } = true; /// - /// 获得/设置 子组件模板 默认为 null + /// 获得/设置 子组件模板 默认为 null + /// Get/Set child component template default null /// public RenderFragment? Template { get; set; } } diff --git a/src/BootstrapBlazor/Misc/QueryData.cs b/src/BootstrapBlazor/Misc/QueryData.cs index 609ab4073ea..465cc5400d9 100644 --- a/src/BootstrapBlazor/Misc/QueryData.cs +++ b/src/BootstrapBlazor/Misc/QueryData.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,40 +6,47 @@ namespace BootstrapBlazor.Components; /// -/// 表格查询数据类 +/// 表格查询数据类 +/// Table query data class /// /// public class QueryData { /// - /// 获得/设置 要显示页码的数据集合 + /// 获得/设置 要显示页码的数据集合 + /// Get/Set data collection to display page number /// public IEnumerable? Items { get; set; } /// - /// 获得/设置 数据集合总数 + /// 获得/设置 数据集合总数 + /// Get/Set total data count /// public int TotalCount { get; set; } /// - /// 获得/设置 数据是否被过滤 默认为 false 未被过滤 + /// 获得/设置 数据是否被过滤 默认为 false 未被过滤 + /// Get/Set whether data is filtered default false /// /// 组件内部通过此属性判断,如果外部未进行数据过滤,内部将进行数据过滤操作 public bool IsFiltered { get; set; } /// - /// 获得/设置 数据是否被排序 默认为 false 未被排序 + /// 获得/设置 数据是否被排序 默认为 false 未被排序 + /// Get/Set whether data is sorted default false /// public bool IsSorted { get; set; } /// - /// 获得/设置 数据是否已处理 SearchText 默认为 false + /// 获得/设置 数据是否已处理 SearchText 默认为 false + /// Get/Set whether data has processed SearchText default false /// /// 设置本属性为 true 时,Table 组件的高级搜索按钮改变颜色 public bool IsSearch { get; set; } /// - /// 获得/设置 数据是否为已处理自定义高级搜索 默认为 false + /// 获得/设置 数据是否为已处理自定义高级搜索 默认为 false + /// Get/Set whether data has processed custom advanced search default false /// /// 设置本属性为 true 时,Table 组件的高级搜索按钮改变颜色 public bool IsAdvanceSearch { get; set; } diff --git a/src/BootstrapBlazor/Misc/SelectedItem.cs b/src/BootstrapBlazor/Misc/SelectedItem.cs index 6b986d36e8f..6c31fa997be 100644 --- a/src/BootstrapBlazor/Misc/SelectedItem.cs +++ b/src/BootstrapBlazor/Misc/SelectedItem.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 选项类 +/// 选项类 +/// Selected item class /// public class SelectedItem { /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public SelectedItem() { } /// - /// 构造函数 + /// 构造函数 + /// 构造函数 /// public SelectedItem(string value, string text) { @@ -25,27 +28,32 @@ public SelectedItem(string value, string text) } /// - /// 获得/设置 显示名称 + /// 获得/设置 显示名称 + /// Get/Set display text /// public string Text { get; set; } = ""; /// - /// 获得/设置 选项值 + /// 获得/设置 选项值 + /// Get/Set item value /// public string Value { get; set; } = ""; /// - /// 获得/设置 是否选中 + /// 获得/设置 是否选中 + /// Get/Set whether active /// public bool Active { get; set; } /// - /// 获得/设置 是否禁用 + /// 获得/设置 是否禁用 + /// Get/Set whether disabled /// public bool IsDisabled { get; set; } /// - /// 获得/设置 分组名称 + /// 获得/设置 分组名称 + /// Get/Set group name /// public string GroupName { get; set; } = ""; } diff --git a/src/BootstrapBlazor/Misc/SelectedItemOfT.cs b/src/BootstrapBlazor/Misc/SelectedItemOfT.cs index 9608ebdbd51..cca5750e3c9 100644 --- a/src/BootstrapBlazor/Misc/SelectedItemOfT.cs +++ b/src/BootstrapBlazor/Misc/SelectedItemOfT.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 泛型实现类 +/// 泛型实现类 +/// Generic implementation class /// public class SelectedItem { /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public SelectedItem() { Value = default!; } /// - /// 构造函数 + /// 构造函数 + /// 构造函数 /// /// /// @@ -27,27 +30,32 @@ public SelectedItem(T value, string text) } /// - /// 获得/设置 显示名称 + /// 获得/设置 显示名称 + /// Get/Set display text /// public string Text { get; set; } = ""; /// - /// 获得/设置 选项值 + /// 获得/设置 选项值 + /// Get/Set item value /// public T Value { get; set; } /// - /// 获得/设置 是否选中 + /// 获得/设置 是否选中 + /// Get/Set whether active /// public bool Active { get; set; } /// - /// 获得/设置 是否禁用 + /// 获得/设置 是否禁用 + /// Get/Set whether disabled /// public bool IsDisabled { get; set; } /// - /// 获得/设置 分组名称 + /// 获得/设置 分组名称 + /// Get/Set group name /// public string GroupName { get; set; } = ""; } diff --git a/src/BootstrapBlazor/Misc/TableTreeNode.cs b/src/BootstrapBlazor/Misc/TableTreeNode.cs index 839a85e0ae7..95f7eb524c6 100644 --- a/src/BootstrapBlazor/Misc/TableTreeNode.cs +++ b/src/BootstrapBlazor/Misc/TableTreeNode.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,29 +6,34 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件树状结构类 +/// Table 组件树状结构类 +/// Table component tree structure class /// public class TableTreeNode : NodeBase, IExpandableNode { /// - /// 获得/设置 子节点集合 + /// 获得/设置 子节点集合 + /// Get/Set child node collection /// [DisallowNull] [NotNull] public IEnumerable>? Items { get; set; } = Enumerable.Empty>(); /// - /// 获得/设置 子节点集合 + /// 获得/设置 子节点集合 + /// Get/Set child node collection /// IEnumerable> IExpandableNode.Items { get => Items; set => Items = value.OfType>(); } /// - /// 获得/设置 父级节点 + /// 获得/设置 父级节点 + /// Get/Set parent node /// public TableTreeNode? Parent { get; set; } /// - /// 获得/设置 父级节点 + /// 获得/设置 父级节点 + /// Get/Set parent node /// IExpandableNode? IExpandableNode.Parent { @@ -44,7 +49,8 @@ public class TableTreeNode : NodeBase, IExpandableNode } /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public TableTreeNode([DisallowNull] TItem item) { diff --git a/src/BootstrapBlazor/Misc/TreeNodeBase.cs b/src/BootstrapBlazor/Misc/TreeNodeBase.cs index 11216f6f7a7..7809774fa2d 100644 --- a/src/BootstrapBlazor/Misc/TreeNodeBase.cs +++ b/src/BootstrapBlazor/Misc/TreeNodeBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,42 +6,50 @@ namespace BootstrapBlazor.Components; /// -/// +/// TreeNodeBase 抽象基类 +/// TreeNodeBase abstract base class /// public abstract class TreeNodeBase : NodeBase { /// - /// 获得/设置 显示文字 + /// 获得/设置 显示文字 + /// Get/Set display text /// public string? Text { get; set; } /// - /// 获得/设置 图标 + /// 获得/设置 图标 + /// Get/Set icon /// public string? Icon { get; set; } /// - /// 获得/设置 展开节点状态下的 Icon 图标 + /// 获得/设置 展开节点状态下的 Icon 图标 + /// Get/Set Icon when node is expanded /// public string? ExpandIcon { get; set; } /// - /// 获得/设置 自定义样式名 + /// 获得/设置 自定义样式名 + /// Get/Set custom css class /// public string? CssClass { get; set; } /// - /// 获得/设置 是否被禁用 默认 false + /// 获得/设置 是否被禁用 默认 false + /// Get/Set whether disabled default false /// public bool IsDisabled { get; set; } /// - /// 获得/设置 是否选中当前节点 默认 false + /// 获得/设置 是否选中当前节点 默认 false + /// Get/Set whether active default false /// public bool IsActive { get; set; } /// - /// 获得/设置 子组件模板 默认为 null + /// 获得/设置 子组件模板 默认为 null + /// Get/Set child component template default null /// public RenderFragment? Template { get; set; } } diff --git a/src/BootstrapBlazor/Misc/TreeNodeCache.cs b/src/BootstrapBlazor/Misc/TreeNodeCache.cs index 76e5fc37566..a5d1e7134b6 100644 --- a/src/BootstrapBlazor/Misc/TreeNodeCache.cs +++ b/src/BootstrapBlazor/Misc/TreeNodeCache.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,29 +6,34 @@ namespace BootstrapBlazor.Components; /// -/// Tree 组件节点缓存类 +/// Tree 组件节点缓存类 +/// Tree component node cache class /// /// /// public class TreeNodeCache : ExpandableNodeCache where TNode : ICheckableNode { /// - /// 获得 所有选中节点集合 作为缓存使用 + /// 获得 所有选中节点集合 作为缓存使用 + /// Get all checked node collection used as cache /// private readonly HashSet _checkedNodeCache; /// - /// 获得 所有未选中节点集合 作为缓存使用 + /// 获得 所有未选中节点集合 作为缓存使用 + /// Get all unchecked node collection used as cache /// private readonly HashSet _uncheckedNodeCache; /// - /// 获得 所有未选中节点集合 作为缓存使用 + /// 获得 所有半选中节点集合 作为缓存使用 + /// Get all indeterminate node collection used as cache /// private readonly HashSet _indeterminateNodeCache; /// - /// 构造函数 + /// 构造函数 + /// Constructor /// /// public TreeNodeCache(IModelEqualityComparer comparer) : base(comparer) @@ -39,7 +44,8 @@ public TreeNodeCache(IModelEqualityComparer comparer) : base(comparer) } /// - /// 切换选中状态方法 + /// 切换选中状态方法 + /// Toggle checked state method /// /// /// @@ -69,7 +75,8 @@ public void ToggleCheck(TNode node) } /// - /// 检查当前节点是否选中 + /// 检查当前节点是否选中 + /// Check whether current node is checked /// /// /// @@ -120,7 +127,8 @@ private void CheckChildren(List> nodes, TNode node) } /// - /// 重置是否选中状态 + /// 重置是否选中状态 + /// Reset checked state /// /// public void IsChecked(List nodes) @@ -148,10 +156,11 @@ private void ResetCheckNodes(List items) } /// - /// 通过指定节点查找父节点 + /// 通过指定节点查找父节点 + /// Find parent node by specified node /// - /// 数据集合 - /// 指定节点 + /// 数据集合Data collection + /// 指定节点Specified node /// public TNode? FindParentNode(List nodes, TNode node) { @@ -173,7 +182,8 @@ private void ResetCheckNodes(List items) } /// - /// 清除缓存方法 + /// 清除缓存方法 + /// Clear cache method /// public void Reset() { diff --git a/src/BootstrapBlazor/Options/ArchiveOptions.cs b/src/BootstrapBlazor/Options/ArchiveOptions.cs index 2beba340e76..55cd4a4da6b 100644 --- a/src/BootstrapBlazor/Options/ArchiveOptions.cs +++ b/src/BootstrapBlazor/Options/ArchiveOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,32 +9,38 @@ namespace BootstrapBlazor.Components; /// -/// 归档配置类 +/// 归档配置类 +/// Archive configuration class /// public class ArchiveOptions { /// - /// 获得/设置 压缩等级 默认 + /// 获得/设置 压缩等级 默认 + /// Get/Set compression level default /// public CompressionLevel CompressionLevel { get; set; } /// - /// 获得/设置 归档模式 默认 + /// 获得/设置 归档模式 默认 + /// Get/Set archive mode default /// public ZipArchiveMode Mode { get; set; } = ZipArchiveMode.Create; /// - /// 获得/设置 归档结束后是否关闭流 默认 false 归档后关闭相关流 + /// 获得/设置 归档结束后是否关闭流 默认 false 归档后关闭相关流 + /// Get/Set whether to leave the stream open after the archive is finished default false /// internal bool LeaveOpen { get; set; } /// - /// 获得/设置 编码方法 默认空 内部使用 UTF-8 编码 + /// 获得/设置 编码方法 默认空 内部使用 UTF-8 编码 + /// Get/Set encoding default null using UTF-8 internally /// public Encoding? Encoding { get; set; } /// - /// 获得/设置 获取文件流回调方法 + /// 获得/设置 获取文件流回调方法 + /// Get/Set get file stream callback method /// public Func>? ReadStreamAsync { get; set; } } diff --git a/src/BootstrapBlazor/Options/BootstrapBlazorOptions.cs b/src/BootstrapBlazor/Options/BootstrapBlazorOptions.cs index 85c3531a166..8d1ee28f16f 100644 --- a/src/BootstrapBlazor/Options/BootstrapBlazorOptions.cs +++ b/src/BootstrapBlazor/Options/BootstrapBlazorOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,151 +10,180 @@ namespace BootstrapBlazor.Components; /// -/// Global configuration class for components +/// Global configuration class for components +/// Global configuration class for components /// public class BootstrapBlazorOptions : IOptions { /// - /// Gets or sets the default delay for the Toast component, default is 0 + /// 获得/设置 the default delay for the Toast component, default is 0 + /// Gets or sets the default delay for the Toast component, default is 0 /// public int ToastDelay { get; set; } /// - /// Gets or sets the default delay for the Message component, default is 0 + /// 获得/设置 the default delay for the Message component, default is 0 + /// Gets or sets the default delay for the Message component, default is 0 /// public int MessageDelay { get; set; } /// - /// Gets or sets the default delay for the Swal component, default is 0 + /// 获得/设置 the default delay for the Swal component, default is 0 + /// Gets or sets the default delay for the Swal component, default is 0 /// public int SwalDelay { get; set; } /// - /// Gets or sets the fallback default language culture, default is "en" (English) + /// 获得/设置 the fallback default language culture, default is "en" (English) + /// Gets or sets the fallback default language culture, default is "en" (English) /// public string FallbackCulture { get; set; } = "en"; /// - /// Gets or sets the default position for the Toast component globally, default is null. When set, it overrides the site-wide setting. + /// 获得/设置 the default position for the Toast component globally, default is null. When set, it overrides the site-wide setting. + /// Gets or sets the default position for the Toast component globally, default is null. When set, it overrides the site-wide setting. /// public Placement? ToastPlacement { get; set; } /// - /// Gets or sets the list of built-in localization languages for components, default is null + /// 获得/设置 the list of built-in localization languages for components, default is null + /// Gets or sets the list of built-in localization languages for components, default is null /// public List? SupportedCultures { get; set; } /// - /// Gets or sets whether to enable global exception capture functionality, default is true + /// 获得/设置 是否 to enable global 异常 capture functionality, default is true + /// Gets or sets whether to enable global exception capture functionality, default is true /// public bool EnableErrorLogger { get; set; } = true; /// - /// Gets or sets whether to enable show toast popup when global exception capture, default is true + /// 获得/设置 是否 to enable show toast popup when global 异常 capture, default is true + /// Gets or sets whether to enable show toast popup when global exception capture, default is true /// public bool ShowErrorLoggerToast { get; set; } = true; /// - /// Gets or sets a value indicating whether error logging using an is enabled, default is true. + /// 获得/设置 a value indicating 是否 error logging using an is enabled, default is true. + /// Gets or sets a value indicating whether error logging using an is enabled, default is true. /// public bool EnableErrorLoggerILogger { get; set; } = true; /// - /// Gets or sets whether to fall back to the fallback culture, default is true + /// 获得/设置 是否 to fall back to the fallback culture, default is true + /// Gets or sets whether to fall back to the fallback culture, default is true /// public bool EnableFallbackCulture { get; set; } = true; /// - /// Gets or sets whether to ignore missing culture log information, default is null (not set) + /// 获得/设置 是否 to ignore missing culture log information, default is null (not set) + /// Gets or sets whether to ignore missing culture log information, default is null (not set) /// /// Uses the default value of public bool? IgnoreLocalizerMissing { get; set; } /// - /// Gets or sets whether to disable fetching localization resources from the service, default is false (not disabled) + /// 获得/设置 是否 to disable fetching localization resources from the service, default is false (not disabled) + /// Gets or sets whether to disable fetching localization resources from the service, default is false (not disabled) /// public bool? DisableGetLocalizerFromService { get; set; } /// - /// Gets or sets whether to disable fetching localization resources of type , default is false (not disabled) + /// 获得/设置 是否 to disable fetching localization resources of 类型 , default is false (not disabled) + /// Gets or sets whether to disable fetching localization resources of type , default is false (not disabled) /// public bool? DisableGetLocalizerFromResourceManager { get; set; } /// - /// Gets or sets the default culture information + /// 获得/设置 the default culture information + /// Gets or sets the default culture information /// /// This parameter is invalid when multi-culture is enabled public string? DefaultCultureInfo { get; set; } /// - /// Gets or sets whether to disable the automatic form submission feature by pressing Enter, default is null (not set) + /// 获得/设置 是否 to disable the automatic form submission feature by pressing Enter, default is null (not set) + /// Gets or sets whether to disable the automatic form submission feature by pressing Enter, default is null (not set) /// public bool? DisableAutoSubmitFormByEnter { get; set; } /// - /// Gets or sets the JavaScript module script version number, default is null + /// 获得/设置 the JavaScript module script version number, default is null + /// Gets or sets the JavaScript module script version number, default is null /// public string? JSModuleVersion { get; set; } /// - /// Gets or sets the configuration instance + /// 获得/设置 the configuration 实例 + /// Gets or sets the configuration instance /// public TableSettings TableSettings { get; set; } = new(); /// - /// Gets or sets the configuration instance + /// 获得/设置 the configuration 实例 + /// Gets or sets the configuration instance /// public ModalSettings ModalSettings { get; set; } = new(); /// - /// Gets or sets the configuration instance + /// 获得/设置 the configuration 实例 + /// Gets or sets the configuration instance /// public StepSettings StepSettings { get; set; } = new(); /// - /// Gets or sets the configuration + /// 获得/设置 the configuration + /// Gets or sets the configuration /// public ConnectionHubOptions ConnectionHubOptions { get; set; } = new(); /// - /// Gets or sets the configuration + /// 获得/设置 the configuration + /// Gets or sets the configuration /// public WebClientOptions WebClientOptions { get; set; } = new(); /// - /// Gets or sets the configuration + /// 获得/设置 the configuration + /// Gets or sets the configuration /// public IpLocatorOptions IpLocatorOptions { get; set; } = new(); /// - /// Gets or sets the configuration + /// 获得/设置 the configuration + /// Gets or sets the configuration /// public ScrollOptions ScrollOptions { get; set; } = new(); /// - /// Gets or sets the configuration + /// 获得/设置 the configuration + /// Gets or sets the configuration /// public ContextMenuOptions ContextMenuOptions { get; set; } = new(); /// - /// Gets or sets the CacheManagerOptions configuration + /// 获得/设置 the CacheManagerOptions configuration + /// Gets or sets the CacheManagerOptions configuration /// public CacheManagerOptions CacheManagerOptions { get; set; } = new(); /// - /// Get or sets website use memorial mode. default is false + /// Get or sets website use memorial mode. default is false + /// Get or sets website use memorial mode. default is false /// public bool IsMemorialMode { get; set; } /// - /// 获得/设置 等组件是否将 参数默认值更改为 true 默认 false + /// 获得/设置 等组件是否将 参数默认值更改为 true 默认 false + /// Get/Set whether the parameter default value is changed to true for components such as default false /// public bool IsPopover { get; set; } BootstrapBlazorOptions IOptions.Value => this; /// - /// Gets the collection of supported languages + /// 获得 the 集合 of supported languages + /// Gets the collection of supported languages /// /// public IList GetSupportedCultures() => SupportedCultures?.Select(name => new CultureInfo(name)).ToList() diff --git a/src/BootstrapBlazor/Options/CacheManagerOptions.cs b/src/BootstrapBlazor/Options/CacheManagerOptions.cs index af2a81ff2bd..9441fb3b939 100644 --- a/src/BootstrapBlazor/Options/CacheManagerOptions.cs +++ b/src/BootstrapBlazor/Options/CacheManagerOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// CacheManagerOptions 配置类 +/// CacheManagerOptions 配置类 +/// CacheManagerOptions configuration class /// public class CacheManagerOptions { /// - /// 获得/设置 是否开启 CacheManager 功能 默认 true 开启 + /// 获得/设置 是否开启 CacheManager 功能 默认 true 开启 + /// Get/Set whether to enable CacheManager feature default true /// public bool Enable { get; set; } = true; /// - /// 获得/设置 滑动缓存过期时间 默认 5 分钟 + /// 获得/设置 滑动缓存过期时间 默认 5 分钟 + /// Get/Set sliding expiration time default 5 minutes /// public TimeSpan SlidingExpiration { get; set; } = TimeSpan.FromMinutes(5); /// - /// 获得/设置 绝对缓存过期时间 默认 10 秒钟 + /// 获得/设置 绝对缓存过期时间 默认 10 秒钟 + /// Get/Set absolute expiration time default 10 seconds /// public TimeSpan AbsoluteExpiration { get; set; } = TimeSpan.FromSeconds(10); } diff --git a/src/BootstrapBlazor/Options/ConfigureOptions.cs b/src/BootstrapBlazor/Options/ConfigureOptions.cs index 02e4b441599..df73a92fb76 100644 --- a/src/BootstrapBlazor/Options/ConfigureOptions.cs +++ b/src/BootstrapBlazor/Options/ConfigureOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace Microsoft.Extensions.DependencyInjection; /// -/// BlazorConfigureFromConfigurationOptions 配置实现类 +/// BlazorConfigureFromConfigurationOptions 配置实现类 +/// BlazorConfigureFromConfigurationOptions configuration implementation class /// public class ConfigureOptions : ConfigureFromConfigurationOptions where TOption : class { /// - /// 构造函数 + /// 构造函数 + /// Constructor /// /// public ConfigureOptions(IConfiguration config) diff --git a/src/BootstrapBlazor/Options/ConnectionHubOptions.cs b/src/BootstrapBlazor/Options/ConnectionHubOptions.cs index 04ac39dcd75..f4616b0f2e9 100644 --- a/src/BootstrapBlazor/Options/ConnectionHubOptions.cs +++ b/src/BootstrapBlazor/Options/ConnectionHubOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,34 +6,40 @@ namespace BootstrapBlazor.Components; /// -/// ConnectionHubOptions 配置类 +/// ConnectionHubOptions 配置类 +/// ConnectionHubOptions configuration class /// public class ConnectionHubOptions { /// - /// 获得/设置 是否开启 CollectionHub 功能 默认 false 未开启 + /// 获得/设置 是否开启 CollectionHub 功能 默认 false 未开启 + /// Get/Set whether to enable CollectionHub feature default false /// public bool Enable { get; set; } /// - /// 获得/设置 是否开启 IP 定位功能 默认 false 未开启 + /// 获得/设置 是否开启 IP 定位功能 默认 false 未开启 + /// Get/Set whether to enable IP locator feature default false /// public bool EnableIpLocator { get; set; } /// - /// 获得/设置 过期扫描周期 默认 1 分钟 + /// 获得/设置 过期扫描周期 默认 1 分钟 + /// Get/Set expiration scan frequency default 1 minute /// - /// 自动清理超时 5 倍心跳时间的客户端信息 + /// 自动清理超时 5 倍心跳时间的客户端信息Automatically clean up client information with timeout 5 times heartbeat time public TimeSpan ExpirationScanFrequency { get; set; } = TimeSpan.FromMinutes(10); /// - /// 获得/设置 超时间隔 默认 10 秒 + /// 获得/设置 超时间隔 默认 10 秒 + /// Get/Set timeout interval default 10 seconds /// - /// 不能小于 心跳间隔 + /// 不能小于 心跳间隔Cannot be less than heartbeat interval public TimeSpan TimeoutInterval { get; set; } = TimeSpan.FromSeconds(10); /// - /// 获得/设置 ConnectionHub 组件心跳间隔 默认 5000 单位毫秒 + /// 获得/设置 ConnectionHub 组件心跳间隔 默认 5000 单位毫秒 + /// Get/Set ConnectionHub component heartbeat interval default 5000 ms /// public TimeSpan BeatInterval { get; set; } = TimeSpan.FromSeconds(5); } diff --git a/src/BootstrapBlazor/Options/Constants.cs b/src/BootstrapBlazor/Options/Constants.cs index 4bc38b3d83a..cc56eeed81b 100644 --- a/src/BootstrapBlazor/Options/Constants.cs +++ b/src/BootstrapBlazor/Options/Constants.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 系统常量 +/// 系统常量 +/// 系统常量 /// public static class Constants { /// - /// + /// + /// /// public const string DropdownToggleString = "bb.dropdown"; } diff --git a/src/BootstrapBlazor/Options/ContextMenuOptions.cs b/src/BootstrapBlazor/Options/ContextMenuOptions.cs index 8174e61b2ae..da97312f6bd 100644 --- a/src/BootstrapBlazor/Options/ContextMenuOptions.cs +++ b/src/BootstrapBlazor/Options/ContextMenuOptions.cs @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// ContextMenuOptions 配置类 +/// ContextMenuOptions 配置类 +/// ContextMenuOptions configuration class /// public class ContextMenuOptions { /// - /// 获得/设置 移动端触屏右键菜单延时时长 默认 500 毫秒 + /// 获得/设置 移动端触屏右键菜单延时时长 默认 500 毫秒 + /// Get/Set mobile touch context menu delay duration default 500 ms /// public int OnTouchDelay { get; set; } = 500; } diff --git a/src/BootstrapBlazor/Options/ExportPdfButtonOptions.cs b/src/BootstrapBlazor/Options/ExportPdfButtonOptions.cs index 5cdbb0436a5..582762f35c5 100644 --- a/src/BootstrapBlazor/Options/ExportPdfButtonOptions.cs +++ b/src/BootstrapBlazor/Options/ExportPdfButtonOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,72 +6,86 @@ namespace BootstrapBlazor.Components; /// -/// ExportPdfButtonOptions 配置类 +/// ExportPdfButtonOptions 配置类 +/// ExportPdfButtonOptions configuration class /// public class ExportPdfButtonOptions { /// - /// 获得/设置 导出 Pdf 选择器 默认为 null + /// 获得/设置 导出 Pdf 选择器 默认为 null + /// Get/Set export Pdf selector default null /// public string? Selector { get; set; } /// - /// 获得/设置 导出 Pdf 元素 Id 默认为 null + /// 获得/设置 导出 Pdf 元素 Id 默认为 null + /// Get/Set export Pdf element Id default null /// public string? ElementId { get; set; } /// - /// 获得/设置 导出 Pdf 所需样式表文件集合 默认为 null + /// 获得/设置 导出 Pdf 所需样式表文件集合 默认为 null + /// Get/Set export Pdf style tags default null /// public List? StyleTags { get; set; } /// - /// 获得/设置 导出 Pdf 所需脚本文件集合 默认为 null + /// 获得/设置 导出 Pdf 所需脚本文件集合 默认为 null + /// Get/Set export Pdf script tags default null /// public List? ScriptTags { get; set; } /// - /// 获得/设置 导出 Pdf 按钮显示文字 默认为资源文件中 导出 Pdf 文字 + /// 获得/设置 导出 Pdf 按钮显示文字 默认为资源文件中 导出 Pdf 文字 + /// Get/Set export Pdf button text default use resource file /// public string? Text { get; set; } /// - /// 获得/设置 导出 Pdf 按钮图标 未设置 取当前图标主题下导出 Pdf 图标 + /// 获得/设置 导出 Pdf 按钮图标 未设置 取当前图标主题下导出 Pdf 图标 + /// Get/Set export Pdf button icon default use current icon theme /// public string? Icon { get; set; } /// - /// 获得/设置 导出 Pdf 按钮颜色 默认 Color.Primary + /// 获得/设置 导出 Pdf 按钮颜色 默认 Color.Primary + /// Get/Set export Pdf button color default Color.Primary /// public Color Color { get; set; } = Color.Primary; /// - /// 获得/设置 导出 Pdf 文件名 默认为 null 未设置时使用 pdf-时间戳.pdf + /// 获得/设置 导出 Pdf 文件名 默认为 null 未设置时使用 pdf-时间戳.pdf + /// Get/Set export Pdf file name default null using pdf-timestamp.pdf when not set /// public string? FileName { get; set; } /// - /// 获得/设置 导出 Pdf 之前回调委托 默认为 null + /// 获得/设置 导出 Pdf 之前回调委托 默认为 null + /// Get/Set on before export callback default null /// public Func? OnBeforeExport { get; set; } /// - /// 获得/设置 下载 Pdf 之前回调委托 默认为 null + /// 获得/设置 下载 Pdf 之前回调委托 默认为 null + /// Get/Set on before download callback default null /// public Func? OnBeforeDownload { get; set; } /// - /// 获得/设置 下载 Pdf 之后回调委托 默认为 null + /// 获得/设置 下载 Pdf 之后回调委托 默认为 null + /// Get/Set on after download callback default null /// public Func? OnAfterDownload { get; set; } /// - /// 获得/设置 是否自动下载 Pdf 默认为 true + /// 获得/设置 是否自动下载 Pdf 默认为 true + /// Get/Set whether auto download Pdf default true /// public bool AutoDownload { get; set; } = true; /// - /// 获得/设置 是否异步导出 默认为 true + /// 获得/设置 是否异步导出 默认为 true + /// Get/Set whether async export default true /// public bool IsAsync { get; set; } = true; } diff --git a/src/BootstrapBlazor/Options/IconThemeOptions.cs b/src/BootstrapBlazor/Options/IconThemeOptions.cs index fb03cf2d8f1..0ef6b987de8 100644 --- a/src/BootstrapBlazor/Options/IconThemeOptions.cs +++ b/src/BootstrapBlazor/Options/IconThemeOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,12 +10,14 @@ namespace BootstrapBlazor.Components; /// -/// IconTheme 配置项 +/// IconTheme 配置项 +/// IconTheme configuration options /// public class IconThemeOptions { /// - /// 获得/设置 主题 Icons 集合 + /// 获得/设置 主题 Icons 集合 + /// Get/Set theme Icons collection /// #if NET8_0_OR_GREATER public FrozenDictionary> Icons { get; private set; } @@ -24,12 +26,14 @@ public class IconThemeOptions #endif /// - /// 获得/设置 当前主题键值 默认 fa 使用 font-awesome 图标集 + /// 获得/设置 当前主题键值 默认 fa 使用 font-awesome 图标集 + /// Get/Set current theme key default fa using font-awesome icon set /// public string ThemeKey { get; set; } /// - /// 构造函数 + /// 构造函数 + /// Constructor /// public IconThemeOptions() { @@ -53,7 +57,8 @@ public IconThemeOptions() #if NET8_0_OR_GREATER /// - /// 尝试通过指定键值添加图标集合 + /// 尝试通过指定键值添加图标集合 + /// Try to add icon collection by specified key /// /// /// diff --git a/src/BootstrapBlazor/Options/MarginOptions.cs b/src/BootstrapBlazor/Options/MarginOptions.cs index 4df1480c5ed..120ee1705f7 100644 --- a/src/BootstrapBlazor/Options/MarginOptions.cs +++ b/src/BootstrapBlazor/Options/MarginOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,28 +6,33 @@ namespace BootstrapBlazor.Components; /// -/// 页面边距选项 +/// 页面边距选项 +/// Page margin options /// [ExcludeFromCodeCoverage] public record MarginOptions { /// - /// Top margin, accepts values labeled with units. + /// Top margin, accepts values labeled with units. + /// Top margin, accepts values labeled with units. /// public object? Top { get; set; } /// - /// Left margin, accepts values labeled with units. + /// Left margin, accepts values labeled with units. + /// Left margin, accepts values labeled with units. /// public object? Left { get; set; } /// - /// Bottom margin, accepts values labeled with units. + /// Bottom margin, accepts values labeled with units. + /// Bottom margin, accepts values labeled with units. /// public object? Bottom { get; set; } /// - /// Right margin, accepts values labeled with units. + /// Right margin, accepts values labeled with units. + /// Right margin, accepts values labeled with units. /// public object? Right { get; set; } } diff --git a/src/BootstrapBlazor/Options/ModalSettings.cs b/src/BootstrapBlazor/Options/ModalSettings.cs index 7666b45f79a..a38afed9683 100644 --- a/src/BootstrapBlazor/Options/ModalSettings.cs +++ b/src/BootstrapBlazor/Options/ModalSettings.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Modal component settings +/// Modal component settings +/// Modal component settings /// public class ModalSettings { /// - /// Gets or sets whether to enable fade animation, default is null + /// 获得/设置 是否 to enable fade animation, default is null + /// Gets or sets whether to enable fade animation, default is null /// public bool? IsFade { get; set; } } diff --git a/src/BootstrapBlazor/Options/OtpOptions.cs b/src/BootstrapBlazor/Options/OtpOptions.cs index 8b299f9aab8..f6660c2f008 100644 --- a/src/BootstrapBlazor/Options/OtpOptions.cs +++ b/src/BootstrapBlazor/Options/OtpOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,70 +6,83 @@ namespace BootstrapBlazor.Components; /// -/// OtpOptions class +/// OtpOptions class +/// OtpOptions class /// public class OtpOptions { /// - /// Gets or sets the secret key used for generating the QR code. + /// 获得/设置 the secret key used for generating the QR code. + /// Gets or sets the secret key used for generating the QR code. /// public string? SecretKey { get; set; } /// - /// Gets or sets the Issuer name + /// 获得/设置 the Issuer name + /// Gets or sets the Issuer name /// public string? IssuerName { get; set; } /// - /// Gets or sets the Account name + /// 获得/设置 the Account name + /// Gets or sets the Account name /// public string? AccountName { get; set; } /// - /// Gets or sets the user name + /// 获得/设置 the user name + /// Gets or sets the user name /// public string? UserName { get; set; } /// - /// Gets or sets the OTP hash mode. + /// 获得/设置 the OTP hash mode. + /// Gets or sets the OTP hash mode. /// public OtpHashMode Algorithm { get; set; } /// - /// Gets or sets the OTP type. + /// 获得/设置 the OTP 类型. + /// Gets or sets the OTP type. /// public OtpType Type { get; set; } /// - /// Gets or sets the code length. Default is 6. + /// 获得/设置 the code length. 默认为 6. + /// Gets or sets the code length. Default is 6. /// public int Digits { get; set; } = 6; /// - /// Gets or sets the period in seconds for TOTP. Default is 30. + /// 获得/设置 the period in seconds for TOTP. 默认为 30. + /// Gets or sets the period in seconds for TOTP. Default is 30. /// public int Period { get; set; } = 30; /// - /// Gets or sets the counter for Hotp. Default is 0. + /// 获得/设置 the counter for Hotp. 默认为 0. + /// Gets or sets the counter for Hotp. Default is 0. /// public int Counter { get; set; } } /// -/// Abstract class representing a Time-based One-Time Password (TOTP) instance. +/// Abstract class representing a Time-based One-Time Password (TOTP) 实例. +/// Abstract class representing a Time-based One-Time Password (TOTP) instance. /// public abstract class TotpInstanceBase { /// - /// Get the remaining seconds until the next TOTP expiration for the given secret key and timestamp. + /// Get the remaining seconds until the next TOTP expiration for the given secret key and timestamp. + /// Get the remaining seconds until the next TOTP expiration for the given secret key and timestamp. /// /// /// public abstract int GetRemainingSeconds(DateTime? timestamp = null); /// - /// Verify the given TOTP code against the expected value using the provided secret key. + /// Verify the given TOTP code against the expected value using the provided secret key. + /// Verify the given TOTP code against the expected value using the provided secret key. /// /// /// @@ -78,12 +91,14 @@ public abstract class TotpInstanceBase } /// -/// Abstract class representing an HMAC-based One-Time Password (HOTP) instance. +/// Abstract class representing an HMAC-based One-Time Password (HOTP) 实例. +/// Abstract class representing an HMAC-based One-Time Password (HOTP) instance. /// public abstract class HotpInstanceBase { /// - /// + /// + /// /// /// /// @@ -92,38 +107,45 @@ public abstract class HotpInstanceBase } /// -/// Enum representing the OTP hash modes. +/// Enum representing the OTP hash modes. +/// Enum representing the OTP hash modes. /// public enum OtpHashMode { /// - /// SHA1 hash mode + /// SHA1 hash mode + /// SHA1 hash mode /// Sha1, /// - /// SHA256 hash mode + /// SHA256 hash mode + /// SHA256 hash mode /// Sha256, /// - /// SHA512 hash mode + /// SHA512 hash mode + /// SHA512 hash mode /// Sha512, } /// -/// Enum representing the OTP types. +/// Enum representing the OTP 类型s. +/// Enum representing the OTP types. /// public enum OtpType { /// - /// Time-based One-Time Password (TOTP) algorithm + /// Time-based One-Time Password (TOTP) algorithm + /// Time-based One-Time Password (TOTP) algorithm /// Totp, /// - /// HMAC-based One-Time Password (HOTP) algorithm + /// HMAC-based One-Time Password (HOTP) algorithm + /// HMAC-based One-Time Password (HOTP) algorithm /// Hotp } diff --git a/src/BootstrapBlazor/Options/PaperFormat.cs b/src/BootstrapBlazor/Options/PaperFormat.cs index 21fb698dac3..c907fefc6a1 100644 --- a/src/BootstrapBlazor/Options/PaperFormat.cs +++ b/src/BootstrapBlazor/Options/PaperFormat.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,78 +6,93 @@ namespace BootstrapBlazor.Components; /// -/// 纸张规格配置类 +/// 纸张规格配置类 +/// Paper format configuration class /// [ExcludeFromCodeCoverage] public record PaperFormat { /// - /// + /// + /// /// public static PaperFormat Letter => new(8.5m, 11m); /// - /// + /// + /// /// public static PaperFormat Legal => new(8.5m, 14m); /// - /// + /// + /// /// public static PaperFormat Tabloid => new(11m, 17m); /// - /// + /// + /// /// public static PaperFormat Ledger => new(17m, 11m); /// - /// + /// + /// /// public static PaperFormat A0 => new(33.1102m, 46.811m); /// - /// + /// + /// /// public static PaperFormat A1 => new(23.3858m, 33.1102m); /// - /// + /// + /// /// public static PaperFormat A2 => new(16.5354m, 23.3858m); /// - /// + /// + /// /// public static PaperFormat A3 => new(11.6929m, 16.5354m); /// - /// + /// + /// /// public static PaperFormat A4 => new(8.2677m, 11.6929m); /// - /// + /// + /// /// public static PaperFormat A5 => new(5.8268m, 8.2677m); /// - /// + /// + /// /// public static PaperFormat A6 => new(4.1339m, 5.8268m); /// - /// + /// + /// /// public decimal Width { get; set; } /// - /// + /// + /// /// public decimal Height { get; set; } /// - /// + /// + /// /// /// /// diff --git a/src/BootstrapBlazor/Options/PdfOptions.cs b/src/BootstrapBlazor/Options/PdfOptions.cs index d7993899b1e..d2ed48a3916 100644 --- a/src/BootstrapBlazor/Options/PdfOptions.cs +++ b/src/BootstrapBlazor/Options/PdfOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,37 +6,44 @@ namespace BootstrapBlazor.Components; /// -/// PdfOptions 实例用于设置导出 Pdf 相关选项 +/// PdfOptions 实例用于设置导出 Pdf 相关选项 +/// PdfOptions instance used to set export Pdf related options /// public class PdfOptions { /// - /// 获得/设置 是否横向打印 默认 false + /// 获得/设置 是否横向打印 默认 false + /// Get/Set whether to print landscape default false /// public bool Landscape { get; set; } /// - /// 获得/设置 是否打印背景色 默认 false + /// 获得/设置 是否打印背景色 默认 false + /// Get/Set whether to print background default false /// public bool PrintBackground { get; set; } /// - /// 获得/设置 纸张格式 默认 A4 + /// 获得/设置 纸张格式 默认 A4 + /// Get/Set paper format default A4 /// public PaperFormat Format { get; set; } = PaperFormat.A4; /// - /// 获得/设置 是否显示页眉页脚 默认 false + /// 获得/设置 是否显示页眉页脚 默认 false + /// Get/Set whether to display header and footer default false /// public bool DisplayHeaderFooter { get; set; } /// - /// 获得/设置 放大比例 默认 1 取值 0.1 到 2 之间 + /// 获得/设置 放大比例 默认 1 取值 0.1 到 2 之间 + /// Get/Set scale default 1 between 0.1 and 2 /// public decimal Scale { get; set; } = 1; /// - /// 获得/设置 页面边距 默认 未设置 + /// 获得/设置 页面边距 默认 未设置 + /// Get/Set page margin default not set /// public MarginOptions MarginOptions { get; set; } = new(); } diff --git a/src/BootstrapBlazor/Options/QueryPageOptions.cs b/src/BootstrapBlazor/Options/QueryPageOptions.cs index 9e41df89652..498040c05e1 100644 --- a/src/BootstrapBlazor/Options/QueryPageOptions.cs +++ b/src/BootstrapBlazor/Options/QueryPageOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,110 +8,130 @@ namespace BootstrapBlazor.Components; /// -/// 查询条件实体类 +/// 查询条件实体类 +/// Query condition entity class /// [JsonConverter(typeof(JsonQueryPageOptionsConverter))] public class QueryPageOptions { /// - /// 获得/设置 模糊查询关键字 + /// 获得/设置 模糊查询关键字 + /// Get/Set search text /// public string? SearchText { get; set; } /// - /// 获得 排序字段名称 由 设置 + /// 获得 排序字段名称 由 设置 + /// Get sort name set by /// public string? SortName { get; set; } /// - /// 获得 排序方式 由 设置 + /// 获得 排序方式 由 设置 + /// Get sort order set by /// public SortOrder SortOrder { get; set; } /// - /// 获得/设置 多列排序集合 默认为 Empty 内部为 "Name" "Age desc" 由 设置 + /// 获得/设置 多列排序集合 默认为 Empty 内部为 "Name" "Age desc" 由 设置 + /// Get/Set multi-column sort list default Empty internal "Name" "Age desc" set by /// public List SortList { get; } = new(10); /// - /// 获得/设置 自定义多列排序集合 默认为 Empty 内部为 "Name" "Age desc" 由 设置 + /// 获得/设置 自定义多列排序集合 默认为 Empty 内部为 "Name" "Age desc" 由 设置 + /// Get/Set custom multi-column sort list default Empty internal "Name" "Age desc" set by /// public List AdvancedSortList { get; } = new(10); /// - /// 获得 搜索条件绑定模型 未设置 时为 泛型模型 + /// 获得 搜索条件绑定模型 未设置 时为 泛型模型 + /// Get search model when is not set, it is generic model /// public object? SearchModel { get; set; } /// - /// 获得 当前页码 首页为 第一页 + /// 获得 当前页码 首页为 第一页 + /// Get current page index, first page is 1 /// public int PageIndex { get; set; } = 1; /// - /// 获得 请求读取数据开始行 默认 0 + /// 获得 请求读取数据开始行 默认 0 + /// Get start index default 0 /// - /// 开启虚拟滚动 时使用 + /// 开启虚拟滚动 时使用Used when enables virtual scroll public int StartIndex { get; set; } /// - /// 获得 每页条目数量 由 设置 + /// 获得 每页条目数量 由 设置 + /// Get items per page set by and /// public int PageItems { get; set; } = 20; /// - /// 获得 是否分页查询模式 默认为 false 由 设置 + /// 获得 是否分页查询模式 默认为 false 由 设置 + /// Get whether is pagination query mode default false set by /// public bool IsPage { get; set; } /// - /// 获得 是否为虚拟滚动查询模式 默认为 false 由 设置 + /// 获得 是否为虚拟滚动查询模式 默认为 false 由 设置 + /// Get whether is virtual scroll query mode default false set by /// public bool IsVirtualScroll { get; set; } /// - /// 获得 通过列集合中的 列与 拼装 IFilterAction 集合 + /// 获得 通过列集合中的 列与 拼装 IFilterAction 集合 + /// Get IFilterAction collection assembled by columns in column collection and /// [Obsolete("This property is obsolete. Use Searches instead. 已过期,请使用 Searches 参数")] [ExcludeFromCodeCoverage] public List Searchs => Searches; /// - /// 获得 通过列集合中的 列与 拼装 IFilterAction 集合 + /// 获得 通过列集合中的 列与 拼装 IFilterAction 集合 + /// Get IFilterAction collection assembled by columns in column collection and /// public List Searches { get; } = new(20); /// - /// 获得 中过滤条件 模板中的条件请使用 获得 + /// 获得 中过滤条件 模板中的条件请使用 获得 + /// Gets 中过滤条件 template中的条件请使用 Gets /// [Obsolete("This property is obsolete. Use CustomerSearches instead. 已过期,请使用 CustomerSearches 参数")] [ExcludeFromCodeCoverage] public List CustomerSearchs => CustomerSearches; /// - /// 获得 中过滤条件 模板中的条件请使用 获得 + /// 获得 中过滤条件 模板中的条件请使用 获得 + /// Get filter conditions in please use to get conditions in template /// public List CustomerSearches { get; } = new(20); /// - /// 获得 中过滤条件 + /// 获得 中过滤条件 + /// Get filter conditions in /// [Obsolete("This property is obsolete. Use AdvanceSearches instead. 已过期,请使用 AdvanceSearches 参数")] [ExcludeFromCodeCoverage] public List AdvanceSearchs => AdvanceSearches; /// - /// 获得 中过滤条件 + /// 获得 中过滤条件 + /// Get filter conditions in /// public List AdvanceSearches { get; } = new(20); /// - /// 获得 过滤条件集合 等同于 值 + /// 获得 过滤条件集合 等同于 + /// Get filter condition collection equivalent to value /// public List Filters { get; } = new(20); /// - /// 获得 是否为首次查询 默认 false + /// 获得 是否为首次查询 默认 false + /// Get whether is first query default false /// /// 组件首次查询数据时为 true [Obsolete("This property is obsolete. Use IsFirstQuery. 已弃用单词拼写错误,请使用 IsFirstQuery")] @@ -119,13 +139,15 @@ public class QueryPageOptions public bool IsFristQuery { get => IsFirstQuery; set => IsFirstQuery = value; } /// - /// 获得 是否为首次查询 默认 false + /// 获得 是否为首次查询 默认 false + /// Get whether is first query default false /// /// 组件首次查询数据时为 true public bool IsFirstQuery { get; set; } /// - /// 获得 是否为刷新分页查询 默认 false + /// 获得 是否为刷新分页查询 默认 false + /// Get whether is refresh pagination query default false /// public bool IsTriggerByPagination { get; set; } } diff --git a/src/BootstrapBlazor/Options/ScrollIntoViewOptions.cs b/src/BootstrapBlazor/Options/ScrollIntoViewOptions.cs index 134949509f1..6309a96bd36 100644 --- a/src/BootstrapBlazor/Options/ScrollIntoViewOptions.cs +++ b/src/BootstrapBlazor/Options/ScrollIntoViewOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,108 +8,126 @@ namespace BootstrapBlazor.Components; /// -/// ScrollIntoViewOptions 配置类 +/// ScrollIntoViewOptions 配置类 +/// ScrollIntoViewOptions configuration class /// public class ScrollIntoViewOptions { /// - /// Determines whether scrolling is instant or animates smoothly + /// Determines 是否 scrolling is instant or animates smoothly + /// Determines whether scrolling is instant or animates smoothly /// public ScrollIntoViewBehavior Behavior { get; set; } /// - /// Defines the vertical alignment of the element within the scrollable ancestor container + /// Defines the vertical alignment of the element within the scrollable ancestor container + /// Defines the vertical alignment of the element within the scrollable ancestor container /// public ScrollIntoViewBlock Block { get; set; } /// - /// Defines the horizontal alignment of the element within the scrollable ancestor container + /// Defines the horizontal alignment of the element within the scrollable ancestor container + /// Defines the horizontal alignment of the element within the scrollable ancestor container /// public ScrollIntoViewInline Inline { get; set; } } /// -/// Determines whether scrolling is instant or animates smoothly. This option is a string which must take one of the following values +/// Determines 是否 scrolling is instant or animates smoothly. This option is a string which must take one of the following values +/// Determines whether scrolling is instant or animates smoothly. This option is a string which must take one of the following values /// [JsonEnumConverter(true)] public enum ScrollIntoViewBehavior { /// - /// scrolling should animate smoothly + /// scrolling should animate smoothly + /// scrolling should animate smoothly /// [Description("smooth")] Smooth, /// - /// scrolling should happen instantly in a single jump + /// scrolling should happen instantly in a single jump + /// scrolling should happen instantly in a single jump /// [Description("instant")] Instant, /// - /// scroll behavior is determined by the computed value of scroll-behavior + /// scroll behavior is determined by the computed value of scroll-behavior + /// scroll behavior is determined by the computed value of scroll-behavior /// [Description("auto")] Auto } /// -/// Defines vertical alignment +/// Defines vertical alignment +/// Defines vertical alignment /// [JsonEnumConverter(true)] public enum ScrollIntoViewBlock { /// - /// Start + /// Start + /// Start /// [Description("start")] Start, /// - /// Center + /// Center + /// Center /// [Description("center")] Center, /// - /// End + /// End + /// End /// [Description("end")] End, /// - /// Nearest + /// Nearest + /// Nearest /// [Description("nearest")] Nearest } /// -/// Defines horizontal alignment +/// Defines horizontal alignment +/// Defines horizontal alignment /// [JsonEnumConverter(true)] public enum ScrollIntoViewInline { /// - /// Start + /// Start + /// Start /// [Description("start")] Start, /// - /// Center + /// Center + /// Center /// [Description("center")] Center, /// - /// End + /// End + /// End /// [Description("end")] End, /// - /// Nearest + /// Nearest + /// Nearest /// [Description("nearest")] Nearest diff --git a/src/BootstrapBlazor/Options/ScrollOptions.cs b/src/BootstrapBlazor/Options/ScrollOptions.cs index 4f6fbe5664a..36150fc37e6 100644 --- a/src/BootstrapBlazor/Options/ScrollOptions.cs +++ b/src/BootstrapBlazor/Options/ScrollOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// ScrollOptions 配置类 +/// ScrollOptions 配置类 +/// ScrollOptions configuration class /// public class ScrollOptions { /// - /// 获得/设置 滚动条宽度 默认 5px + /// 获得/设置 滚动条宽度 默认 5px + /// Get/Set scroll width default 5px /// public int ScrollWidth { get; set; } = 5; /// - /// 获得/设置 滚动条鼠标悬浮宽度 默认 5px + /// 获得/设置 滚动条鼠标悬浮宽度 默认 5px + /// Get/Set scroll hover width default 5px /// public int ScrollHoverWidth { get; set; } = 5; } diff --git a/src/BootstrapBlazor/Options/StepSettings.cs b/src/BootstrapBlazor/Options/StepSettings.cs index 47f53f220fe..b4369e86ca9 100644 --- a/src/BootstrapBlazor/Options/StepSettings.cs +++ b/src/BootstrapBlazor/Options/StepSettings.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,42 +6,50 @@ namespace BootstrapBlazor.Components; /// -/// StepSettings 配置类 +/// StepSettings 配置类 +/// StepSettings configuration class /// public class StepSettings { /// - /// 获得/设置 int 数据类型步长 默认 null 未设置 + /// 获得/设置 int 数据类型步长 默认 null 未设置 + /// Get/Set int type step default null /// public int? Int { get; set; } /// - /// 获得/设置 long 数据类型步长 默认 null 未设置 + /// 获得/设置 long 数据类型步长 默认 null 未设置 + /// Get/Set long type step default null /// public int? Long { get; set; } /// - /// 获得/设置 short 数据类型步长 默认 null 未设置 + /// 获得/设置 short 数据类型步长 默认 null 未设置 + /// Get/Set short type step default null /// public int? Short { get; set; } /// - /// 获得/设置 float 数据类型步长 默认 null 未设置 + /// 获得/设置 float 数据类型步长 默认 null 未设置 + /// Get/Set float type step default null /// public float? Float { get; set; } /// - /// 获得/设置 double 数据类型步长 默认 null 未设置 + /// 获得/设置 double 数据类型步长 默认 null 未设置 + /// Get/Set double type step default null /// public double? Double { get; set; } /// - /// 获得/设置 decimal 数据类型步长 默认 null 未设置 + /// 获得/设置 decimal 数据类型步长 默认 null 未设置 + /// Get/Set decimal type step default null /// public decimal? Decimal { get; set; } /// - /// 获得步长字符串 + /// 获得步长字符串 + /// Get step string /// /// /// diff --git a/src/BootstrapBlazor/Options/TabItemMenuBindOptions.cs b/src/BootstrapBlazor/Options/TabItemMenuBindOptions.cs index 504dfc42687..d50da3dee6b 100644 --- a/src/BootstrapBlazor/Options/TabItemMenuBindOptions.cs +++ b/src/BootstrapBlazor/Options/TabItemMenuBindOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 标签与菜单捆绑配置项 +/// 标签与菜单捆绑配置项 +/// Tab and menu binding options /// public class TabItemBindOptions { /// - /// 获得/设置 集合 + /// 获得/设置 集合 + /// Get/Set collection /// public Dictionary Binders { get; set; } = []; } diff --git a/src/BootstrapBlazor/Options/TabItemTextOptions.cs b/src/BootstrapBlazor/Options/TabItemTextOptions.cs index 922439d01ff..cbdefb2faea 100644 --- a/src/BootstrapBlazor/Options/TabItemTextOptions.cs +++ b/src/BootstrapBlazor/Options/TabItemTextOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,33 +6,39 @@ namespace BootstrapBlazor.Components; /// -/// 菜单与标签捆绑配置类 +/// 菜单与标签捆绑配置类 +/// Menu and tab binding configuration class /// internal class TabItemTextOptions { /// - /// 获得/设置 Tab 标签文本 + /// 获得/设置 Tab 标签文本 + /// Get/Set Tab label text /// public string? Text { get; set; } /// - /// 获得/设置 图标字符串 + /// 获得/设置 图标字符串 + /// Get/Set icon string /// public string? Icon { get; set; } /// - /// 获得/设置 是否激活 默认为 true + /// 获得/设置 是否激活 默认为 true + /// Get/Set whether active default true /// /// public bool IsActive { get; set; } = true; /// - /// 获得/设置 当前 TabItem 是否可关闭 默认为 true + /// 获得/设置 当前 TabItem 是否可关闭 默认为 true + /// Get/Set whether current TabItem is closable default true /// public bool Closable { get; set; } = true; /// - /// 重置方法 + /// 重置方法 + /// Reset method /// public void Reset() { @@ -43,7 +49,8 @@ public void Reset() } /// - /// 是否可用方法 + /// 是否可用方法 + /// Is valid method /// /// public bool Valid() => Text != null; diff --git a/src/BootstrapBlazor/Options/TableExportOptions.cs b/src/BootstrapBlazor/Options/TableExportOptions.cs index fd4ce446bc0..7f64cf98e83 100644 --- a/src/BootstrapBlazor/Options/TableExportOptions.cs +++ b/src/BootstrapBlazor/Options/TableExportOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,45 +8,52 @@ namespace BootstrapBlazor.Components; /// -/// Configuration class for exporting tables to Excel +/// Configuration class for exporting tables to Excel +/// Configuration class for exporting tables to Excel /// public class TableExportOptions { /// - /// Gets or sets whether to use formatting. Default is true. - /// If or is set, the formatted value will be used. + /// Gets or sets whether to use formatting. Default is true. If or is set, the formatted value will be used. + /// Gets or sets whether to use formatting. Default is true. If or is set, the formatted value will be used. /// /// Note: After formatting, the returned value is a string, which may change the original value type. public bool EnableFormat { get; set; } = true; /// - /// Gets or sets whether to use Lookup. Default is true. + /// Gets or sets whether to use Lookup. Default is true. + /// Gets or sets whether to use Lookup. Default is true. /// public bool EnableLookup { get; set; } = true; /// - /// Gets or sets whether to merge array-type values. Default is true. + /// Gets or sets whether to merge array-type values. Default is true. + /// Gets or sets whether to merge array-type values. Default is true. /// public bool AutoMergeArray { get; set; } = true; /// - /// Gets or sets whether to use the tag for enum types. Default is true. + /// Gets or sets whether to use the tag for enum types. Default is true. + /// Gets or sets whether to use the tag for enum types. Default is true. /// public bool UseEnumDescription { get; set; } = true; /// - /// Gets or sets the delimiter used when merging array-type values. Default is a comma. + /// Gets or sets the delimiter used when merging array-type values. Default is a comma. + /// Gets or sets the delimiter used when merging array-type values. Default is a comma. /// /// Note: After formatting, the returned value is a string, which may change the original value type. public string ArrayDelimiter { get; set; } = ","; /// - /// Gets or sets whether to enable Excel auto-filtering. Default is true. + /// Gets or sets whether to enable Excel auto-filtering. Default is true. + /// Gets or sets whether to enable Excel auto-filtering. Default is true. /// public bool EnableAutoFilter { get; set; } = true; /// - /// Gets or sets whether to enable Excel auto-width. Default is false. + /// Gets or sets whether to enable Excel auto-width. Default is false. + /// Gets or sets whether to enable Excel auto-width. Default is false. /// public bool EnableAutoWidth { get; set; } } diff --git a/src/BootstrapBlazor/Options/TableSettings.cs b/src/BootstrapBlazor/Options/TableSettings.cs index bfbf8ed3c8f..d56f8189201 100644 --- a/src/BootstrapBlazor/Options/TableSettings.cs +++ b/src/BootstrapBlazor/Options/TableSettings.cs @@ -6,47 +6,56 @@ namespace BootstrapBlazor.Components; /// -/// TableSettings 表格组件全局默认设置 +/// TableSettings 表格组件全局默认设置 +/// TableSettings component global default settings /// public class TableSettings { /// - /// 获得/设置 复选框宽度 默认 36 + /// 获得/设置 复选框宽度 默认 36 + /// Get/Set checkbox column width default 36 /// public int CheckboxColumnWidth { get; set; } = 36; /// - /// 获得/设置 复选框宽度 默认 28 + /// 获得/设置 复选框宽度 默认 28 + /// Get/Set checkbox column compact width default 28 /// public int CheckboxColumnCompactWidth { get; set; } = 28; /// - /// 获得/设置 明细行 Row Header 宽度 默认 24 + /// 获得/设置 明细行 Row Header 宽度 默认 24 + /// Get/Set detail row header width default 24 /// public int DetailColumnWidth { get; set; } = 24; /// - /// 获得/设置 显示文字的复选框列宽度 默认 80 + /// 获得/设置 显示文字的复选框列宽度 默认 80 + /// Get/Set show checkbox text column width default 80 /// public int ShowCheckboxTextColumnWidth { get; set; } = 80; /// - /// 获得/设置 行号列宽度 默认 60 + /// 获得/设置 行号列宽度 默认 60 + /// Get/Set line no column width default 60 /// public int LineNoColumnWidth { get; set; } = 60; /// - /// 获得/设置 列最小宽度 默认 64 + /// 获得/设置 列最小宽度 默认 64 + /// Get/Set column min width default 64 /// public int ColumnMinWidth { get; set; } = 64; /// - /// 获得/设置 表格渲染模式 + /// 获得/设置 表格渲染模式 + /// Get/Set table render mode /// public TableRenderMode? TableRenderMode { get; set; } /// - /// 获得/设置 TableExportExcelOptions 配置 默认为不为空 + /// 获得/设置 TableExportExcelOptions 配置 默认为不为空 + /// Get/Set TableExportExcelOptions configuration default not null /// public TableExportOptions TableExportOptions { get; set; } = new(); } diff --git a/src/BootstrapBlazor/Options/ThrottleOptions.cs b/src/BootstrapBlazor/Options/ThrottleOptions.cs index 98c422fec65..dd271195662 100644 --- a/src/BootstrapBlazor/Options/ThrottleOptions.cs +++ b/src/BootstrapBlazor/Options/ThrottleOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// 限流配置类 +/// 限流配置类 +/// Throttle configuration class /// public class ThrottleOptions { /// - /// 获得/设置 限流时长 默认 500 单位毫秒 + /// 获得/设置 限流时长 默认 500 单位毫秒 + /// Get/Set throttle interval default 500 ms /// public TimeSpan Interval { get; set; } = TimeSpan.FromMilliseconds(500); /// - /// 获得/设置 是否执行结束后开始延时 默认 false + /// 获得/设置 是否执行结束后开始延时 默认 false + /// Get/Set whether to delay after execution default false /// public bool DelayAfterExecution { get; set; } /// - /// 获得/设置 发生错误时是否重置时长 默认 false + /// 获得/设置 发生错误时是否重置时长 默认 false + /// Get/Set whether to reset interval on exception default false /// public bool ResetIntervalOnException { get; set; } } diff --git a/src/BootstrapBlazor/Options/WebClientOptions.cs b/src/BootstrapBlazor/Options/WebClientOptions.cs index e18c2f63103..7b2f2f29687 100644 --- a/src/BootstrapBlazor/Options/WebClientOptions.cs +++ b/src/BootstrapBlazor/Options/WebClientOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// WebClient +/// WebClient +/// WebClient /// public class WebClientOptions { /// - /// 获得/设置 是否开启 IP 定位功能 默认 false 未开启 + /// 获得/设置 是否开启 IP 定位功能 默认 false 未开启 + /// Get/Set whether to enable IP locator feature default false /// public bool EnableIpLocator { get; set; } } diff --git a/src/BootstrapBlazor/Router/AttributeAuthorizeDataCache.cs b/src/BootstrapBlazor/Router/AttributeAuthorizeDataCache.cs index 1cd8b602a14..ea5476fa0b5 100644 --- a/src/BootstrapBlazor/Router/AttributeAuthorizeDataCache.cs +++ b/src/BootstrapBlazor/Router/AttributeAuthorizeDataCache.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Router/RouteContext.cs b/src/BootstrapBlazor/Router/RouteContext.cs index 185d481c313..f43542cc7cf 100644 --- a/src/BootstrapBlazor/Router/RouteContext.cs +++ b/src/BootstrapBlazor/Router/RouteContext.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Router/RouteTableFactory.cs b/src/BootstrapBlazor/Router/RouteTableFactory.cs index c3519ef9dad..332916d574b 100644 --- a/src/BootstrapBlazor/Router/RouteTableFactory.cs +++ b/src/BootstrapBlazor/Router/RouteTableFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -15,7 +15,8 @@ internal static class RouteTableFactory private static readonly HashSet _assemblies = new(); /// - /// + /// + /// /// /// /// diff --git a/src/BootstrapBlazor/Services/AjaxService.cs b/src/BootstrapBlazor/Services/AjaxService.cs index b03db8e7821..50eb80d62ae 100644 --- a/src/BootstrapBlazor/Services/AjaxService.cs +++ b/src/BootstrapBlazor/Services/AjaxService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// Ajax 服务类 +/// Ajax 服务类 +/// Ajax Service /// public class AjaxService(IJSRuntime jSRuntime) { @@ -18,7 +19,8 @@ public class AjaxService(IJSRuntime jSRuntime) private Task LoadModule() => jSRuntime.LoadModuleByName("ajax"); /// - /// 调用Ajax方法发送请求 + /// 调用Ajax方法发送请求 + /// Invoke Ajax method to send request /// public async Task InvokeAsync(AjaxOption option, CancellationToken token = default) { @@ -27,7 +29,8 @@ public class AjaxService(IJSRuntime jSRuntime) } /// - /// 调用 Goto 方法跳转其他页面 + /// 调用 Goto 方法跳转其他页面 + /// Invoke Goto method to navigate to other page /// /// /// diff --git a/src/BootstrapBlazor/Services/ArchiveEntry.cs b/src/BootstrapBlazor/Services/ArchiveEntry.cs index efd21c63717..caf5597cfd7 100644 --- a/src/BootstrapBlazor/Services/ArchiveEntry.cs +++ b/src/BootstrapBlazor/Services/ArchiveEntry.cs @@ -6,22 +6,26 @@ using System.IO.Compression; /// -/// 归档项实体类 +/// 归档项实体类 +/// Archive Entry Entity Class /// public readonly record struct ArchiveEntry { /// - /// 获得 物理文件 + /// 获得 物理文件 + /// Get Physical File /// public string SourceFileName { get; init; } /// - /// 获得 归档项 + /// 获得 归档项 + /// Get Archive Entry /// public string EntryName { get; init; } /// - /// 获得 压缩配置 + /// 获得 压缩配置 + /// Get Compression Configuration /// public CompressionLevel? CompressionLevel { get; init; } } diff --git a/src/BootstrapBlazor/Services/Bluetooth/BluetoothDeviceInfo.cs b/src/BootstrapBlazor/Services/Bluetooth/BluetoothDeviceInfo.cs index 9fee44b98a7..7bd3b68650b 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/BluetoothDeviceInfo.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/BluetoothDeviceInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,84 +6,100 @@ namespace BootstrapBlazor.Components; /// -/// 蓝牙设备信息 +/// 蓝牙设备信息 +/// Bluetooth Device Info /// public class BluetoothDeviceInfo { /// - /// 获得/设置 ManufacturerName + /// 获得/设置 ManufacturerName + /// Get/Set ManufacturerName /// public string? ManufacturerName { get; set; } /// - /// 获得/设置 ModelNumber + /// 获得/设置 ModelNumber + /// Get/Set ModelNumber /// public string? ModelNumber { get; set; } /// - /// 获得/设置 HardwareRevision + /// 获得/设置 HardwareRevision + /// Get/Set HardwareRevision /// public string? HardwareRevision { get; set; } /// - /// 获得/设置 FirmwareRevision + /// 获得/设置 FirmwareRevision + /// Get/Set FirmwareRevision /// public string? FirmwareRevision { get; set; } /// - /// 获得/设置 SoftwareRevision + /// 获得/设置 SoftwareRevision + /// Get/Set SoftwareRevision /// public string? SoftwareRevision { get; set; } /// - /// 获得/设置 SystemId + /// 获得/设置 SystemId + /// Get/Set SystemId /// public SystemId? SystemId { get; set; } /// - /// 获得/设置 IEEERegulatoryCertificationDataList + /// 获得/设置 IEEERegulatoryCertificationDataList + /// Get/Set IEEERegulatoryCertificationDataList /// public string? IEEERegulatoryCertificationDataList { get; set; } /// - /// 获得/设置 PnPID + /// 获得/设置 PnPID + /// Get/Set PnPID /// public PnPID? PnPID { get; set; } } /// -/// SystemId 类 +/// SystemId 类 +/// SystemId Class /// public class SystemId { /// - /// 获得/设置 ManufacturerIdentifier + /// 获得/设置 ManufacturerIdentifier + /// Get/Set ManufacturerIdentifier /// public string? ManufacturerIdentifier { get; set; } /// - /// 获得/设置 OrganizationallyUniqueIdentifier + /// 获得/设置 OrganizationallyUniqueIdentifier + /// Get/Set OrganizationallyUniqueIdentifier /// public string? OrganizationallyUniqueIdentifier { get; set; } } /// -/// PnPID 类 +/// PnPID 类 +/// PnPID Class /// public class PnPID { /// - /// 获得/设置 VendorIdSource + /// 获得/设置 VendorIdSource + /// Get/Set VendorIdSource /// public string? VendorIdSource { get; set; } /// - /// 获得/设置 ProductId + /// 获得/设置 ProductId + /// Get/Set ProductId /// public string? ProductId { get; set; } /// - /// 获得/设置 ProductVersion + /// 获得/设置 ProductVersion + /// Get/Set ProductVersion /// public string? ProductVersion { get; set; } } diff --git a/src/BootstrapBlazor/Services/Bluetooth/BluetoothFilter.cs b/src/BootstrapBlazor/Services/Bluetooth/BluetoothFilter.cs index 20cc682a844..ceaef614ec0 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/BluetoothFilter.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/BluetoothFilter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,36 +8,42 @@ namespace BootstrapBlazor.Components; /// -/// BluetoothFilter 类 +/// BluetoothFilter 类 +/// BluetoothFilter Class /// public class BluetoothFilter { /// - /// An array of values indicating the Bluetooth GATT (Generic Attribute Profile) services that a Bluetooth device must support. Each value can be a valid name from the GATT assigned services list, such as 'battery_service' or 'blood_pressure'. You can also pass a full service UUID such as '0000180F-0000-1000-8000-00805f9b34fb' or the short 16-bit (0x180F) or 32-bit alias. Note that these are the same values that can be passed to BluetoothUUID.getService(). + /// An array of values indicating the Bluetooth GATT (Generic Attribute Profile) services that a Bluetooth device must support. Each value can be a valid name from the GATT assigned services list, such as 'battery_service' or 'blood_pressure'. You can also pass a full service UUID such as '0000180F-0000-1000-8000-00805f9b34fb' or the short 16-bit (0x180F) or 32-bit alias. Note that these are the same values that can be passed to BluetoothUUID.getService(). + /// An array of values indicating the Bluetooth GATT (Generic Attribute Profile) services that a Bluetooth device must support. Each value can be a valid name from the GATT assigned services list, such as 'battery_service' or 'blood_pressure'. You can also pass a full service UUID such as '0000180F-0000-1000-8000-00805f9b34fb' or the short 16-bit (0x180F) or 32-bit alias. Note that these are the same values that can be passed to BluetoothUUID.getService(). /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public List? Services { get; set; } /// - /// A string containing the precise name of the device to match against. + /// A string containing the precise name of the device to match against. + /// A string containing the precise name of the device to match against. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Name { get; set; } /// - /// A string containing the name prefix to match against. All devices that have a name starting with this string will be matched. + /// A string containing the name prefix to match against. All devices that have a name starting with this string will be matched. + /// A string containing the name prefix to match against. All devices that have a name starting with this string will be matched. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? NamePrefix { get; set; } /// - /// An array of objects matching against manufacturer data in the Bluetooth Low Energy (BLE) advertising packets. + /// An array of objects matching against manufacturer 数据 in the Bluetooth Low Energy (BLE) advertising packets. + /// An array of objects matching against manufacturer data in the Bluetooth Low Energy (BLE) advertising packets. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public List? ManufacturerData { get; set; } /// - /// An array of objects matching against service data in the Bluetooth Low Energy (BLE) advertising packets. + /// An array of objects matching against service 数据 in the Bluetooth Low Energy (BLE) advertising packets. + /// An array of objects matching against service data in the Bluetooth Low Energy (BLE) advertising packets. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public List? ServiceData { get; set; } diff --git a/src/BootstrapBlazor/Services/Bluetooth/BluetoothManufacturerDataFilter.cs b/src/BootstrapBlazor/Services/Bluetooth/BluetoothManufacturerDataFilter.cs index d2daba7e88d..091ad9ebf99 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/BluetoothManufacturerDataFilter.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/BluetoothManufacturerDataFilter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,24 +8,28 @@ namespace BootstrapBlazor.Components; /// -/// BluetoothManufacturerDataFilter 配置类 +/// BluetoothManufacturerDataFilter 配置类 +/// BluetoothManufacturerDataFilter Configuration Class /// public class BluetoothManufacturerDataFilter { /// - /// A mandatory number identifying the manufacturer of the device. Company identifiers are listed in the Bluetooth specification Assigned numbers, Section 7. For example, to match against devices manufactured by "Digianswer A/S", with assigned hex number 0x000C, you would specify 12. + /// A mandatory number identifying the manufacturer of the device. Company identifiers are listed in the Bluetooth specification Assigned numbers, Section 7. For example, to match against devices manufactured by "Digianswer A/S", with assigned hex number 0x000C, you would specify 12. + /// A mandatory number identifying the manufacturer of the device. Company identifiers are listed in the Bluetooth specification Assigned numbers, Section 7. For example, to match against devices manufactured by "Digianswer A/S", with assigned hex number 0x000C, you would specify 12. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? CompanyIdentifier { get; set; } /// - /// The data prefix. A buffer containing values to match against the values at the start of the advertising manufacturer data. + /// 数据 prefix. A buffer containing values to match against the values at the start of the advertising manufacturer 数据. + /// The data prefix. A buffer containing values to match against the values at the start of the advertising manufacturer data. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? DataPrefix { get; set; } /// - /// This allows you to match against bytes within the manufacturer data, by masking some bytes of the service data dataPrefix. + /// This allows you to match against bytes within the manufacturer 数据, by masking some bytes of the service 数据 数据Prefix. + /// This allows you to match against bytes within the manufacturer data, by masking some bytes of the service data dataPrefix. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Mask { get; set; } diff --git a/src/BootstrapBlazor/Services/Bluetooth/BluetoothRequestOptions.cs b/src/BootstrapBlazor/Services/Bluetooth/BluetoothRequestOptions.cs index abcfb3cfa15..1ebaad94178 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/BluetoothRequestOptions.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/BluetoothRequestOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,43 +9,50 @@ namespace BootstrapBlazor.Components; /// -/// BluetoothRequestOptions 参数类 +/// BluetoothRequestOptions 参数类 +/// BluetoothRequestOptions Parameter Class /// public class BluetoothRequestOptions { /// - /// An array of filter objects indicating the properties of devices that will be matched. To match a filter object, a device must match all the values of the filter: all its specified services, name, namePrefix, and so on + /// An array of filter objects indicating the properties of devices that will be matched. To match a filter object, a device must match all the values of the filter: all its specified services, name, namePrefix, and so on + /// An array of filter objects indicating the properties of devices that will be matched. To match a filter object, a device must match all the values of the filter: all its specified services, name, namePrefix, and so on /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public List? Filters { get; set; } /// - /// An array of filter objects indicating the characteristics of devices that will be excluded from matching. The properties of the array elements are the same as for . + /// An array of filter objects indicating the characteristics of devices that will be excluded from matching. properties of the array elements are the same as for . + /// An array of filter objects indicating the characteristics of devices that will be excluded from matching. The properties of the array elements are the same as for . /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public List? ExclusionFilters { get; set; } /// - /// An array of optional service identifiers. + /// An array of optional service identifiers. + /// An array of optional service identifiers. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public List? OptionalServices { get; set; } /// - /// An optional array of integer manufacturer codes. This takes the same values as companyIdentifier. + /// An optional array of integer manufacturer codes. This takes the same values as companyIdentifier. + /// An optional array of integer manufacturer codes. This takes the same values as companyIdentifier. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public List? OptionalManufacturerData { get; set; } /// - /// A boolean value indicating that the requesting script can accept all Bluetooth devices. The default is false. + /// A boolean value indicating that the requesting script can accept all Bluetooth devices. default is false. + /// A boolean value indicating that the requesting script can accept all Bluetooth devices. The default is false. /// /// This option is appropriate when devices have not advertised enough information for filtering to be useful. When acceptAllDevices is set to true you should omit all filters and exclusionFilters, and you must set optionalServices to be able to use the returned device. [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] public bool AcceptAllDevices { get; set; } /// - /// 获得所有蓝牙服务 + /// 获得所有蓝牙服务 + /// Get All Bluetooth Services /// /// public static List GetAllServices() => typeof(BluetoothServicesEnum).GetEnumNames().Select(i => diff --git a/src/BootstrapBlazor/Services/Bluetooth/BluetoothServiceDataFilter.cs b/src/BootstrapBlazor/Services/Bluetooth/BluetoothServiceDataFilter.cs index 5c7ca8fa3dc..4e8cd48f3fd 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/BluetoothServiceDataFilter.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/BluetoothServiceDataFilter.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,24 +8,28 @@ namespace BootstrapBlazor.Components; /// -/// BluetoothServiceDataFilter 配置类 +/// BluetoothServiceDataFilter 配置类 +/// BluetoothServiceDataFilter Configuration Class /// public class BluetoothServiceDataFilter { /// - /// The GATT service name, the service UUID, or the UUID 16-bit or 32-bit form. This takes the same values as the elements of the services array. + /// GATT service name, the service UUID, or the UUID 16-bit or 32-bit form. This takes the same values as the elements of the services array. + /// The GATT service name, the service UUID, or the UUID 16-bit or 32-bit form. This takes the same values as the elements of the services array. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Service { get; set; } /// - /// The data prefix. A buffer containing values to match against the values at the start of the advertising service data. + /// 数据 prefix. A buffer containing values to match against the values at the start of the advertising service 数据. + /// The data prefix. A buffer containing values to match against the values at the start of the advertising service data. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? DataPrefix { get; set; } /// - /// This allows you to match against bytes within the manufacturer data, by masking some bytes of the service data dataPrefix. + /// This allows you to match against bytes within the manufacturer 数据, by masking some bytes of the service 数据 数据Prefix. + /// This allows you to match against bytes within the manufacturer data, by masking some bytes of the service data dataPrefix. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public string? Mask { get; set; } diff --git a/src/BootstrapBlazor/Services/Bluetooth/BluetoothServices.cs b/src/BootstrapBlazor/Services/Bluetooth/BluetoothServices.cs index 7196ccebbe5..b4c15160dbb 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/BluetoothServices.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/BluetoothServices.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,278 +8,318 @@ namespace BootstrapBlazor.Components; /// -/// Bluetooth 设备服务枚举 +/// Bluetooth 设备服务枚举 +/// Bluetooth Device Service Enum /// public enum BluetoothServicesEnum { /// - /// 通用访问 + /// 通用访问 + /// Generic Access /// [JsonPropertyName("generic_access")] [BluetoothUUID("00001800-0000-1000-8000-00805f9b34fb")] GenericAccess, /// - /// 通用属性 + /// 通用属性 + /// Generic Attribute /// [JsonPropertyName("generic_attribute")] [BluetoothUUID("00001801-0000-1000-8000-00805f9b34fb")] GenericAttribute, /// - /// 即时闹钟 + /// 即时闹钟 + /// Immediate Alert /// [JsonPropertyName("immediate_alert")] [BluetoothUUID("00001802-0000-1000-8000-00805f9b34fb")] ImmediateAlert, /// - /// 连接丢失 + /// 连接丢失 + /// Link Loss /// [JsonPropertyName("link_loss")] [BluetoothUUID("00001803-0000-1000-8000-00805f9b34fb")] LinkLoss, /// - /// 发送功率 + /// 发送功率 + /// Tx Power /// [JsonPropertyName("tx_power")] [BluetoothUUID("00001804-0000-1000-8000-00805f9b34fb")] TxPower, /// - /// 当前时间 + /// 当前时间 + /// Current Time /// [JsonPropertyName("current_time")] [BluetoothUUID("00001805-0000-1000-8000-00805f9b34fb")] CurrentTime, /// - /// 参照时间更新 + /// 参照时间更新 + /// Reference Time Update /// [JsonPropertyName("reference_time_update")] [BluetoothUUID("00001806-0000-1000-8000-00805f9b34fb")] ReferenceTimeUpdate, /// - /// 下个日光节约时间(夏令时)更改 + /// 下个日光节约时间(夏令时)更改 + /// Next DST Change /// [JsonPropertyName("next_dst_change")] [BluetoothUUID("00001807-0000-1000-8000-00805f9b34fb")] NextDstChange, /// - /// 葡萄糖 + /// 葡萄糖 + /// Glucose /// [JsonPropertyName("glucose")] [BluetoothUUID("00001808-0000-1000-8000-00805f9b34fb")] Glucose, /// - /// 温度计 + /// 温度计 + /// Health Thermometer /// [JsonPropertyName("health_thermometer")] [BluetoothUUID("00001809-0000-1000-8000-00805f9b34fb")] HealthThermometer, /// - /// 设备信息 + /// 设备信息 + /// Device Information /// [JsonPropertyName("device_information")] [BluetoothUUID("0000180A-0000-1000-8000-00805f9b34fb")] DeviceInformation, /// - /// 心率 + /// 心率 + /// Heart Rate /// [JsonPropertyName("heart_rate")] [BluetoothUUID("0000180D-0000-1000-8000-00805f9b34fb")] HeartRate, /// - /// 手机报警状态 + /// 手机报警状态 + /// Phone Alert Status /// [JsonPropertyName("phone_alert_status")] [BluetoothUUID("0000180E-0000-1000-8000-00805f9b34fb")] PhoneAlertStatus, /// - /// 电池数据 + /// 电池数据 + /// Battery Service /// [JsonPropertyName("battery_service")] [BluetoothUUID("0000180F-0000-1000-8000-00805f9b34fb")] BatteryService, /// - /// 血压 + /// 血压 + /// Blood Pressure /// [JsonPropertyName("blood_pressure")] [BluetoothUUID("00001810-0000-1000-8000-00805f9b34fb")] BloodPressure, /// - /// 闹钟通知 + /// 闹钟通知 + /// Alert Notification /// [JsonPropertyName("alert_notification")] [BluetoothUUID("00001811-0000-1000-8000-00805f9b34fb")] AlertNotification, /// - /// HID设备 + /// HID设备 + /// Human Interface Device /// [JsonPropertyName("human_interface_device")] [BluetoothUUID("00001812-0000-1000-8000-00805f9b34fb")] HumanInterfaceDevice, /// - /// 扫描参数 + /// 扫描参数 + /// Scan Parameters /// [JsonPropertyName("scan_parameters")] [BluetoothUUID("00001813-0000-1000-8000-00805f9b34fb")] ScanParameters, /// - /// 跑步速度、节奏 + /// 跑步速度、节奏 + /// Running Speed and Cadence /// [JsonPropertyName("running_speed_and_cadence")] [BluetoothUUID("00001814-0000-1000-8000-00805f9b34fb")] RunningSpeedAndCadence, /// - /// 自动化输入输出 + /// 自动化输入输出 + /// Automation IO /// [JsonPropertyName("automation_io")] [BluetoothUUID("00001815-0000-1000-8000-00805f9b34fb")] AutomationIo, /// - /// 循环速度、节奏 + /// 循环速度、节奏 + /// Cycling Speed and Cadence /// [JsonPropertyName("cycling_speed_and_cadence")] [BluetoothUUID("00001816-0000-1000-8000-00805f9b34fb")] CyclingSpeedAndCadence, /// - /// 骑行能量 + /// 骑行能量 + /// Cycling Power /// [JsonPropertyName("cycling_power")] [BluetoothUUID("00001818-0000-1000-8000-00805f9b34fb")] CyclingPower, /// - /// 定位及导航 + /// 定位及导航 + /// Location and Navigation /// [JsonPropertyName("location_and_navigation")] [BluetoothUUID("00001819-0000-1000-8000-00805f9b34fb")] LocationAndNavigation, /// - /// 环境传感 + /// 环境传感 + /// Environmental Sensing /// [JsonPropertyName("environmental_sensing")] [BluetoothUUID("0000181A-0000-1000-8000-00805f9b34fb")] EnvironmentalSensing, /// - /// 身体组成 + /// 身体组成 + /// Body Composition /// [JsonPropertyName("body_composition")] [BluetoothUUID("0000181B-0000-1000-8000-00805f9b34fb")] BodyComposition, /// - /// 用户数据 + /// 用户数据 + /// User Data /// [JsonPropertyName("user_data")] [BluetoothUUID("0000181C-0000-1000-8000-00805f9b34fb")] UserData, /// - /// 体重秤 + /// 体重秤 + /// Weight Scale /// [JsonPropertyName("weight_scale")] [BluetoothUUID("0000181D-0000-1000-8000-00805f9b34fb")] WeightScale, /// - /// 设备绑定管理 + /// 设备绑定管理 + /// Bond Management /// [JsonPropertyName("bond_management")] [BluetoothUUID("0000181E-0000-1000-8000-00805f9b34fb")] BondManagement, /// - /// 动态血糖检测 + /// 动态血糖检测 + /// Continuous Glucose Monitoring /// [JsonPropertyName("continuous_glucose_monitoring")] [BluetoothUUID("0000181F-0000-1000-8000-00805f9b34fb")] ContinuousGlucoseMonitoring, /// - /// 互联网协议支持 + /// 互联网协议支持 + /// Internet Protocol Support /// [JsonPropertyName("internet_protocol_support")] [BluetoothUUID("00001820-0000-1000-8000-00805f9b34fb")] InternetProtocolSupport, /// - /// 室内定位 + /// 室内定位 + /// Indoor Positioning /// [JsonPropertyName("indoor_positioning")] [BluetoothUUID("00001821-0000-1000-8000-00805f9b34fb")] IndoorPositioning, /// - /// 脉搏血氧计 + /// 脉搏血氧计 + /// Pulse Oximeter /// [JsonPropertyName("pulse_oximeter")] [BluetoothUUID("00001822-0000-1000-8000-00805f9b34fb")] PulseOximeter, /// - /// HTTP代理 + /// HTTP代理 + /// HTTP Proxy /// [JsonPropertyName("http_proxy")] [BluetoothUUID("00001823-0000-1000-8000-00805f9b34fb")] HttpProxy, /// - /// 传输发现 + /// 传输发现 + /// Transport Discovery /// [JsonPropertyName("transport_discovery")] [BluetoothUUID("00001824-0000-1000-8000-00805f9b34fb")] TransportDiscovery, /// - /// 对象传输 + /// 对象传输 + /// Object Transfer /// [JsonPropertyName("object_transfer")] [BluetoothUUID("00001825-0000-1000-8000-00805f9b34fb")] ObjectTransfer, /// - /// 健康设备 + /// 健康设备 + /// Fitness Machine /// [JsonPropertyName("fitness_machine")] [BluetoothUUID("00001826-0000-1000-8000-00805f9b34fb")] FitnessMachine, /// - /// 节点配置 + /// 节点配置 + /// Mesh Provisioning /// [JsonPropertyName("mesh_provisioning")] [BluetoothUUID("00001827-0000-1000-8000-00805f9b34fb")] MeshProvisioning, /// - /// 节点代理 + /// 节点代理 + /// Mesh Proxy /// [JsonPropertyName("mesh_proxy")] [BluetoothUUID("00001828-0000-1000-8000-00805f9b34fb")] MeshProxy, /// - /// 重连配置 + /// 重连配置 + /// Reconnection Configuration /// [JsonPropertyName("reconnection_configuration")] [BluetoothUUID("00001829-0000-1000-8000-00805f9b34fb")] diff --git a/src/BootstrapBlazor/Services/Bluetooth/BluetoothUUIDAttribute.cs b/src/BootstrapBlazor/Services/Bluetooth/BluetoothUUIDAttribute.cs index eb7e0be6e4a..4246e1c02b0 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/BluetoothUUIDAttribute.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/BluetoothUUIDAttribute.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// UUID 标签 +/// UUID 标签 +/// UUID Attribute /// [AttributeUsage(AttributeTargets.All)] public class BluetoothUUIDAttribute(string name) : Attribute { /// - /// 获得 UUID 值 + /// 获得 UUID 值 + /// Get UUID Value /// public string Name => name; } diff --git a/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetooth.cs b/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetooth.cs index 62a7ecff80e..b6297ad1ad6 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetooth.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetooth.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,17 +8,20 @@ namespace BootstrapBlazor.Components; sealed class DefaultBluetooth : IBluetooth { /// - /// + /// + /// /// public bool IsSupport { get; private set; } /// - /// + /// + /// /// public bool IsAvailable { get; private set; } /// - /// + /// + /// /// public string? ErrorMessage { get; private set; } @@ -32,7 +35,8 @@ sealed class DefaultBluetooth : IBluetooth private readonly DotNetObjectReference _interop; /// - /// 构造函数 + /// 构造函数 + /// Constructor /// /// public DefaultBluetooth(IJSRuntime jsRuntime) @@ -51,7 +55,8 @@ private async Task LoadModule() } /// - /// + /// + /// /// /// /// @@ -69,7 +74,8 @@ public async Task GetAvailability(CancellationToken token = default) } /// - /// + /// + /// /// public async Task RequestDevice(BluetoothRequestOptions? options = null, CancellationToken token = default) { @@ -89,7 +95,8 @@ public async Task GetAvailability(CancellationToken token = default) } /// - /// + /// + /// /// /// /// @@ -101,7 +108,8 @@ public async Task GetAvailability(CancellationToken token = default) } /// - /// JavaScript 报错回调方法 + /// JavaScript 报错回调方法 + /// JavaScript Error Callback Method /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothCharacteristic.cs b/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothCharacteristic.cs index 527d1f049bf..675090576b1 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothCharacteristic.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothCharacteristic.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// DefaultBluetoothCharacteristic 实现类 +/// DefaultBluetoothCharacteristic 实现类 +/// DefaultBluetoothCharacteristic Implementation Class /// sealed class DefaultBluetoothCharacteristic : IBluetoothCharacteristic { @@ -42,7 +43,8 @@ sealed class DefaultBluetoothCharacteristic : IBluetoothCharacteristic private Func? _notifyCallback; /// - /// 构造函数 + /// 构造函数 + /// Constructor /// /// /// @@ -117,7 +119,8 @@ public async Task OnNotification(string uuId, byte[] payload) } /// - /// JavaScript 报错回调方法 + /// JavaScript 报错回调方法 + /// JavaScript Error Callback Method /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothDevice.cs b/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothDevice.cs index 9e94a32895b..bb60ee80480 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothDevice.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothDevice.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// 蓝牙设备 +/// 蓝牙设备 +/// Bluetooth Device /// sealed class DefaultBluetoothDevice : IBluetoothDevice { @@ -85,7 +86,8 @@ public async Task Disconnect(CancellationToken token = default) } /// - /// + /// + /// /// /// /// @@ -142,7 +144,8 @@ public async Task> GetPrimaryServices(CancellationToken } /// - /// + /// + /// /// /// /// @@ -162,7 +165,8 @@ public async Task> GetPrimaryServices(CancellationToken } /// - /// + /// + /// /// /// /// @@ -198,7 +202,8 @@ public async Task> GetPrimaryServices(CancellationToken } /// - /// JavaScript 报错回调方法 + /// JavaScript 报错回调方法 + /// JavaScript Error Callback Method /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothService.cs b/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothService.cs index d6a5b281e0e..79c66158031 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothService.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/DefaultBluetoothService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// DefaultBluetoothService 实现类 +/// DefaultBluetoothService 实现类 +/// DefaultBluetoothService Implementation Class /// sealed class DefaultBluetoothService : IBluetoothService { @@ -35,7 +36,8 @@ sealed class DefaultBluetoothService : IBluetoothService public string? ErrorMessage { get; private set; } /// - /// 构造函数 + /// 构造函数 + /// Constructor /// /// /// @@ -51,7 +53,8 @@ public DefaultBluetoothService(JSModule module, string clientId, string serviceN } /// - /// + /// + /// /// /// /// @@ -86,7 +89,8 @@ public async Task> GetCharacteristics(Cancellatio } /// - /// JavaScript 报错回调方法 + /// JavaScript 报错回调方法 + /// JavaScript Error Callback Method /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Services/Bluetooth/IBluetooth.cs b/src/BootstrapBlazor/Services/Bluetooth/IBluetooth.cs index 039bcb3c4ac..3be56f44ee4 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/IBluetooth.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/IBluetooth.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,41 +6,48 @@ namespace BootstrapBlazor.Components; /// -/// 蓝牙服务接口 +/// 蓝牙服务接口 +/// Bluetooth Service Interface /// public interface IBluetooth { /// - /// 获得 浏览器是否支持蓝牙 + /// 获得 浏览器是否支持蓝牙 + /// Get if browser supports Bluetooth /// bool IsSupport { get; } /// - /// 获得 是否有蓝牙模块 + /// 获得 是否有蓝牙模块 + /// Get if Bluetooth module is available /// bool IsAvailable { get; } /// - /// 获得 上次运行错误描述信息 + /// 获得 上次运行错误描述信息 + /// Get Last Error Message /// string? ErrorMessage { get; } /// - /// 获得所有可用串口 + /// 获得所有可用串口 + /// Get all available serial ports /// /// Task GetAvailability(CancellationToken token = default); /// - /// 请求蓝牙配对方法 + /// 请求蓝牙配对方法 + /// 请求蓝牙配对方法 /// - /// 实例 + /// 实例 instance /// /// Task RequestDevice(BluetoothRequestOptions? options = null, CancellationToken token = default); /// - /// 请求蓝牙配对方法 + /// 请求蓝牙配对方法 + /// 请求蓝牙配对方法 /// /// /// diff --git a/src/BootstrapBlazor/Services/Bluetooth/IBluetoothCharacterics.cs b/src/BootstrapBlazor/Services/Bluetooth/IBluetoothCharacterics.cs index 37192fb53e2..0e45ca7e68e 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/IBluetoothCharacterics.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/IBluetoothCharacterics.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,38 @@ namespace BootstrapBlazor.Components; /// -/// IBluetoothCharacteristic 接口定义 +/// IBluetoothCharacteristic 接口定义 +/// IBluetoothCharacteristic Interface Definition /// public interface IBluetoothCharacteristic { /// - /// 获得 上次运行错误描述信息 + /// 获得 上次运行错误描述信息 + /// Get Last Error Message /// string? ErrorMessage { get; } /// - /// 获得 服务 UUID 值 + /// 获得 服务 UUID 值 + /// Get Service UUID Value /// string ServiceUUID { get; } /// - /// 获得 特征 UUID 值 + /// 获得 特征 UUID 值 + /// Get Characteristic UUID Value /// public string UUID { get; } /// - /// 获得 是否已经开始调用 方法 + /// 获得 是否已经开始调用 方法 + /// Get if method has been called /// public bool IsNotify { get; } /// - /// 设备指定特征开始持续回调方法 + /// 设备指定特征开始持续回调方法 + /// Start Notifications Method /// /// /// @@ -39,16 +45,18 @@ public interface IBluetoothCharacteristic Task StartNotifications(Func notificationCallback, CancellationToken token = default); /// - /// 设备指定特征结束回调方法 + /// 设备指定特征结束回调方法 + /// Stop Notifications Method /// /// /// Task StopNotifications(CancellationToken token = default); /// - /// 获得设备指定值方法 + /// 获得设备指定值方法 + /// Read Value Method /// - /// 比如获得电量方法为 ReadValue("battery_service", "battery_level") + /// 比如获得电量方法为 ReadValue("battery_service", "battery_level")For example, get battery level method is ReadValue("battery_service", "battery_level") /// Task ReadValue(CancellationToken token = default); } diff --git a/src/BootstrapBlazor/Services/Bluetooth/IBluetoothDevice.cs b/src/BootstrapBlazor/Services/Bluetooth/IBluetoothDevice.cs index 383a8255abd..072430db009 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/IBluetoothDevice.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/IBluetoothDevice.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,51 +6,60 @@ namespace BootstrapBlazor.Components; /// -/// IBluetoothDevice 接口 +/// IBluetoothDevice 接口 +/// IBluetoothDevice Interface /// public interface IBluetoothDevice : IAsyncDisposable { /// - /// 获得 当前设备连接状态 + /// 获得 当前设备连接状态 + /// Get Current Device Connection Status /// bool Connected { get; } /// - /// 获得 设备 Id + /// 获得 设备 Id + /// Get Device Id /// string? Id { get; } /// - /// 获得 设备名称 + /// 获得 设备名称 + /// Get Device Name /// string? Name { get; } /// - /// 获得 上次运行错误描述信息 + /// 获得 上次运行错误描述信息 + /// Get Last Error Message /// string? ErrorMessage { get; } /// - /// 连接方法 + /// 连接方法 + /// Connect Method /// /// Task Connect(CancellationToken token = default); /// - /// 断开连接方法 + /// 断开连接方法 + /// Disconnect Method /// /// Task Disconnect(CancellationToken token = default); /// - /// 获得设备所有支持服务 + /// 获得设备所有支持服务 + /// Get All Supported Services of Device /// /// /// Task> GetPrimaryServices(CancellationToken token = default); /// - /// 获得设备指定服务 + /// 获得设备指定服务 + /// Get Specified Service of Device /// /// /// @@ -58,28 +67,32 @@ public interface IBluetoothDevice : IAsyncDisposable Task GetPrimaryService(string serviceUUID, CancellationToken token = default); /// - /// 获得设备指定值方法 + /// 获得设备指定值方法 + /// Read Value Method /// - /// 比如获得电量方法为 ReadValue("battery_service", "battery_level") + /// 比如获得电量方法为 ReadValue("battery_service", "battery_level")For example, get battery level method is ReadValue("battery_service", "battery_level") /// Task ReadValue(string serviceUUID, string characteristicUUID, CancellationToken token = default); /// - /// 获得设备信息方法 + /// 获得设备信息方法 + /// Get Device Info Method /// /// /// Task GetDeviceInfo(CancellationToken token = default); /// - /// 获得设备当前时间方法 + /// 获得设备当前时间方法 + /// Get Device Current Time Method /// /// /// Task GetCurrentTime(CancellationToken token = default); /// - /// 获得设备当前时间方法 + /// 获得设备当前时间方法 + /// Get Device Battery Level Method /// /// /// diff --git a/src/BootstrapBlazor/Services/Bluetooth/IBluetoothService.cs b/src/BootstrapBlazor/Services/Bluetooth/IBluetoothService.cs index c8ab38ee7a3..1054e6fa7a6 100644 --- a/src/BootstrapBlazor/Services/Bluetooth/IBluetoothService.cs +++ b/src/BootstrapBlazor/Services/Bluetooth/IBluetoothService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,34 +6,40 @@ namespace BootstrapBlazor.Components; /// -/// IBluetoothService 接口定义 +/// IBluetoothService 接口定义 +/// IBluetoothService Interface Definition /// public interface IBluetoothService { /// - /// 获得 服务名称 + /// 获得 服务名称 + /// Get Service Name /// public string Name { get; } /// - /// 获得 服务 UUID 值 + /// 获得 服务 UUID 值 + /// Get Service UUID Value /// public string UUID { get; } /// - /// 获得 上次运行错误描述信息 + /// 获得 上次运行错误描述信息 + /// Get Last Error Message /// string? ErrorMessage { get; } /// - /// 获得设备所有支持特征 + /// 获得设备所有支持特征 + /// Get All Supported Characteristics /// /// /// Task> GetCharacteristics(CancellationToken token = default); /// - /// 获得设备特定支持特征 + /// 获得设备特定支持特征 + /// Get Specified Supported Characteristic /// /// /// diff --git a/src/BootstrapBlazor/Services/BootstrapBlazorRootRegisterService.cs b/src/BootstrapBlazor/Services/BootstrapBlazorRootRegisterService.cs index a5dc7d6b3bc..3ca25956aad 100644 --- a/src/BootstrapBlazor/Services/BootstrapBlazorRootRegisterService.cs +++ b/src/BootstrapBlazor/Services/BootstrapBlazorRootRegisterService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapBlazorRootRegisterService +/// BootstrapBlazorRootRegisterService +/// BootstrapBlazorRootRegisterService /// public class BootstrapBlazorRootRegisterService { @@ -14,7 +15,8 @@ public class BootstrapBlazorRootRegisterService private readonly Dictionary> _providersByIdentifier = []; /// - /// Add provider + /// Add provider + /// Add provider /// /// /// @@ -30,7 +32,8 @@ public void AddProvider(object identifier, BootstrapBlazorRootContent provider) } /// - /// Remove provider + /// Remove provider + /// Remove provider /// /// /// @@ -58,7 +61,8 @@ public void RemoveProvider(object identifier, BootstrapBlazorRootContent provide } /// - /// Get all providers by identifier + /// Get all providers by identifier + /// Get all providers by identifier /// /// /// @@ -69,7 +73,8 @@ public List GetProviders(object identifier) } /// - /// Subscribe + /// Subscribe + /// Subscribe /// /// /// @@ -84,7 +89,8 @@ public void Subscribe(object identifier, BootstrapBlazorRootOutlet subscriber) } /// - /// Unsubscribe + /// Unsubscribe + /// Unsubscribe /// /// public void Unsubscribe(object identifier) @@ -93,7 +99,8 @@ public void Unsubscribe(object identifier) } /// - /// Notify content provider changed + /// Notify 内容 provider changed + /// Notify content provider changed /// /// /// diff --git a/src/BootstrapBlazor/Services/BootstrapServiceBase.cs b/src/BootstrapBlazor/Services/BootstrapServiceBase.cs index 6a681b19bca..b25b5fe137f 100644 --- a/src/BootstrapBlazor/Services/BootstrapServiceBase.cs +++ b/src/BootstrapBlazor/Services/BootstrapServiceBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// BootstrapServiceBase 基类 +/// BootstrapServiceBase 基类 +/// BootstrapServiceBase Base Class /// public abstract class BootstrapServiceBase { /// - /// 获得 回调委托缓存集合 + /// 获得 回调委托缓存集合 + /// Get Callback Delegate Cache Collection /// protected List<(ComponentBase Key, Func Callback)> Cache { get; } = []; /// - /// 异步回调方法 + /// 异步回调方法 + /// Async Callback Method /// /// /// @@ -39,7 +42,8 @@ protected async Task Invoke(TOption option, ComponentBase? component = null) } /// - /// 注册弹窗事件 + /// 注册弹窗事件 + /// Register Dialog Event /// /// /// @@ -49,7 +53,8 @@ internal void Register(ComponentBase key, Func callback) } /// - /// 注销弹窗事件 + /// 注销弹窗事件 + /// Unregister Dialog Event /// internal void UnRegister(ComponentBase key) { diff --git a/src/BootstrapBlazor/Services/CacheManager.cs b/src/BootstrapBlazor/Services/CacheManager.cs index fa0bdadf63d..c1d429f1d53 100644 --- a/src/BootstrapBlazor/Services/CacheManager.cs +++ b/src/BootstrapBlazor/Services/CacheManager.cs @@ -19,7 +19,8 @@ namespace BootstrapBlazor.Components; /// -/// 缓存操作类 +/// 缓存操作类 +/// Cache Manager Class /// internal class CacheManager : ICacheManager { @@ -36,7 +37,8 @@ internal class CacheManager : ICacheManager private const string CacheKeyPrefix = "BootstrapBlazor"; /// - /// 构造函数 + /// 构造函数 + /// Constructor /// /// /// @@ -49,7 +51,8 @@ public CacheManager(IServiceProvider provider, IMemoryCache memoryCache) } /// - /// 获得或者创建指定 Key 缓存项 + /// 获得或者创建指定 Key 缓存项 + /// Get or create cache item by key /// public TItem GetOrCreate(object key, Func factory) => Cache.GetOrCreate(key, entry => { @@ -60,7 +63,8 @@ public TItem GetOrCreate(object key, Func factory) => })!; /// - /// 获得或者创建指定 Key 缓存项 异步重载方法 + /// 获得或者创建指定 Key 缓存项 异步重载方法 + /// Get or create cache item by key (Async) /// public Task GetOrCreateAsync(object key, Func> factory) => Cache.GetOrCreateAsync(key, async entry => { @@ -89,7 +93,8 @@ public bool TryGetValue(object key, [NotNullWhen(true)] out TItem? value) } /// - /// 清除指定 Key 缓存项 + /// 清除指定 Key 缓存项 + /// Clear cache item by key /// /// public void Clear(object? key) @@ -109,12 +114,14 @@ public void Clear(object? key) } /// - /// 设置 App 开始时间 + /// 设置 App 开始时间 + /// Set App Start Time /// public void SetStartTime() => SetStartTime(DateTimeOffset.Now); /// - /// 设置 App 开始时间 + /// 设置 App 开始时间 + /// Set App Start Time /// private void SetStartTime(DateTimeOffset startDateTimeOffset) { @@ -126,7 +133,8 @@ private void SetStartTime(DateTimeOffset startDateTimeOffset) } /// - /// 获取 App 开始时间 + /// 获取 App 开始时间 + /// Get App Start Time /// /// public DateTimeOffset GetStartTime() @@ -140,7 +148,8 @@ public DateTimeOffset GetStartTime() } /// - /// 获得 缓存数量 + /// 获得 缓存数量 + /// Get Cache Count /// public long Count { @@ -157,7 +166,8 @@ public long Count #if NET9_0_OR_GREATER /// - /// 获得 缓存键集合 + /// 获得 缓存键集合 + /// Get Cache Keys /// public IEnumerable Keys { @@ -218,7 +228,8 @@ private List GetAllValues(MemoryCache cache) #region Assembly /// - /// 获得唯一类型名称方法 + /// 获得唯一类型名称方法 + /// Get Unique Type Name Method /// /// /// @@ -255,7 +266,8 @@ public static int ElementCount(object? value) #region Localizer /// - /// 通过 Type 获得 实例 + /// 通过 Type 获得 实例 + /// Get instance by Type /// /// /// @@ -264,7 +276,8 @@ public static int ElementCount(object? value) : Instance.Provider.GetRequiredService().Create(resourceSource); /// - /// 获得 值 + /// 获得 + /// Get Value /// /// private static JsonLocalizationOptions GetJsonLocalizationOption() @@ -274,10 +287,11 @@ private static JsonLocalizationOptions GetJsonLocalizationOption() } /// - /// 通过 程序集与类型获得 IStringLocalizer 实例 + /// 通过 程序集与类型获得 IStringLocalizer 实例 + /// Get IStringLocalizer instance by Assembly and Type Name /// - /// Assembly 程序集实例 - /// 类型名称 + /// Assembly 程序集实例Assembly 程序集instance + /// 类型名称typename /// public static IStringLocalizer? GetStringLocalizerFromService(Assembly assembly, string typeName) { @@ -300,21 +314,23 @@ private static JsonLocalizationOptions GetJsonLocalizationOption() } /// - /// 获取指定文化本地化资源集合 + /// 获取指定文化本地化资源集合 + /// Get localized string collection for specified culture /// - /// Assembly 程序集实例 - /// 类型名称 + /// Assembly 程序集实例Assembly 程序集instance + /// 类型名称typename public static IEnumerable? GetAllStringsByTypeName(Assembly assembly, string typeName) => GetJsonStringByTypeName(GetJsonLocalizationOption(), assembly, typeName, CultureInfo.CurrentUICulture.Name); /// - /// 通过指定程序集获取所有本地化信息键值集合 + /// 通过指定程序集获取所有本地化信息键值集合 + /// Get all localized string key-value pairs by assembly /// - /// JsonLocalizationOptions 实例 - /// Assembly 程序集实例 - /// 类型名称 - /// cultureName 未空时使用 CultureInfo.CurrentUICulture.Name - /// 默认 false 使用缓存值 设置 true 时内部强制重新加载 + /// JsonLocalizationOptions 实例JsonLocalizationOptions instance + /// Assembly 程序集实例Assembly 程序集instance + /// 类型名称typename + /// cultureName 未空时使用 CultureInfo.CurrentUICulture.NamecultureName 未空时使用 CultureInfo.CurrentUICulture.Name + /// 默认 false 使用缓存值 设置 true 时内部强制重新加载default is false 使用缓存value Sets true 时内部强制重新加载 /// public static IEnumerable? GetJsonStringByTypeName(JsonLocalizationOptions option, Assembly assembly, string typeName, string? cultureName = null, bool forceLoad = false) { @@ -357,7 +373,8 @@ private static JsonLocalizationOptions GetJsonLocalizationOption() } /// - /// 通过 ILocalizationResolve 接口实现类获得本地化键值集合 + /// 通过 ILocalizationResolve 接口实现类获得本地化键值集合 + /// Get localized string key-value pairs from ILocalizationResolve implementation /// /// /// @@ -367,7 +384,8 @@ private static JsonLocalizationOptions GetJsonLocalizationOption() #region DisplayName /// - /// 获得类型属性的描述信息 + /// 获得类型属性的描述信息 + /// Get Description of Type Property /// /// /// @@ -375,7 +393,8 @@ private static JsonLocalizationOptions GetJsonLocalizationOption() public static string GetDisplayName(Type modelType, string fieldName) { string? dn = null; - // 显示名称为空时通过资源文件查找 FieldName 项 + // 显示名称为空时通过资源文件查找 FieldName 项 + // Find FieldName item in resource file when display name is null var localizer = modelType.Assembly.IsDynamic ? null : CreateLocalizerByType(modelType); var stringLocalizer = localizer?[fieldName]; if (stringLocalizer is { ResourceNotFound: false }) @@ -399,12 +418,14 @@ public static string GetDisplayName(Type modelType, string fieldName) private static string? FindDisplayAttribute(Type modelType, MemberInfo memberInfo) { - // 回退查找 Display 标签 + // 回退查找 Display 标签 + // Fallback to find Display Attribute var dn = memberInfo.GetCustomAttribute(true)?.Name ?? memberInfo.GetCustomAttribute(true)?.DisplayName ?? memberInfo.GetCustomAttribute(true)?.Description; - // 回退查找资源文件通过 dn 查找匹配项 用于支持 Validation + // 回退查找资源文件通过 dn 查找匹配项 用于支持 Validation + // Fallback to find matching item in resource file by dn for Validation if (!modelType.Assembly.IsDynamic && !string.IsNullOrEmpty(dn)) { dn = GetLocalizerValueFromResourceManager(dn); @@ -429,7 +450,8 @@ string FindDisplayText(string itemName, Func优先读取资源文件配置 + // Prioritize reading resource file configuration var stringLocalizer = localizer?[$"{fieldName}-{itemName}"]; if (stringLocalizer is { ResourceNotFound: false }) { @@ -437,7 +459,8 @@ string FindDisplayText(string itemName, Func类资源文件未找到 回落查找标签 + // Class resource file not found, fallback to find Attribute var attr = propertyInfo.GetCustomAttribute(true); if (attr != null && !modelType.Assembly.IsDynamic) { @@ -445,7 +468,8 @@ string FindDisplayText(string itemName, Func回落读取 NullableBoolItemsAttribute 资源文件配置 + // Fallback to read NullableBoolItemsAttribute resource file configuration return dn ?? FindDisplayTextByItemName(itemName); } @@ -459,7 +483,8 @@ string FindDisplayTextByItemName(string itemName) } /// - /// 通过指定 Key 获取资源文件中的键值 + /// 通过指定 Key 获取资源文件中的键值 + /// Get value from resource file by key /// /// /// @@ -596,7 +621,8 @@ private static Action GetSetPropertyValueInvoker } /// - /// 获得 指定模型标记 的属性值 + /// 获得 指定模型标记 的属性值 + /// Get property value of specified model marked with /// /// /// @@ -655,7 +681,8 @@ public static Func, List, IEnumerable> GetSortListFunc #region OnValueChanged Lambda /// - /// 创建 OnValueChanged 回调委托 + /// 创建 OnValueChanged 回调委托 + /// Create OnValueChanged Callback Delegate /// /// /// diff --git a/src/BootstrapBlazor/Services/ClipboardService.cs b/src/BootstrapBlazor/Services/ClipboardService.cs index c276179dd9c..b924606f15e 100644 --- a/src/BootstrapBlazor/Services/ClipboardService.cs +++ b/src/BootstrapBlazor/Services/ClipboardService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 粘贴板服务 +/// 粘贴板服务 +/// Clipboard Service /// public class ClipboardService(IJSRuntime jSRuntime) { @@ -16,7 +17,8 @@ public class ClipboardService(IJSRuntime jSRuntime) private Task LoadModule() => jSRuntime.LoadUtility(); /// - /// 获取剪切板数据方法 + /// 获取剪切板数据方法 + /// Get Clipboard Data Method /// public async Task> Get(CancellationToken token = default) { @@ -25,7 +27,8 @@ public async Task> Get(CancellationToken token = default) } /// - /// 获得剪切板拷贝文字方法 + /// 获得剪切板拷贝文字方法 + /// Get Clipboard Text Method /// /// public async Task GetText(CancellationToken token = default) @@ -35,10 +38,11 @@ public async Task> Get(CancellationToken token = default) } /// - /// 将指定文本设置到剪切板方法 + /// 将指定文本设置到剪切板方法 + /// Set Copy Text to Clipboard Method /// - /// 要拷贝的文字 - /// 拷贝后回调方法 + /// 要拷贝的文字要拷贝的文字 + /// 拷贝后回调方法拷贝后callback method /// /// public async Task Copy(string? text, Func? callback = null, CancellationToken token = default) diff --git a/src/BootstrapBlazor/Services/ComponentHtmlRenderer.cs b/src/BootstrapBlazor/Services/ComponentHtmlRenderer.cs index c7f3b876df0..f899498ecc3 100644 --- a/src/BootstrapBlazor/Services/ComponentHtmlRenderer.cs +++ b/src/BootstrapBlazor/Services/ComponentHtmlRenderer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/DataServiceBase.cs b/src/BootstrapBlazor/Services/DataServiceBase.cs index 8457a63e92a..335814b76b1 100644 --- a/src/BootstrapBlazor/Services/DataServiceBase.cs +++ b/src/BootstrapBlazor/Services/DataServiceBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,26 +6,30 @@ namespace BootstrapBlazor.Components; /// -/// IDataServie 实现类基类 +/// IDataServie 实现类基类 +/// IDataService Implementation Base Class /// public abstract class DataServiceBase : IDataService where TModel : class { /// - /// 新建数据操作方法 + /// 新建数据操作方法 + /// Add Data Method /// /// /// public virtual Task AddAsync(TModel model) => Task.FromResult(true); /// - /// 删除数据操作方法 + /// 删除数据操作方法 + /// Delete Data Method /// /// /// public virtual Task DeleteAsync(IEnumerable models) => Task.FromResult(true); /// - /// 保存数据操作方法 + /// 保存数据操作方法 + /// Save Data Method /// /// /// @@ -33,7 +37,8 @@ public abstract class DataServiceBase : IDataService where TMode public virtual Task SaveAsync(TModel model, ItemChangedType changedType) => Task.FromResult(true); /// - /// 查询数据操作方法 + /// 查询数据操作方法 + /// Query Data Method /// /// /// diff --git a/src/BootstrapBlazor/Services/DefaultBrowserFingerService.cs b/src/BootstrapBlazor/Services/DefaultBrowserFingerService.cs index e04288faed8..16be75f2aeb 100644 --- a/src/BootstrapBlazor/Services/DefaultBrowserFingerService.cs +++ b/src/BootstrapBlazor/Services/DefaultBrowserFingerService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 浏览器指纹服务 +/// 浏览器指纹服务 +/// Browser Fingerprint Service /// class DefaultBrowserFingerService(IJSRuntime jSRuntime) : IBrowserFingerService { diff --git a/src/BootstrapBlazor/Services/DefaultCalendarFestivals.cs b/src/BootstrapBlazor/Services/DefaultCalendarFestivals.cs index 844af647cc4..ce767853424 100644 --- a/src/BootstrapBlazor/Services/DefaultCalendarFestivals.cs +++ b/src/BootstrapBlazor/Services/DefaultCalendarFestivals.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/DefaultCalendarHolidayss.cs b/src/BootstrapBlazor/Services/DefaultCalendarHolidayss.cs index 554a10ce787..89ba044d06d 100644 --- a/src/BootstrapBlazor/Services/DefaultCalendarHolidayss.cs +++ b/src/BootstrapBlazor/Services/DefaultCalendarHolidayss.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/DefaultConnectionService.cs b/src/BootstrapBlazor/Services/DefaultConnectionService.cs index eddce6b24e3..55cc34ff142 100644 --- a/src/BootstrapBlazor/Services/DefaultConnectionService.cs +++ b/src/BootstrapBlazor/Services/DefaultConnectionService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// 当前链接服务 +/// 当前链接服务 +/// Current Connection Service /// class DefaultConnectionService : IConnectionService, IDisposable { diff --git a/src/BootstrapBlazor/Services/DefaultDispatchService.cs b/src/BootstrapBlazor/Services/DefaultDispatchService.cs index 7b0e221156e..192dee7d45c 100644 --- a/src/BootstrapBlazor/Services/DefaultDispatchService.cs +++ b/src/BootstrapBlazor/Services/DefaultDispatchService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/DefaultGeoLocationService.cs b/src/BootstrapBlazor/Services/DefaultGeoLocationService.cs index f03c3c87b4f..1352024a8f7 100644 --- a/src/BootstrapBlazor/Services/DefaultGeoLocationService.cs +++ b/src/BootstrapBlazor/Services/DefaultGeoLocationService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -18,7 +18,8 @@ class DefaultGeoLocationService : IGeoLocationService private long WatchId { get; set; } /// - /// 构造函数 + /// 构造函数 + /// Constructor /// /// public DefaultGeoLocationService(IJSRuntime jsRuntime) @@ -31,7 +32,8 @@ public DefaultGeoLocationService(IJSRuntime jsRuntime) private Task LoadModule() => JSRuntime.LoadModuleByName("geo"); /// - /// get the current position of the device + /// get the current position of the device + /// get the current position of the device /// /// public async Task GetPositionAsync() @@ -43,7 +45,8 @@ public DefaultGeoLocationService(IJSRuntime jsRuntime) private Func? WatchPositionCallback { get; set; } /// - /// register a handler function that will be called automatically each time the position of the device changes + /// register a handler function that will be called automatically each time the position of the device changes + /// register a handler function that will be called automatically each time the position of the device changes /// /// public async ValueTask WatchPositionAsync(Func callback) @@ -59,7 +62,8 @@ public async ValueTask WatchPositionAsync(Func } /// - /// unregister location/error monitoring handlers previously installed using + /// unregister location/error monitoring handlers previously installed using + /// unregister location/error monitoring handlers previously installed using /// /// public async ValueTask ClearWatchPositionAsync(long id) @@ -69,7 +73,8 @@ public async ValueTask ClearWatchPositionAsync(long id) } /// - /// 获得 当前设备地理位置由 JS 调用 + /// 获得 当前设备地理位置由 JS 调用 + /// Get current device location (invoked by JS) /// /// /// @@ -85,7 +90,8 @@ public async Task WatchCallback(GeolocationPosition position) } /// - /// DisposeAsync 方法 + /// DisposeAsync 方法 + /// DisposeAsync Method /// /// protected virtual async ValueTask DisposeAsync(bool disposing) diff --git a/src/BootstrapBlazor/Services/DefaultHtml2ImageService.cs b/src/BootstrapBlazor/Services/DefaultHtml2ImageService.cs index 81cebb745e0..897fadba3a0 100644 --- a/src/BootstrapBlazor/Services/DefaultHtml2ImageService.cs +++ b/src/BootstrapBlazor/Services/DefaultHtml2ImageService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 默认 Html2Image 实现 +/// 默认 Html2Image 实现 +/// Default Html2Image Implementation /// class DefaultHtml2ImageService : IHtml2Image { diff --git a/src/BootstrapBlazor/Services/DefaultHtml2PdfService.cs b/src/BootstrapBlazor/Services/DefaultHtml2PdfService.cs index 778e0ef9279..05486c76bd1 100644 --- a/src/BootstrapBlazor/Services/DefaultHtml2PdfService.cs +++ b/src/BootstrapBlazor/Services/DefaultHtml2PdfService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 默认 Html to Pdf 实现 +/// 默认 Html to Pdf 实现 +/// Default Html to Pdf Implementation /// class DefaultHtml2PdfService : IHtml2Pdf { diff --git a/src/BootstrapBlazor/Services/DefaultIconTheme.cs b/src/BootstrapBlazor/Services/DefaultIconTheme.cs index b38c59f96de..bc7ed9dd6e7 100644 --- a/src/BootstrapBlazor/Services/DefaultIconTheme.cs +++ b/src/BootstrapBlazor/Services/DefaultIconTheme.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/DefaultIdGenerator.cs b/src/BootstrapBlazor/Services/DefaultIdGenerator.cs index 051a84d5628..87bb1ca4300 100644 --- a/src/BootstrapBlazor/Services/DefaultIdGenerator.cs +++ b/src/BootstrapBlazor/Services/DefaultIdGenerator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 默认组件 ID 生成器 +/// 默认组件 ID 生成器 +/// Default Component ID Generator /// internal class DefaultIdGenerator : IComponentIdGenerator { /// - /// 生成组件 Id 字符串 + /// 生成组件 Id 字符串 + /// Generate Component ID String /// /// /// diff --git a/src/BootstrapBlazor/Services/DefaultJSVersionService.cs b/src/BootstrapBlazor/Services/DefaultJSVersionService.cs index 7743aca9a33..b26bdb57362 100644 --- a/src/BootstrapBlazor/Services/DefaultJSVersionService.cs +++ b/src/BootstrapBlazor/Services/DefaultJSVersionService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/DefaultNetworkMonitorService.cs b/src/BootstrapBlazor/Services/DefaultNetworkMonitorService.cs index c0fea94a86c..f241f126465 100644 --- a/src/BootstrapBlazor/Services/DefaultNetworkMonitorService.cs +++ b/src/BootstrapBlazor/Services/DefaultNetworkMonitorService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// 网络状态服务 +/// 网络状态服务 +/// Network State Service /// class DefaultNetowrkMonitorService : INetworkMonitorService, IAsyncDisposable { @@ -87,7 +88,8 @@ public void UnregisterStateChangedCallback(IComponent component) } /// - /// JSInvoke 回调方法 + /// JSInvoke 回调方法 + /// JSInvoke Callback Method /// /// [JSInvokable] diff --git a/src/BootstrapBlazor/Services/DefaultTableExport.cs b/src/BootstrapBlazor/Services/DefaultTableExport.cs index 3ab3cb2c4a6..92cc0888dd5 100644 --- a/src/BootstrapBlazor/Services/DefaultTableExport.cs +++ b/src/BootstrapBlazor/Services/DefaultTableExport.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/DefaultThemeProvider.cs b/src/BootstrapBlazor/Services/DefaultThemeProvider.cs index 18007dbc13d..e694086a18c 100644 --- a/src/BootstrapBlazor/Services/DefaultThemeProvider.cs +++ b/src/BootstrapBlazor/Services/DefaultThemeProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/DefaultThrottleDispatcherFactory.cs b/src/BootstrapBlazor/Services/DefaultThrottleDispatcherFactory.cs index 24ca5c76ac3..45e2a4b12b8 100644 --- a/src/BootstrapBlazor/Services/DefaultThrottleDispatcherFactory.cs +++ b/src/BootstrapBlazor/Services/DefaultThrottleDispatcherFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/DefaultTotpService.cs b/src/BootstrapBlazor/Services/DefaultTotpService.cs index b59bdd07bb1..7911a885f44 100644 --- a/src/BootstrapBlazor/Services/DefaultTotpService.cs +++ b/src/BootstrapBlazor/Services/DefaultTotpService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/EyeDropperService.cs b/src/BootstrapBlazor/Services/EyeDropperService.cs index 747108868c6..1d6c03c2559 100644 --- a/src/BootstrapBlazor/Services/EyeDropperService.cs +++ b/src/BootstrapBlazor/Services/EyeDropperService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// EyeDropper 服务用于屏幕吸色 +/// EyeDropper 服务用于屏幕吸色 +/// EyeDropper Service for screen color picking /// public class EyeDropperService(IJSRuntime jSRuntime) { @@ -14,7 +15,8 @@ public class EyeDropperService(IJSRuntime jSRuntime) private JSModule? _module = null; /// - /// 全屏方法,已经全屏时再次调用后退出全屏 + /// 全屏方法,已经全屏时再次调用后退出全屏 + /// Fullscreen method, exit fullscreen if called again when already in fullscreen /// /// public async Task PickAsync(CancellationToken token = default) diff --git a/src/BootstrapBlazor/Services/FullScreenService.cs b/src/BootstrapBlazor/Services/FullScreenService.cs index 8161350ea69..22517c4cb39 100644 --- a/src/BootstrapBlazor/Services/FullScreenService.cs +++ b/src/BootstrapBlazor/Services/FullScreenService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// FullScreen 服务 +/// FullScreen 服务 +/// FullScreen Service /// public class FullScreenService(IJSRuntime jSRuntime) { @@ -14,7 +15,8 @@ public class FullScreenService(IJSRuntime jSRuntime) private JSModule? _module = null; /// - /// 全屏方法,已经全屏时再次调用后退出全屏 + /// 全屏方法,已经全屏时再次调用后退出全屏 + /// Fullscreen method, exit fullscreen if called again when already in fullscreen /// /// /// diff --git a/src/BootstrapBlazor/Services/IBrowserFingerService.cs b/src/BootstrapBlazor/Services/IBrowserFingerService.cs index 05c218cbf3e..0da95f607ef 100644 --- a/src/BootstrapBlazor/Services/IBrowserFingerService.cs +++ b/src/BootstrapBlazor/Services/IBrowserFingerService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// 浏览器指纹接口 +/// 浏览器指纹接口 +/// Browser Fingerprint Interface /// public interface IBrowserFingerService { /// - /// 获得当前浏览器指纹方法 + /// 获得当前浏览器指纹方法 + /// Get current browser fingerprint method /// /// Task GetFingerCodeAsync(CancellationToken token = default); /// - /// 获得当前连接的客户端 ID 由 BootstrapBlazor 组件框架提供 + /// 获得当前连接的客户端 ID 由 BootstrapBlazor 组件框架提供 + /// Get current connected client ID provided by BootstrapBlazor component framework /// /// /// diff --git a/src/BootstrapBlazor/Services/ICacheManager.cs b/src/BootstrapBlazor/Services/ICacheManager.cs index a63b531d660..2171de62a5d 100644 --- a/src/BootstrapBlazor/Services/ICacheManager.cs +++ b/src/BootstrapBlazor/Services/ICacheManager.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,12 +8,14 @@ namespace BootstrapBlazor.Components; /// -/// CacheManager 接口类 +/// CacheManager 接口类 +/// CacheManager Interface Class /// public interface ICacheManager { /// - /// + /// + /// /// /// /// @@ -22,7 +24,8 @@ public interface ICacheManager TItem GetOrCreate(object key, Func factory); /// - /// + /// + /// /// /// /// @@ -31,7 +34,8 @@ public interface ICacheManager Task GetOrCreateAsync(object key, Func> factory); /// - /// 获取指定键值 + /// 获取指定键值 + /// Get specified key value /// /// /// @@ -40,35 +44,41 @@ public interface ICacheManager bool TryGetValue(object key, [NotNullWhen(true)] out TItem? value); /// - /// 设置 App 开始时间 + /// 设置 App 开始时间 + /// Set App Start Time /// void SetStartTime(); /// - /// 获取 App 开始时间 + /// 获取 App 开始时间 + /// Get App Start Time /// /// DateTimeOffset GetStartTime(); /// - /// 通过指定 key 清除缓存方法 + /// 通过指定 key 清除缓存方法 + /// Clear cache method by specified key /// /// void Clear(object? key = null); /// - /// 获得 缓存数量 + /// 获得 缓存数量 + /// Get Cache Count /// long Count { get; } #if NET9_0_OR_GREATER /// - /// 获得 缓存键集合 + /// 获得 缓存键集合 + /// Get Cache Keys /// IEnumerable Keys { get; } /// - /// 通过指定 key 获取缓存项 实例 + /// 通过指定 key 获取缓存项 实例 + /// Get instance by specified key /// /// /// diff --git a/src/BootstrapBlazor/Services/ICalendarFestivals.cs b/src/BootstrapBlazor/Services/ICalendarFestivals.cs index d9c4dd18af7..4b80c5744a5 100644 --- a/src/BootstrapBlazor/Services/ICalendarFestivals.cs +++ b/src/BootstrapBlazor/Services/ICalendarFestivals.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 节日接口 +/// 节日接口 +/// Festivals Interface /// public interface ICalendarFestivals { /// - /// 获得 节日键值对 + /// 获得 节日键值对 + /// Get Festival Key-Value Pair /// /// string? GetFestival(DateTime dt); diff --git a/src/BootstrapBlazor/Services/ICalendarHolidays.cs b/src/BootstrapBlazor/Services/ICalendarHolidays.cs index e30ee6175bd..b6f2f8496d2 100644 --- a/src/BootstrapBlazor/Services/ICalendarHolidays.cs +++ b/src/BootstrapBlazor/Services/ICalendarHolidays.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// 休假接口 +/// 休假接口 +/// Holiday Interface /// public interface ICalendarHolidays { /// - /// 是否为假日 + /// 是否为假日 + /// Is Holiday /// /// bool IsHoliday(DateTime dt); /// - /// 是否为工作日 + /// 是否为工作日 + /// Is Workday /// /// bool IsWorkday(DateTime dt); diff --git a/src/BootstrapBlazor/Services/IComponentHtmlRenderer.cs b/src/BootstrapBlazor/Services/IComponentHtmlRenderer.cs index ee210e05652..3fa87ab2675 100644 --- a/src/BootstrapBlazor/Services/IComponentHtmlRenderer.cs +++ b/src/BootstrapBlazor/Services/IComponentHtmlRenderer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// IComponentHtmlRenderer interface +/// IComponentHtmlRenderer 接口 +/// IComponentHtmlRenderer Interface /// public interface IComponentHtmlRenderer { /// - /// 转化成 Html 片段方法 + /// 转化成 Html 片段方法 + /// Render to HTML Fragment Method /// /// /// @@ -19,9 +21,10 @@ public interface IComponentHtmlRenderer Task RenderAsync(IDictionary? parameters = null) where TComponent : IComponent; /// - /// 转化成 Html 片段方法 + /// 转化成 Html 片段方法 + /// Render to HTML Fragment Method /// - /// Blazor 组件类型 + /// Blazor 组件类型Blazor componenttype /// /// Task RenderAsync(Type type, IDictionary? parameters = null); diff --git a/src/BootstrapBlazor/Services/IComponentIdGenerator.cs b/src/BootstrapBlazor/Services/IComponentIdGenerator.cs index f1251b86555..ffddf47230f 100644 --- a/src/BootstrapBlazor/Services/IComponentIdGenerator.cs +++ b/src/BootstrapBlazor/Services/IComponentIdGenerator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 组件 ID 生成器接口 +/// 组件 ID 生成器接口 +/// Component ID Generator Interface /// public interface IComponentIdGenerator { /// - /// 生成组件 Id 方法 + /// 生成组件 Id 方法 + /// Generate Component ID Method /// /// /// diff --git a/src/BootstrapBlazor/Services/IConnectionService.cs b/src/BootstrapBlazor/Services/IConnectionService.cs index ec37ea942b7..34f91c37b53 100644 --- a/src/BootstrapBlazor/Services/IConnectionService.cs +++ b/src/BootstrapBlazor/Services/IConnectionService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,31 +6,36 @@ namespace BootstrapBlazor.Components; /// -/// 当前链接服务 +/// 当前链接服务 +/// Current Connection Service /// public interface IConnectionService { /// - /// 增加或更新当前 Key + /// 增加或更新当前 Key + /// Add or Update Current Key /// - /// ClientInfo 实例 + /// ClientInfo 实例ClientInfo instance void AddOrUpdate(ClientInfo client); /// - /// 获得指定 key 的连接信息 + /// 获得指定 key 的连接信息 + /// Get connection information for specified key /// - /// 键值 - /// 连接信息 + /// 键值键value + /// 连接信息连接info /// bool TryGetValue(string key, out ConnectionItem? value); /// - /// 获得 链接集合 + /// 获得 链接集合 + /// Get Connections Collection /// ICollection Connections { get; } /// - /// 获得在线连接数 + /// 获得在线连接数 + /// Get Online Connection Count /// long Count { get; } } diff --git a/src/BootstrapBlazor/Services/IDataService.cs b/src/BootstrapBlazor/Services/IDataService.cs index 9f88340cd50..7d99469fbe6 100644 --- a/src/BootstrapBlazor/Services/IDataService.cs +++ b/src/BootstrapBlazor/Services/IDataService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,47 +6,54 @@ namespace BootstrapBlazor.Components; /// -/// IDataService 接口 +/// IDataService 接口 +/// IDataService Interface /// public interface IDataService where TModel : class { /// - /// 新建数据方法 + /// 新建数据方法 + /// Add Data Method /// /// /// Task AddAsync(TModel model); /// - /// 保存数据方法 + /// 保存数据方法 + /// Save Data Method /// - /// 保存实体类实例 + /// 保存实体类实例保存实体类instance /// /// Task SaveAsync(TModel model, ItemChangedType changedType); /// - /// 删除数据方法 + /// 删除数据方法 + /// Delete Data Method /// - /// 要删除的数据集合 - /// 成功返回真,失败返回假 + /// 要删除的数据集合要删除的datacollection + /// 成功返回真,失败返回假成功返回真,失败返回假 Task DeleteAsync(IEnumerable models); /// - /// 查询数据方法 + /// 查询数据方法 + /// Query Data Method /// - /// 查询条件参数集合 + /// 查询条件参数集合查询条件参数collection /// Task> QueryAsync(QueryPageOptions option); } /// -/// 内部默认数据注入服务实现类 +/// 内部默认数据注入服务实现类 +/// Internal Default Data Service Implementation /// internal class NullDataService : DataServiceBase where TModel : class { /// - /// 查询操作方法 + /// 查询操作方法 + /// Query Method /// /// /// @@ -57,7 +64,8 @@ public override Task> QueryAsync(QueryPageOptions options) => }); /// - /// + /// + /// /// /// /// @@ -65,7 +73,8 @@ public override Task> QueryAsync(QueryPageOptions options) => public override Task SaveAsync(TModel model, ItemChangedType changedType) => Task.FromResult(false); /// - /// + /// + /// /// /// /// diff --git a/src/BootstrapBlazor/Services/IDispatchService.cs b/src/BootstrapBlazor/Services/IDispatchService.cs index cf0e376e04f..d640ba5b4a4 100644 --- a/src/BootstrapBlazor/Services/IDispatchService.cs +++ b/src/BootstrapBlazor/Services/IDispatchService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,24 +6,28 @@ namespace BootstrapBlazor.Components; /// -/// 分发服务接口 +/// 分发服务接口 +/// Dispatcher Service Interface /// public interface IDispatchService { /// - /// 分发方法 + /// 分发方法 + /// Dispatch Method /// /// void Dispatch(DispatchEntry entry); /// - /// 订阅分发 + /// 订阅分发 + /// Subscribe Dispatch /// /// void Subscribe(Func, Task> callback); /// - /// 取消订阅分发 + /// 取消订阅分发 + /// Unsubscribe Dispatch /// /// /// diff --git a/src/BootstrapBlazor/Services/IEntityFrameworkCoreDataService.cs b/src/BootstrapBlazor/Services/IEntityFrameworkCoreDataService.cs index ab8639a39bb..ee1f01f9e2b 100644 --- a/src/BootstrapBlazor/Services/IEntityFrameworkCoreDataService.cs +++ b/src/BootstrapBlazor/Services/IEntityFrameworkCoreDataService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// IEntityFrameworkCoreDataService 接口 +/// IEntityFrameworkCoreDataService 接口 +/// IEntityFrameworkCoreDataService Interface /// public interface IEntityFrameworkCoreDataService { /// - /// 取消方法,由于编辑时使用的是克隆数据,常见取消用法不需要写任何代码,可用于保存数据下次编辑时恢复 + /// 取消方法,由于编辑时使用的是克隆数据,常见取消用法不需要写任何代码,可用于保存数据下次编辑时恢复 + /// Cancel method. Since cloned data is used during editing, no code is required for common cancellation usage. It can be used to restore data for the next edit save. /// /// Task CancelAsync(); /// - /// 编辑方法,可对未提供编辑 UI 的数据进行填充 + /// 编辑方法,可对未提供编辑 UI 的数据进行填充 + /// Edit method, can fill data not provided by the edit UI /// /// /// diff --git a/src/BootstrapBlazor/Services/IExportPdf.cs b/src/BootstrapBlazor/Services/IExportPdf.cs index 49cc72e23c9..1b89583faf2 100644 --- a/src/BootstrapBlazor/Services/IExportPdf.cs +++ b/src/BootstrapBlazor/Services/IExportPdf.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,19 +6,22 @@ namespace BootstrapBlazor.Components; /// -/// 导出 Pdf 接口 +/// 导出 Pdf 接口 +/// Export PDF Interface /// [Obsolete("已弃用,删除即可,组件内部已不使用,直接调用 IHtml2Pdf 接口方法")] public interface IExportPdf { /// - /// 导出 Pdf 数据 + /// 导出 Pdf 数据 + /// Export Pdf Data /// /// Task PdfDataAsync(string content); /// - /// 导出 Pdf 流 + /// 导出 Pdf 流 + /// Export Pdf Stream /// /// Task PdfStreamAsync(string content); diff --git a/src/BootstrapBlazor/Services/IGeoLocationService.cs b/src/BootstrapBlazor/Services/IGeoLocationService.cs index 8b03adfbfd7..35789057cb2 100644 --- a/src/BootstrapBlazor/Services/IGeoLocationService.cs +++ b/src/BootstrapBlazor/Services/IGeoLocationService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,27 +6,31 @@ namespace BootstrapBlazor.Components; /// -/// 设备地理位置服务 +/// 设备地理位置服务 +/// Device Geo-Location Service /// public interface IGeoLocationService : IAsyncDisposable { /// - /// 获得设备地理位置方法 + /// 获得设备地理位置方法 + /// Get Device Geo-Location Method /// /// Task GetPositionAsync(); /// - /// 注册 WatchPositionAsync 监控地理位置变化方法 + /// 注册 WatchPositionAsync 监控地理位置变化方法 + /// Register WatchPositionAsync to monitor location changes /// /// /// ValueTask WatchPositionAsync(Func callback); /// - /// 清除 WatchPositionAsync 方法 + /// 清除 WatchPositionAsync 方法 + /// Clear WatchPositionAsync Method /// - /// 方法返回值 + /// 方法返回值 method返回value /// ValueTask ClearWatchPositionAsync(long id); } diff --git a/src/BootstrapBlazor/Services/IHtml2Image.cs b/src/BootstrapBlazor/Services/IHtml2Image.cs index 02639faf208..546bf9261db 100644 --- a/src/BootstrapBlazor/Services/IHtml2Image.cs +++ b/src/BootstrapBlazor/Services/IHtml2Image.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,21 +6,22 @@ namespace BootstrapBlazor.Components; /// -/// IHtml2Image 接口 +/// IHtml2Image 接口 +/// IHtml2Image Interface /// public interface IHtml2Image { /// /// Export method /// - /// 选择器 + /// 选择器Selector /// Task GetDataAsync(string selector, IHtml2ImageOptions? options = null); /// /// Export method /// - /// 选择器 + /// 选择器Selector /// Task GetStreamAsync(string selector, IHtml2ImageOptions? options = null); } diff --git a/src/BootstrapBlazor/Services/IHtml2ImageOptions.cs b/src/BootstrapBlazor/Services/IHtml2ImageOptions.cs index fcf4e14f30c..9701608443c 100644 --- a/src/BootstrapBlazor/Services/IHtml2ImageOptions.cs +++ b/src/BootstrapBlazor/Services/IHtml2ImageOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,55 +6,62 @@ namespace BootstrapBlazor.Components; /// -/// IHtml2ImageOptions 选项类接口 +/// IHtml2ImageOptions 选项类接口 +/// IHtml2ImageOptions Class Interface /// public interface IHtml2ImageOptions { /// - /// Width in pixels to be applied to node before rendering. + /// Width in pixels to be applied to node before rendering. + /// Width in pixels to be applied to node before rendering. /// int? Width { get; set; } /// - /// Height in pixels to be applied to node before rendering. + /// Height in pixels to be applied to node before rendering. + /// Height in pixels to be applied to node before rendering. /// int? Height { get; set; } /// - /// A string value for the background color, any valid CSS color value. + /// A string value for the background 颜色, any valid CSS 颜色 value. + /// A string value for the background color, any valid CSS color value. /// string? BackgroundColor { get; set; } /// - /// Width in pixels to be applied to canvas on export. + /// Width in pixels to be applied to canvas on export. + /// Width in pixels to be applied to canvas on export. /// int? CanvasWidth { get; set; } /// - /// Height in pixels to be applied to canvas on export. + /// Height in pixels to be applied to canvas on export. + /// Height in pixels to be applied to canvas on export. /// int? CanvasHeight { get; set; } /// - /// An array of style properties to be copied to node's style before rendering. - /// For performance-critical scenarios, users may want to specify only the required properties instead of all styles. + /// An array of 样式 properties to be copied to node's 样式 before rendering. For performance-critical scenarios, users may want to specify only the required properties instead of all 样式s. + /// An array of style properties to be copied to node's style before rendering. For performance-critical scenarios, users may want to specify only the required properties instead of all styles. /// string[]? IncludeStyleProperties { get; set; } /// - /// A number between `0` and `1` indicating image quality (e.g. 0.92 => 92%) - /// of the JPEG image. + /// A number between `0` and `1` indicating image quality (e.g. 0.92 => 92%) of the JPEG image. + /// A number between `0` and `1` indicating image quality (e.g. 0.92 => 92%) of the JPEG image. /// double? Quality { get; set; } /// - /// The pixel ratio of captured image. Default is the actual pixel ratio of - /// the device. Set 1 to use as initial-scale 1 for the image + /// pixel ratio of captured image. 默认为 the actual pixel ratio of the device. Set 1 to use as initial-scale 1 for the image + /// The pixel ratio of captured image. Default is the actual pixel ratio of the device. Set 1 to use as initial-scale 1 for the image /// double? PixelRatio { get; set; } /// - /// A string indicating the image format. The default type is image/png; that type is also used if the given type isn't supported. + /// A string indicating the image format. default 类型 is image/png; that 类型 is also used if the given 类型 isn't supported. + /// A string indicating the image format. The default type is image/png; that type is also used if the given type isn't supported. /// string? Type { get; set; } } diff --git a/src/BootstrapBlazor/Services/IHtml2Pdf.cs b/src/BootstrapBlazor/Services/IHtml2Pdf.cs index 501841c8b07..db30cada13f 100644 --- a/src/BootstrapBlazor/Services/IHtml2Pdf.cs +++ b/src/BootstrapBlazor/Services/IHtml2Pdf.cs @@ -1,39 +1,35 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone -using System.Net; - namespace BootstrapBlazor.Components; /// -/// Html export PDF service +/// Html export PDF service +/// Html export PDF service /// public interface IHtml2Pdf { - ///// - ///// 获得/设置 WebProxy 对象用于网络请求代理 - ///// Get or set the WebProxy object for network request proxy - ///// - //public IWebProxy? WebProxy { get; set; } - /// - /// Export method + /// Export method + /// Export method /// /// url /// Task PdfDataAsync(string url, PdfOptions? options = null); /// - /// Export method + /// Export method + /// Export method /// /// url /// Task PdfStreamAsync(string url, PdfOptions? options = null); /// - /// Export method + /// Export method + /// Export method /// /// html raw string /// @@ -42,7 +38,8 @@ public interface IHtml2Pdf Task PdfDataFromHtmlAsync(string html, IEnumerable? links = null, IEnumerable? scripts = null, PdfOptions? options = null); /// - /// Export method + /// Export method + /// Export method /// /// html raw string /// diff --git a/src/BootstrapBlazor/Services/IIconTheme.cs b/src/BootstrapBlazor/Services/IIconTheme.cs index f6799439118..9932a06121e 100644 --- a/src/BootstrapBlazor/Services/IIconTheme.cs +++ b/src/BootstrapBlazor/Services/IIconTheme.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,12 +10,14 @@ namespace BootstrapBlazor.Components; /// -/// Icon 主题服务 +/// Icon 主题服务 +/// Icon Theme Service /// public interface IIconTheme { /// - /// 获得所有图标 + /// 获得所有图标 + /// Get All Icons /// /// #if NET8_0_OR_GREATER diff --git a/src/BootstrapBlazor/Services/ILookupService.cs b/src/BootstrapBlazor/Services/ILookupService.cs index 119822e34ad..2bcb0e0296d 100644 --- a/src/BootstrapBlazor/Services/ILookupService.cs +++ b/src/BootstrapBlazor/Services/ILookupService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,29 +6,33 @@ namespace BootstrapBlazor.Components; /// -/// ILookupService 接口 +/// ILookupService 接口 +/// ILookupService Interface /// public interface ILookupService { /// - /// 根据指定键值获取 Lookup 集合方法 + /// 根据指定键值获取 Lookup 集合方法 + /// Get Lookup Collection by Key Method /// - /// 获得 Lookup 数据集合键值 + /// 获得 Lookup 数据集合键值Lookup Data Key [Obsolete("已弃用,请使用 data 参数重载方法;Deprecated, please use the data parameter method")] [ExcludeFromCodeCoverage] IEnumerable? GetItemsByKey(string? key); /// - /// 根据指定键值获取 Lookup 集合方法 + /// 根据指定键值获取 Lookup 集合方法 + /// Get Lookup Collection by Key Method /// - /// 获得 Lookup 数据集合键值 - /// Lookup 键值附加数据 + /// 获得 Lookup 数据集合键值Lookup Data Key + /// Lookup 键值附加数据Lookup Key Additional Data IEnumerable? GetItemsByKey(string? key, object? data); /// - /// 根据指定键值获取 Lookup 集合异步方法 + /// 根据指定键值获取 Lookup 集合异步方法 + /// Get Lookup Collection by Key Async Method /// - /// 获得 Lookup 数据集合键值 - /// Lookup 键值附加数据 + /// 获得 Lookup 数据集合键值Lookup Data Key + /// Lookup 键值附加数据Lookup Key Additional Data Task?> GetItemsByKeyAsync(string? key, object? data); } diff --git a/src/BootstrapBlazor/Services/INetworkMonitorService.cs b/src/BootstrapBlazor/Services/INetworkMonitorService.cs index b127f03ccf6..57b445a20c0 100644 --- a/src/BootstrapBlazor/Services/INetworkMonitorService.cs +++ b/src/BootstrapBlazor/Services/INetworkMonitorService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Defines a service for monitoring network state and retrieving the current network monitor status. +/// Defines a service for monitoring network state and retrieving the current network monitor status. +/// Defines a service for monitoring network state and retrieving the current network monitor status. /// public interface INetworkMonitorService { /// - /// Retrieves the current state of the network monitor. + /// Retrieves the current state of the network monitor. + /// Retrieves the current state of the network monitor. /// /// A cancellation token that can be used to cancel the operation. /// A task representing the asynchronous operation. The task result contains the current GetNetworkMonitorState(CancellationToken token = default); /// - /// Registers a callback to be invoked when the network monitor state changes. + /// Registers a 回调 to be invoked when the network monitor state changes. + /// Registers a callback to be invoked when the network monitor state changes. /// /// The callback is executed asynchronously whenever the network monitor detects a change in /// state. Ensure that the callback function is thread-safe and handles any exceptions that may occur during @@ -30,7 +33,8 @@ public interface INetworkMonitorService Task RegisterStateChangedCallback(IComponent component, Func callback); /// - /// Unregisters a previously registered callback for state changes on the specified component. + /// Unregisters a previously registered 回调 for state changes on the specified component. + /// Unregisters a previously registered callback for state changes on the specified component. /// /// The component for which the state change callback should be unregistered. Cannot be null. void UnregisterStateChangedCallback(IComponent component); diff --git a/src/BootstrapBlazor/Services/IPLocator/BaiduIpLocatorProvider.cs b/src/BootstrapBlazor/Services/IPLocator/BaiduIpLocatorProvider.cs index c90987402b3..8fb733cc78d 100644 --- a/src/BootstrapBlazor/Services/IPLocator/BaiduIpLocatorProvider.cs +++ b/src/BootstrapBlazor/Services/IPLocator/BaiduIpLocatorProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// 百度搜索引擎 IP 定位器 +/// 百度搜索引擎 IP 定位器 +/// Baidu Search Engine IP Locator /// public class BaiduIpLocatorProvider(IHttpClientFactory httpClientFactory, IOptions options, ILogger logger) : DefaultIpLocatorProvider(options) { @@ -38,20 +39,23 @@ public class BaiduIpLocatorProvider(IHttpClientFactory httpClientFactory, IOptio } /// - /// 获得 HttpClient 实例方法 + /// 获得 HttpClient 实例方法 + /// Get HttpClient Instance Method /// /// protected virtual HttpClient GetHttpClient() => httpClientFactory.CreateClient(); /// - /// 获得 Url 地址 + /// 获得 Url 地址 + /// Get URL Address /// /// /// protected virtual string GetUrl(string ip) => $"https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?resource_id=6006&query={ip}"; /// - /// 请求获得地理位置接口方法 + /// 请求获得地理位置接口方法 + /// Request Geolocation Interface Method /// /// /// @@ -64,23 +68,27 @@ public class BaiduIpLocatorProvider(IHttpClientFactory httpClientFactory, IOptio } /// - /// LocationResult 结构体 + /// LocationResult 结构体 + /// LocationResult Structure /// [ExcludeFromCodeCoverage] class LocationResult { /// - /// 获得/设置 结果状态返回码 为 0 时通讯正常 + /// 获得/设置 结果状态返回码 为 0 时通讯正常 + /// Get/Set Result Status Code, 0 is Normal /// public string? Status { get; set; } /// - /// 获得/设置 定位信息 + /// 获得/设置 定位信息 + /// Get/Set Location Info /// public List? Data { get; set; } /// /// + /// /// /// public override string? ToString() @@ -98,7 +106,8 @@ class LocationResult class LocationData { /// - /// 获得/设置 定位信息 + /// 获得/设置 定位信息 + /// Gets or sets 定位信息 /// public string? Location { get; set; } } diff --git a/src/BootstrapBlazor/Services/IPLocator/BaiduIpLocatorProviderV2.cs b/src/BootstrapBlazor/Services/IPLocator/BaiduIpLocatorProviderV2.cs index f20cac775a0..b4ac462dae2 100644 --- a/src/BootstrapBlazor/Services/IPLocator/BaiduIpLocatorProviderV2.cs +++ b/src/BootstrapBlazor/Services/IPLocator/BaiduIpLocatorProviderV2.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// BaiduIPLocatorV2 第二个版本实现类 +/// BaiduIPLocatorV2 第二个版本实现类 +/// BaiduIPLocatorV2 Implementation Class /// public class BaiduIpLocatorProviderV2(IHttpClientFactory httpClientFactory, IOptions options, ILogger logger) : BaiduIpLocatorProvider(httpClientFactory, options, logger) { @@ -66,87 +67,104 @@ class LocationResultV2 class LocationDataV2 { /// - /// 获得/设置 州 + /// 获得/设置 州 + /// Get/Set Continent /// public string? Continent { get; set; } /// - /// 获得/设置 国家 + /// 获得/设置 国家 + /// Get/Set Country /// public string? Country { get; set; } /// - /// 获得/设置 邮编 + /// 获得/设置 邮编 + /// Get/Set ZipCode /// public string? ZipCode { get; set; } /// - /// 获得/设置 时区 + /// 获得/设置 时区 + /// Get/Set TimeZone /// public string? TimeZone { get; set; } /// - /// 获得/设置 精度 + /// 获得/设置 精度 + /// Get/Set Accuracy /// public string? Accuracy { get; set; } /// - /// 获得/设置 所属 + /// 获得/设置 所属 + /// Get/Set Owner /// public string? Owner { get; set; } /// - /// 获得/设置 运营商 + /// 获得/设置 运营商 + /// Get/Set ISP /// public string? Isp { get; set; } /// - /// 获得/设置 来源 + /// 获得/设置 来源 + /// Get/Set Source /// public string? Source { get; set; } /// - /// 获得/设置 区号 + /// 获得/设置 区号 + /// Get/Set Area Code /// public string? AreaCode { get; set; } /// - /// 获得/设置 行政区划代码 + /// 获得/设置 行政区划代码 + /// Get/Set AdCode /// public string? AdCode { get; set; } /// - /// 获得/设置 国家代码 + /// 获得/设置 国家代码 + /// Get/Set Country Code /// public string? AsNumber { get; set; } /// - /// 获得/设置 经度 + /// 获得/设置 经度 + /// Get/Set Latitude /// public string? Lat { get; set; } /// - /// 获得/设置 纬度 + /// 获得/设置 纬度 + /// Get/Set Longitude /// public string? Lng { get; set; } /// - /// 获得/设置 半径 + /// 获得/设置 半径 + /// Get/Set Radius /// public string? Radius { get; set; } /// - /// 获得/设置 省份 + /// 获得/设置 省份 + /// Get/Set Province /// public string? Prov { get; set; } /// - /// 获得/设置 城市 + /// 获得/设置 城市 + /// Get/Set City /// public string? City { get; set; } /// - /// 获得/设置 区县 + /// 获得/设置 区县 + /// Get/Set District /// public string? District { get; set; } } diff --git a/src/BootstrapBlazor/Services/IPLocator/DefaultIPLocatorProvider.cs b/src/BootstrapBlazor/Services/IPLocator/DefaultIPLocatorProvider.cs index d32ae7cfdbf..4a3746f12e7 100644 --- a/src/BootstrapBlazor/Services/IPLocator/DefaultIPLocatorProvider.cs +++ b/src/BootstrapBlazor/Services/IPLocator/DefaultIPLocatorProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,22 +8,26 @@ namespace BootstrapBlazor.Components; /// -/// 默认 IP 地理位置定位器 +/// 默认 IP 地理位置定位器 +/// Default IP Geolocation Locator /// public abstract class DefaultIpLocatorProvider : IIpLocatorProvider { /// - /// 获得 Ip 定位结果缓存 + /// 获得 Ip 定位结果缓存 + /// Get IP Location Cache /// protected MemoryCache IpCache { get; } = new(new MemoryCacheOptions()); /// - /// 获得 IpLocator 配置信息 + /// 获得 IpLocator 配置信息 + /// Get IpLocator Configuration Options /// protected IpLocatorOptions Options { get; } /// - /// 构造函数 + /// 构造函数 + /// Constructor /// protected DefaultIpLocatorProvider(IOptions options) { @@ -32,7 +36,8 @@ protected DefaultIpLocatorProvider(IOptions options) } /// - /// 获得 本机地址列表 + /// 获得 本机地址列表 + /// Get Localhost List /// private readonly List _localhostList = [.. new[] { "::1", "127.0.0.1" }]; @@ -80,7 +85,8 @@ protected DefaultIpLocatorProvider(IOptions options) } /// - /// 内部定位方法 + /// 内部定位方法 + /// Internal Locate Method /// /// /// diff --git a/src/BootstrapBlazor/Services/IPLocator/DefaultIpLocatorFactory.cs b/src/BootstrapBlazor/Services/IPLocator/DefaultIpLocatorFactory.cs index b4727092f14..510cf75104c 100644 --- a/src/BootstrapBlazor/Services/IPLocator/DefaultIpLocatorFactory.cs +++ b/src/BootstrapBlazor/Services/IPLocator/DefaultIpLocatorFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,14 +8,16 @@ namespace BootstrapBlazor.Components; /// -/// IIPLocatorFactory 接口实现类 +/// IIPLocatorFactory 接口实现类 +/// IIPLocatorFactory Implementation Class /// class DefaultIpLocatorFactory(IServiceProvider provider, IOptionsMonitor options) : IIpLocatorFactory { private Dictionary? _providers = null; /// - /// 创建 实例方法 + /// 创建 实例方法 + /// Create Instance Method /// /// public IIpLocatorProvider Create(string? key = null) diff --git a/src/BootstrapBlazor/Services/IPLocator/IIpLocatorFactory.cs b/src/BootstrapBlazor/Services/IPLocator/IIpLocatorFactory.cs index 9d96f3b864b..ff76cdee570 100644 --- a/src/BootstrapBlazor/Services/IPLocator/IIpLocatorFactory.cs +++ b/src/BootstrapBlazor/Services/IPLocator/IIpLocatorFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,14 +6,16 @@ namespace BootstrapBlazor.Components; /// -/// IIpLocatorFactory 接口 +/// IIpLocatorFactory 接口 +/// IIpLocatorFactory Interface /// public interface IIpLocatorFactory { /// - /// 创建 IIPLocator 实例方法 + /// 创建 IIPLocator 实例方法 + /// Create IIPLocator Instance Method /// - /// 注入时使用的 key 值 + /// 注入时使用的 key 值Key used when injecting /// IIpLocatorProvider Create(string? key = null); } diff --git a/src/BootstrapBlazor/Services/IPLocator/IIpLocatorProvider.cs b/src/BootstrapBlazor/Services/IPLocator/IIpLocatorProvider.cs index 5c3862de6fe..7f38a8e1625 100644 --- a/src/BootstrapBlazor/Services/IPLocator/IIpLocatorProvider.cs +++ b/src/BootstrapBlazor/Services/IPLocator/IIpLocatorProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// IP 地址定位服务接口 +/// IP 地址定位服务接口 +/// IP Address Location Service Interface /// public interface IIpLocatorProvider { /// - /// 获得/设置 定位器 Key 默认 null 使用已注册的最后一个 Provider + /// 获得/设置 定位器 Key 默认 null 使用已注册的最后一个 Provider + /// Get/Set Locator Key, default null, use the last registered Provider /// string? Key { get; set; } /// - /// 通过 IP 地址定位地理位置信息 + /// 通过 IP 地址定位地理位置信息 + /// Locate Geolocation Info by IP Address /// /// Task Locate(string? ip); diff --git a/src/BootstrapBlazor/Services/IPLocator/IpLocatorOptions.cs b/src/BootstrapBlazor/Services/IPLocator/IpLocatorOptions.cs index 0ce126b09ca..2b64bed4a94 100644 --- a/src/BootstrapBlazor/Services/IPLocator/IpLocatorOptions.cs +++ b/src/BootstrapBlazor/Services/IPLocator/IpLocatorOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,22 +6,26 @@ namespace BootstrapBlazor.Components; /// -/// IpLocator 配置类 +/// IpLocator 配置类 +/// IpLocator Options /// public class IpLocatorOptions { /// - /// 获得/设置 定位器名称 内置支持 BaiduIpLocatorProvider BaiduIpLocatorProviderV2 + /// 获得/设置 定位器名称 内置支持 BaiduIpLocatorProvider BaiduIpLocatorProviderV2 + /// Get/Set Locator Name, built-in support for BaiduIpLocatorProvider, BaiduIpLocatorProviderV2 /// public string? ProviderName { get; set; } /// - /// 获得/设置 是否开启缓存降低请求频率 默认 true 缓存 + /// 获得/设置 是否开启缓存降低请求频率 默认 true 缓存 + /// Get/Set Enable Cache to reduce request frequency, default true /// public bool EnableCache { get; set; } = true; /// - /// 获得/设置 滑动过期时间 默认 5 分钟 + /// 获得/设置 滑动过期时间 默认 5 分钟 + /// Get/Set Sliding Expiration, default 5 minutes /// public TimeSpan SlidingExpiration { get; set; } = TimeSpan.FromMinutes(5); } diff --git a/src/BootstrapBlazor/Services/IRootComponentGenerator.cs b/src/BootstrapBlazor/Services/IRootComponentGenerator.cs index 486f142d8d9..ff2699ea458 100644 --- a/src/BootstrapBlazor/Services/IRootComponentGenerator.cs +++ b/src/BootstrapBlazor/Services/IRootComponentGenerator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 根组件接口 +/// 根组件接口 +/// Root Component Generator Interface /// public interface IRootComponentGenerator { /// - /// 生成组件方法 + /// 生成组件方法 + /// Generate Component Method /// /// RenderFragment Generator(); diff --git a/src/BootstrapBlazor/Services/ITableExcelExport.cs b/src/BootstrapBlazor/Services/ITableExcelExport.cs index 4b0ca30b139..f68d3e7a927 100644 --- a/src/BootstrapBlazor/Services/ITableExcelExport.cs +++ b/src/BootstrapBlazor/Services/ITableExcelExport.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,36 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件 Excel 导出接口 +/// Table 组件 Excel 导出接口 +/// Table Component Excel Export Interface /// [Obsolete("已过期,请使用 ITableExport 代替 Please use ITableExport instead")] public interface ITableExcelExport { /// - /// 导出 Excel 方法 + /// 导出 Excel 方法 + /// Export Excel Data Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合Export Data Collection + /// 当前可见列数据集合 默认 null 导出全部列Current visible column data collection, default null to export all columns + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsxFile name, default null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportAsync(IEnumerable items, IEnumerable? cols, string? fileName = null); /// - /// 导出 Csv 方法 + /// 导出 Csv 方法 + /// Export CSV Data Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合导出datacollection + /// 当前可见列数据集合 默认 null 导出全部列当前可见列datacollection default is null 导出全部列 + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx文件名 default is null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportCsvAsync(IEnumerable items, IEnumerable? cols, string? fileName = null); /// - /// 导出 Pdf 方法 + /// 导出 Pdf 方法 + /// Export PDF Data Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合导出datacollection + /// 当前可见列数据集合 默认 null 导出全部列当前可见列datacollection default is null 导出全部列 + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx文件名 default is null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportPdfAsync(IEnumerable items, IEnumerable? cols, string? fileName = null); } diff --git a/src/BootstrapBlazor/Services/ITableExport.cs b/src/BootstrapBlazor/Services/ITableExport.cs index 4376ae6e9e3..36b1d232f7a 100644 --- a/src/BootstrapBlazor/Services/ITableExport.cs +++ b/src/BootstrapBlazor/Services/ITableExport.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,85 +6,95 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件 Excel 导出接口 +/// Table 组件 Excel 导出接口 +/// Table Component Excel Export Interface /// public interface ITableExport { /// - /// 导出 方法 + /// 导出 方法 + /// Export Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合Export Data Collection + /// 当前可见列数据集合 默认 null 导出全部列Current visible column data collection, default null to export all columns + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsxFile name, default null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportAsync(IEnumerable items, IEnumerable? cols, string? fileName = null); /// - /// 导出 方法 + /// 导出 方法 + /// Export Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 导出配置实例 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合导出datacollection + /// 当前可见列数据集合 默认 null 导出全部列当前可见列datacollection default is null 导出全部列 + /// 导出配置实例导出configinstance + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx文件名 default is null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportAsync(IEnumerable items, IEnumerable? cols, TableExportOptions options, string? fileName = null) => ExportAsync(items, cols, fileName); /// - /// 导出 Excel 方法 + /// 导出 Excel 方法 + /// Export Excel Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合导出datacollection + /// 当前可见列数据集合 默认 null 导出全部列当前可见列datacollection default is null 导出全部列 + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx文件名 default is null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportExcelAsync(IEnumerable items, IEnumerable? cols, string? fileName = null); /// - /// 导出 Excel 方法 + /// 导出 Excel 方法 + /// Export Excel Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 导出配置实例 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合Export Data Collection + /// 当前可见列数据集合 默认 null 导出全部列Current visible column data collection, default null to export all columns + /// 导出配置实例Export Options Instance + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsxFile name, default null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportExcelAsync(IEnumerable items, IEnumerable? cols, TableExportOptions options, string? fileName = null) => ExportExcelAsync(items, cols, fileName); /// - /// 导出 Csv 方法 + /// 导出 Csv 方法 + /// Export CSV Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合导出datacollection + /// 当前可见列数据集合 默认 null 导出全部列当前可见列datacollection default is null 导出全部列 + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx文件名 default is null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportCsvAsync(IEnumerable items, IEnumerable? cols, string? fileName = null); /// - /// 导出 Csv 方法 + /// 导出 Csv 方法 + /// Export CSV Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 导出配置实例 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合导出datacollection + /// 当前可见列数据集合 默认 null 导出全部列当前可见列datacollection default is null 导出全部列 + /// 导出配置实例导出configinstance + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx文件名 default is null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportCsvAsync(IEnumerable items, IEnumerable? cols, TableExportOptions options, string? fileName = null) => ExportCsvAsync(items, cols, fileName); /// - /// 导出 Pdf 方法 + /// 导出 Pdf 方法 + /// Export PDF Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合导出datacollection + /// 当前可见列数据集合 默认 null 导出全部列当前可见列datacollection default is null 导出全部列 + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx文件名 default is null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportPdfAsync(IEnumerable items, IEnumerable? cols, string? fileName = null); /// - /// 导出 Pdf 方法 + /// 导出 Pdf 方法 + /// Export PDF Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 导出配置实例 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 导出数据集合导出datacollection + /// 当前可见列数据集合 默认 null 导出全部列当前可见列datacollection default is null 导出全部列 + /// 导出配置实例导出configinstance + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx文件名 default is null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx Task ExportPdfAsync(IEnumerable items, IEnumerable? cols, TableExportOptions options, string? fileName = null) => ExportPdfAsync(items, cols, fileName); /// - /// 导出 Pdf 方法 + /// 导出 Pdf 方法 + /// Export PDF Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 导出配置实例 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx - /// 样式表集合 + /// 导出数据集合Export Data Collection + /// 当前可见列数据集合 默认 null 导出全部列Current visible column data collection, default null to export all columns + /// 导出配置实例Export Options Instance + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsxFile name, default null ExportData_{DateTime.Now:yyyyMMddHHmmss}.xlsx + /// 样式表集合Style Sheet Collection Task ExportPdfAsync(IEnumerable items, IEnumerable? cols, TableExportOptions options, string? fileName = null, IEnumerable? links = null) => ExportPdfAsync(items, cols, fileName); } diff --git a/src/BootstrapBlazor/Services/ITablePdfExport.cs b/src/BootstrapBlazor/Services/ITablePdfExport.cs index e7c3788884b..efddb769d91 100644 --- a/src/BootstrapBlazor/Services/ITablePdfExport.cs +++ b/src/BootstrapBlazor/Services/ITablePdfExport.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,16 +6,18 @@ namespace BootstrapBlazor.Components; /// -/// Table 组件 Pdf 导出接口 +/// Table 组件 Pdf 导出接口 +/// Table Component PDF Export Interface /// [Obsolete("已过期,统一使用 ITableExport 接口")] public interface ITablePdfExport { /// - /// 导出 Pdf 方法 + /// 导出 Pdf 方法 + /// Export PDF Method /// - /// 导出数据集合 - /// 当前可见列数据集合 默认 null 导出全部列 - /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.pdf + /// 导出数据集合Export Data Collection + /// 当前可见列数据集合 默认 null 导出全部列Current visible column data collection, default null to export all columns + /// 文件名 默认 null ExportData_{DateTime.Now:yyyyMMddHHmmss}.pdfFile name, default null ExportData_{DateTime.Now:yyyyMMddHHmmss}.pdf Task ExportAsync(IEnumerable items, IEnumerable? cols, string? fileName = null) where TItem : class; } diff --git a/src/BootstrapBlazor/Services/IThemeProvider.cs b/src/BootstrapBlazor/Services/IThemeProvider.cs index 2592815770b..35fec1d06be 100644 --- a/src/BootstrapBlazor/Services/IThemeProvider.cs +++ b/src/BootstrapBlazor/Services/IThemeProvider.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,30 +6,35 @@ namespace BootstrapBlazor.Components; /// -/// Interface for theme provider +/// Interface for theme provider +/// Interface for theme provider /// public interface IThemeProvider { /// - /// Sets the theme asynchronously. + /// 设置 the theme asynchronously. + /// Sets the theme asynchronously. /// /// The name of the theme to set. /// A representing the asynchronous operation. ValueTask SetThemeAsync(string themeName); /// - /// Gets the current theme asynchronously. + /// 获得 the current theme asynchronously. + /// Gets the current theme asynchronously. /// /// A representing the asynchronous operation, with the current theme name as the result. ValueTask GetThemeAsync(); /// - /// The callback when theme changed + /// 回调 when theme changed + /// The callback when theme changed /// Func? ThemeChangedAsync { get; set; } /// - /// Trigger the theme changed event + /// Trigger the theme changed event + /// Trigger the theme changed event /// /// The name of the theme to set. void TriggerThemeChanged(string themeName); diff --git a/src/BootstrapBlazor/Services/IThrottleDispatcherFactory.cs b/src/BootstrapBlazor/Services/IThrottleDispatcherFactory.cs index 1c3b79af303..6b01d67a9bd 100644 --- a/src/BootstrapBlazor/Services/IThrottleDispatcherFactory.cs +++ b/src/BootstrapBlazor/Services/IThrottleDispatcherFactory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,25 +6,29 @@ namespace BootstrapBlazor.Components; /// -/// 同步限流器接口 +/// 同步限流器接口 +/// Throttle Dispatcher Interface /// public interface IThrottleDispatcherFactory { /// - /// 获得或创建限流器 + /// 获得或创建限流器 + /// Gets或创建限流器 /// /// ThrottleDispatcher GetOrCreate(string key, ThrottleOptions? options = null); /// - /// 获得或创建限流器 + /// 获得或创建限流器 + /// Get or Create Throttle Dispatcher /// /// ThrottleDispatcher GetOrCreate(string key, int interval) => GetOrCreate(key, new ThrottleOptions() { Interval = TimeSpan.FromMilliseconds(interval) }); /// - /// 销毁限流器 + /// 销毁限流器 + /// Destroy Throttle Dispatcher /// - /// 为空时销毁所有限流器 + /// 为空时销毁所有限流器If empty, destroy all throttle dispatchers void Clear(string? key = null); } diff --git a/src/BootstrapBlazor/Services/ITotpService.cs b/src/BootstrapBlazor/Services/ITotpService.cs index c0efbb0ef07..d6b10d74d06 100644 --- a/src/BootstrapBlazor/Services/ITotpService.cs +++ b/src/BootstrapBlazor/Services/ITotpService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,19 +6,22 @@ namespace BootstrapBlazor.Components; /// -/// ITotpService interface +/// ITotpService interface +/// ITotpService interface /// public interface ITotpService { /// - /// Generates a one-time password (OTP) URI for the specified parameters. + /// Generates a one-time password (OTP) URI for the specified parameters. + /// Generates a one-time password (OTP) URI for the specified parameters. /// /// the instance of /// string GenerateOtpUri(OtpOptions? options = null); /// - /// Computes the Time-based One-Time Password (TOTP) for the given secret key and timestamp. + /// Computes the Time-based One-Time Password (TOTP) for the given secret key and timestamp. + /// Computes the Time-based One-Time Password (TOTP) for the given secret key and timestamp. /// /// /// @@ -29,26 +32,30 @@ public interface ITotpService string Compute(string secretKey, int period = 30, OtpHashMode mode = OtpHashMode.Sha1, int digits = 6, DateTime? timestamp = null); /// - /// Computes the remaining seconds until the next TOTP expiration for the given secret key and timestamp. + /// Computes the remaining seconds until the next TOTP expiration for the given secret key and timestamp. + /// Computes the remaining seconds until the next TOTP expiration for the given secret key and timestamp. /// /// /// int GetRemainingSeconds(DateTime? timestamp = null); /// - /// Generates a random secret key for OTP authentication. + /// Generates a random secret key for OTP authentication. + /// Generates a random secret key for OTP authentication. /// /// string GenerateSecretKey(int length = 20); /// - /// Gets the secret key bytes from the given input string. + /// 获得 the secret key bytes from the given input string. + /// Gets the secret key bytes from the given input string. /// /// byte[] GetSecretKeyBytes(string input); /// - /// Verifies the given TOTP code against the expected value using the provided secret key. + /// Verifies the given TOTP code against the expected value using the provided secret key. + /// Verifies the given TOTP code against the expected value using the provided secret key. /// /// /// @@ -56,7 +63,8 @@ public interface ITotpService bool Verify(string code, DateTime? timestamp = null); /// - /// Gets the instance. Default is null. + /// 获得 the 实例. 默认为 null. + /// Gets the instance. Default is null. /// TotpInstanceBase Instance { get; } } diff --git a/src/BootstrapBlazor/Services/IVersionService.cs b/src/BootstrapBlazor/Services/IVersionService.cs index 9f3f7c66aaa..5de789b06a7 100644 --- a/src/BootstrapBlazor/Services/IVersionService.cs +++ b/src/BootstrapBlazor/Services/IVersionService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,20 +6,23 @@ namespace BootstrapBlazor.Components; /// -/// 组件版本号服务 +/// 组件版本号服务 +/// Component Version Service /// public interface IVersionService { /// - /// 获得 版本号 + /// 获得 版本号 + /// Get Version /// /// string GetVersion(); /// - /// 获得 版本号 + /// 获得 版本号 + /// Get Version /// - /// 当前资源 相对路径 如 ./css/site.css + /// 当前资源 相对路径 如 ./css/site.cssCurrent resource relative path, e.g. ./css/site.css /// string GetVersion(string? url) => GetVersion(); } diff --git a/src/BootstrapBlazor/Services/IZipArchiveService.cs b/src/BootstrapBlazor/Services/IZipArchiveService.cs index 65c6eff4ee2..819f5da3405 100644 --- a/src/BootstrapBlazor/Services/IZipArchiveService.cs +++ b/src/BootstrapBlazor/Services/IZipArchiveService.cs @@ -9,69 +9,77 @@ namespace BootstrapBlazor.Components; /// -/// Zip 归档服务 +/// Zip 归档服务 +/// Zip Archive Service /// public interface IZipArchiveService { /// - /// 将文件归档方法 + /// 将文件归档方法 + /// Archive File Method /// - /// 要归档的文件集合 - /// 归档配置 - /// 归档数据流 + /// 要归档的文件集合Collection of files to archive + /// 归档配置Archive Options + /// 归档数据流Archive Data Stream Task ArchiveAsync(IEnumerable files, ArchiveOptions? options = null); /// - /// 将文件归档方法 + /// 将文件归档方法 + /// Archive File Method /// - /// 归档文件 - /// 要归档的文件集合 - /// 归档配置 + /// 归档文件Archive File + /// 要归档的文件集合要归档的文件collection + /// 归档配置归档config Task ArchiveAsync(string archiveFile, IEnumerable files, ArchiveOptions? options = null); /// - /// 将文件归档方法 + /// 将文件归档方法 + /// Archive File Method /// - /// 要归档项集合 - /// 归档配置 - /// 归档数据流 + /// 要归档项集合Collection of entries to archive + /// 归档配置归档config + /// 归档数据流归档data流 Task ArchiveAsync(IEnumerable entries, ArchiveOptions? options = null); /// - /// 将文件归档方法 + /// 将文件归档方法 + /// Archive File Method /// - /// 归档文件 - /// 要归档项集合 - /// 归档配置 + /// 归档文件归档文件 + /// 要归档项集合要归档项collection + /// 归档配置归档config Task ArchiveAsync(string archiveFile, IEnumerable entries, ArchiveOptions? options = null); /// - /// 将指定目录归档方法 + /// 将指定目录归档方法 + /// Archive Directory Method /// - /// 归档文件 - /// 要归档文件夹 - /// 压缩率 - /// 是否包含本目录 默认 false - /// 编码方式 默认 null 内部使用 UTF-8 + /// 归档文件归档文件 + /// 要归档文件夹Directory to archive + /// 压缩率Compression Level + /// 是否包含本目录 默认 falseInclude base directory, default false + /// 编码方式 默认 null 内部使用 UTF-8Encoding, default null, internal use UTF-8 /// Task ArchiveDirectoryAsync(string archiveFile, string directoryName, CompressionLevel compressionLevel = CompressionLevel.Optimal, bool includeBaseDirectory = false, Encoding? encoding = null, CancellationToken token = default); /// - /// 解压缩归档文件到指定文件夹异步方法 + /// 解压缩归档文件到指定文件夹异步方法 + /// Extract Archive to Directory Async Method /// - /// 归档文件 - /// 解压缩文件夹 - /// 是否覆盖文件 默认 false 不覆盖 - /// 编码方式 默认 null 内部使用 UTF-8 + /// 归档文件归档文件 + /// 解压缩文件夹Destination Directory + /// 是否覆盖文件 默认 false 不覆盖Overwrite files, default false + /// 编码方式 默认 null 内部使用 UTF-8Encoding, default null, internal use UTF-8 /// Task ExtractToDirectoryAsync(string archiveFile, string destinationDirectoryName, bool overwriteFiles = false, Encoding? encoding = null, CancellationToken token = default); /// - /// 获得归档压缩文件中指定归档文件 + /// 获得归档压缩文件中指定归档文件 + /// Get Entry from Archive File /// - /// 归档文件 - /// 解压缩文件 - /// 是否覆盖文件 默认 false 不覆盖 - /// 编码方式 默认 null 内部使用 UTF-8 + /// 归档文件归档文件 + /// 解压缩文件Entry File + /// 是否覆盖文件 默认 false 不覆盖Overwrite files, default false + /// 编码方式 默认 null 内部使用 UTF-8Encoding, default null, internal use UTF-8 ZipArchiveEntry? GetEntry(string archiveFile, string entryFile, bool overwriteFiles = false, Encoding? encoding = null); } diff --git a/src/BootstrapBlazor/Services/Internal/HtmlRenderer.cs b/src/BootstrapBlazor/Services/Internal/HtmlRenderer.cs index 89e6a3f3f71..d56617a84d1 100644 --- a/src/BootstrapBlazor/Services/Internal/HtmlRenderer.cs +++ b/src/BootstrapBlazor/Services/Internal/HtmlRenderer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -13,7 +13,8 @@ namespace Microsoft.AspNetCore.Components.Web; /// -/// Provides a mechanism for rendering components non-interactively as HTML markup. +/// Provides a mechanism for rendering components non-interactively as HTML markup. +/// Provides a mechanism for rendering components non-interactively as HTML markup. /// [ExcludeFromCodeCoverage] sealed class HtmlRenderer : IDisposable, IAsyncDisposable @@ -21,7 +22,8 @@ sealed class HtmlRenderer : IDisposable, IAsyncDisposable private readonly StaticHtmlRenderer _passiveHtmlRenderer; /// - /// Constructs an instance of . + /// Constructs an 实例 of . + /// Constructs an instance of . /// /// The services to use when rendering components. /// The logger factory to use. @@ -30,26 +32,27 @@ public HtmlRenderer(IServiceProvider services, ILoggerFactory loggerFactory) _passiveHtmlRenderer = new StaticHtmlRenderer(services, loggerFactory); } - /// + /// + /// + /// public void Dispose() => _passiveHtmlRenderer.Dispose(); - /// + /// + /// + /// public ValueTask DisposeAsync() => _passiveHtmlRenderer.DisposeAsync(); /// - /// Gets the associated with this instance. Any calls to - /// or - /// must be performed using this . + /// 获得 the associated with this 实例. Any calls to or must be performed using this . + /// Gets the associated with this instance. Any calls to or must be performed using this . /// public Dispatcher Dispatcher => _passiveHtmlRenderer.Dispatcher; /// - /// Adds an instance of the specified component and instructs it to render. The resulting content represents the - /// initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete - /// any asynchronous operations such as loading, await before - /// reading content from the . + /// Adds an 实例 of the specified component and instructs it to render. resulting 内容 represents the initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete any asynchronous operations such as loading, await before reading 内容 from the . + /// Adds an instance of the specified component and instructs it to render. The resulting content represents the initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete any asynchronous operations such as loading, await before reading content from the . /// /// The component type. /// An instance representing the render output. @@ -57,10 +60,8 @@ public ValueTask DisposeAsync() => _passiveHtmlRenderer.BeginRenderingComponent(typeof(TComponent), ParameterView.Empty); /// - /// Adds an instance of the specified component and instructs it to render. The resulting content represents the - /// initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete - /// any asynchronous operations such as loading, await before - /// reading content from the . + /// Adds an 实例 of the specified component and instructs it to render. resulting 内容 represents the initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete any asynchronous operations such as loading, await before reading 内容 from the . + /// Adds an instance of the specified component and instructs it to render. The resulting content represents the initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete any asynchronous operations such as loading, await before reading content from the . /// /// The component type. /// Parameters for the component. @@ -70,10 +71,8 @@ public ValueTask DisposeAsync() => _passiveHtmlRenderer.BeginRenderingComponent(typeof(TComponent), parameters); /// - /// Adds an instance of the specified component and instructs it to render. The resulting content represents the - /// initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete - /// any asynchronous operations such as loading, await before - /// reading content from the . + /// Adds an 实例 of the specified component and instructs it to render. resulting 内容 represents the initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete any asynchronous operations such as loading, await before reading 内容 from the . + /// Adds an instance of the specified component and instructs it to render. The resulting content represents the initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete any asynchronous operations such as loading, await before reading content from the . /// /// The component type. This must implement . /// An instance representing the render output. @@ -82,10 +81,8 @@ public HtmlRootComponent BeginRenderingComponent( => _passiveHtmlRenderer.BeginRenderingComponent(componentType, ParameterView.Empty); /// - /// Adds an instance of the specified component and instructs it to render. The resulting content represents the - /// initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete - /// any asynchronous operations such as loading, await before - /// reading content from the . + /// Adds an 实例 of the specified component and instructs it to render. resulting 内容 represents the initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete any asynchronous operations such as loading, await before reading 内容 from the . + /// Adds an instance of the specified component and instructs it to render. The resulting content represents the initial synchronous rendering output, which may later change. To wait for the component hierarchy to complete any asynchronous operations such as loading, await before reading content from the . /// /// The component type. This must implement . /// Parameters for the component. @@ -96,8 +93,8 @@ public HtmlRootComponent BeginRenderingComponent( => _passiveHtmlRenderer.BeginRenderingComponent(componentType, parameters); /// - /// Adds an instance of the specified component and instructs it to render, waiting - /// for the component hierarchy to complete asynchronous tasks such as loading. + /// Adds an 实例 of the specified component and instructs it to render, waiting for the component hierarchy to complete asynchronous tasks such as loading. + /// Adds an instance of the specified component and instructs it to render, waiting for the component hierarchy to complete asynchronous tasks such as loading. /// /// The component type. /// A task that completes with once the component hierarchy has completed any asynchronous tasks such as loading. @@ -105,8 +102,8 @@ public HtmlRootComponent BeginRenderingComponent( => RenderComponentAsync(ParameterView.Empty); /// - /// Adds an instance of the specified component and instructs it to render, waiting - /// for the component hierarchy to complete asynchronous tasks such as loading. + /// Adds an 实例 of the specified component and instructs it to render, waiting for the component hierarchy to complete asynchronous tasks such as loading. + /// Adds an instance of the specified component and instructs it to render, waiting for the component hierarchy to complete asynchronous tasks such as loading. /// /// The component type. This must implement . /// A task that completes with once the component hierarchy has completed any asynchronous tasks such as loading. @@ -115,8 +112,8 @@ public Task RenderComponentAsync( => RenderComponentAsync(componentType, ParameterView.Empty); /// - /// Adds an instance of the specified component and instructs it to render, waiting - /// for the component hierarchy to complete asynchronous tasks such as loading. + /// Adds an 实例 of the specified component and instructs it to render, waiting for the component hierarchy to complete asynchronous tasks such as loading. + /// Adds an instance of the specified component and instructs it to render, waiting for the component hierarchy to complete asynchronous tasks such as loading. /// /// The component type. /// Parameters for the component. @@ -126,8 +123,8 @@ public Task RenderComponentAsync( => RenderComponentAsync(typeof(TComponent), parameters); /// - /// Adds an instance of the specified component and instructs it to render, waiting - /// for the component hierarchy to complete asynchronous tasks such as loading. + /// Adds an 实例 of the specified component and instructs it to render, waiting for the component hierarchy to complete asynchronous tasks such as loading. + /// Adds an instance of the specified component and instructs it to render, waiting for the component hierarchy to complete asynchronous tasks such as loading. /// /// The component type. This must implement . /// Parameters for the component. diff --git a/src/BootstrapBlazor/Services/Internal/HtmlRootComponent.cs b/src/BootstrapBlazor/Services/Internal/HtmlRootComponent.cs index 0cbb38eea2d..66a3207441b 100644 --- a/src/BootstrapBlazor/Services/Internal/HtmlRootComponent.cs +++ b/src/BootstrapBlazor/Services/Internal/HtmlRootComponent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -11,7 +11,8 @@ namespace Microsoft.AspNetCore.Components.Web.HtmlRendering; #pragma warning disable BL0006 // Do not use RenderTree types /// -/// Represents the output of rendering a root component as HTML. The content can change if the component instance re-renders. +/// Represents the output of rendering a root component as HTML. 内容 can change if the component 实例 re-renders. +/// Represents the output of rendering a root component as HTML. The content can change if the component instance re-renders. /// [ExcludeFromCodeCoverage] readonly struct HtmlRootComponent @@ -26,17 +27,20 @@ internal HtmlRootComponent(StaticHtmlRenderer renderer, int componentId, Task qu } /// - /// Gets the component ID. + /// 获得 the component ID. + /// Gets the component ID. /// public int ComponentId { get; } /// - /// Gets a that completes when the component hierarchy has completed asynchronous tasks such as loading. + /// 获得 a that completes when the component hierarchy has completed asynchronous tasks such as loading. + /// Gets a that completes when the component hierarchy has completed asynchronous tasks such as loading. /// public Task QuiescenceTask { get; } = Task.CompletedTask; /// - /// Returns an HTML string representation of the component's latest output. + /// Returns an HTML string representation of the component's latest output. + /// Returns an HTML string representation of the component's latest output. /// /// An HTML string representation of the component's latest output. public string ToHtmlString() @@ -52,7 +56,8 @@ public string ToHtmlString() } /// - /// Writes the component's latest output as HTML to the specified writer. + /// Writes the component's latest output as HTML to the specified writer. + /// Writes the component's latest output as HTML to the specified writer. /// /// The output destination. public void WriteHtmlTo(TextWriter output) diff --git a/src/BootstrapBlazor/Services/Internal/StaticHtmlRenderer.HtmlWriting.cs b/src/BootstrapBlazor/Services/Internal/StaticHtmlRenderer.HtmlWriting.cs index 947f7d980ac..32e018e3171 100644 --- a/src/BootstrapBlazor/Services/Internal/StaticHtmlRenderer.HtmlWriting.cs +++ b/src/BootstrapBlazor/Services/Internal/StaticHtmlRenderer.HtmlWriting.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -23,7 +23,8 @@ partial class StaticHtmlRenderer private string? _closestSelectValueAsString; /// - /// Renders the specified component as HTML to the output. + /// Renders the specified component as HTML to the output. + /// Renders the specified component as HTML to the output. /// /// The ID of the component whose current HTML state is to be rendered. /// The output destination. diff --git a/src/BootstrapBlazor/Services/Internal/StaticHtmlRenderer.cs b/src/BootstrapBlazor/Services/Internal/StaticHtmlRenderer.cs index bffa9b0a3af..457cf40e918 100644 --- a/src/BootstrapBlazor/Services/Internal/StaticHtmlRenderer.cs +++ b/src/BootstrapBlazor/Services/Internal/StaticHtmlRenderer.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -15,9 +15,8 @@ namespace Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure; #pragma warning disable BL0006 // Do not use RenderTree types /// -/// A subclass that is intended for static HTML rendering. Application -/// developers should not normally use this class directly. Instead, use -/// for a more convenient API. +/// A subclass that is intended for static HTML rendering. Application developers should not normally use this class directly. Instead, use for a more convenient API. +/// A subclass that is intended for static HTML rendering. Application developers should not normally use this class directly. Instead, use for a more convenient API. /// [ExcludeFromCodeCoverage] partial class StaticHtmlRenderer : Renderer @@ -25,7 +24,8 @@ partial class StaticHtmlRenderer : Renderer private static readonly Task CanceledRenderTask = Task.FromCanceled(new CancellationToken(canceled: true)); /// - /// Constructs an instance of . + /// Constructs an 实例 of . + /// Constructs an instance of . /// /// The to be used when initializing components. /// The . @@ -34,11 +34,14 @@ public StaticHtmlRenderer(IServiceProvider serviceProvider, ILoggerFactory logge { } + /// /// + /// public override Dispatcher Dispatcher { get; } = Dispatcher.CreateDefault(); /// - /// Adds a root component of the specified type and begins rendering it. + /// Adds a root component of the specified 类型 and begins rendering it. + /// Adds a root component of the specified type and begins rendering it. /// /// The component type. This must implement . /// Parameters for the component. @@ -52,7 +55,8 @@ public HtmlRootComponent BeginRenderingComponent( } /// - /// Adds a root component and begins rendering it. + /// Adds a root component and begins rendering it. + /// Adds a root component and begins rendering it. /// /// The root component instance to be added and rendered. This must not already be associated with any renderer. /// Parameters for the component. @@ -72,11 +76,15 @@ public HtmlRootComponent BeginRenderingComponent( return new HtmlRootComponent(this, componentId, quiescenceTask); } + /// /// + /// protected override void HandleException(Exception exception) => ExceptionDispatchInfo.Capture(exception).Throw(); + /// /// + /// protected override Task UpdateDisplayAsync(in RenderBatch renderBatch) { // By default we return a canceled task. This has the effect of making it so that the diff --git a/src/BootstrapBlazor/Services/LookupServiceBase.cs b/src/BootstrapBlazor/Services/LookupServiceBase.cs index 7dbf912cfa5..28f97ce3222 100644 --- a/src/BootstrapBlazor/Services/LookupServiceBase.cs +++ b/src/BootstrapBlazor/Services/LookupServiceBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,19 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// LookupService 基类 +/// LookupService 基类 +/// LookupService Base Class /// public abstract class LookupServiceBase : ILookupService { /// - /// + /// /// [Obsolete("已弃用,请使用 data 参数重载方法;Deprecated, please use the data parameter method")] [ExcludeFromCodeCoverage] public virtual IEnumerable? GetItemsByKey(string? key) => GetItemsByKey(key, null); /// - /// + /// /// public abstract IEnumerable? GetItemsByKey(string? key, object? data); diff --git a/src/BootstrapBlazor/Services/MediaDevices/DefaultAudioDevice.cs b/src/BootstrapBlazor/Services/MediaDevices/DefaultAudioDevice.cs index 95b0420bfe2..8567c67eacc 100644 --- a/src/BootstrapBlazor/Services/MediaDevices/DefaultAudioDevice.cs +++ b/src/BootstrapBlazor/Services/MediaDevices/DefaultAudioDevice.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/MediaDevices/DefaultMediaDevices.cs b/src/BootstrapBlazor/Services/MediaDevices/DefaultMediaDevices.cs index 682c58bc570..69fe7bb5259 100644 --- a/src/BootstrapBlazor/Services/MediaDevices/DefaultMediaDevices.cs +++ b/src/BootstrapBlazor/Services/MediaDevices/DefaultMediaDevices.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/MediaDevices/DefaultVideoDevice.cs b/src/BootstrapBlazor/Services/MediaDevices/DefaultVideoDevice.cs index e68dbae597d..ec80fa6c505 100644 --- a/src/BootstrapBlazor/Services/MediaDevices/DefaultVideoDevice.cs +++ b/src/BootstrapBlazor/Services/MediaDevices/DefaultVideoDevice.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/MediaDevices/IAudioDevice.cs b/src/BootstrapBlazor/Services/MediaDevices/IAudioDevice.cs index 8f4685a1402..a11d66c187d 100644 --- a/src/BootstrapBlazor/Services/MediaDevices/IAudioDevice.cs +++ b/src/BootstrapBlazor/Services/MediaDevices/IAudioDevice.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,37 @@ namespace BootstrapBlazor.Components; /// -/// Audio Media Device Interface +/// Audio Media Device Interface +/// Audio Media Device Interface /// public interface IAudioDevice { /// - /// Gets the list of audio devices. + /// 获得 the list of audio devices. + /// Gets the list of audio devices. /// /// Task?> GetDevices(); /// - /// Opens the audio device with the specified constraints. + /// Opens the audio device with the specified constraints. + /// Opens the audio device with the specified constraints. /// /// /// Task Open(MediaTrackConstraints constraints); /// - /// Close the audio device with the specified selector. + /// Close the audio device with the specified selector. + /// Close the audio device with the specified selector. /// /// /// Task Close(string? selector); /// - /// Gets the stream of the audio. + /// 获得 the stream of the audio. + /// Gets the stream of the audio. /// /// Task GetData(); diff --git a/src/BootstrapBlazor/Services/MediaDevices/IMediaDeviceInfo.cs b/src/BootstrapBlazor/Services/MediaDevices/IMediaDeviceInfo.cs index 71c57b71a37..c5a7e28699c 100644 --- a/src/BootstrapBlazor/Services/MediaDevices/IMediaDeviceInfo.cs +++ b/src/BootstrapBlazor/Services/MediaDevices/IMediaDeviceInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,27 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// The MediaDeviceInfo interface of the Media Capture and Streams API contains information that describes a single media input or output device. +/// MediaDeviceInfo interface of the Media Capture and Streams API contains information that describes a single media input or output device. +/// The MediaDeviceInfo interface of the Media Capture and Streams API contains information that describes a single media input or output device. /// public interface IMediaDeviceInfo { /// - /// The deviceId read-only property of the MediaDeviceInfo interface returns a string that is an identifier for the represented device and is persisted across sessions. + /// deviceId read-only 属性 of the MediaDeviceInfo interface returns a string that is an identifier for the represented device and is persisted across sessions. + /// The deviceId read-only property of the MediaDeviceInfo interface returns a string that is an identifier for the represented device and is persisted across sessions. /// public string DeviceId { get; } /// - /// The groupId read-only property of the MediaDeviceInfo interface returns a string that is a group identifier. + /// groupId read-only 属性 of the MediaDeviceInfo interface returns a string that is a group identifier. + /// The groupId read-only property of the MediaDeviceInfo interface returns a string that is a group identifier. /// public string GroupId { get; } /// - /// The kind read-only property of the MediaDeviceInfo interface returns an enumerated value, that is either "videoinput", "audioinput" or "audiooutput". + /// kind read-only 属性 of the MediaDeviceInfo interface returns an 枚举erated value, that is either "videoinput", "audioinput" or "audiooutput". + /// The kind read-only property of the MediaDeviceInfo interface returns an enumerated value, that is either "videoinput", "audioinput" or "audiooutput". /// public string Kind { get; } /// - /// The label read-only property of the MediaDeviceInfo interface returns a string describing this device (for example "External USB Webcam"). + /// label read-only 属性 of the MediaDeviceInfo interface returns a string describing this device (for example "External USB Webcam"). + /// The label read-only property of the MediaDeviceInfo interface returns a string describing this device (for example "External USB Webcam"). /// public string Label { get; } } diff --git a/src/BootstrapBlazor/Services/MediaDevices/IMediaDevices.cs b/src/BootstrapBlazor/Services/MediaDevices/IMediaDevices.cs index 99da23a9a25..7acf1592432 100644 --- a/src/BootstrapBlazor/Services/MediaDevices/IMediaDevices.cs +++ b/src/BootstrapBlazor/Services/MediaDevices/IMediaDevices.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// The MediaDevices interface of the Media Capture and Streams API provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media data. +/// MediaDevices interface of the Media Capture and Streams API provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media 数据. +/// The MediaDevices interface of the Media Capture and Streams API provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media data. /// public interface IMediaDevices { /// - /// An array of MediaDeviceInfo objects. Each object in the array describes one of the available media input and output devices. + /// An array of MediaDeviceInfo objects. Each object in the array describes one of the available media input and output devices. + /// An array of MediaDeviceInfo objects. Each object in the array describes one of the available media input and output devices. /// /// Task?> EnumerateDevices(); /// - /// The open() method of the MediaDevices interface creates a new MediaStream object and starts capturing media from the specified device. + /// open() method of the MediaDevices interface creates a new MediaStream object and starts capturing media from the specified device. + /// The open() method of the MediaDevices interface creates a new MediaStream object and starts capturing media from the specified device. /// /// video or audio /// @@ -25,39 +28,45 @@ public interface IMediaDevices Task Open(string type, MediaTrackConstraints constraints); /// - /// The close() method of the MediaDevices interface stops capturing media from the specified device and closes the MediaStream object. + /// close() method of the MediaDevices interface stops capturing media from the specified device and closes the MediaStream object. + /// The close() method of the MediaDevices interface stops capturing media from the specified device and closes the MediaStream object. /// /// /// Task Close(string? selector); /// - /// The capture() method of the MediaDevices interface captures a still image from the specified video stream and saves it to the specified location. + /// capture() method of the MediaDevices interface captures a still image from the specified video stream and saves it to the specified location. + /// The capture() method of the MediaDevices interface captures a still image from the specified video stream and saves it to the specified location. /// /// Task Capture(); /// - /// Gets the preview URL of the captured image. + /// 获得 the preview URL of the captured image. + /// Gets the preview URL of the captured image. /// /// Task GetPreviewUrl(); /// - /// Gets the stream of the captured image. + /// 获得 the stream of the captured image. + /// Gets the stream of the captured image. /// /// Task GetPreviewData(); /// - /// Apply the media track constraints. + /// Apply the media track constraints. + /// Apply the media track constraints. /// /// /// Task Apply(MediaTrackConstraints constraints); /// - /// Gets the stream of the audio. + /// 获得 the stream of the audio. + /// Gets the stream of the audio. /// /// Task GetAudioData(); diff --git a/src/BootstrapBlazor/Services/MediaDevices/IVideoDevice.cs b/src/BootstrapBlazor/Services/MediaDevices/IVideoDevice.cs index b72bcf73221..a744890b478 100644 --- a/src/BootstrapBlazor/Services/MediaDevices/IVideoDevice.cs +++ b/src/BootstrapBlazor/Services/MediaDevices/IVideoDevice.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,50 +6,58 @@ namespace BootstrapBlazor.Components; /// -/// Video Media Device Interface +/// Video Media Device Interface +/// Video Media Device Interface /// public interface IVideoDevice { /// - /// Gets the list of video devices. + /// 获得 the list of video devices. + /// Gets the list of video devices. /// /// Task?> GetDevices(); /// - /// Opens the video device with the specified constraints. + /// Opens the video device with the specified constraints. + /// Opens the video device with the specified constraints. /// /// /// Task Open(MediaTrackConstraints constraints); /// - /// Close the video device with the specified selector. + /// Close the video device with the specified selector. + /// Close the video device with the specified selector. /// /// /// Task Close(string? selector); /// - /// Capture a still image from the video stream. + /// Capture a still image from the video stream. + /// Capture a still image from the video stream. /// /// Task Capture(); /// - /// Gets the preview URL of the captured image. + /// 获得 the preview URL of the captured image. + /// Gets the preview URL of the captured image. /// /// Task GetPreviewUrl(); /// - /// Gets the stream of the captured image. + /// 获得 the stream of the captured image. + /// Gets the stream of the captured image. /// /// Task GetPreviewData(); /// - /// Apply the media track constraints. + /// Apply the media track constraints. + /// Apply the media track constraints. /// /// /// diff --git a/src/BootstrapBlazor/Services/MediaDevices/MediaDeviceInfo.cs b/src/BootstrapBlazor/Services/MediaDevices/MediaDeviceInfo.cs index 12ab88a2cfb..2800f636b10 100644 --- a/src/BootstrapBlazor/Services/MediaDevices/MediaDeviceInfo.cs +++ b/src/BootstrapBlazor/Services/MediaDevices/MediaDeviceInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -7,6 +7,7 @@ namespace BootstrapBlazor.Components; /// /// +/// /// public class MediaDeviceInfo : IMediaDeviceInfo { diff --git a/src/BootstrapBlazor/Services/MediaDevices/MediaTrackConstraints.cs b/src/BootstrapBlazor/Services/MediaDevices/MediaTrackConstraints.cs index 88c39f8d681..4d1d8f1403c 100644 --- a/src/BootstrapBlazor/Services/MediaDevices/MediaTrackConstraints.cs +++ b/src/BootstrapBlazor/Services/MediaDevices/MediaTrackConstraints.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,32 +6,38 @@ namespace BootstrapBlazor.Components; /// -/// The MediaTrackConstraints interface of the Media Capture and Streams API is used to specify constraints on the media tracks that are requested from a media device. It is used in conjunction with the getUserMedia() method to specify the desired properties of the media tracks, such as resolution, frame rate, and aspect ratio. +/// MediaTrackConstraints interface of the Media Capture and Streams API is used to specify constraints on the media tracks that are requested from a media device. It is used in conjunction with the getUserMedia() method to specify the desired properties of the media tracks, such as resolution, frame rate, and aspect ratio. +/// The MediaTrackConstraints interface of the Media Capture and Streams API is used to specify constraints on the media tracks that are requested from a media device. It is used in conjunction with the getUserMedia() method to specify the desired properties of the media tracks, such as resolution, frame rate, and aspect ratio. /// public class MediaTrackConstraints { /// - /// + /// + /// /// public string DeviceId { get; set; } = ""; /// - /// + /// + /// /// public string? Selector { get; set; } /// - /// + /// + /// /// public int? Width { get; set; } /// - /// + /// + /// /// public int? Height { get; set; } /// - /// + /// + /// /// public string? FacingMode { get; set; } } diff --git a/src/BootstrapBlazor/Services/NotificationService.cs b/src/BootstrapBlazor/Services/NotificationService.cs index eb8f781fcff..810aef715be 100644 --- a/src/BootstrapBlazor/Services/NotificationService.cs +++ b/src/BootstrapBlazor/Services/NotificationService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,7 +8,8 @@ namespace BootstrapBlazor.Components; /// -/// 浏览器通知服务 +/// 浏览器通知服务 +/// Browser Notification Service /// public class NotificationService : IAsyncDisposable { @@ -21,7 +22,8 @@ public class NotificationService : IAsyncDisposable private ICacheManager Cache { get; } /// - /// 构造函数 + /// 构造函数 + /// Constructor /// /// /// @@ -35,9 +37,10 @@ public NotificationService(IJSRuntime runtime, ICacheManager cache) private Task LoadModule() => JSRuntime.LoadModuleByName("noti"); /// - /// 检查浏览器通知权限状态 + /// 检查浏览器通知权限状态 + /// Check Browser Notification Permission Status /// - /// 是否请求权限 默认 true + /// 是否请求权限 默认 trueRequest permission, default true /// public async ValueTask CheckPermission(bool requestPermission = true) { @@ -46,9 +49,10 @@ public async ValueTask CheckPermission(bool requestPermission = true) } /// - /// 发送浏览器通知 + /// 发送浏览器通知 + /// Dispatch Browser Notification /// - /// NotificationItem 实例 + /// NotificationItem 实例NotificationItem Instance /// public async Task Dispatch(NotificationItem item) { @@ -63,7 +67,8 @@ public async Task Dispatch(NotificationItem item) } /// - /// 消息通知回调方法由 JS 点击触发 + /// 消息通知回调方法由 JS 点击触发 + /// Notification callback method triggered by JS click /// /// [JSInvokable] @@ -81,7 +86,8 @@ public async Task DispatchCallback(string id) } /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. /// /// /// @@ -89,10 +95,12 @@ protected virtual async ValueTask DisposeAsync(bool disposing) { if (disposing) { - // 销毁 DotNetObjectReference 实例 + // 销毁 DotNetObjectReference 实例 + // Dispose DotNetObjectReference instance Interop.Dispose(); - // 销毁 JSModule + // 销毁 JSModule + // Dispose JSModule if (Module != null) { await Module.DisposeAsync(); diff --git a/src/BootstrapBlazor/Services/NullLookupService.cs b/src/BootstrapBlazor/Services/NullLookupService.cs index a9ddb62c8eb..4071d7c86b5 100644 --- a/src/BootstrapBlazor/Services/NullLookupService.cs +++ b/src/BootstrapBlazor/Services/NullLookupService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,13 @@ namespace BootstrapBlazor.Components; /// -/// 内部默认字典服务实现类 +/// 内部默认字典服务实现类 +/// Internal Default Lookup Service Implementation /// class NullLookupService : LookupServiceBase { /// - /// > + /// /// public override IEnumerable? GetItemsByKey(string? key, object? data) => null; } diff --git a/src/BootstrapBlazor/Services/Pinyin/DefaultPinyinService.cs b/src/BootstrapBlazor/Services/Pinyin/DefaultPinyinService.cs index d16abac3e09..9860cd17b8e 100644 --- a/src/BootstrapBlazor/Services/Pinyin/DefaultPinyinService.cs +++ b/src/BootstrapBlazor/Services/Pinyin/DefaultPinyinService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone diff --git a/src/BootstrapBlazor/Services/Pinyin/IPinyinService.cs b/src/BootstrapBlazor/Services/Pinyin/IPinyinService.cs index e5c9f2b2aef..7bc47272a89 100644 --- a/src/BootstrapBlazor/Services/Pinyin/IPinyinService.cs +++ b/src/BootstrapBlazor/Services/Pinyin/IPinyinService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 拼音服务接口 +/// 拼音服务接口 +/// 拼音服务接口 /// public interface IPinyinService { /// - /// 获得首字母拼音方法 + /// 获得首字母拼音方法 + /// Gets首字母拼音方法 /// /// /// @@ -19,7 +21,8 @@ public interface IPinyinService HashSet GetFirstLetters(string text, PinyinLetterCaseCategory caseCategory = PinyinLetterCaseCategory.UppercaseLetter); /// - /// 获得完整拼音方法 + /// 获得完整拼音方法 + /// Gets完整拼音方法 /// /// /// @@ -27,14 +30,16 @@ public interface IPinyinService HashSet GetPinyin(string text, PinyinLetterCaseCategory caseCategory = PinyinLetterCaseCategory.UppercaseLetter); /// - /// 判断是否为中文字符 + /// 判断是否为中文字符 + /// 判断whether为中文字符 /// /// /// bool IsChinese(char c); /// - /// 判断字符串是否包含中文字符 + /// 判断字符串是否包含中文字符 + /// 判断字符串whether包含中文字符 /// /// /// diff --git a/src/BootstrapBlazor/Services/Pinyin/PinyinLetterCaseCategory.cs b/src/BootstrapBlazor/Services/Pinyin/PinyinLetterCaseCategory.cs index c3946646103..0d91bb1abda 100644 --- a/src/BootstrapBlazor/Services/Pinyin/PinyinLetterCaseCategory.cs +++ b/src/BootstrapBlazor/Services/Pinyin/PinyinLetterCaseCategory.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// Pinyin 大小写枚举 +/// Pinyin 大小写枚举 +/// Pinyin 大小写enum /// public enum PinyinLetterCaseCategory { /// - /// Indicates that the character is an uppercase letter. + /// Indicates that the character is an uppercase letter. + /// Indicates that the character is an uppercase letter. /// UppercaseLetter = 0, /// - /// Represents a Unicode character that is classified as a lowercase letter. + /// Represents a Unicode character that is classified as a lowercase letter. + /// Represents a Unicode character that is classified as a lowercase letter. /// LowercaseLetter = 1, } diff --git a/src/BootstrapBlazor/Services/PrintService.cs b/src/BootstrapBlazor/Services/PrintService.cs index 78f90463556..b7935ff64ff 100644 --- a/src/BootstrapBlazor/Services/PrintService.cs +++ b/src/BootstrapBlazor/Services/PrintService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// Print 服务 +/// Print 服务 +/// Print Service /// public class PrintService(DialogService dialogService) { /// - /// 打印方法 + /// 打印方法 + /// Print Method /// /// /// diff --git a/src/BootstrapBlazor/Services/Serial/AutoFrameBreakType.cs b/src/BootstrapBlazor/Services/Serial/AutoFrameBreakType.cs index 6123bf34fc0..18df97c8af0 100644 --- a/src/BootstrapBlazor/Services/Serial/AutoFrameBreakType.cs +++ b/src/BootstrapBlazor/Services/Serial/AutoFrameBreakType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,33 +6,40 @@ namespace BootstrapBlazor.Components; /// -/// 自动断帧方式 +/// 自动断帧方式 +/// 自动断帧方式 /// public enum AutoFrameBreakType { /// - /// 未启用自动断帧 + /// 未启用自动断帧 + /// 未启用自动断帧 /// None, /// - /// 字符断帧 + /// 字符断帧 + /// 字符断帧 /// Character, /// - /// 空闲中断 (未完成) + /// 空闲中断 (未完成) + /// 空闲中断 (未完成) /// Timeout, /// - /// 帧头、帧尾 (未实现) - /// 例如: 帧头(AA 、BB) + 数据长度 + 数据 + CRC校验 + 帧尾(CC、DD) + /// 帧头、帧尾 (未实现) 例如: 帧头(AA 、BB) + 数据长度 + 数据 + CRC校验 + 帧尾(CC、DD) + /// + /// 帧头、帧尾 (未实现) 例如: 帧头(AA 、BB) + data长度 + data + CRC校验 + 帧尾(CC、DD) + /// /// FrameTail, /// - /// 字符间隔 (未实现) + /// 字符间隔 (未实现) + /// 字符间隔 (未实现) /// CharacterInterval, } diff --git a/src/BootstrapBlazor/Services/Serial/DefaultSerialService.cs b/src/BootstrapBlazor/Services/Serial/DefaultSerialService.cs index 9ef4800bba4..5a2d2f32944 100644 --- a/src/BootstrapBlazor/Services/Serial/DefaultSerialService.cs +++ b/src/BootstrapBlazor/Services/Serial/DefaultSerialService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -35,7 +35,8 @@ private async Task LoadModule() } /// - /// get the current position of the device + /// get the current position of the device + /// get the current position of the device /// /// public async Task GetPort(CancellationToken token = default) @@ -54,7 +55,8 @@ private async Task LoadModule() } /// - /// DisposeAsync 方法 + /// DisposeAsync 方法 + /// DisposeAsync 方法 /// /// protected virtual async ValueTask DisposeAsync(bool disposing) diff --git a/src/BootstrapBlazor/Services/Serial/ISerialPort.cs b/src/BootstrapBlazor/Services/Serial/ISerialPort.cs index 72e27315893..c4c262cbf63 100644 --- a/src/BootstrapBlazor/Services/Serial/ISerialPort.cs +++ b/src/BootstrapBlazor/Services/Serial/ISerialPort.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,55 +6,64 @@ namespace BootstrapBlazor.Components; /// -/// ISerialPort 接口 +/// ISerialPort 接口 +/// ISerialPort 接口 /// public interface ISerialPort : IAsyncDisposable { /// - /// 获得 端口是否打开 + /// 获得 端口是否打开 + /// Gets 端口whether打开 /// bool IsOpen { get; } /// - /// 关闭端口方法 + /// 关闭端口方法 + /// 关闭端口方法 /// /// Task Close(CancellationToken token = default); /// - /// 打开端口方法 + /// 打开端口方法 + /// 打开端口方法 /// /// Task Open(SerialPortOptions options, CancellationToken token = default); /// - /// 接收数据回调方法 + /// 接收数据回调方法 + /// 接收datacallback method /// /// Func? DataReceive { get; set; } /// - /// 写入数据方法 + /// 写入数据方法 + /// 写入data方法 /// /// Task Write(byte[] data, CancellationToken token = default); /// - /// 获得 Usb 设备信息 + /// 获得 Usb 设备信息 + /// Gets Usb 设备信息 /// /// /// Task GetUsbInfo(CancellationToken token = default); /// - /// 获得设备参数 + /// 获得设备参数 + /// Gets设备参数 /// /// /// Task GetSignals(CancellationToken token = default); /// - /// 设置设备参数 + /// 设置设备参数 + /// Sets设备参数 /// /// /// diff --git a/src/BootstrapBlazor/Services/Serial/ISerialService.cs b/src/BootstrapBlazor/Services/Serial/ISerialService.cs index ca7753acb3f..8d02c5ad1fc 100644 --- a/src/BootstrapBlazor/Services/Serial/ISerialService.cs +++ b/src/BootstrapBlazor/Services/Serial/ISerialService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// ISerialService 串口通讯服务 +/// ISerialService 串口通讯服务 +/// ISerialService 串口通讯服务 /// public interface ISerialService { /// - /// 获得/设置 是否支持串口通讯 + /// 获得/设置 是否支持串口通讯 + /// Gets or sets whether支持串口通讯 /// bool IsSupport { get; } /// - /// 获得所有可用串口 + /// 获得所有可用串口 + /// Gets所有可用串口 /// /// Task GetPort(CancellationToken token = default); diff --git a/src/BootstrapBlazor/Services/Serial/SerialPort.cs b/src/BootstrapBlazor/Services/Serial/SerialPort.cs index 53a81430f2b..051c934e5d2 100644 --- a/src/BootstrapBlazor/Services/Serial/SerialPort.cs +++ b/src/BootstrapBlazor/Services/Serial/SerialPort.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// 串口通讯类 +/// 串口通讯类 +/// 串口通讯类 /// class SerialPort(JSModule jsModule, string serialPortId) : ISerialPort { @@ -64,7 +65,8 @@ public async Task Close(CancellationToken token = default) } /// - /// 接收数据回调方法 由 Javascript 调用 + /// 接收数据回调方法 由 Javascript 调用 + /// 接收datacallback method 由 Javascript 调用 /// /// /// @@ -97,7 +99,6 @@ public async Task DataReceiveCallback(byte[] data) /// /// /// - /// public async Task SetSignals(SerialPortSignalsOptions options, CancellationToken token = default) => await jsModule.InvokeAsync("setSignals", token, serialPortId, options); private async ValueTask DisposeAsync(bool disposing) diff --git a/src/BootstrapBlazor/Services/Serial/SerialPortFlowControlType.cs b/src/BootstrapBlazor/Services/Serial/SerialPortFlowControlType.cs index 818187167d8..5e4c83719a0 100644 --- a/src/BootstrapBlazor/Services/Serial/SerialPortFlowControlType.cs +++ b/src/BootstrapBlazor/Services/Serial/SerialPortFlowControlType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,18 +6,21 @@ namespace BootstrapBlazor.Components; /// -/// 流量控制方法 +/// 流量控制方法 +/// 流量控制方法 /// [JsonEnumConverter(true)] public enum SerialPortFlowControlType { /// - /// 未启用流量控制 + /// 未启用流量控制 + /// 未启用流量控制 /// None, /// - /// 启用使用 RTS 和 CTS 信号的硬件流控制 + /// 启用使用 RTS 和 CTS 信号的硬件流控制 + /// 启用使用 RTS 和 CTS 信号的硬件流控制 /// Hardware, } diff --git a/src/BootstrapBlazor/Services/Serial/SerialPortOptions.cs b/src/BootstrapBlazor/Services/Serial/SerialPortOptions.cs index 7698183aab3..919155c7616 100644 --- a/src/BootstrapBlazor/Services/Serial/SerialPortOptions.cs +++ b/src/BootstrapBlazor/Services/Serial/SerialPortOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,38 +8,45 @@ namespace BootstrapBlazor.Components; /// -/// 串口通讯参数 +/// 串口通讯参数 +/// 串口通讯参数 /// public class SerialPortOptions { /// - /// 波特率 默认 9600 + /// 波特率 默认 9600 + /// 波特率 Default is 9600 /// public int BaudRate { get; set; } = 9600; /// - /// 数据位 7 或 8 默认 8 + /// 数据位 7 或 8 默认 8 + /// data位 7 或 8 Default is 8 /// public int DataBits { get; set; } = 8; /// - /// 停止位 1 或 2 默认为 1 + /// 停止位 1 或 2 默认为 1 + /// 停止位 1 或 2 Default is为 1 /// public int StopBits { get; set; } = 1; /// - /// 校验位 none、even、odd 默认 "none" + /// 校验位 none、even、odd 默认 "none" + /// 校验位 none、even、odd Default is "none" /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] public SerialPortParityType ParityType { get; set; } /// - /// 读写缓冲区 默认 255 + /// 读写缓冲区 默认 255 + /// 读写缓冲区 Default is 255 /// public int BufferSize { get; set; } = 255; /// - /// 流控制 "none"或"hardware" 默认值为"none" + /// 流控制 "none"或"hardware" 默认值为"none" + /// 流控制 "none"或"hardware" Default is值为"none" /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] public SerialPortFlowControlType FlowControlType { get; set; } diff --git a/src/BootstrapBlazor/Services/Serial/SerialPortParityType.cs b/src/BootstrapBlazor/Services/Serial/SerialPortParityType.cs index 8295de03103..b9c3630e96b 100644 --- a/src/BootstrapBlazor/Services/Serial/SerialPortParityType.cs +++ b/src/BootstrapBlazor/Services/Serial/SerialPortParityType.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,23 +6,27 @@ namespace BootstrapBlazor.Components; /// -/// 校验位枚举 +/// 校验位枚举 +/// 校验位enum /// [JsonEnumConverter(true)] public enum SerialPortParityType { /// - /// 每个数据字不发送奇偶校验位 + /// 每个数据字不发送奇偶校验位 + /// 每个data字不发送奇偶校验位 /// None, /// - /// 数据字加上奇偶校验位具有偶奇偶校验 + /// 数据字加上奇偶校验位具有偶奇偶校验 + /// data字加上奇偶校验位具有偶奇偶校验 /// Even, /// - /// 数据字加奇偶校验位具有奇校验 + /// 数据字加奇偶校验位具有奇校验 + /// data字加奇偶校验位具有奇校验 /// Odd } diff --git a/src/BootstrapBlazor/Services/Serial/SerialPortSignals.cs b/src/BootstrapBlazor/Services/Serial/SerialPortSignals.cs index 7078e72660f..3cfc60baeff 100644 --- a/src/BootstrapBlazor/Services/Serial/SerialPortSignals.cs +++ b/src/BootstrapBlazor/Services/Serial/SerialPortSignals.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -20,34 +20,35 @@ namespace BootstrapBlazor.Components; //9 振铃提示 RI(Ring Indicator) /// -/// 串口信号 +/// 串口信号 +/// 串口信号 /// public class SerialPortSignals { /// - /// 振铃提示 RI(Ring Indicator) - /// 如果 RI 为 true,则表示已检测到振铃。如果 RI 为 false,则表示未检测到振铃。Pin 9 + /// 振铃提示 RI(Ring Indicator) 如果 RI 为 true,则表示已检测到振铃。如果 RI 为 false,则表示未检测到振铃。Pin 9 + /// 振铃提示 RI(Ring Indicator) 如果 RI 为 true,则表示已检测到振铃。如果 RI 为 false,则表示未检测到振铃。Pin 9 /// [JsonPropertyName("ringIndicator")] public bool RING { get; set; } /// - /// 数据准备就绪 DSR(Data Set Ready) - /// 如果 DSR 为 true,则表示已准备好接收数据。如果 DSR 为 false,则表示未准备好接收数据。Pin 6 + /// 数据准备就绪 DSR(Data Set Ready) 如果 DSR 为 true,则表示已准备好接收数据。如果 DSR 为 false,则表示未准备好接收数据。Pin 6 + /// data准备就绪 DSR(Data Set Ready) 如果 DSR 为 true,则表示已准备好接收data。如果 DSR 为 false,则表示未准备好接收data。Pin 6 /// [JsonPropertyName("dataSetReady")] public bool DSR { get; set; } /// - /// 清除发送 CTS(Clear To Send) - /// 如果 CTS 为 true,则表示已准备好发送数据。如果 CTS 为 false,则表示未准备好发送数据。Pin 8 + /// 清除发送 CTS(Clear To Send) 如果 CTS 为 true,则表示已准备好发送数据。如果 CTS 为 false,则表示未准备好发送数据。Pin 8 + /// 清除发送 CTS(Clear To Send) 如果 CTS 为 true,则表示已准备好发送data。如果 CTS 为 false,则表示未准备好发送data。Pin 8 /// [JsonPropertyName("clearToSend")] public bool CTS { get; set; } /// - /// 载波检测 DCD(Data Carrier Detect) - /// 如果 DCD 为 true,则表示已检测到载波。如果 DCD 为 false,则表示未检测到载波。Pin 1 + /// 载波检测 DCD(Data Carrier Detect) 如果 DCD 为 true,则表示已检测到载波。如果 DCD 为 false,则表示未检测到载波。Pin 1 + /// 载波检测 DCD(Data Carrier Detect) 如果 DCD 为 true,则表示已检测到载波。如果 DCD 为 false,则表示未检测到载波。Pin 1 /// [JsonPropertyName("dataCarrierDetect")] public bool DCD { get; set; } diff --git a/src/BootstrapBlazor/Services/Serial/SerialPortSignalsOptions.cs b/src/BootstrapBlazor/Services/Serial/SerialPortSignalsOptions.cs index 1cfd5fa4fbe..ec79219e023 100644 --- a/src/BootstrapBlazor/Services/Serial/SerialPortSignalsOptions.cs +++ b/src/BootstrapBlazor/Services/Serial/SerialPortSignalsOptions.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,27 +8,34 @@ namespace BootstrapBlazor.Components; /// -/// 串口信号设置 +/// 串口信号设置 +/// 串口信号Sets /// public class SerialPortSignalsOptions { /// - /// 中断 - /// 如果 Break 为 true,则表示已中断。如果 Break 为 false,则表示未中断。 + /// 中断 如果 Break 为 true,则表示已中断。如果 Break 为 false,则表示未中断。 + /// + /// 中断 如果 Break 为 true,则表示已中断。如果 Break 为 false,则表示未中断。 + /// /// [JsonPropertyName("break")] public bool Break { get; set; } /// - /// 数据终端准备就绪 DTR(Data Terminal Ready) - /// 如果 DTR 为 true,则表示已准备好接收数据。如果 DTR 为 false,则表示未准备好接收数据。Pin 4 + /// 数据终端准备就绪 DTR(Data Terminal Ready) 如果 DTR 为 true,则表示已准备好接收数据。如果 DTR 为 false,则表示未准备好接收数据。Pin 4 + /// + /// data终端准备就绪 DTR(Data Terminal Ready) 如果 DTR 为 true,则表示已准备好接收data。如果 DTR 为 false,则表示未准备好接收data。Pin 4 + /// /// [JsonPropertyName("dataTerminalReady")] public bool DTR { get; set; } /// - /// 请求发送 RTS(Request To Send) - /// 如果 RTS 为 true,则表示已准备好发送数据。如果 RTS 为 false,则表示未准备好发送数据。Pin 7 + /// 请求发送 RTS(Request To Send) 如果 RTS 为 true,则表示已准备好发送数据。如果 RTS 为 false,则表示未准备好发送数据。Pin 7 + /// + /// 请求发送 RTS(Request To Send) 如果 RTS 为 true,则表示已准备好发送data。如果 RTS 为 false,则表示未准备好发送data。Pin 7 + /// /// [JsonPropertyName("requestToSend")] public bool RTS { get; set; } diff --git a/src/BootstrapBlazor/Services/Serial/SerialPortUsbInfo.cs b/src/BootstrapBlazor/Services/Serial/SerialPortUsbInfo.cs index 0620c825f44..828485f01e4 100644 --- a/src/BootstrapBlazor/Services/Serial/SerialPortUsbInfo.cs +++ b/src/BootstrapBlazor/Services/Serial/SerialPortUsbInfo.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// Usb 串口设备信息类 +/// Usb 串口设备信息类 +/// Usb 串口设备信息类 /// public class SerialPortUsbInfo { /// - /// 厂商 Id + /// 厂商 Id + /// 厂商 Id /// public string? UsbVendorId { get; set; } /// - /// 产品 Id + /// 产品 Id + /// 产品 Id /// public string? UsbProductId { get; set; } } diff --git a/src/BootstrapBlazor/Services/TableMetadataTypeService.cs b/src/BootstrapBlazor/Services/TableMetadataTypeService.cs index bb2d7b11780..4927fd281af 100644 --- a/src/BootstrapBlazor/Services/TableMetadataTypeService.cs +++ b/src/BootstrapBlazor/Services/TableMetadataTypeService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,15 +9,16 @@ namespace BootstrapBlazor.Components; /// -/// service for storage metadata type/data type pair for Table component -/// more details: +/// service for storage meta数据 类型/数据 类型 pair for Table component more details: +/// service for storage metadata type/data type pair for Table component more details: /// public static class TableMetadataTypeService { private static ConcurrentDictionary _metadataTypeCache { get; } = new(); /// - /// register metadata type for target model/data type + /// register meta数据 类型 for target model/数据 类型 + /// register metadata type for target model/data type /// /// Table ui metadata type /// the target model/data type @@ -29,7 +30,8 @@ public static void RegisterMatadataType(Type metadataType, Type targetType) } /// - /// register metadata type for target model/data type + /// 注册数据类型 + /// register metadata type for target model/data type /// /// Table ui metadata type /// the target model/data type @@ -39,14 +41,16 @@ public static void RegisterMetadataType(Type metadataType, Type targetType) } /// - /// get metadata type for target data type. return data type itself if metadata type not registered. + /// 通过指定数据类型获得其 Metadata 数据 + /// get metadata type for target data type. return data type itself if metadata type not registered. /// /// the target data type /// metadata type public static Type GetMetadataType(Type targetType) => _metadataTypeCache.TryGetValue(targetType, out var type) ? type : targetType; /// - /// register metadata types from assemblies by using reflection + /// register meta数据 类型s from assemblies by using reflection + /// register metadata types from assemblies by using reflection /// /// Assemblies contains metadata types public static void RegisterMetadataTypes(params Assembly[] assemblies) diff --git a/src/BootstrapBlazor/Services/ThrottleDispatcher.cs b/src/BootstrapBlazor/Services/ThrottleDispatcher.cs index c7680326f7f..7fad3d49b78 100644 --- a/src/BootstrapBlazor/Services/ThrottleDispatcher.cs +++ b/src/BootstrapBlazor/Services/ThrottleDispatcher.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,30 +6,34 @@ namespace BootstrapBlazor.Components; /// -/// 限流器泛型类 +/// 限流器泛型类 +/// Throttle Dispatcher Generic Class /// public class ThrottleDispatcher(ThrottleOptions options) { private DateTime? _invokeTime; /// - /// 判断是否等待方法 + /// 判断是否等待方法 + /// Check if Should Wait Method /// /// protected virtual bool ShouldWait() => _invokeTime.HasValue && (DateTime.UtcNow - _invokeTime.Value) < options.Interval; /// - /// 异步限流方法 + /// 异步限流方法 + /// Throttle Async Method /// - /// 异步回调方法 - /// 取消令牌 + /// 异步回调方法Async Callback Function + /// 取消令牌Cancellation Token public Task ThrottleAsync(Func function, CancellationToken cancellationToken = default) => InternalThrottleAsync(function, cancellationToken); /// - /// 同步限流方法 + /// 同步限流方法 + /// Throttle Method /// - /// 同步回调方法 - /// 取消令牌 + /// 同步回调方法Sync Callback Action + /// 取消令牌Cancellation Token public void Throttle(Action action, CancellationToken token = default) { var task = InternalThrottleAsync(() => @@ -42,10 +46,11 @@ public void Throttle(Action action, CancellationToken token = default) } /// - /// 限流异步方法 + /// 限流异步方法 + /// Internal Throttle Async Method /// - /// 异步回调方法 - /// 取消令牌 + /// 异步回调方法异步callback method + /// 取消令牌取消令牌 private async Task InternalThrottleAsync(Func function, CancellationToken cancellationToken = default) { if (ShouldWait()) diff --git a/src/BootstrapBlazor/Services/TitleService.cs b/src/BootstrapBlazor/Services/TitleService.cs index b1227cde523..77525508a37 100644 --- a/src/BootstrapBlazor/Services/TitleService.cs +++ b/src/BootstrapBlazor/Services/TitleService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// Title 服务 +/// Title 服务 +/// Title Service /// public class TitleService(IJSRuntime jSRuntime) { @@ -14,7 +15,8 @@ public class TitleService(IJSRuntime jSRuntime) private JSModule? _module = null; /// - /// 设置当前网页 Title 方法 + /// 设置当前网页 Title 方法 + /// Set Current Page Title Method /// /// public async Task SetTitle(string title, CancellationToken token = default) diff --git a/src/BootstrapBlazor/Services/WebClientService.cs b/src/BootstrapBlazor/Services/WebClientService.cs index 385684b9e7d..5bbe6c20fd6 100644 --- a/src/BootstrapBlazor/Services/WebClientService.cs +++ b/src/BootstrapBlazor/Services/WebClientService.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// WebClient 服务类 +/// WebClient 服务类 +/// WebClient Service Class /// /// /// @@ -29,7 +30,8 @@ public class WebClientService(IIpLocatorFactory ipLocatorFactory, private IIpLocatorProvider? _provider; /// - /// 获得 ClientInfo 实例方法 + /// 获得 ClientInfo 实例方法 + /// Get ClientInfo Instance Method /// /// public async Task GetClientInfo() @@ -47,7 +49,8 @@ public async Task GetClientInfo() { _interop ??= DotNetObjectReference.Create(this); await _jsModule.InvokeVoidAsync("ping", "ip.axd", _interop, nameof(SetData)); - // 等待 SetData 方法执行完毕 + // 等待 SetData 方法执行完毕 + // Wait for SetData method to complete await _taskCompletionSource.Task.WaitAsync(TimeSpan.FromSeconds(3)); } } @@ -56,7 +59,8 @@ public async Task GetClientInfo() logger.LogError(ex, "{GetClientInfo} throw exception", nameof(GetClientInfo)); } - // 补充 IP 地址信息 + // 补充 IP 地址信息 + // Supplement IP address information if (options.CurrentValue.WebClientOptions.EnableIpLocator && string.IsNullOrEmpty(_client.City)) { _provider ??= ipLocatorFactory.Create(options.CurrentValue.IpLocatorOptions.ProviderName); @@ -66,7 +70,8 @@ public async Task GetClientInfo() } /// - /// SetData 方法由 JS 调用 + /// SetData 方法由 JS 调用 + /// SetData method called by JS /// /// [JSInvokable] @@ -78,7 +83,8 @@ public void SetData(ClientInfo client) } /// - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously. /// /// /// @@ -86,10 +92,12 @@ protected virtual async ValueTask DisposeAsync(bool disposing) { if (disposing) { - // 销毁 DotNetObjectReference 实例 + // 销毁 DotNetObjectReference 实例 + // Dispose DotNetObjectReference instance _interop?.Dispose(); - // 销毁 JSModule + // 销毁 JSModule + // Dispose JSModule if (_jsModule != null) { await _jsModule.DisposeAsync(); @@ -110,58 +118,69 @@ public async ValueTask DisposeAsync() } /// -/// 客户端请求信息实体类 +/// 客户端请求信息实体类 +/// Client Request Information Entity Class /// public class ClientInfo { /// - /// 获得/设置 链接 Id + /// 获得/设置 链接 Id + /// Get/Set Connection Id /// public string? Id { get; set; } /// - /// 获得/设置 客户端IP + /// 获得/设置 客户端IP + /// Get/Set Client IP /// public string? Ip { get; set; } /// - /// 获得/设置 客户端地点 + /// 获得/设置 客户端地点 + /// Get/Set Client City /// public string? City { get; set; } /// - /// 获得/设置 客户端浏览器 + /// 获得/设置 客户端浏览器 + /// Get/Set Client Browser /// public string? Browser { get; set; } /// - /// 获得/设置 客户端操作系统 + /// 获得/设置 客户端操作系统 + /// Get/Set Client OS /// public string? OS { get; set; } /// - /// 获得/设置 客户端设备类型 + /// 获得/设置 客户端设备类型 + /// Get/Set Client Device Type /// [JsonConverter(typeof(JsonStringEnumConverter))] public WebClientDeviceType Device { get; set; } /// - /// 获得/设置 客户端浏览器语言 + /// 获得/设置 客户端浏览器语言 + /// Get/Set Client Browser Language /// public string? Language { get; set; } /// - /// 获取/设置 请求网址 + /// 获取/设置 请求网址 + /// Get/Set Request URL /// public string? RequestUrl { get; set; } /// - /// 获得/设置 客户端 UserAgent + /// 获得/设置 客户端 UserAgent + /// Get/Set Client UserAgent /// public string? UserAgent { get; set; } /// - /// 获得/设置 浏览器引擎信息 + /// 获得/设置 浏览器引擎信息 + /// Get/Set Browser Engine Info /// public string? Engine { get; set; } } diff --git a/src/BootstrapBlazor/Utils/BootstrapDynamicComponent.cs b/src/BootstrapBlazor/Utils/BootstrapDynamicComponent.cs index ed69e327ee0..30660b93521 100644 --- a/src/BootstrapBlazor/Utils/BootstrapDynamicComponent.cs +++ b/src/BootstrapBlazor/Utils/BootstrapDynamicComponent.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,29 +6,33 @@ namespace BootstrapBlazor.Components; /// -/// 动态组件类 +/// 动态组件类 +/// Dynamic component class /// /// -/// TCom 组件所需要的参数集合 +/// TCom 组件所需要的参数集合TCom component所需要的参数collection public class BootstrapDynamicComponent(Type componentType, IDictionary? parameters = null) { /// - /// 创建自定义组件方法 + /// 创建自定义组件方法 + /// Create custom component method /// /// - /// TCom 组件所需要的参数集合 + /// TCom 组件所需要的参数集合TCom component所需要的参数collection /// public static BootstrapDynamicComponent CreateComponent(IDictionary? parameters = null) where TCom : IComponent => CreateComponent(typeof(TCom), parameters); /// - /// 创建自定义组件方法 + /// 创建自定义组件方法 + /// Create custom component method /// /// /// public static BootstrapDynamicComponent CreateComponent() where TCom : IComponent => CreateComponent(new Dictionary()); /// - /// 创建自定义组件方法 + /// 创建自定义组件方法 + /// Create custom component method /// /// /// @@ -36,7 +40,8 @@ public class BootstrapDynamicComponent(Type componentType, IDictionary? parameters = null) => new(type, parameters); /// - /// 创建组件实例并渲染 + /// 创建组件实例并渲染 + /// Create component instance and render /// /// public RenderFragment Render() => builder => diff --git a/src/BootstrapBlazor/Utils/CssBuilder.cs b/src/BootstrapBlazor/Utils/CssBuilder.cs index dcfdb703958..cdd12dfb3be 100644 --- a/src/BootstrapBlazor/Utils/CssBuilder.cs +++ b/src/BootstrapBlazor/Utils/CssBuilder.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,7 +9,8 @@ namespace BootstrapBlazor.Components; /// -/// Css 生成操作类 +/// Css 生成操作类 +/// Css builder class /// public class CssBuilder { @@ -17,15 +18,15 @@ public class CssBuilder private bool _hasConent; /// - /// Creates a CssBuilder used to define conditional CSS classes used in a component. - /// Call Build() to return the completed CSS Classes as a string. + /// Creates a CssBuilder used to define conditional CSS classes used in a component. Call Build() to return the completed CSS Classes as a string. + /// Creates a CssBuilder used to define conditional CSS classes used in a component. Call Build() to return the completed CSS Classes as a string. /// /// public static CssBuilder Default(string? value = null) => new(value); /// - /// Creates a CssBuilder used to define conditional CSS classes used in a component. - /// Call Build() to return the completed CSS Classes as a string. + /// Creates a CssBuilder used to define conditional CSS classes used in a component. Call Build() to return the completed CSS Classes as a string. + /// Creates a CssBuilder used to define conditional CSS classes used in a component. Call Build() to return the completed CSS Classes as a string. /// /// protected CssBuilder(string? value) @@ -38,7 +39,8 @@ protected CssBuilder(string? value) } /// - /// Adds a raw string to the builder that will be concatenated with the next class or value added to the builder. + /// Adds a raw string to the builder that will be concatenated with the next class or value added to the builder. + /// Adds a raw string to the builder that will be concatenated with the next class or value added to the builder. /// /// /// CssBuilder @@ -60,7 +62,8 @@ public CssBuilder AddClass(string? value) } /// - /// Adds a conditional CSS Class to the builder with space separator. + /// Adds a conditional CSS Class to the builder with space separator. + /// Adds a conditional CSS Class to the builder with space separator. /// /// CSS Class to conditionally add. /// Condition in which the CSS Class is added. @@ -68,7 +71,8 @@ public CssBuilder AddClass(string? value) public CssBuilder AddClass(string? value, bool when = true) => when ? AddClass(value) : this; /// - /// Adds a conditional CSS Class to the builder with space separator. + /// Adds a conditional CSS Class to the builder with space separator. + /// Adds a conditional CSS Class to the builder with space separator. /// /// CSS Class to conditionally add. /// Condition in which the CSS Class is added. @@ -76,7 +80,8 @@ public CssBuilder AddClass(string? value) public CssBuilder AddClass(string? value, Func when) => AddClass(value, when()); /// - /// Adds a conditional CSS Class to the builder with space separator. + /// Adds a conditional CSS Class to the builder with space separator. + /// Adds a conditional CSS Class to the builder with space separator. /// /// Function that returns a CSS Class to conditionally add. /// Condition in which the CSS Class is added. @@ -84,7 +89,8 @@ public CssBuilder AddClass(string? value) public CssBuilder AddClass(Func value, bool when = true) => when ? AddClass(value()) : this; /// - /// Adds a conditional CSS Class to the builder with space separator. + /// Adds a conditional CSS Class to the builder with space separator. + /// Adds a conditional CSS Class to the builder with space separator. /// /// Function that returns a CSS Class to conditionally add. /// Condition in which the CSS Class is added. @@ -92,7 +98,8 @@ public CssBuilder AddClass(string? value) public CssBuilder AddClass(Func value, Func when) => AddClass(value, when()); /// - /// Adds a conditional nested CssBuilder to the builder with space separator. + /// Adds a conditional nested CssBuilder to the builder with space separator. + /// Adds a conditional nested CssBuilder to the builder with space separator. /// /// CSS Class to conditionally add. /// Condition in which the CSS Class is added. @@ -100,7 +107,8 @@ public CssBuilder AddClass(string? value) public CssBuilder AddClass(CssBuilder builder, bool when = true) => when ? AddClass(builder.Build()) : this; /// - /// Adds a conditional CSS Class to the builder with space separator. + /// Adds a conditional CSS Class to the builder with space separator. + /// Adds a conditional CSS Class to the builder with space separator. /// /// CSS Class to conditionally add. /// Condition in which the CSS Class is added. @@ -108,8 +116,8 @@ public CssBuilder AddClass(string? value) public CssBuilder AddClass(CssBuilder builder, Func when) => AddClass(builder, when()); /// - /// Adds a conditional CSS Class when it exists in a dictionary to the builder with space separator. - /// Null safe operation. + /// Adds a conditional CSS Class when it exists in a dictionary to the builder with space separator. Null safe operation. + /// Adds a conditional CSS Class when it exists in a dictionary to the builder with space separator. Null safe operation. /// /// Additional Attribute splat parameters /// CssBuilder @@ -124,8 +132,8 @@ public CssBuilder AddClassFromAttributes(IDictionary? additional } /// - /// Adds a conditional css Style when it exists in a dictionary to the builder with space separator. - /// Null safe operation. + /// Adds a conditional css Style when it exists in a dictionary to the builder with space separator. Null safe operation. + /// Adds a conditional css Style when it exists in a dictionary to the builder with space separator. Null safe operation. /// /// Additional Attribute splat parameters /// CssBuilder @@ -140,7 +148,8 @@ public CssBuilder AddStyleFromAttributes(IDictionary? additional } /// - /// Finalize the completed CSS Classes as a string. + /// Finalize the completed CSS Classes as a string. + /// Finalize the completed CSS Classes as a string. /// /// string public string? Build() => _hasConent ? _builder.ToString() : null; diff --git a/src/BootstrapBlazor/Utils/EmitHelper.cs b/src/BootstrapBlazor/Utils/EmitHelper.cs index 658aee95376..af18580b545 100644 --- a/src/BootstrapBlazor/Utils/EmitHelper.cs +++ b/src/BootstrapBlazor/Utils/EmitHelper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -9,17 +9,19 @@ namespace BootstrapBlazor.Components; /// -/// Emit 方法帮助类 +/// Emit 方法帮助类 +/// Emit helper class /// public static class EmitHelper { /// - /// 通过 ITableColumn 创建动态类 + /// 通过 ITableColumn 创建动态类 + /// Create dynamic class by ITableColumn /// - /// 动态类名称 - /// ITableColumn 集合 - /// 父类类型 - /// 回调委托 + /// 动态类名称动态类name + /// ITableColumn 集合ITableColumn collection + /// 父类类型父类type + /// 回调委托回调delegate /// public static Type? CreateTypeByName(string typeName, IEnumerable cols, Type? parent = null, Func>? creatingCallback = null) { diff --git a/src/BootstrapBlazor/Utils/JSModule.cs b/src/BootstrapBlazor/Utils/JSModule.cs index 1f0f22edf31..c337c041c6b 100644 --- a/src/BootstrapBlazor/Utils/JSModule.cs +++ b/src/BootstrapBlazor/Utils/JSModule.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,13 +6,15 @@ namespace BootstrapBlazor.Components; /// -/// 模块加载器 +/// 模块加载器 +/// Module loader /// /// public class JSModule(IJSObjectReference? jSObjectReference) : IAsyncDisposable { /// - /// InvokeVoidAsync 方法 + /// InvokeVoidAsync 方法 + /// InvokeVoidAsync method /// /// /// @@ -20,7 +22,8 @@ public class JSModule(IJSObjectReference? jSObjectReference) : IAsyncDisposable public virtual ValueTask InvokeVoidAsync(string identifier, params object?[]? args) => InvokeVoidAsync(identifier, CancellationToken.None, args); /// - /// InvokeVoidAsync 方法 + /// InvokeVoidAsync 方法 + /// InvokeVoidAsync method /// /// /// @@ -34,7 +37,8 @@ public virtual ValueTask InvokeVoidAsync(string identifier, TimeSpan timeout, pa } /// - /// InvokeVoidAsync 方法 + /// InvokeVoidAsync 方法 + /// InvokeVoidAsync method /// /// /// @@ -67,7 +71,8 @@ public virtual async ValueTask InvokeVoidAsync(string identifier, CancellationTo } /// - /// InvokeAsync 方法 + /// InvokeAsync 方法 + /// InvokeAsync method /// /// /// @@ -75,7 +80,8 @@ public virtual async ValueTask InvokeVoidAsync(string identifier, CancellationTo public virtual ValueTask InvokeAsync(string identifier, params object?[]? args) => InvokeAsync(identifier, CancellationToken.None, args); /// - /// InvokeAsync 方法 + /// InvokeAsync 方法 + /// InvokeAsync method /// /// /// @@ -89,7 +95,8 @@ public virtual async ValueTask InvokeVoidAsync(string identifier, CancellationTo } /// - /// InvokeAsync 方法 + /// InvokeAsync 方法 + /// InvokeAsync method /// /// /// @@ -126,7 +133,8 @@ public virtual async ValueTask InvokeVoidAsync(string identifier, CancellationTo } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose method /// /// protected virtual async ValueTask DisposeAsyncCore(bool disposing) @@ -145,7 +153,8 @@ protected virtual async ValueTask DisposeAsyncCore(bool disposing) } /// - /// Dispose 方法 + /// Dispose 方法 + /// Dispose method /// public async ValueTask DisposeAsync() { diff --git a/src/BootstrapBlazor/Utils/Offset.cs b/src/BootstrapBlazor/Utils/Offset.cs index 1d96b5cad84..ac24a8510fd 100644 --- a/src/BootstrapBlazor/Utils/Offset.cs +++ b/src/BootstrapBlazor/Utils/Offset.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,27 +6,32 @@ namespace BootstrapBlazor.Components; /// -/// 物体偏移量类 +/// 物体偏移量类 +/// Object offset class /// public class Offset { /// - /// 获得/设置 X 轴偏移量 + /// 获得/设置 X 轴偏移量 + /// Get/Set global x-coordinate /// public int Top { get; set; } /// - /// 获得/设置 Y 轴偏移量 + /// 获得/设置 Y 轴偏移量 + /// Get/Set global y-coordinate /// public int Left { get; set; } /// - /// 获得/设置 宽度 + /// 获得/设置 宽度 + /// Get/Set width /// public int Width { get; set; } /// - /// 获得/设置 高度 + /// 获得/设置 高度 + /// Get/Set height /// public int Height { get; set; } } diff --git a/src/BootstrapBlazor/Utils/QueryHelper.cs b/src/BootstrapBlazor/Utils/QueryHelper.cs index e75f82e1404..46d8a4de08c 100644 --- a/src/BootstrapBlazor/Utils/QueryHelper.cs +++ b/src/BootstrapBlazor/Utils/QueryHelper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -10,13 +10,15 @@ namespace BootstrapBlazor.Components; /// -/// Provides methods for parsing and manipulating query strings. +/// Provides methods for parsing and manipulating query strings. +/// Provides methods for parsing and manipulating query strings. /// [ExcludeFromCodeCoverage] public static class QueryHelper { /// - /// Append the given query key and value to the URI. + /// Append the given query key and value to the URI. + /// Append the given query key and value to the URI. /// /// The base URI. /// The name of the query key. @@ -29,7 +31,8 @@ public static string AddQueryString(string uri, string name, string value) => Ad uri, new[] { new KeyValuePair(name, value) }); /// - /// Append the given query keys and values to the URI. + /// Append the given query keys and values to the URI. + /// Append the given query keys and values to the URI. /// /// The base URI. /// A dictionary of query keys and values to append. @@ -39,7 +42,8 @@ public static string AddQueryString(string uri, string name, string value) => Ad public static string AddQueryString(string uri, IDictionary queryString) => AddQueryString(uri, (IEnumerable>)queryString); /// - /// Append the given query keys and values to the URI. + /// Append the given query keys and values to the URI. + /// Append the given query keys and values to the URI. /// /// The base URI. /// A collection of query names and values to append. @@ -49,7 +53,8 @@ public static string AddQueryString(string uri, string name, string value) => Ad public static string AddQueryString(string uri, IEnumerable> queryString) => AddQueryString(uri, queryString.SelectMany(kvp => kvp.Value, (kvp, v) => KeyValuePair.Create(kvp.Key, v))); /// - /// Append the given query keys and values to the URI. + /// Append the given query keys and values to the URI. + /// Append the given query keys and values to the URI. /// /// The base URI. /// A collection of name value query pairs to append. @@ -92,14 +97,16 @@ public static string AddQueryString(string uri, IEnumerable - /// Parse a query string into its component key and value parts. + /// Parse a query string into its component key and value parts. + /// Parse a query string into its component key and value parts. /// /// The raw query string value, with or without the leading '?'. /// A collection of parsed keys and values. public static Dictionary ParseQuery(string? queryString) => ParseNullableQuery(queryString) ?? []; /// - /// Parse a query string into its component key and value parts. + /// Parse a query string into its component key and value parts. + /// Parse a query string into its component key and value parts. /// /// The raw query string value, with or without the leading '?'. /// A collection of parsed keys and values, null if there are no entries. diff --git a/src/BootstrapBlazor/Utils/Utility.cs b/src/BootstrapBlazor/Utils/Utility.cs index f58a6a06f99..ea532f2ea5e 100644 --- a/src/BootstrapBlazor/Utils/Utility.cs +++ b/src/BootstrapBlazor/Utils/Utility.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -13,55 +13,62 @@ namespace BootstrapBlazor.Components; /// -/// Utility 帮助类 +/// Utility 帮助类 +/// Utility helper class /// public static class Utility { /// - /// 获取资源文件中 DisplayAttribute/DisplayNameAttribute 标签名称方法 + /// 获取资源文件中 DisplayAttribute/DisplayNameAttribute 标签名称方法 + /// Get DisplayAttribute/DisplayNameAttribute name from resource file /// - /// 模型实例 - /// 字段名称 + /// 模型实例Model instance + /// 字段名称Field name /// public static string GetDisplayName(object model, string fieldName) => GetDisplayName(model.GetType(), fieldName); /// - /// 获取显示名称方法 + /// 获取显示名称方法 + /// Get display name method /// - /// 模型类型 - /// 字段名称 + /// 模型类型Model type + /// 字段名称Field name /// public static string GetDisplayName(Type modelType, string fieldName) => CacheManager.GetDisplayName(Nullable.GetUnderlyingType(modelType) ?? modelType, fieldName); /// - /// 获取显示名称方法 + /// 获取显示名称方法 + /// Get display name method /// - /// 模型 - /// 字段名称 + /// 模型Model + /// 字段名称Field name /// public static string GetDisplayName(string fieldName) => GetDisplayName(typeof(TModel), fieldName); /// - /// 获取 RangeAttribute 标签值 + /// 获取 RangeAttribute 标签值 + /// Get RangeAttribute value /// - /// 模型实例 - /// 字段名称 + /// 模型实例Model instance + /// 字段名称Field name /// public static RangeAttribute? GetRange(object model, string fieldName) => GetRange(model.GetType(), fieldName); /// - /// 获得 RangeAttribute 标签值 + /// 获得 RangeAttribute 标签值 + /// Get RangeAttribute value /// - /// 模型 - /// 字段名称 + /// 模型Model + /// 字段名称Field name /// public static RangeAttribute? GetRange(string fieldName) => GetRange(typeof(TModel), fieldName); /// - /// 获得 RangeAttribute 标签值 + /// 获得 RangeAttribute 标签值 + /// Get RangeAttribute value /// - /// 模型类型 - /// 字段名称 + /// 模型类型Model type + /// 字段名称Field name /// public static RangeAttribute? GetRange(Type modelType, string fieldName) { @@ -76,23 +83,26 @@ public static class Utility } /// - /// 获取资源文件中 NullableBoolItemsAttribute 标签名称方法 + /// 获取资源文件中 NullableBoolItemsAttribute 标签名称方法 + /// Get NullableBoolItemsAttribute name from resource file /// - /// 模型实例 - /// 字段名称 + /// 模型实例Model instance + /// 字段名称Field name /// public static List GetNullableBoolItems(object model, string fieldName) => GetNullableBoolItems(model.GetType(), fieldName); /// - /// 获取资源文件中 NullableBoolItemsAttribute 标签名称方法 + /// 获取资源文件中 NullableBoolItemsAttribute 标签名称方法 + /// Get NullableBoolItemsAttribute name from resource file /// - /// 模型实例 - /// 字段名称 + /// 模型实例Model instance + /// 字段名称Field name /// public static List GetNullableBoolItems(Type modelType, string fieldName) => CacheManager.GetNullableBoolItems(modelType, fieldName); /// - /// 获得 指定模型标记 的属性值 + /// 获得 指定模型标记 的属性值 + /// Get property value of specified model marked with /// /// /// @@ -102,7 +112,8 @@ public static class Utility public static TValue? GetKeyValue(TModel model, Type? customAttribute = null) => CacheManager.GetKeyValue(model, customAttribute); /// - /// 获得 指定模型属性值 + /// 获得 指定模型属性值 + /// Get specified model property value /// /// /// @@ -112,7 +123,8 @@ public static class Utility public static TResult GetPropertyValue(TModel model, string fieldName) => CacheManager.GetPropertyValue(model, fieldName); /// - /// 获取 指定对象的属性值 + /// 获取 指定对象的属性值 + /// Get property value of specified object /// /// /// @@ -136,7 +148,8 @@ public static class Utility } /// - /// 设置指定模型属性值方法 + /// 设置指定模型属性值方法 + /// Set specified model property value method /// /// /// @@ -147,62 +160,70 @@ public static class Utility public static void SetPropertyValue(TModel model, string fieldName, TValue value) => CacheManager.SetPropertyValue(model, fieldName, value); /// - /// 获得 排序方法 + /// 获得 排序方法 + /// Get sort method /// /// public static Func, string, SortOrder, IEnumerable> GetSortFunc() => CacheManager.GetSortFunc(); /// - /// 获得 通过排序集合进行排序 Func 方法 + /// 获得 通过排序集合进行排序 Func 方法 + /// Get sort Func method by sort collection /// /// public static Func, List, IEnumerable> GetSortListFunc() => CacheManager.GetSortListFunc(); /// - /// 通过指定程序集获取所有本地化信息键值集合 + /// 通过指定程序集获取所有本地化信息键值集合 + /// Get all localization key-value pairs by specified assembly /// - /// JsonLocalizationOptions 实例 - /// Assembly 程序集实例 - /// 类名称 - /// cultureName 未空时使用 CultureInfo.CurrentUICulture.Name - /// 默认 false 使用缓存值 设置 true 时内部强制重新加载 + /// JsonLocalizationOptions 实例JsonLocalizationOptions instance + /// Assembly 程序集实例Assembly instance + /// 类名称Class name + /// cultureName 未空时使用 CultureInfo.CurrentUICulture.NameUse CultureInfo.CurrentUICulture.Name when cultureName is empty + /// 默认 false 使用缓存值 设置 true 时内部强制重新加载Default false use cache, force reload when set to true public static IEnumerable GetJsonStringByTypeName(JsonLocalizationOptions option, Assembly assembly, string typeName, string? cultureName = null, bool forceLoad = false) => CacheManager.GetJsonStringByTypeName(option, assembly, typeName, cultureName, forceLoad) ?? []; /// - /// 通过指定程序集与类型获得 IStringLocalizer 实例 + /// 通过指定程序集与类型获得 IStringLocalizer 实例 + /// Get IStringLocalizer instance by specified assembly and type /// /// /// public static IStringLocalizer? GetStringLocalizerFromService(Assembly assembly, string typeName) => CacheManager.GetStringLocalizerFromService(assembly, typeName); /// - /// 获取 PlaceHolder 方法 + /// 获取 PlaceHolder 方法 + /// Get PlaceHolder method /// - /// 模型类型 - /// 字段名称 + /// 模型类型Model type + /// 字段名称Field name /// public static string? GetPlaceHolder(string fieldName) => GetPlaceHolder(typeof(TModel), fieldName); /// - /// 获取 PlaceHolder 方法 + /// 获取 PlaceHolder 方法 + /// Get PlaceHolder method /// - /// 模型实例 - /// 字段名称 + /// 模型实例Model instance + /// 字段名称Field name /// public static string? GetPlaceHolder(object model, string fieldName) => GetPlaceHolder(model.GetType(), fieldName); /// - /// 获取 PlaceHolder 方法 + /// 获取 PlaceHolder 方法 + /// Get PlaceHolder method /// - /// 模型类型 - /// 字段名称 + /// 模型类型Model type + /// 字段名称Field name /// public static string? GetPlaceHolder(Type modelType, string fieldName) => modelType.Assembly.IsDynamic ? null : CacheManager.GetPlaceholder(modelType, fieldName); /// - /// 通过 数据类型与字段名称获取 PropertyInfo 实例方法 + /// 通过 数据类型与字段名称获取 PropertyInfo 实例方法 + /// Get PropertyInfo instance by data type and field name /// /// /// @@ -211,13 +232,15 @@ public static class Utility public static bool TryGetProperty(Type modelType, string fieldName, [NotNullWhen(true)] out PropertyInfo? propertyInfo) => CacheManager.TryGetProperty(modelType, fieldName, out propertyInfo); /// - /// 重置对象属性值到默认值方法 + /// 重置对象属性值到默认值方法 + /// Reset object property value to default value /// /// public static void Reset(TModel source) where TModel : class, new() => Reset(source, new TModel()); /// - /// 重置对象属性值到默认值方法 + /// 重置对象属性值到默认值方法 + /// Reset object property value to default value /// /// public static void Reset(TModel source, TModel model) where TModel : class @@ -234,12 +257,14 @@ public static void Reset(TModel source, TModel model) where TModel : cla } /// - /// 泛型 Clone 方法 - /// 仅克隆类 公开 Field 与 Property + /// 泛型 Clone 方法 + /// Generic Clone method + /// 仅克隆类 公开 Field 与 Property + /// Only clone public Field and Property of class /// /// - /// 克隆对象 - /// 简单的深克隆方法,内部未使用序列化技术 + /// 克隆对象Clone object + /// 简单的深克隆方法,内部未使用序列化技术Simple deep clone method, internal not use serialization /// public static TModel Clone(TModel item) { @@ -265,7 +290,8 @@ public static TModel Clone(TModel item) } /// - /// 泛型 Copy 方法 + /// 泛型 Copy 方法 + /// Generic Copy method /// /// /// @@ -295,20 +321,22 @@ public static void Copy(TModel source, TModel destination) where TModel #region GenerateColumns /// - /// 通过特定类型模型获取模型属性集合 + /// 通过特定类型模型获取模型属性集合 + /// Get model property collection by specific type /// /// /// - /// 默认排序回调方法 + /// 默认排序回调方法Default order callback /// public static IEnumerable GetTableColumns(IEnumerable? source = null, Func, IEnumerable>? defaultOrderCallback = null) => GetTableColumns(typeof(TModel), source, defaultOrderCallback); /// - /// 通过特定类型模型获取模型属性集合 + /// 通过特定类型模型获取模型属性集合 + /// Get model property collection by specific type /// - /// 绑定模型类型 - /// Razor 文件中列集合 - /// 默认排序回调方法 + /// 绑定模型类型Model type + /// Razor 文件中列集合Column collection in Razor file + /// 默认排序回调方法Default order callback /// public static IEnumerable GetTableColumns(Type type, IEnumerable? source = null, Func, IEnumerable>? defaultOrderCallback = null) { @@ -382,19 +410,21 @@ internal static IEnumerable OrderFunc(this List cols .Concat(cols.Where(a => a.Order < 0).OrderBy(a => a.Order)); /// - /// 通过指定 Model 获得 IEditorItem 集合方法 + /// 通过指定 Model 获得 IEditorItem 集合方法 + /// Get IEditorItem collection by specified Model /// /// /// public static IEnumerable GenerateColumns(Func predicate) => GetTableColumns().Where(predicate); /// - /// RenderTreeBuilder 扩展方法 通过 IEditorItem 与 model 创建 Display 组件 + /// RenderTreeBuilder 扩展方法 通过 IEditorItem 与 model 创建 Display 组件 + /// RenderTreeBuilder extension method create Display component by IEditorItem and model /// - /// 实例 - /// 实例 - /// 当前模型对象实例 - /// 如果是 组件时是否显示提示栏 默认 false + /// 实例instance + /// 实例instance + /// 当前模型对象实例Current model object instance + /// 如果是 组件时是否显示提示栏 默认 falseShow tooltip if it is component default false public static void CreateDisplayByFieldType(this RenderTreeBuilder builder, IEditorItem item, object model, bool showTooltip = false) { var fieldType = item.PropertyType; @@ -482,7 +512,8 @@ private static void RenderDisplay(this RenderTreeBuilder builder, IEditorItem it } /// - /// RenderTreeBuilder 扩展方法 通过指定模型与属性生成编辑组件 + /// RenderTreeBuilder 扩展方法 通过指定模型与属性生成编辑组件 + /// RenderTreeBuilder extension method generate editor component by specified model and property /// /// /// @@ -611,7 +642,8 @@ public static void CreateComponentByFieldType(this RenderTreeBuilder builder, Co private static object? GenerateValue(object model, string fieldName) => GetPropertyValue(model, fieldName); /// - /// 通过指定类型实例获取属性 Lambda 表达式 + /// 通过指定类型实例获取属性 Lambda 表达式 + /// Get property Lambda expression by specified type instance /// /// /// @@ -653,7 +685,8 @@ object ComplexPropertyValueExpression() } /// - /// 通过指定类型生成组件类型 + /// 通过指定类型生成组件类型 + /// Generate component type by specified type /// /// private static Type GenerateComponentType(IEditorItem item) @@ -693,10 +726,11 @@ private static Type GenerateComponentType(IEditorItem item) } /// - /// 通过指定数据类型判断是否可使用 CheckboxList 进行渲染 + /// 通过指定数据类型判断是否可使用 CheckboxList 进行渲染 + /// Judge whether to use CheckboxList to render by specified data type /// /// - /// 组件类型 + /// 组件类型Component type /// public static bool IsCheckboxList(Type fieldType, Type? componentType = null) { @@ -716,12 +750,13 @@ public static bool IsCheckboxList(Type fieldType, Type? componentType = null) private static bool IsValidComponent(Type componentType) => Array.Find(componentType.GetProperties(), p => p.Name == nameof(IEditorItem.SkipValidate)) != null; /// - /// 通过模型与指定数据类型生成组件参数集合 + /// 通过模型与指定数据类型生成组件参数集合 + /// Generate component parameter collection by model and specified data type /// - /// 待编辑数据类型 - /// 上下文模型 - /// 字段名称 - /// IEditorItem 实例 + /// 待编辑数据类型Data type to be edited + /// 上下文模型Context model + /// 字段名称Field name + /// IEditorItem 实例IEditorItem instance /// private static Dictionary CreateMultipleAttributes(Type fieldType, object model, string fieldName, IEditorItem item) { @@ -751,7 +786,8 @@ private static Dictionary CreateMultipleAttributes(Type fieldTyp } /// - /// 创建 委托方法 + /// 创建 委托方法 + /// Create delegate method /// /// /// @@ -762,7 +798,8 @@ private static Dictionary CreateMultipleAttributes(Type fieldTyp public static Func CreateOnValueChangedCallback(TModel model, ITableColumn col, Func callback) => v => callback(model, col, v); /// - /// 创建 OnValueChanged 回调委托 + /// 创建 OnValueChanged 回调委托 + /// Create OnValueChanged callback delegate /// /// /// @@ -779,7 +816,8 @@ private static Dictionary CreateMultipleAttributes(Type fieldTyp } /// - /// 创建 OnValueChanged 回调委托 + /// 创建 OnValueChanged 回调委托 + /// Create OnValueChanged callback delegate /// /// /// @@ -789,7 +827,8 @@ private static Dictionary CreateMultipleAttributes(Type fieldTyp #region Format /// - /// 任意类型格式化方法 + /// 任意类型格式化方法 + /// Format method for any type /// /// /// @@ -807,7 +846,8 @@ public static string Format(object? source, string format, IFormatProvider? prov } /// - /// 任意类型格式化方法 + /// 任意类型格式化方法 + /// Format method for any type /// /// /// @@ -825,7 +865,8 @@ public static string Format(object? source, IFormatProvider provider) #endregion /// - /// 转换泛型类型为字符串方法 + /// 转换泛型类型为字符串方法 + /// Convert generic type to string method /// /// /// @@ -865,7 +906,8 @@ public static string Format(object? source, IFormatProvider provider) } /// - /// 获得 ValueChanged 回调委托 + /// 获得 ValueChanged 回调委托 + /// Get ValueChanged callback delegate /// /// /// @@ -890,7 +932,8 @@ static Expression> CreateLambda(Type } /// - /// 创建 方法 + /// 创建 方法 + /// Create method /// /// /// @@ -900,21 +943,24 @@ static Expression> CreateLambda(Type public static EventCallback CreateCallback(ComponentBase component, object model, string fieldName) => EventCallback.Factory.Create(component, t => CacheManager.SetPropertyValue(model, fieldName, t)); /// - /// 获得指定泛型的 IEditorItem 集合 + /// 获得指定泛型的 IEditorItem 集合 + /// Get IEditorItem collection of specified generic type /// /// /// public static IEnumerable GenerateEditorItems(IEnumerable? source = null) => GetTableColumns(source); /// - /// 通过指定类型创建 IStringLocalizer 实例 + /// 通过指定类型创建 IStringLocalizer 实例 + /// Create IStringLocalizer instance by specified type /// /// /// public static IStringLocalizer? CreateLocalizer() => CreateLocalizer(typeof(TType)); /// - /// 通过指定类型创建 IStringLocalizer 实例 + /// 通过指定类型创建 IStringLocalizer 实例 + /// Create IStringLocalizer instance by specified type /// /// /// diff --git a/src/BootstrapBlazor/Validators/DateTimeRangeRequiredValidator.cs b/src/BootstrapBlazor/Validators/DateTimeRangeRequiredValidator.cs index 41d979d0cdf..3176d8d1902 100644 --- a/src/BootstrapBlazor/Validators/DateTimeRangeRequiredValidator.cs +++ b/src/BootstrapBlazor/Validators/DateTimeRangeRequiredValidator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,11 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// DateTimeRange 验证 +/// DateTimeRange 验证 +/// DateTimeRange validation /// public class DateTimeRangeRequiredValidator : RequiredValidator { + /// /// + /// public override void Validate(object? propertyValue, ValidationContext context, List results) { if (propertyValue is DateTimeRangeValue d && (d.Start == DateTime.MinValue || d.End == DateTime.MinValue)) diff --git a/src/BootstrapBlazor/Validators/FormItemValidator.cs b/src/BootstrapBlazor/Validators/FormItemValidator.cs index c648be18db6..05426cc9062 100644 --- a/src/BootstrapBlazor/Validators/FormItemValidator.cs +++ b/src/BootstrapBlazor/Validators/FormItemValidator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,19 @@ namespace BootstrapBlazor.Components; /// -/// 自定义验证类 +/// 自定义验证类 +/// Custom validation class /// /// public class FormItemValidator(ValidationAttribute attribute) : ValidatorBase { /// - /// 验证方法 + /// 验证方法 + /// Validation method /// - /// 待校验值 - /// ValidateContext 实例 - /// ValidateResult 集合实例 + /// 待校验值Value to be validated + /// ValidateContext 实例ValidateContext instance + /// ValidateResult 集合实例ValidateResult collection instance public override void Validate(object? propertyValue, ValidationContext context, List results) { var result = attribute.GetValidationResult(propertyValue, context); @@ -27,7 +29,8 @@ public override void Validate(object? propertyValue, ValidationContext context, } /// - /// 是否为 RequiredAttribute 标签特性 + /// 是否为 RequiredAttribute 标签特性 + /// Whether it is RequiredAttribute tag attribute /// public bool IsRequired => attribute is RequiredAttribute; } diff --git a/src/BootstrapBlazor/Validators/IValidator.cs b/src/BootstrapBlazor/Validators/IValidator.cs index 6b12ff12666..eb50a6861db 100644 --- a/src/BootstrapBlazor/Validators/IValidator.cs +++ b/src/BootstrapBlazor/Validators/IValidator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// IValidator 接口 +/// IValidator 接口 +/// IValidator interface /// public interface IValidator { /// - /// 异步验证方法 + /// 异步验证方法 + /// Async validation method /// /// /// diff --git a/src/BootstrapBlazor/Validators/IValidatorAsync.cs b/src/BootstrapBlazor/Validators/IValidatorAsync.cs index fc3b6745231..db7f1c4d44e 100644 --- a/src/BootstrapBlazor/Validators/IValidatorAsync.cs +++ b/src/BootstrapBlazor/Validators/IValidatorAsync.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// 异步验证组件 +/// 异步验证组件 +/// Async validation component /// public interface IValidatorAsync : IValidator { /// - /// 异步验证方法 + /// 异步验证方法 + /// Async validation method /// /// /// diff --git a/src/BootstrapBlazor/Validators/MaxValidator.cs b/src/BootstrapBlazor/Validators/MaxValidator.cs index c8b665d1803..83ea7230aaf 100644 --- a/src/BootstrapBlazor/Validators/MaxValidator.cs +++ b/src/BootstrapBlazor/Validators/MaxValidator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -8,36 +8,42 @@ namespace BootstrapBlazor.Components; /// -/// 选项最大数验证实现类 +/// 选项最大数验证实现类 +/// Max validator implementation class /// public class MaxValidator : ValidatorBase { /// - /// 获得/设置 错误描述信息 + /// 获得/设置 错误描述信息 + /// Get/Set error message /// public string? ErrorMessage { get; set; } /// - /// 获得/设置 值 + /// 获得/设置 值 + /// Get/Set value /// public int Value { get; set; } /// - /// 获得/设置 分割回调方法 默认 使用 ',' 分割 + /// 获得/设置 分割回调方法 默认 使用 ',' 分割 + /// Get/Set split callback method default use ',' split /// public Func SplitCallback { get; set; } = value => value.Split(',', StringSplitOptions.RemoveEmptyEntries).Length; /// - /// 获得 ErrorMessage 方法 + /// 获得 ErrorMessage 方法 + /// Get ErrorMessage method /// protected virtual string GetErrorMessage() => ErrorMessage ?? "At most {0} items can be selected"; /// - /// 验证方法 + /// 验证方法 + /// Validation method /// - /// 待校验值 - /// ValidateContext 实例 - /// ValidateResult 集合实例 + /// 待校验值Value to be validated + /// ValidateContext 实例ValidateContext instance + /// ValidateResult 集合实例ValidateResult collection instance public override void Validate(object? propertyValue, ValidationContext context, List results) { if (!Validate(propertyValue)) @@ -48,7 +54,8 @@ public override void Validate(object? propertyValue, ValidationContext context, } /// - /// 检查 Value 是否合法 返回 true 表示合法 + /// 检查 Value 是否合法 返回 true 表示合法 + /// Check if Value is valid return true if valid /// /// protected virtual bool Validate(object? propertyValue) @@ -75,7 +82,8 @@ protected virtual bool Validate(object? propertyValue) } /// - /// 验证方法 小于等于 Value 时 返回 true + /// 验证方法 小于等于 Value 时 返回 true + /// Validation method return true when less than or equal to Value /// protected virtual bool Validate(int count) => count <= Value; } diff --git a/src/BootstrapBlazor/Validators/MinValidator.cs b/src/BootstrapBlazor/Validators/MinValidator.cs index 2532eac0f50..6be12195bb8 100644 --- a/src/BootstrapBlazor/Validators/MinValidator.cs +++ b/src/BootstrapBlazor/Validators/MinValidator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,17 +6,20 @@ namespace BootstrapBlazor.Components; /// -/// 选项最小数验证实现类 +/// 选项最小数验证实现类 +/// Min validator implementation class /// public class MinValidator : MaxValidator { /// - /// 验证方法 大于等于 Value 时 返回 true + /// 验证方法 大于等于 Value 时 返回 true + /// Validation method return true when greater than or equal to Value /// protected override bool Validate(int count) => count >= Value; /// - /// 获得 ErrorMessage 方法 + /// 获得 ErrorMessage 方法 + /// Get ErrorMessage method /// /// protected override string GetErrorMessage() => ErrorMessage ?? "Select at least {0} items"; diff --git a/src/BootstrapBlazor/Validators/RequiredValidator.cs b/src/BootstrapBlazor/Validators/RequiredValidator.cs index 063b8f045bf..37cfbb7b934 100644 --- a/src/BootstrapBlazor/Validators/RequiredValidator.cs +++ b/src/BootstrapBlazor/Validators/RequiredValidator.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -12,36 +12,42 @@ namespace BootstrapBlazor.Components; /// -/// Required 验证实现类 +/// Required 验证实现类 +/// Required validator implementation class /// public class RequiredValidator : ValidatorBase { /// - /// 获得/设置 错误描述信息 默认为 null 需要赋值 + /// 获得/设置 错误描述信息 默认为 null 需要赋值 + /// Get/Set error message default null need to be assigned /// public string? ErrorMessage { get; set; } /// - /// 获得/设置 是否允许空字符串 默认 false 不允许 + /// 获得/设置 是否允许空字符串 默认 false 不允许 + /// Get/Set whether to allow empty string default false not allowed /// public bool AllowEmptyString { get; set; } /// - /// 获得/设置 IStringLocalizerFactory 注入服务实例 默认为 null + /// 获得/设置 IStringLocalizerFactory 注入服务实例 默认为 null + /// Get/Set IStringLocalizerFactory injection service instance default null /// public IStringLocalizerFactory? LocalizerFactory { get; set; } /// - /// 获得/设置 Json 资源文件配置 默认为 null + /// 获得/设置 Json 资源文件配置 默认为 null + /// Get/Set Json resource file configuration default null /// public JsonLocalizationOptions? Options { get; set; } /// - /// 验证方法 + /// 验证方法 + /// Validation method /// - /// 待校验值 - /// ValidateContext 实例 - /// ValidateResult 集合实例 + /// 待校验值Value to be validated + /// ValidateContext 实例ValidateContext instance + /// ValidateResult 集合实例ValidateResult collection instance public override void Validate(object? propertyValue, ValidationContext context, List results) { if (string.IsNullOrEmpty(ErrorMessage)) @@ -86,13 +92,15 @@ private ValidationResult GetValidationResult(ValidationContext context) } /// - /// 获得当前验证规则资源文件中 Key 格式 + /// 获得当前验证规则资源文件中 Key 格式 + /// Get Key format in current validation rule resource file /// /// protected virtual string GetRuleKey() => GetType().Name.Split(".").Last().Replace("Validator", ""); /// - /// 通过资源文件获取 ErrorMessage 方法 + /// 通过资源文件获取 ErrorMessage 方法 + /// Get ErrorMessage method by resource file /// /// /// diff --git a/src/BootstrapBlazor/Validators/ValidatorAsyncBase.cs b/src/BootstrapBlazor/Validators/ValidatorAsyncBase.cs index 8644c50bf51..06db2cec2d3 100644 --- a/src/BootstrapBlazor/Validators/ValidatorAsyncBase.cs +++ b/src/BootstrapBlazor/Validators/ValidatorAsyncBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,7 +6,8 @@ namespace BootstrapBlazor.Components; /// -/// IValidator 异步实现类基类 +/// IValidator 异步实现类基类 +/// IValidator async implementation base class /// public abstract class ValidatorAsyncBase : IValidatorAsync { @@ -17,7 +18,8 @@ void IValidator.Validate(object? propertyValue, ValidationContext context, List< } /// - /// 数据验证方法 + /// 数据验证方法 + /// Data validation method /// /// /// diff --git a/src/BootstrapBlazor/Validators/ValidatorBase.cs b/src/BootstrapBlazor/Validators/ValidatorBase.cs index 71b83754b4b..46afa8c8d40 100644 --- a/src/BootstrapBlazor/Validators/ValidatorBase.cs +++ b/src/BootstrapBlazor/Validators/ValidatorBase.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone @@ -6,12 +6,14 @@ namespace BootstrapBlazor.Components; /// -/// IValidator 实现类基类 +/// IValidator 实现类基类 +/// IValidator implementation base class /// public abstract class ValidatorBase : IValidator { /// - /// 数据验证方法 + /// 数据验证方法 + /// Data validation method /// /// ///