# patryk129/projektwpf architecture

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

- Interactive diagram: https://gitdiagram.com/patryk129/projektwpf
- Repository: https://github.com/patryk129/projektwpf

## Overview

This is a WPF student-record manager. The main workflow is to view a collection of student records, add or edit records, and import/export them as CSV. Record fields and the observable collection are defined alongside the main window; add and edit dialogs contain validation and formatting logic. The excerpts show the main window opening the edit dialog and a separate Window1, but do not establish how Window1 relates to Add_student. XAML views and other unsampled files limit certainty about the complete UI wiring.

Main entry points: [`MainWindow.xaml.cs`](https://github.com/patryk129/projektwpf/blob/main/MainWindow.xaml.cs) (Record list and actions), [`Edit_student.xaml.cs`](https://github.com/patryk129/projektwpf/blob/main/Edit_student.xaml.cs) (Edit student), [`Add_student.xaml.cs`](https://github.com/patryk129/projektwpf/blob/main/Add_student.xaml.cs) (Add student), [`Window1.xaml.cs`](https://github.com/patryk129/projektwpf/blob/main/Window1.xaml.cs) (Window1 dialog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop UI"]
  node_main["Record list and actions<br/>[MainWindow.xaml.cs]"]
  node_add["Add student"]
  node_edit["Edit student"]
  node_window1["Window1 dialog<br/>[Window1.xaml.cs]"]
  node_about["About dialog<br/>[Info.xaml.cs]"]
end

subgraph group_records["Student records"]
  node_person["Person records<br/>[MainWindow.xaml.cs]"]
  node_collection["Observable collection<br/>[MainWindow.xaml.cs]"]
end

subgraph group_files["CSV exchange"]
  node_csv["CSV file"]
end

node_user(("User"))

node_user -->|"uses"| node_main
node_main -->|"creates"| node_person
node_main -->|"initializes"| node_collection
node_main -->|"opens"| node_window1
node_main -->|"opens"| node_edit
node_main -->|"opens"| node_about
node_add -->|"adds records"| node_collection
node_edit -->|"edits records"| node_collection
node_main -->|"removes records"| node_collection
node_main -->|"reads CSV"| node_csv
node_main -->|"writes CSV"| node_csv

click node_main "https://github.com/patryk129/projektwpf/blob/main/MainWindow.xaml.cs"
click node_add "https://github.com/patryk129/projektwpf/blob/main/Add_student.xaml.cs"
click node_edit "https://github.com/patryk129/projektwpf/blob/main/Edit_student.xaml.cs"
click node_window1 "https://github.com/patryk129/projektwpf/blob/main/Window1.xaml.cs"
click node_about "https://github.com/patryk129/projektwpf/blob/main/Info.xaml.cs"
click node_person "https://github.com/patryk129/projektwpf/blob/main/MainWindow.xaml.cs"
click node_collection "https://github.com/patryk129/projektwpf/blob/main/MainWindow.xaml.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_main,node_add,node_edit,node_window1,node_about,node_user toneBlue
class node_person,node_collection toneAmber
class node_csv toneMint
```

## Components

### Desktop UI

- [Record list and actions](https://github.com/patryk129/projektwpf/blob/main/MainWindow.xaml.cs): `MainWindow.xaml.cs`
- [Add student](https://github.com/patryk129/projektwpf/blob/main/Add_student.xaml.cs): `Add_student.xaml.cs`
- [Edit student](https://github.com/patryk129/projektwpf/blob/main/Edit_student.xaml.cs): `Edit_student.xaml.cs`
- [Window1 dialog](https://github.com/patryk129/projektwpf/blob/main/Window1.xaml.cs): `Window1.xaml.cs`
- [About dialog](https://github.com/patryk129/projektwpf/blob/main/Info.xaml.cs): `Info.xaml.cs`

### Student records

- [Person records](https://github.com/patryk129/projektwpf/blob/main/MainWindow.xaml.cs): `MainWindow.xaml.cs`
- [Observable collection](https://github.com/patryk129/projektwpf/blob/main/MainWindow.xaml.cs): `MainWindow.xaml.cs`

### CSV exchange

- **CSV file**

### Other components

- **User**

## Connections

- User → Record list and actions: uses
- Record list and actions → Person records: creates (evidence: `MainWindow.xaml.cs`)
- Record list and actions → Observable collection: initializes (evidence: `MainWindow.xaml.cs`)
- Record list and actions → Window1 dialog: opens (evidence: `MainWindow.xaml.cs`)
- Record list and actions → Edit student: opens (evidence: `MainWindow.xaml.cs`)
- Record list and actions → About dialog: opens (evidence: `MainWindow.xaml.cs`)
- Add student → Observable collection: adds records (evidence: `Add_student.xaml.cs`)
- Edit student → Observable collection: edits records (evidence: `Edit_student.xaml.cs`)
- Record list and actions → Observable collection: removes records (evidence: `MainWindow.xaml.cs`)
- Record list and actions → CSV file: reads CSV (evidence: `MainWindow.xaml.cs`)
- Record list and actions → CSV file: writes CSV (evidence: `MainWindow.xaml.cs`)
