diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..68af5dbd7b6ccc1e1ec550931de9bfbdb1e198b3 --- /dev/null +++ b/README.en.md @@ -0,0 +1,158 @@ +# Production Monitoring System + +## 📋 Project Introduction + +This project is a production monitoring system based on WPF and .NET 8.0, used for real-time monitoring of workshop machine operating status, environmental parameters, equipment data, and other information. The system adopts the MVVM architecture pattern and provides an intuitive visual interface, including various chart display methods such as radar charts and donut progress charts. + +## ✨ Main Features + +### 1. Workshop Monitoring +- Real-time display of statistics on the working status of each workshop +- Display the number of machines processing, pending, abnormal, or stopped +- Support viewing workshop details + +### 2. Machine Status Monitoring +- Monitor machine name and operating status +- Display planned production quantity and completed quantity +- Automatically calculate completion percentage +- Display current work order information + +### 3. Environmental Parameter Monitoring +- Real-time collection of workshop environment data (temperature, humidity, etc.) +- Visual display of environmental indicators + +### 4. Equipment Data Display +- Mechanical equipment operating data charts +- Multidimensional display of equipment status via radar charts +- Display of key metrics via ring progress charts + +### 5. Alarm Management +- Real-time alarm information recording +- Display alarm content and duration +- Support historical alarm queries + +## 🛠 Tech Stack + +| Technology | Usage | +|------|------| +| C# 8.0 | Development Language | +| .NET 8.0-windows | Runtime Framework | +| WPF | Desktop UI Framework | +| CommunityToolkit.Mvvm | MVVM Pattern Support | +| LiveCharts | Chart Library | + +## 📁 Project Structure + +``` +ProductionMonitoringSystem/ +├── App.xaml # Application Entry +├── App.xaml.cs # Application Logic +├── AssemblyInfo.cs # Assembly Information +├── MainWindow.xaml # Main Window Interface +├── MainWindow.xaml.cs # Main Window Logic +├── Dictionary/ # Resource Dictionary +│ ├── Fonts.xaml # Font Styles +│ ├── OperateBtunStyle.xaml # Button Styles +│ └── UserControlDic.xaml # User Control Styles +├── Models/ # Data Models +│ ├── AiarmModel.cs # Alarm Information Model +│ ├── EnviromentModel.cs # Environmental Data Model +│ ├── MachineModel.cs # Machine Status Model +│ ├── MachineryModel.cs # Mechanical Equipment Model +│ ├── RaderModel.cs # Radar Chart Data Model +│ └── WorkShopModel.cs # Workshop Information Model +├── UserControls/ # Custom Controls +│ ├── RaderUC.xaml # Radar Chart Control +│ ├── RaderUC.xaml.cs # Radar Chart Logic +│ ├── RingUC.xaml # Ring Chart Control +│ ├── RingUC.xaml.cs # Ring Chart Logic +│ ├── UserControlUC.xaml # Generic User Control +│ └── WorksShopDetailUC.xaml # Workshop Detail Control +├── ViewModel/ # ViewModels +│ ├── MainWindowVM.cs # Main Window ViewModel +│ ├── UserControlucVM.cs # User Control ViewModel +│ └── WorksShopDetailVM.cs # Workshop Detail ViewModel +└── Resource/ # Resource Files + ├── Fonts/ # Font Files + └── Image/ # Image Resources +``` + +## 🚀 Quick Start + +### Environment Requirements + +- Windows Operating System +- .NET 8.0 SDK or higher +- Visual Studio 2022 or VS Code + +### Installation Steps + +1. Clone or download the project code +2. Open the `01.MonitoringSystem.csproj` file using Visual Studio +3. Restore NuGet packages (The project will automatically reference LiveCharts and CommunityToolkit.Mvvm) +4. Press F5 to compile and run + +### Running Instructions + +``` +dotnet run --project 01.MonitoringSystem +``` + +## 📊 Data Model Description + +### MachineModel - Machine Status Model +```csharp +public class MachineModel +{ + public string MachineName; // Machine Name + public string Status; // Operating Status + public int PlanCount; // Planned Quantity + public int FinishedCount; // Completed Quantity + public string OrderNo; // Work Order Number + public double Percent; // Completion Percentage +} +``` + +### WorkShopModel - Workshop Information Model +```csharp +public class WorkShopModel +{ + public string WorkShopName; // Workshop Name + public int WorkCount; // Count Processing + public int WaitCount; // Count Pending + public int WrongCount; // Count Abnormal + public int StopCount; // Count Stopped + public int TotalCount; // Total Count +} +``` + +### AiarmModel - Alarm Information Model +```csharp +public class AiarmModel +{ + public string Num; // Alarm Number + public string Msg; // Alarm Message + public string Time; // Alarm Time + public int Duration; // Duration +} +``` + +## 🔧 Custom Controls + +### RaderUC (Radar Chart Control) +Used for multidimensional data display, supports data binding and dynamic updates. + +### RingUC (Ring Chart Control) +Displays percentage data in the form of a ring progress bar, suitable for metrics such as completion rates. + +## 📝 License + +This project is open source. For specific license information, please refer to the LICENSE file in the root directory of the project. + +## 👤 Author + +wang1751518025 + +## 📧 Contact + +If you have any questions, please submit an Issue via the Gitee project page. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..26d9d6c847597144d0ab4b79d456ad9bf06d0d6c --- /dev/null +++ b/README.md @@ -0,0 +1,160 @@ + + +# 生产监控系统 + +## 📋 项目简介 + +本项目是一个基于 WPF 和 .NET 8.0 的生产监控系统,用于实时监控车间机器运行状态、环境参数、设备数据等信息。系统采用 MVVM 架构模式,提供了直观的可视化界面,包括雷达图、环形进度图等多种图表展示方式。 + +## ✨ 主要功能 + +### 1. 车间监控 +- 实时显示各车间工作状态统计 +- 展示加工中、待加工、异常、停止等机器数量 +- 支持车间详情查看 + +### 2. 机器状态监控 +- 监控机器名称、运行状态 +- 显示计划产量和完成数量 +- 自动计算完成百分比 +- 展示当前工单信息 + +### 3. 环境参数监测 +- 实时采集车间环境数据(温度、湿度等) +- 环境指标可视化展示 + +### 4. 设备数据展示 +- 机械设备运行数据图表 +- 雷达图多维度展示设备状态 +- 环形进度图显示关键指标 + +### 5. 报警管理 +- 实时报警信息记录 +- 显示报警内容、持续时间 +- 支持历史报警查询 + +## 🛠 技术栈 + +| 技术 | 用途 | +|------|------| +| C# 8.0 | 开发语言 | +| .NET 8.0-windows | 运行时框架 | +| WPF | 桌面UI框架 | +| CommunityToolkit.Mvvm | MVVM模式支持 | +| LiveCharts | 图表库 | + +## 📁 项目结构 + +``` +生产监控系统/ +├── App.xaml # 应用程序入口 +├── App.xaml.cs # 应用程序逻辑 +├── AssemblyInfo.cs # 程序集信息 +├── MainWindow.xaml # 主窗口界面 +├── MainWindow.xaml.cs # 主窗口逻辑 +├── Dictionary/ # 资源字典 +│ ├── Fonts.xaml # 字体样式 +│ ├── OperateBtunStyle.xaml # 按钮样式 +│ └── UserControlDic.xaml # 用户控件样式 +├── Models/ # 数据模型 +│ ├── AiarmModel.cs # 报警信息模型 +│ ├── EnviromentModel.cs # 环境数据模型 +│ ├── MachineModel.cs # 机器状态模型 +│ ├── MachineryModel.cs # 机械设备模型 +│ ├── RaderModel.cs # 雷达图数据模型 +│ └── WorkShopModel.cs # 车间信息模型 +├── UserControls/ # 自定义控件 +│ ├── RaderUC.xaml # 雷达图控件 +│ ├── RaderUC.xaml.cs # 雷达图逻辑 +│ ├── RingUC.xaml # 环形图控件 +│ ├── RingUC.xaml.cs # 环形图逻辑 +│ ├── UserControlUC.xaml # 通用用户控件 +│ └── WorksShopDetailUC.xaml # 车间详情控件 +├── ViewModel/ # 视图模型 +│ ├── MainWindowVM.cs # 主窗口视图模型 +│ ├── UserControlucVM.cs # 用户控件视图模型 +│ └── WorksShopDetailVM.cs # 车间详情视图模型 +└── Resource/ # 资源文件 + ├── Fonts/ # 字体文件 + └── Image/ # 图片资源 +``` + +## 🚀 快速开始 + +### 环境要求 + +- Windows 操作系统 +- .NET 8.0 SDK 或更高版本 +- Visual Studio 2022 或 VS Code + +### 安装步骤 + +1. 克隆或下载项目代码 +2. 使用 Visual Studio 打开 `01.MonitoringSystem.csproj` 文件 +3. 还原 NuGet 包(项目会自动引用 LiveCharts 和 CommunityToolkit.Mvvm) +4. 按 F5 编译运行 + +### 运行说明 + +``` +dotnet run --project 01.MonitoringSystem +``` + +## 📊 数据模型说明 + +### MachineModel - 机器状态模型 +```csharp +public class MachineModel +{ + public string MachineName; // 机器名称 + public string Status; // 运行状态 + public int PlanCount; // 计划产量 + public int FinishedCount; // 完成数量 + public string OrderNo; // 工单号 + public double Percent; // 完成百分比 +} +``` + +### WorkShopModel - 车间信息模型 +```csharp +public class WorkShopModel +{ + public string WorkShopName; // 车间名称 + public int WorkCount; // 加工中数量 + public int WaitCount; // 待加工数量 + public int WrongCount; // 异常数量 + public int StopCount; // 停止数量 + public int TotalCount; // 总数量 +} +``` + +### AiarmModel - 报警信息模型 +```csharp +public class AiarmModel +{ + public string Num; // 报警编号 + public string Msg; // 报警信息 + public string Time; // 报警时间 + public int Duration; // 持续时间 +} +``` + +## 🔧 自定义控件 + +### RaderUC (雷达图控件) +用于多维度展示数据,支持数据绑定和动态更新。 + +### RingUC (环形图控件) +以环形进度条的形式展示百分比数据,适用于完成率等指标。 + +## 📝 许可证 + +本项目为开源项目,具体许可证信息请查看项目根目录下的 LICENSE 文件。 + +## 👤 作者 + +wang1751518025 + +## 📧 联系方式 + +如有任何问题,请通过 Gitee 项目页面提交 Issue。 \ No newline at end of file