# itlec/itlec.xrmtoolbox.formxmlmanager architecture

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

- Interactive diagram: https://gitdiagram.com/itlec/itlec.xrmtoolbox.formxmlmanager
- Repository: https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager

## Overview

ITLec.FormXmlManager is a Windows desktop plugin for working with Microsoft Dynamics CRM form XML. The main workflow is selecting CRM entities/forms, opening a form XML editor, changing the XML and its structured properties, then saving or publishing changes; the main control also supports file-based import and export. The graph includes the editor’s tree/property-control layer and documented helper capabilities. Some source is unsampled and there is no README, so uncertain links are omitted or marked dashed.

Main entry points: [`MainControl.cs`](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/MainControl.cs) (Main plugin control), [`Controls/BaseMainChartUserControl.cs`](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/BaseMainChartUserControl.cs) (Property control factory), [`Forms/FormXmlEditor.cs`](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/FormXmlEditor.cs) (Form XML editor), [`AppCode/Common.cs`](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/Common.cs) (XML and value utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["CRM workflow"]
  node_main["Main plugin control<br/>[MainControl.cs]"]
  node_metadata["CRM metadata helper<br/>[MetadataHelper.cs]"]
  node_errors["Error list<br/>[ErrorsListForm.cs]"]
  node_overwrite["Overwrite prompt"]
  node_folder["Folder picker"]
end

subgraph group_editing["XML editing"]
  node_editor["Form XML editor<br/>[FormXmlEditor.cs]"]
  node_formhelper["Editor tree and save helper"]
  node_tree["XML tree builder<br/>[TreeNodeHelper.cs]"]
  node_folding["XML folding strategy"]
  node_sorter["List sorting"]
end

subgraph group_controls["Property controls"]
  node_controlsbase["Property control factory"]
  node_text["Text property editor<br/>[TextControl.cs]"]
  node_number["Number property editor<br/>[NumberControl.cs]"]
  node_color["Color property editor<br/>[ColorControl.cs]"]
  node_font["Font property editor<br/>[FontControl.cs]"]
  node_enum["Enum property editor<br/>[EnumControl.cs]"]
  node_chartcontrols["Chart and series controls"]
  node_formchart["Chart control base"]
  node_series["Series editor<br/>[SeriesControl.cs]"]
  node_mainchart["Chart control<br/>[MainControl.cs]"]
end

subgraph group_shared["Shared helpers"]
  node_common["XML and value utilities<br/>[Common.cs]"]
  node_enums["Enum choices<br/>[EnumHelper.cs]"]
  node_saveargs["Save event data<br/>[SaveEventArgs.cs]"]
  node_chart["Chart utilities<br/>[ChartHelper.cs]"]
  node_xmlhelper["XML utilities<br/>[XmlHelper.cs]"]
  node_clipboard["Clipboard support<br/>[Clipboard.cs]"]
end

node_user(("Plugin user"))
node_crm{{"Dynamics CRM service"}}

node_user -->|"uses"| node_main
node_main -->|"loads metadata"| node_metadata
node_main -->|"shows errors"| node_errors
node_main -->|"confirms overwrite"| node_overwrite
node_main -->|"chooses folder"| node_folder
node_main -->|"opens editor"| node_editor
node_main -->|"uses sorter"| node_sorter
node_main -.->|"requests CRM data"| node_crm
node_editor -->|"publishes or deletes"| node_crm
node_editor -->|"uses editor helper"| node_formhelper
node_editor -->|"uses tree helper"| node_tree
node_editor -->|"configures folding"| node_folding
node_editor -->|"uses sorter"| node_sorter
node_formhelper -->|"uses tree builder"| node_tree
node_formhelper -->|"creates section control"| node_chartcontrols
node_formhelper -->|"uses save data"| node_saveargs
node_controlsbase -->|"creates"| node_text
node_controlsbase -->|"creates"| node_number
node_controlsbase -->|"creates"| node_color
node_controlsbase -->|"creates"| node_font
node_controlsbase -->|"creates"| node_enum
node_controlsbase -->|"raises saving event"| node_saveargs
node_enum -->|"loads choices"| node_enums
node_enum -->|"fills combo box"| node_common
node_font -->|"loads choices"| node_enums
node_font -->|"fills combo box"| node_common
node_mainchart -->|"extends"| node_controlsbase
node_series -->|"extends"| node_controlsbase
node_mainchart -->|"uses utilities"| node_common
node_series -->|"uses utilities"| node_common
node_chartcontrols -->|"uses utilities"| node_common

click node_main "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/MainControl.cs"
click node_metadata "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Helpers/MetadataHelper.cs"
click node_errors "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/ErrorsListForm.cs"
click node_overwrite "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/OverwriteConfirmationDialog.cs"
click node_folder "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/CustomFolderBrowserDialog.cs"
click node_editor "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/FormXmlEditor.cs"
click node_formhelper "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/FormXmlEditorHelper.cs"
click node_tree "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/TreeNodeHelper.cs"
click node_folding "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Helpers/XmlFoldingStrategy.cs"
click node_sorter "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/ListViewItemComparer.cs"
click node_controlsbase "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/BaseMainChartUserControl.cs"
click node_text "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/TextControl.cs"
click node_number "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/NumberControl.cs"
click node_color "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/ColorControl.cs"
click node_font "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/FontControl.cs"
click node_enum "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/EnumControl.cs"
click node_chartcontrols "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/MainChartSectionControl.cs"
click node_common "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/Common.cs"
click node_enums "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/EnumHelper.cs"
click node_saveargs "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/SaveEventArgs.cs"
click node_chart "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Helpers/ChartHelper.cs"
click node_xmlhelper "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Helpers/XmlHelper.cs"
click node_clipboard "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/Clipboard.cs"
click node_formchart "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/BaseChartControl.cs"
click node_series "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/SeriesControl.cs"
click node_mainchart "https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/MainControl.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_metadata,node_errors,node_overwrite,node_folder,node_user toneBlue
class node_editor,node_formhelper,node_tree,node_folding,node_sorter toneAmber
class node_controlsbase,node_text,node_number,node_color,node_font,node_enum,node_chartcontrols,node_formchart,node_series,node_mainchart toneMint
class node_common,node_enums,node_saveargs,node_chart,node_xmlhelper,node_clipboard toneRose
class node_crm toneIndigo
```

## Components

### CRM workflow

- [Main plugin control](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/MainControl.cs): `MainControl.cs`
- [CRM metadata helper](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Helpers/MetadataHelper.cs): `Helpers/MetadataHelper.cs`
- [Error list](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/ErrorsListForm.cs): `Forms/ErrorsListForm.cs`
- [Overwrite prompt](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/OverwriteConfirmationDialog.cs): `Forms/OverwriteConfirmationDialog.cs`
- [Folder picker](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/CustomFolderBrowserDialog.cs): `Forms/CustomFolderBrowserDialog.cs`

### XML editing

- [Form XML editor](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/FormXmlEditor.cs): `Forms/FormXmlEditor.cs`
- [Editor tree and save helper](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Forms/FormXmlEditorHelper.cs): `Forms/FormXmlEditorHelper.cs`
- [XML tree builder](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/TreeNodeHelper.cs): `AppCode/TreeNodeHelper.cs`
- [XML folding strategy](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Helpers/XmlFoldingStrategy.cs): `Helpers/XmlFoldingStrategy.cs`
- [List sorting](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/ListViewItemComparer.cs): `ListViewItemComparer.cs`

### Property controls

- [Property control factory](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/BaseMainChartUserControl.cs): `Controls/BaseMainChartUserControl.cs`
- [Text property editor](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/TextControl.cs): `Controls/TextControl.cs`
- [Number property editor](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/NumberControl.cs): `Controls/NumberControl.cs`
- [Color property editor](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/ColorControl.cs): `Controls/ColorControl.cs`
- [Font property editor](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/FontControl.cs): `Controls/FontControl.cs`
- [Enum property editor](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/EnumControl.cs): `Controls/EnumControl.cs`
- [Chart and series controls](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/MainChartSectionControl.cs): `Controls/MainChartSectionControl.cs`
- [Chart control base](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/BaseChartControl.cs): `Controls/BaseChartControl.cs`
- [Series editor](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/SeriesControl.cs): `Controls/SeriesControl.cs`
- [Chart control](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Controls/MainControl.cs): `Controls/MainControl.cs`

### Shared helpers

- [XML and value utilities](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/Common.cs): `AppCode/Common.cs`
- [Enum choices](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/EnumHelper.cs): `AppCode/EnumHelper.cs`
- [Save event data](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/SaveEventArgs.cs): `AppCode/SaveEventArgs.cs`
- [Chart utilities](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Helpers/ChartHelper.cs): `Helpers/ChartHelper.cs`
- [XML utilities](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/Helpers/XmlHelper.cs): `Helpers/XmlHelper.cs`
- [Clipboard support](https://github.com/itlec/itlec.xrmtoolbox.formxmlmanager/blob/master/AppCode/Clipboard.cs): `AppCode/Clipboard.cs`

### Other components

- **Plugin user**
- **Dynamics CRM service**

## Connections

- Plugin user → Main plugin control: uses
- Main plugin control → CRM metadata helper: loads metadata (evidence: `MainControl.cs`)
- Main plugin control → Error list: shows errors (evidence: `MainControl.cs`)
- Main plugin control → Overwrite prompt: confirms overwrite (evidence: `MainControl.cs`)
- Main plugin control → Folder picker: chooses folder (evidence: `MainControl.cs`)
- Main plugin control → Form XML editor: opens editor (evidence: `MainControl.cs`)
- Main plugin control → List sorting: uses sorter (evidence: `MainControl.cs`)
- Main plugin control → Dynamics CRM service: requests CRM data
- Form XML editor → Dynamics CRM service: publishes or deletes (evidence: `Forms/FormXmlEditor.cs`)
- Form XML editor → Editor tree and save helper: uses editor helper (evidence: `Forms/FormXmlEditor.cs`)
- Form XML editor → XML tree builder: uses tree helper (evidence: `Forms/FormXmlEditor.cs`)
- Form XML editor → XML folding strategy: configures folding (evidence: `Forms/FormXmlEditor.cs`)
- Form XML editor → List sorting: uses sorter (evidence: `Forms/FormXmlEditor.cs`)
- Editor tree and save helper → XML tree builder: uses tree builder (evidence: `Forms/FormXmlEditorHelper.cs`)
- Editor tree and save helper → Chart and series controls: creates section control (evidence: `Forms/FormXmlEditorHelper.cs`)
- Editor tree and save helper → Save event data: uses save data (evidence: `Forms/FormXmlEditorHelper.cs`)
- Property control factory → Text property editor: creates (evidence: `Controls/BaseMainChartUserControl.cs`)
- Property control factory → Number property editor: creates (evidence: `Controls/BaseMainChartUserControl.cs`)
- Property control factory → Color property editor: creates (evidence: `Controls/BaseMainChartUserControl.cs`)
- Property control factory → Font property editor: creates (evidence: `Controls/BaseMainChartUserControl.cs`)
- Property control factory → Enum property editor: creates (evidence: `Controls/BaseMainChartUserControl.cs`)
- Property control factory → Save event data: raises saving event (evidence: `Controls/BaseMainChartUserControl.cs`)
- Enum property editor → Enum choices: loads choices (evidence: `Controls/EnumControl.cs`)
- Enum property editor → XML and value utilities: fills combo box (evidence: `Controls/EnumControl.cs`)
- Font property editor → Enum choices: loads choices (evidence: `Controls/FontControl.cs`)
- Font property editor → XML and value utilities: fills combo box (evidence: `Controls/FontControl.cs`)
- Chart control → Property control factory: extends (evidence: `Controls/MainControl.cs`)
- Series editor → Property control factory: extends (evidence: `Controls/SeriesControl.cs`)
- Chart control → XML and value utilities: uses utilities (evidence: `Controls/MainControl.cs`)
- Series editor → XML and value utilities: uses utilities (evidence: `Controls/SeriesControl.cs`)
- Chart and series controls → XML and value utilities: uses utilities (evidence: `Controls/MainChartSectionControl.cs`)
