# irihojaphet/dotnetlab2 architecture

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

- Interactive diagram: https://gitdiagram.com/irihojaphet/dotnetlab2
- Repository: https://github.com/irihojaphet/dotnetlab2

## Overview

Lab2 is a Windows Forms desktop app with a simple sign-in gate and a choice screen leading to two standalone tasks: calculating bicycle rental charges and identifying mushrooms through questions. The forms own their UI state and domain logic; the bicycle form validates times and calculates a total, while the mushroom form advances a question tree and displays a result. No persistence or external services are evidenced. Relationships below follow the shown form construction and dialog calls.

Main entry points: [`Lab2/Lab2/ChooseForm.cs`](https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/ChooseForm.cs) (Task chooser), [`Lab2/Lab2/LoginForm.cs`](https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/LoginForm.cs) (Login form), [`Lab2/Lab2/Program.cs`](https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/Program.cs) (App startup), [`Lab2/Lab2/BicycleForm.cs`](https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/BicycleForm.cs) (Bicycle rental)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["Access and navigation"]
  node_program["App startup<br/>[Program.cs]"]
  node_login["Login form<br/>[LoginForm.cs]"]
  node_chooser["Task chooser<br/>[ChooseForm.cs]"]
end

subgraph group_tasks["Interactive tasks"]
  node_bicycle["Bicycle rental<br/>[BicycleForm.cs]"]
  node_mushroom["Mushroom identification<br/>[MushroomForm.cs]"]
end

node_user(("User"))

node_user -->|"launches"| node_program
node_program -->|"runs"| node_login
node_user -->|"enters credentials"| node_login
node_login -->|"opens dialog"| node_chooser
node_user -->|"selects task"| node_chooser
node_chooser -->|"opens dialog"| node_bicycle
node_chooser -->|"opens dialog"| node_mushroom
node_user -->|"provides rental times"| node_bicycle
node_user -->|"answers questions"| node_mushroom

click node_program "https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/Program.cs"
click node_login "https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/LoginForm.cs"
click node_chooser "https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/ChooseForm.cs"
click node_bicycle "https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/BicycleForm.cs"
click node_mushroom "https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/MushroomForm.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_program,node_login,node_chooser,node_user toneBlue
class node_bicycle,node_mushroom toneAmber
```

## Components

### Access and navigation

- [App startup](https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/Program.cs): `Lab2/Lab2/Program.cs`
- [Login form](https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/LoginForm.cs): `Lab2/Lab2/LoginForm.cs`
- [Task chooser](https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/ChooseForm.cs): `Lab2/Lab2/ChooseForm.cs`

### Interactive tasks

- [Bicycle rental](https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/BicycleForm.cs): `Lab2/Lab2/BicycleForm.cs`
- [Mushroom identification](https://github.com/irihojaphet/dotnetlab2/blob/main/Lab2/Lab2/MushroomForm.cs): `Lab2/Lab2/MushroomForm.cs`

### Other components

- **User**

## Connections

- User → App startup: launches
- App startup → Login form: runs (evidence: `Lab2/Lab2/Program.cs`)
- User → Login form: enters credentials
- Login form → Task chooser: opens dialog (evidence: `Lab2/Lab2/LoginForm.cs`)
- User → Task chooser: selects task
- Task chooser → Bicycle rental: opens dialog (evidence: `Lab2/Lab2/ChooseForm.cs`)
- Task chooser → Mushroom identification: opens dialog (evidence: `Lab2/Lab2/ChooseForm.cs`)
- User → Bicycle rental: provides rental times
- User → Mushroom identification: answers questions
