# System.Windows.Forms

**Kind:** Service

**Source:** `Pams/HelperTool/HelperTool.csproj` (line 1)

**Part of:** [Pams](subsystem-pams)

NuGet package dependency

System.Windows.Forms is declared as a NuGet package dependency in `Pams/HelperTool/HelperTool.csproj`. It supplies Windows Forms APIs that HelperTool can use for desktop UI controls, forms, and event handling.

## Diagram

```mermaid
sequenceDiagram
    participant Developer
    participant Project as HelperTool.csproj
    participant Restore as NuGet Restore
    participant Forms as System.Windows.Forms
    participant App as HelperTool

    Developer->>Project: Build HelperTool
    Project->>Restore: Resolve package dependency
    Restore->>Forms: Download or load package
    Forms->>App: Expose Windows Forms APIs
    App->>Developer: Run desktop UI
```

## Usage

```javascript
import { execFileSync } from "node:child_process";
import { readFileSync } from "node:fs";

const projectPath = "Pams/HelperTool/HelperTool.csproj";
const projectFile = readFileSync(projectPath, "utf8");

if (!projectFile.includes("System.Windows.Forms")) {
  throw new Error("System.Windows.Forms dependency is not declared.");
}

execFileSync("dotnet", ["build", projectPath], {
  stdio: "inherit",
});
```

## AI Coding Instructions

- Keep the `System.Windows.Forms` dependency declaration in `Pams/HelperTool/HelperTool.csproj` aligned with the project target framework.
- Restore NuGet packages before building or running HelperTool.
- Use Windows Forms controls and events from the dependency rather than adding duplicate UI abstractions.
- Avoid removing the dependency while HelperTool code still references Windows Forms namespaces.

## Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Injected or called by (1)

- `HelperTool` — `Pams/HelperTool/HelperTool.csproj`:1
