# KodeQR **Repository Path**: jr-soft/kode-qr ## Basic Information - **Project Name**: KodeQR - **Description**: 基于 .NET Framework 4.8 的 Windows 桌面工具,用于二维码/条形码的生成与解码,并支持图片与 Base64 互转。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-29 - **Last Updated**: 2026-05-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # K码工坊(KodeQR)v1.0.0 基于 .NET Framework 4.8 的 Windows 桌面工具,用于二维码/条形码的生成与解码,并支持图片与 Base64 互转。 ## 功能概览 | 模块 | 说明 | |------|------| | 二维码生成 | 单条/批量生成,自定义尺寸、颜色、纠错等级、码下方文字、中心 Logo(10%–30%),支持 ZIP 批量导出 | | 二维码解码 | 文件选择、粘贴、拖拽导入;单张/批量并行解码;结果导出 CSV | | 条形码生成 | 多种格式(如 CODE_128),可配置宽高、前景/背景色、是否显示文字 | | 条形码解码 | 文件/粘贴/拖拽解码 | | 图片/Base64 | 图片与 Base64 双向转换,支持 data URI 前缀 | | 高级选项 | 解码参数(TryHarder、自动旋转、超时)、默认输出路径与文件名规则 | | 关于 | 版本信息、作者联系方式、打赏二维码 | ## 系统要求 - **操作系统**:Windows 7 SP1 及以上(推荐 Windows 10/11) - **运行时**: [.NET Framework 4.8](https://dotnet.microsoft.com/download/dotnet-framework/net48)(Windows 10 1809+ 通常已预装) ## 快速开始(发布包) 1. 下载或解压发布包: - 目录:`publish/KodeQR-v1.0.0/` - 压缩包:`publish/KodeQR-v1.0.0-win-x64.zip` 2. 将文件夹解压到任意位置(路径尽量不含特殊字符)。 3. 双击运行 `KodeQR.exe`。 4. 生成的图片默认保存到程序目录下的 `Output` 文件夹(可在「高级选项」中修改)。 > 首次运行若提示缺少 .NET Framework 4.8,请先安装运行时后再启动。 ## 发布包目录结构 ``` KodeQR-v1.0.0/ ├── KodeQR.exe # 主程序 ├── KodeQR.exe.config ├── BarcodeGeneratorCore.dll ├── BarcodeServices.dll ├── Newtonsoft.Json.dll ├── System.Drawing.Common.dll ├── zxing.dll ├── zxing.presentation.dll ├── Config/ │ └── appsettings.json # 默认配置(运行时可被用户设置覆盖) └── Resources/ ├── app.ico └── donation-frame2.png ``` ## 配置说明 配置文件位于 `Config/appsettings.json`,主要包含: - **DefaultSettings.QRCode**:二维码默认尺寸、颜色、纠错、码下文字、Logo 等 - **DefaultSettings.Barcode**:条形码默认格式、尺寸、颜色 - **Output**:默认保存路径、文件名模式、图片格式 - **Decoding**:解码是否加强尝试、自动旋转、超时秒数 程序界面中的样式与高级选项修改会持久化到用户配置,无需手动编辑 JSON。 ## 从源码构建 ```bash cd BarcodeSolution dotnet restore dotnet build -c Release dotnet test -c Release ``` Release 输出路径: `BarcodeSolution/03_UI/KodeQR/bin/Release/net48/KodeQR.exe` 重新打包发布目录(PowerShell 示例): ```powershell $src = "BarcodeSolution/03_UI/KodeQR/bin/Release/net48" $dst = "publish/KodeQR-v1.0.0" # 复制 exe、dll、Config、Resources 至 $dst 后压缩为 zip ``` ## 项目结构 ``` BarcodeSolution/ ├── 01_Core/BarcodeGeneratorCore/ # 编解码核心库 ├── 02_Services/BarcodeServices/ # 配置与业务服务 ├── 03_UI/KodeQR/ # WinForms 主程序 ├── 04_Tests/BarcodeCoreTests/ # 单元测试 └── docs/ # 开发文档 ``` ## 主要依赖 | 组件 | 版本 | |------|------| | ZXing.Net | 0.16.9 | | Newtonsoft.Json | 13.0.3 | | System.Drawing.Common | 7.0.0 | ## 作者 - **作者**:金锐 - **邮箱**:kingsf1979@163.com - **版本**:1.0.0 ## 许可证 本项目为个人作品,使用前请遵守相关开源组件(ZXing.Net、Newtonsoft.Json 等)的许可协议。