# tiniifan/cfgbineditor architecture

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

- Interactive diagram: https://gitdiagram.com/tiniifan/cfgbineditor
- Repository: https://github.com/tiniifan/cfgbineditor

## Overview

CfgBinEditor is a Windows Forms tool for reading and modifying Level 5 cfg.bin files. The user launches the editor, works with binary entries and their variables, and can enter or search for values. The README also documents optional MyTags.txt naming and MyIDs.txt hash lookup capabilities. The sampled code shows editor interactions with binary and JSON models and value dialogs; unsampled UI details are represented only where documented. Edges are limited to those shown in excerpts or stated in the README.

Main entry points: [`CfgBinEditor/CfgBinEditorWindow.cs`](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinEditorWindow.cs) (CfgBin editor), [`CfgBinEditor/SearchWindow.cs`](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/SearchWindow.cs) (Entry search dialog), [`CfgBinEditor/InputValueWindow.cs`](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/InputValueWindow.cs) (Value input dialog), [`CfgBinEditor/Program.cs`](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/Program.cs) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Editor workflow"]
  node_program["Application entry<br/>[Program.cs]"]
  node_editor["CfgBin editor"]
end

subgraph group_models["Binary and data"]
  node_binary["Binary file model"]
  node_tag["Tag metadata<br/>[Tag.cs]"]
  node_jsonentry["JSON entry<br/>[JsonEntry.cs]"]
  node_jsonvariable["JSON variable<br/>[JsonVariable.cs]"]
end

subgraph group_lookup["Value lookup"]
  node_id["ID record<br/>[ID.cs]"]
  node_idswindow["ID lookup dialog<br/>[IDsWindow.cs]"]
end

subgraph group_ui["Desktop UI"]
  node_input["Value input dialog"]
  node_search["Entry search dialog<br/>[SearchWindow.cs]"]
  node_tabs["Custom tab control<br/>[VSTabControl.cs]"]
end

node_user(("User"))

node_user -->|"launches"| node_program
node_program -->|"runs"| node_editor
node_user -.->|"edits files"| node_editor
node_editor -->|"opens binary"| node_binary
node_editor -->|"uses tags"| node_tag
node_editor -->|"builds entries"| node_jsonentry
node_editor -->|"reads variables"| node_jsonvariable
node_jsonentry -->|"contains"| node_jsonvariable
node_editor -->|"prompts values"| node_input
node_input -->|"opens lookup"| node_idswindow
node_idswindow -->|"displays IDs"| node_id
node_search -->|"prompts search"| node_input
node_search -->|"searches entries"| node_binary
node_user -.->|"searches values"| node_search

click node_program "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/Program.cs"
click node_editor "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinEditorWindow.cs"
click node_binary "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinCore/Binary/ExportableCfgBin.cs"
click node_tag "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinCore/Common/Tag.cs"
click node_jsonentry "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinCore/Json/JsonEntry.cs"
click node_jsonvariable "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinCore/Json/JsonVariable.cs"
click node_id "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinCore/Common/ID.cs"
click node_input "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/InputValueWindow.cs"
click node_idswindow "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/IDsWindow.cs"
click node_search "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/SearchWindow.cs"
click node_tabs "https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/UI/VSTabControl.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_editor,node_user toneBlue
class node_binary,node_tag,node_jsonentry,node_jsonvariable toneAmber
class node_id,node_idswindow toneMint
class node_input,node_search,node_tabs toneRose
```

## Components

### Editor workflow

- [Application entry](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/Program.cs): `CfgBinEditor/Program.cs`
- [CfgBin editor](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinEditorWindow.cs): `CfgBinEditor/CfgBinEditorWindow.cs`

### Binary and data

- [Binary file model](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinCore/Binary/ExportableCfgBin.cs): `CfgBinEditor/CfgBinCore/Binary/ExportableCfgBin.cs`
- [Tag metadata](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinCore/Common/Tag.cs): `CfgBinEditor/CfgBinCore/Common/Tag.cs`
- [JSON entry](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinCore/Json/JsonEntry.cs): `CfgBinEditor/CfgBinCore/Json/JsonEntry.cs`
- [JSON variable](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinCore/Json/JsonVariable.cs): `CfgBinEditor/CfgBinCore/Json/JsonVariable.cs`

### Value lookup

- [ID record](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/CfgBinCore/Common/ID.cs): `CfgBinEditor/CfgBinCore/Common/ID.cs`
- [ID lookup dialog](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/IDsWindow.cs): `CfgBinEditor/IDsWindow.cs`

### Desktop UI

- [Value input dialog](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/InputValueWindow.cs): `CfgBinEditor/InputValueWindow.cs`
- [Entry search dialog](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/SearchWindow.cs): `CfgBinEditor/SearchWindow.cs`
- [Custom tab control](https://github.com/tiniifan/cfgbineditor/blob/main/CfgBinEditor/UI/VSTabControl.cs): `CfgBinEditor/UI/VSTabControl.cs`

### Other components

- **User**

## Connections

- User → Application entry: launches (evidence: `CfgBinEditor/Program.cs`)
- Application entry → CfgBin editor: runs (evidence: `CfgBinEditor/Program.cs`)
- User → CfgBin editor: edits files (evidence: `README.md`)
- CfgBin editor → Binary file model: opens binary (evidence: `CfgBinEditor/CfgBinEditorWindow.cs`)
- CfgBin editor → Tag metadata: uses tags (evidence: `CfgBinEditor/CfgBinEditorWindow.cs`)
- CfgBin editor → JSON entry: builds entries (evidence: `CfgBinEditor/CfgBinEditorWindow.cs`)
- CfgBin editor → JSON variable: reads variables (evidence: `CfgBinEditor/CfgBinEditorWindow.cs`)
- JSON entry → JSON variable: contains (evidence: `CfgBinEditor/CfgBinCore/Json/JsonEntry.cs`)
- CfgBin editor → Value input dialog: prompts values (evidence: `CfgBinEditor/CfgBinEditorWindow.cs`)
- Value input dialog → ID lookup dialog: opens lookup (evidence: `CfgBinEditor/InputValueWindow.cs`)
- ID lookup dialog → ID record: displays IDs (evidence: `CfgBinEditor/IDsWindow.cs`)
- Entry search dialog → Value input dialog: prompts search (evidence: `CfgBinEditor/SearchWindow.cs`)
- Entry search dialog → Binary file model: searches entries (evidence: `CfgBinEditor/SearchWindow.cs`)
- User → Entry search dialog: searches values
