BootstrapBlazor.Bluetooth 7.1.0
Blazor Bluetooth & Printer 蓝牙和打印 组件
1. 蓝牙打印机 Printer
2. 蓝牙心率带 Heart Rate
3. 蓝牙设备电量 Battery Level
4. 蓝牙特征通知 Notification
示例
https://www.blazor.zone/bluetooth
https://blazor.app1.es/bluetooth
使用方法:
nuget包
BootstrapBlazor.Bluetooth
_Imports.razor 文件 或者页面添加 添加组件库引用
@using BootstrapBlazor.Components
Razor页面
蓝牙打印机 BT Printer
https://github.com/densen2014/Densen.Extensions/blob/master/Demo/DemoShared/Pages/BtPrinterPage.razor@using BootstrapBlazor.Components <Printer OnResult="OnResult" ShowUI="true" Debug="true" />
@using BootstrapBlazor.Components <button class="btn btn-outline-secondary" @onclick="GetHeartrate ">查询心率</button> <button class="btn btn-outline-secondary" @onclick="StopHeartrate ">停止读取</button> <Heartrate @ref="heartrate" OnUpdateValue="OnUpdateValue" /> <h2 style="color:red" data-action="heartrate"/> @code{ Heartrate heartrate { get; set; } = new Heartrate(); private int? value; private Task OnUpdateValue(int value) { this.value = value; StateHasChanged(); return Task.CompletedTask; } }
@using BootstrapBlazor.Components <button class="btn btn-outline-secondary" @onclick="GetBatteryLevel ">查询电量</button> <BatteryLevel @ref="batteryLevel" OnUpdateValue="OnUpdateValue" /> <pre>@message</pre> @code{ Heartrate heartrate { get; set; } = new Heartrate(); private int? value; private Task OnUpdateValue(decimal value) { this.value = value; this.statusmessage = $"设备电量{value}%"; StateHasChanged(); return Task.CompletedTask; } }
更多信息请参考
Bootstrap 风格的 Blazor UI 组件库 基于 Bootstrap 样式库精心打造,并且额外增加了 100 多种常用的组件,为您快速开发项目带来非一般的感觉
Blazor Printer component
1. Printer
2. Heart Rate
3. Battery Level
4. Notification
Demo
https://www.blazor.zone/bluetooth
https://blazor.app1.es/bluetooth
Instructions:
NuGet install pack
BootstrapBlazor.Bluetooth
_Imports.razor or Razor page
@using BootstrapBlazor.Components
Razor page
@using BootstrapBlazor.Components <Printer OnResult="OnResult" ShowUI="true" Debug="true" />
Heart rate
@using BootstrapBlazor.Components <button class="btn btn-outline-secondary" @onclick="GetHeartrate ">查询心率</button> <button class="btn btn-outline-secondary" @onclick="StopHeartrate ">停止读取</button> <Heartrate @ref="heartrate" OnUpdateValue="OnUpdateValue" /> <h2 style="color:red" data-action="heartrate"/> @code{ Heartrate heartrate { get; set; } = new Heartrate(); private int? value; private Task OnUpdateValue(int value) { this.value = value; StateHasChanged(); return Task.CompletedTask; } }
Battery Level
https://github.com/densen2014/Densen.Extensions/blob/master/Demo/DemoShared/Pages/BtBatteryLevelPage.razor@using BootstrapBlazor.Components <button class="btn btn-outline-secondary" @onclick="GetBatteryLevel ">查询电量</button> <BatteryLevel @ref="batteryLevel" OnUpdateValue="OnUpdateValue" /> <pre>@message</pre> @code{ Heartrate heartrate { get; set; } = new Heartrate(); private int? value; private Task OnUpdateValue(decimal value) { this.value = value; this.statusmessage = $"设备电量{value}%"; StateHasChanged(); return Task.CompletedTask; } }
More informations
Bootstrap style Blazor UI component library Based on the Bootstrap style library, it is carefully built, and 100 a variety of commonly used components have been added to bring you an extraordinary feeling for rapid development projects
Blazor 组件
AlexChow
今日头条 | 博客园 | 知乎 | Gitee | GitHub
No packages depend on BootstrapBlazor.Bluetooth.
.NET 6.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.0)
.NET 7.0
- Microsoft.AspNetCore.Components.Web (>= 7.0.0)
Version | Downloads | Last updated |
---|---|---|
9.0.0 | 0 | 2025/1/21 |
8.0.2 | 0 | 2024/4/26 |
8.0.1 | 0 | 2023/12/9 |
8.0.0 | 0 | 2023/11/15 |
7.1.0 | 1 | 2025/5/28 |
7.0.1 | 0 | 2022/12/7 |
7.0.0 | 0 | 2022/11/9 |
6.2.1 | 0 | 2022/10/12 |
6.2.0 | 0 | 2022/10/12 |
6.1.0 | 0 | 2022/10/12 |
6.0.7 | 0 | 2022/10/12 |
6.0.6 | 0 | 2022/10/3 |
6.0.5 | 0 | 2022/10/3 |
6.0.4 | 0 | 2022/10/2 |
6.0.3 | 0 | 2022/10/2 |
6.0.2 | 0 | 2022/10/2 |
6.0.1 | 0 | 2022/10/2 |
6.0.0 | 0 | 2022/10/2 |