BootstrapBlazor.Bluetooth 7.0.1

.NET 6.0
dotnet add package BootstrapBlazor.Bluetooth --version 7.0.1
NuGet\Install-Package BootstrapBlazor.Bluetooth -Version 7.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BootstrapBlazor.Bluetooth" Version="7.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BootstrapBlazor.Bluetooth --version 7.0.1
#r "nuget: BootstrapBlazor.Bluetooth, 7.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install BootstrapBlazor.Bluetooth as a Cake Addin
#addin nuget:?package=BootstrapBlazor.Bluetooth&version=7.0.1

// Install BootstrapBlazor.Bluetooth as a Cake Tool
#tool nuget:?package=BootstrapBlazor.Bluetooth&version=7.0.1

Blazor Bluetooth & Printer 蓝牙和打印 组件

1. 蓝牙打印机 Printer
2. 蓝牙心率带 Heart Rate
3. 蓝牙设备电量 Battery Level

示例

https://www.blazor.zone/bluetooth

https://blazor.app1.es/bluetooth

使用方法:

  1. nuget包

    BootstrapBlazor.Bluetooth

  2. _Imports.razor 文件 或者页面添加 添加组件库引用

    @using BootstrapBlazor.Components

  3. 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" />
    
    

    蓝牙心率带
    https://github.com/densen2014/Densen.Extensions/blob/master/Demo/DemoShared/Pages/BtHeartratePage.razor

    @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;
        }
    }
    

    蓝牙设备电量
    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;
        }
    }
    
    
  4. 更多信息请参考

    Bootstrap 风格的 Blazor UI 组件库 基于 Bootstrap 样式库精心打造,并且额外增加了 100 多种常用的组件,为您快速开发项目带来非一般的感觉

    https://www.blazor.zone

    https://www.blazor.zone/bluetooth


Blazor Printer component

1. Printer
2. Heart Rate
3. Battery Level

Demo

https://www.blazor.zone/bluetooth

https://blazor.app1.es/bluetooth

Instructions:

  1. NuGet install pack

    BootstrapBlazor.Bluetooth

  2. _Imports.razor or Razor page

    @using BootstrapBlazor.Components
    
  3. Razor page

    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" />
    
    

    Heart rate

    https://github.com/densen2014/Densen.Extensions/blob/master/Demo/DemoShared/Pages/BtHeartratePage.razor

    @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;
        }
    }
    
    
  4. 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

    https://www.blazor.zone

    https://www.blazor.zone/bluetooth


Blazor 组件

条码扫描 ZXingBlazor nuget stats

图片浏览器 Viewer

条码扫描 BarcodeScanner

手写签名 Handwritten

手写签名 SignaturePad

定位/持续定位 Geolocation

屏幕键盘 OnScreenKeyboard

百度地图 BaiduMap

谷歌地图 GoogleMap

蓝牙和打印 Bluetooth

PDF阅读器 PdfReader

文件系统访问 FileSystem

光学字符识别 OCR

电池信息/网络信息 WebAPI

AlexChow

今日头条 | 博客园 | 知乎 | Gitee | GitHub

ChuanglinZhou

Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on BootstrapBlazor.Bluetooth:

Package Downloads
BlazorShared

BlazorMaui , 整合Blazor,BootstrapBlazor UI组件库,Maui的共享跨平台工程示例共享库

BootstrapBlazor.Densen.All

Blazor 组件懒人包

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on BootstrapBlazor.Bluetooth:

Repository Stars
dotnetcore/BootstrapBlazor
A set of enterprise-class UI components based on Bootstrap and Blazor
Version Downloads Last updated
7.0.1 584 12/7/2022
7.0.0 390 11/9/2022
6.2.1 308 10/12/2022
6.2.0 191 10/12/2022
6.1.0 192 10/12/2022
6.0.7 191 10/12/2022
6.0.6 185 10/3/2022
6.0.5 187 10/3/2022
6.0.4 205 10/2/2022
6.0.3 188 10/2/2022
6.0.2 213 10/2/2022
6.0.1 187 10/2/2022
6.0.0 191 10/2/2022