# bariskisir/shutdown-timer architecture

> Architecture diagram of the GitHub repository bariskisir/shutdown-timer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bariskisir/shutdown-timer
- Repository: https://github.com/bariskisir/shutdown-timer

## Overview

A small Windows Forms utility lets users choose a delay, previews the resulting shutdown time, and schedules or aborts a Windows shutdown. The form code combines timer refresh and command handling; the separate calculation node represents its delay-to-seconds logic. The README is brief, and no additional capabilities are documented.

Main entry points: [`src/shutdown-timer/frmMain.cs`](https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/frmMain.cs) (Timer form), [`src/shutdown-timer/frmMain.Designer.cs`](https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/frmMain.Designer.cs) (Form controls), [`src/shutdown-timer/Program.cs`](https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/Program.cs) (App startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_startup["App startup<br/>[Program.cs]"]
  node_form["Timer form<br/>[frmMain.cs]"]
  node_controls["Form controls"]
  node_delay["Delay calculation<br/>[frmMain.cs]"]
end

subgraph group_system["System control"]
  node_windows["Windows shutdown"]
end

node_user(("User"))

node_startup -->|"runs"| node_form
node_user -->|"sets delay"| node_controls
node_controls -->|"dispatches actions"| node_form
node_form -->|"calculates delay"| node_delay
node_delay -->|"returns seconds"| node_form
node_form -->|"updates preview"| node_controls
node_form -->|"schedules or aborts"| node_windows

click node_startup "https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/Program.cs"
click node_form "https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/frmMain.cs"
click node_controls "https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/frmMain.Designer.cs"
click node_delay "https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/frmMain.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_startup,node_form,node_controls,node_delay,node_user toneBlue
class node_windows toneAmber
```

## Components

### Desktop app

- [App startup](https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/Program.cs): `src/shutdown-timer/Program.cs`
- [Timer form](https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/frmMain.cs): `src/shutdown-timer/frmMain.cs`
- [Form controls](https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/frmMain.Designer.cs): `src/shutdown-timer/frmMain.Designer.cs`
- [Delay calculation](https://github.com/bariskisir/shutdown-timer/blob/master/src/shutdown-timer/frmMain.cs): `src/shutdown-timer/frmMain.cs`

### System control

- **Windows shutdown**

### Other components

- **User**

## Connections

- App startup → Timer form: runs
- User → Form controls: sets delay
- Form controls → Timer form: dispatches actions
- Timer form → Delay calculation: calculates delay
- Delay calculation → Timer form: returns seconds
- Timer form → Form controls: updates preview
- Timer form → Windows shutdown: schedules or aborts
