# p1ng-p0ng/tscreen architecture

> Architecture diagram of the GitHub repository p1ng-p0ng/tscreen, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/p1ng-p0ng/tscreen
- Repository: https://github.com/p1ng-p0ng/tscreen

## Overview

TScreen is a Windows desktop screen-capture utility. The user selects an on-screen region, then chooses an action in a dialog; Form1 handles the selection and action, while Form4 can display text stored in shared application state. The source excerpt shows the OCR integration commented out and assigns placeholder text instead, so OCR should not be understood as a confirmed working stage. Some capture-action details are omitted from the excerpt; the graph limits those relationships to what is evidenced.

Main entry points: [`Form1.cs`](https://github.com/p1ng-p0ng/tscreen/blob/master/Form1.cs) (Capture and selection), [`Program.cs`](https://github.com/p1ng-p0ng/tscreen/blob/master/Program.cs) (Shared flags and text), [`Form3.cs`](https://github.com/p1ng-p0ng/tscreen/blob/master/Form3.cs) (Action choices), [`Form4.cs`](https://github.com/p1ng-p0ng/tscreen/blob/master/Form4.cs) (Text result dialog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Application startup"]
  node_entry["Application entry<br/>[Program.cs]"]
end

subgraph group_capture["Screen capture"]
  node_mainform["Capture and selection<br/>[Form1.cs]"]
  node_overlay["Selection overlay<br/>[Form2.cs]"]
end

subgraph group_actions["Capture actions"]
  node_options["Action choices<br/>[Form3.cs]"]
  node_shared["Shared flags and text<br/>[Program.cs]"]
end

subgraph group_display["Text display"]
  node_textview["Text result dialog<br/>[Form4.cs]"]
end

node_user(("User"))
node_screen["Windows display"]

node_entry -->|"starts"| node_mainform
node_user -->|"selects region"| node_mainform
node_mainform -->|"captures display"| node_screen
node_mainform -->|"shows overlay"| node_overlay
node_mainform -->|"opens choices"| node_options
node_options -->|"sets flags"| node_shared
node_mainform -->|"sets text"| node_shared
node_mainform -->|"opens dialog"| node_textview
node_shared -->|"provides text"| node_textview

click node_entry "https://github.com/p1ng-p0ng/tscreen/blob/master/Program.cs"
click node_mainform "https://github.com/p1ng-p0ng/tscreen/blob/master/Form1.cs"
click node_overlay "https://github.com/p1ng-p0ng/tscreen/blob/master/Form2.cs"
click node_options "https://github.com/p1ng-p0ng/tscreen/blob/master/Form3.cs"
click node_shared "https://github.com/p1ng-p0ng/tscreen/blob/master/Program.cs"
click node_textview "https://github.com/p1ng-p0ng/tscreen/blob/master/Form4.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_user toneBlue
class node_mainform,node_overlay toneAmber
class node_options,node_shared toneMint
class node_textview toneRose
class node_screen toneIndigo
```

## Components

### Application startup

- [Application entry](https://github.com/p1ng-p0ng/tscreen/blob/master/Program.cs): `Program.cs`

### Screen capture

- [Capture and selection](https://github.com/p1ng-p0ng/tscreen/blob/master/Form1.cs): `Form1.cs`
- [Selection overlay](https://github.com/p1ng-p0ng/tscreen/blob/master/Form2.cs): `Form2.cs`

### Capture actions

- [Action choices](https://github.com/p1ng-p0ng/tscreen/blob/master/Form3.cs): `Form3.cs`
- [Shared flags and text](https://github.com/p1ng-p0ng/tscreen/blob/master/Program.cs): `Program.cs`

### Text display

- [Text result dialog](https://github.com/p1ng-p0ng/tscreen/blob/master/Form4.cs): `Form4.cs`

### Other components

- **User**
- **Windows display**

## Connections

- Application entry → Capture and selection: starts (evidence: `Program.cs`)
- User → Capture and selection: selects region (evidence: `Form1.cs`)
- Capture and selection → Windows display: captures display (evidence: `Form1.cs`)
- Capture and selection → Selection overlay: shows overlay (evidence: `Form1.cs`)
- Capture and selection → Action choices: opens choices (evidence: `Form1.cs`)
- Action choices → Shared flags and text: sets flags (evidence: `Form3.cs`)
- Capture and selection → Shared flags and text: sets text (evidence: `Form1.cs`)
- Capture and selection → Text result dialog: opens dialog (evidence: `Form1.cs`)
- Shared flags and text → Text result dialog: provides text (evidence: `Form4.cs`)
