# 大漠插件使用教程 **Repository Path**: xuchuruo/desert-plugin-usage-tutorial ## Basic Information - **Project Name**: 大漠插件使用教程 - **Description**: C#大漠教程的使用教程 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 6 - **Created**: 2025-12-18 - **Last Updated**: 2025-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Desert-Plugin-Usage-Tutorial This is an example project providing a tutorial on using the Desert Plugin (DmSoft), designed to help developers quickly get started with developing and debugging using the Desert Plugin. ## Project Overview This project is a C# Windows Forms application demonstrating how to achieve automation tasks by encapsulating and calling the Desert Plugin's APIs, including window binding, image recognition, and mouse/keyboard simulation. - **DmSoft**: Encapsulates the core APIs of the Desert Plugin. - **DmHelper**: Provides commonly used helper methods such as image search and random delays. - **RegisterDmSoft**: Used to register the Desert Plugin's DLL files. - **Form1**: The main interface demonstrating simple button event bindings. ## Quick Start ### System Requirements - .NET Framework 4.7.2 or higher - Visual Studio 2019 or higher - Desert Plugin-related DLL files (dm.dll, DmReg.dll) ### Installation Steps 1. Clone the project locally: ```bash git clone https://gitee.com/learning-projects_1/desert-plugin-usage-tutorial.git ``` 2. Place the `dm.dll` and `DmReg.dll` files from the `libs` directory into the project's runtime directory (or system PATH). 3. Open the `dm_project.sln` solution in Visual Studio. 4. Build and run the project. ### Usage Example ```csharp // Use DmSoft within a button click event private void button1_Click(object sender, EventArgs e) { dmsoft dm = new dmsoft(); bool success = DmHelper.FindPic(dm, 0, 0, 1024, 768, "example.bmp", 5); if (success) { MessageBox.Show("Image found!"); } else { MessageBox.Show("Image not found."); } } ``` ## Core Features - **Window Operations**: Window binding, searching, moving, resizing, etc. - **Image Recognition**: Supports image search, similarity matching, multi-threaded search, etc. - **Mouse and Keyboard Simulation**: Supports clicking, dragging, key simulation, etc. - **Text and Color Recognition**: Supports screen text recognition (OCR) and color detection. - **File and Registration Operations**: Supports file read/write and Desert Plugin registration. ## Project Structure - **Common/**: Contains the constant configuration class `DmConfig` for the Desert Plugin. - **Helper/**: Contains encapsulated helper classes `DmHelper` and `RegisterDmSoft`. - **Form1.cs**: The main form class demonstrating basic UI interactions. - **libs/**: Stores the DLL files required by the Desert Plugin. ## Contribution Guidelines Pull requests to improve this project are welcome. Before submitting, please ensure: - Code adheres to .NET coding standards. - All new features include corresponding tests or documentation. - Existing code modifications maintain backward compatibility. ## License This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. ## Contact Us If you have any questions or suggestions, feel free to open an Issue on Gitee or contact the project maintainer.