This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
---
source_files:
- Common/DTS.Common/obj/x86/Debug/GeneratedInternalTypeHelper.g.cs
- Common/DTS.Common/obj/x86/Debug/GeneratedInternalTypeHelper.g.i.cs
generated_at: "2026-04-16T02:56:51.283838+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "708a410ec1ac79c2"
---
# Debug
## Documentation: `GeneratedInternalTypeHelper`
### 1. Purpose
This module provides a WPF-specific runtime helper class used internally during XAML parsing and object initialization. It extends `System.Windows.Markup.InternalTypeHelper` to customize how objects are instantiated, property values are read/written, and event handlers are attached—primarily to support WPFs XAML infrastructure (e.g., for `x:Class`, `x:Name`, or event wiring in compiled XAML). It is **not intended for direct use** by application code and is auto-generated by the `PresentationBuildTasks` MSBuild task during the build process.
### 2. Public Interface
The class is `sealed` and inherits from `InternalTypeHelper`. All members are `protected override` methods—**not public API**—but are included here for completeness.
- **`protected override object CreateInstance(Type type, CultureInfo culture)`**
Instantiates the given `type` using reflection, allowing both public and non-public constructors (via `BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.CreateInstance`). Returns the new instance.
- **`protected override object GetPropertyValue(PropertyInfo propertyInfo, object target, CultureInfo culture)`**
Reads the value of `propertyInfo` on `target` using default binding flags (`BindingFlags.Default`). Returns the property value.
- **`protected override void SetPropertyValue(PropertyInfo propertyInfo, object target, object value, CultureInfo culture)`**
Writes `value` to `propertyInfo` on `target` using default binding flags.
- **`protected override Delegate CreateDelegate(Type delegateType, object target, string handler)`**
Dynamically creates a delegate of `delegateType` bound to the instance method named `handler` on `target`. Uses reflection to invoke the *non-public* instance method `_CreateDelegate` on `target.GetType()`.
⚠️ **Note**: This relies on an internal implementation detail (`_CreateDelegate`) of the target objects type.
- **`protected override void AddEventHandler(EventInfo eventInfo, object target, Delegate handler)`**
Attaches `handler` to the event represented by `eventInfo` on `target` using `EventInfo.AddEventHandler`.
### 3. Invariants
- The class is `sealed` and inherits from `System.Windows.Markup.InternalTypeHelper`, meaning it is tightly coupled to WPFs XAML infrastructure.
- All methods use reflection with explicit `BindingFlags`; no method relies on dynamic invocation beyond what is visible in the source.
- The `CreateDelegate` method assumes the `target` objects type exposes a non-public instance method named `_CreateDelegate` accepting `(Type, string)`—this is an internal contract with WPFs runtime, not a documented public API.
- The class is marked with `[EditorBrowsable(EditorBrowsableState.Never)]`, indicating it should never appear in IntelliSense or designer tooling.
### 4. Dependencies
- **Depends on**:
- `System.Windows.Markup.InternalTypeHelper` (base class)
- `System.Activator`, `System.Reflection` (for reflection-based object creation/property/event handling)
- `System.Globalization.CultureInfo` (for culture-sensitive operations)
- `PresentationBuildTasks` (the MSBuild task that generates this file)
- **Used by**:
- WPFs XAML compiler/runtime (e.g., `BamlReader`, `XamlWriter`, or generated BAML code) during deserialization or event wiring.
- Likely referenced indirectly via `x:Class` or `x:Name` in XAML files compiled into the same assembly.
- *Not* referenced directly by application code.
### 5. Gotchas
- **Auto-generated file**: This file is regenerated on every build; manual edits will be lost.
- **Non-public contract**: The `_CreateDelegate` reflection call in `CreateDelegate` is fragile—it depends on an undocumented, internal method of the target type. If the target type changes or does not implement `_CreateDelegate`, this will throw a `MissingMethodException` at runtime.
- **No public surface area**: This class is strictly internal infrastructure. Developers should never instantiate or extend it.
- **Culture handling**: All methods accept a `CultureInfo` parameter but pass it directly to reflection APIs—behavior may vary across cultures (e.g., case sensitivity in property/event names is not affected, but custom type converters might be).
- **No error handling visible**: The source shows no explicit exception handling; failures (e.g., missing methods, inaccessible properties) will propagate as reflection exceptions.
- **None identified from source alone** for typical usage patterns—only the above technical caveats are evident.

View File

@@ -0,0 +1,49 @@
---
source_files:
- Common/DTS.Common/obj/x86/Debug/BusyIndicatorManager/xBusyIndicator.g.i.cs
- Common/DTS.Common/obj/x86/Debug/BusyIndicatorManager/xBusyIndicator.g.cs
generated_at: "2026-04-16T02:57:03.548766+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "8a85dd764831c7b1"
---
# BusyIndicatorManager
## Documentation: `xBusyIndicator` Class
### 1. Purpose
The `xBusyIndicator` class is a custom WPF control that extends `Xceed.Wpf.Toolkit.BusyIndicator` to provide a project-specific busy indicator implementation within the `DTS.Common` library. It encapsulates UI-level configuration and initialization logic defined in the corresponding XAML file (`xBusyIndicator.xaml`), enabling consistent visual behavior and styling for indicating asynchronous operations across the application. This class exists to allow centralized customization of the busy indicators appearance and behavior beyond what the base `Xceed.Wpf.Toolkit.BusyIndicator` provides, while leveraging WPFs component initialization infrastructure.
### 2. Public Interface
The class exposes only one public method (inherited from `Xceed.Wpf.Toolkit.BusyIndicator`, not overridden or extended in the provided source):
- **`void InitializeComponent()`**
- **Signature**: `public void InitializeComponent()`
- **Behavior**: Initializes the component by loading the associated XAML resource (`/DTS.Common;component/busyindicatormanager/xbusyindicator.xaml`) via `Application.LoadComponent`. Ensures initialization occurs only once via the `_contentLoaded` flag. Must be called during construction (typically from the constructor, though not shown here—standard WPF pattern).
No other public methods, properties, or events are defined or overridden in this generated file. All public members of `Xceed.Wpf.Toolkit.BusyIndicator` (e.g., `IsBusy`, `BusyContent`, `BusyContentTemplate`) remain available via inheritance.
### 3. Invariants
- `_contentLoaded` is `false` initially and set to `true` upon first successful call to `InitializeComponent()`. Subsequent calls to `InitializeComponent()` are no-ops.
- The XAML resource URI used is strictly relative: `/DTS.Common;component/busyindicatormanager/xbusyindicator.xaml`.
- `InitializeComponent()` must be called exactly once per instance before UI interaction; calling it after UI interaction may cause undefined behavior (though the `_contentLoaded` guard prevents re-execution).
- The class implements `System.Windows.Markup.IComponentConnector.Connect`, but the implementation is minimal and does not perform any connection logic beyond setting `_contentLoaded = true`.
### 4. Dependencies
- **Runtime/Platform**: .NET Framework 4.0 (based on `Runtime Version:4.0.30319.42000`).
- **WPF Framework**: `System.Windows.*`, `System.Windows.Controls.*`, `System.Windows.Markup`, etc.
- **Third-party Libraries**:
- `Xceed.Wpf.Toolkit` and multiple sub-namespaces (e.g., `Xceed.Wpf.Toolkit`, `Xceed.Wpf.Toolkit.Core.*`, `Xceed.Wpf.Toolkit.PropertyGrid`, etc.).
- `Microsoft.Windows.Controls` (likely part of the WPF Toolkit or similar).
- **Source Dependency**: Requires the XAML file `BusyIndicatorManager\xBusyIndicator.xaml` at build time (referenced via relative path in `resourceLocater`).
- **Depended upon by**: Unknown from this file alone—likely consumed by other modules in `DTS.Common` or the main application, but no explicit references are visible here.
### 5. Gotchas
- **Generated Code Warning**: This file is auto-generated by `PresentationBuildTasks` (WPF build tools). Manual edits will be overwritten on rebuild.
- **No Custom Logic Visible**: The provided source contains *only* boilerplate initialization logic. Any custom behavior (e.g., overrides of `OnIsBusyChanged`, custom styling hooks, or附加 properties) must reside in the corresponding partial class file (e.g., `xBusyIndicator.xaml.cs`), which is not included here.
- **Hardcoded Resource Path**: The XAML resource path is hardcoded and relative to the assembly root (`/DTS.Common;component/...`). Moving or renaming `xBusyIndicator.xaml` without updating the build action or this path will cause runtime failures.
- **No Public Constructor Shown**: The constructor (where `InitializeComponent()` is typically invoked) is not present in this file. Its existence and implementation are inferred but not verifiable from this source.
- **Interface Implementation is Minimal**: The `IComponentConnector.Connect` method does not wire any named elements (e.g., `x:Name="PART_BusyContent"`), suggesting either no named elements exist in the XAML, or wiring is handled implicitly by the base class.
None identified beyond the above.

View File

@@ -0,0 +1,48 @@
---
source_files:
- Common/DTS.Common/obj/x86/Debug/Constant/XamlConstants.g.cs
- Common/DTS.Common/obj/x86/Debug/Constant/XamlConstants.g.i.cs
generated_at: "2026-04-16T02:57:16.557108+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "a1984828a5c93588"
---
# Documentation: `XamlConstants` Class
## 1. Purpose
The `XamlConstants` class is an auto-generated WPF `ResourceDictionary` subclass used to load and expose static resources defined in the `XamlConstants.xaml` file. It serves as the runtime entry point for integrating XAML-defined constants (e.g., colors, brushes, dimensions, styles) into the applications resource system. This class is not intended for direct instantiation or modification by developers; it is generated automatically by the WPF build toolchain (`PresentationBuildTasks`) and should be treated as read-only infrastructure.
## 2. Public Interface
The class exposes only one public method, inherited from WPFs resource loading infrastructure:
- **`void InitializeComponent()`**
- **Signature**: `public void InitializeComponent()`
- **Behavior**: Loads the XAML resources defined in `XamlConstants.xaml` (resolved via the pack URI `/DTS.Common;component/constant/xamlconstants.xaml`) into the current instance. Ensures idempotency by skipping re-execution if already loaded (`_contentLoaded` flag). Must be called before attempting to access resources from this dictionary.
> Note: This method is auto-generated and should not be manually invoked outside of the WPF frameworks expected initialization flow (e.g., typically called in the constructor of a partial class or via `Application.LoadComponent`).
## 3. Invariants
- `_contentLoaded` is `false` initially and set to `true` upon first successful call to `InitializeComponent()`.
- `InitializeComponent()` is idempotent: subsequent calls after the first have no effect.
- The class inherits from `System.Windows.ResourceDictionary`, so it must contain only valid WPF resource keys and values (e.g., `SolidColorBrush`, `Thickness`, `Style`, etc.).
- The pack URI `/DTS.Common;component/constant/xamlconstants.xaml` must resolve to an existing `.xaml` file at build time; otherwise, `LoadComponent` will fail at runtime.
## 4. Dependencies
- **Depends on**:
- `System.Windows.Application.LoadComponent` (WPF framework)
- `XamlConstants.xaml` (source file at `..\..\..\..\Constant\XamlConstants.xaml`)
- WPF assemblies (`PresentationFramework`, `WindowsBase`, `System.Xaml`)
- `Microsoft.Windows.Controls` (likely from an external control library, e.g., Microsoft Expression Controls or similar)
- **Used by**:
- The WPF build system (via `PresentationBuildTasks`) to generate this file.
- Application code that merges `XamlConstants` into `Application.Current.Resources` or a parent `ResourceDictionary`.
- *Not* directly referenced in the provided sources; usage would be inferred from other modules (e.g., `DTS.Common` library consumers).
## 5. Gotchas
- **Auto-generated**: This file is regenerated on every build. Manual edits will be overwritten.
- **No custom logic**: The class contains no business logic—only WPF resource loading boilerplate.
- **`IComponentConnector.Connect` is a stub**: The interface implementation does nothing beyond setting `_contentLoaded = true`; it does not wire up named elements (as `XamlConstants.xaml` is expected to be a pure resource dictionary, not a UI with named controls).
- **Case sensitivity**: The pack URI path `/DTS.Common;component/constant/xamlconstants.xaml` is case-sensitive on some platforms (e.g., Linux with Mono), though WPF is typically Windows-only.
- **No public properties or resources exposed directly**: Resources from `XamlConstants.xaml` are accessible only via the base `ResourceDictionary` indexer (e.g., `xamlConstants["MyBrushKey"]`), not as strongly-typed properties.
- **None identified from source alone** regarding runtime behavior, but developers should verify that `XamlConstants.xaml` exists and is included as a `Resource` build action in the project.

View File

@@ -0,0 +1,80 @@
---
source_files:
- Common/DTS.Common/obj/x86/Debug/Controls/RoundedBox.g.i.cs
- Common/DTS.Common/obj/x86/Debug/Controls/RoundedBox.g.cs
- Common/DTS.Common/obj/x86/Debug/Controls/TestIDView.g.cs
- Common/DTS.Common/obj/x86/Debug/Controls/TestIDView.g.i.cs
- Common/DTS.Common/obj/x86/Debug/Controls/TestIDControl.g.cs
- Common/DTS.Common/obj/x86/Debug/Controls/TestIDControl.g.i.cs
- Common/DTS.Common/obj/x86/Debug/Controls/CommonStatusRibbon.g.i.cs
- Common/DTS.Common/obj/x86/Debug/Controls/CommonStatusRibbon.g.cs
- Common/DTS.Common/obj/x86/Debug/Controls/TestIDTestBox.g.cs
- Common/DTS.Common/obj/x86/Debug/Controls/TestIDTestBox.g.i.cs
- Common/DTS.Common/obj/x86/Debug/Controls/LookupPopup.g.cs
- Common/DTS.Common/obj/x86/Debug/Controls/LookupPopup.g.i.cs
- Common/DTS.Common/obj/x86/Debug/Controls/checkbox.g.cs
- Common/DTS.Common/obj/x86/Debug/Controls/checkbox.g.i.cs
- Common/DTS.Common/obj/x86/Debug/Controls/GridViewColumnHeaderSearchable.g.cs
generated_at: "2026-04-16T02:57:21.705051+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "b0a99f13377fec7b"
---
# Documentation: `DTS.Common.Controls` Auto-Generated WPF Control Files
## 1. Purpose
This directory contains auto-generated C# source files produced by the WPF build toolchain (`PresentationBuildTasks`) for several custom user controls and resources in the `DTS.Common` assembly. These files are not hand-written code but are generated at build time from corresponding `.xaml` files to implement the WPF `IComponentConnector` and `IStyleConnector` interfaces required for runtime XAML loading, event wiring, and field initialization. Their purpose is to enable the WPF runtime to correctly instantiate and connect UI elements defined in XAML to their code-behind classes (e.g., assigning `x:Name`-declared fields, attaching event handlers, and loading component resources). They do not contain business logic themselves but are essential infrastructure for the controls to function.
## 2. Public Interface
All classes are `public partial` and reside in the `DTS.Common.Controls` namespace. They implement `System.Windows.Markup.IComponentConnector`. None expose custom public methods or properties beyond standard WPF `UserControl`/`Popup`/`ResourceDictionary` behavior.
| Class | Base Type | Key Public Members |
|-------|-----------|--------------------|
| `RoundedBox` | `System.Windows.Controls.UserControl` | `void InitializeComponent()` |
| `TestIDView` | `System.Windows.Controls.UserControl` | `void InitializeComponent()` |
| `TestIdControl` | `System.Windows.Controls.UserControl` | `void InitializeComponent()` |
| `CommonStatusRibbon` | `System.Windows.Controls.UserControl` | `void InitializeComponent()`, internal fields: `commonStatusRibbon`, `lblAggregateStatusText` |
| `TestIDTextBox` | `System.Windows.Controls.UserControl` | `void InitializeComponent()`, internal fields: `TestIdTextBoxControl`, `tbTestId` |
| `LookupPopup` | `System.Windows.Controls.Primitives.Popup` | `void InitializeComponent()`, internal fields: `lookupPopup`, `possibleChannels` |
| `checkbox` | `System.Windows.ResourceDictionary` | `void InitializeComponent()`, implements `IStyleConnector` |
| `GridViewColumnHeaderSearchable` | `System.Windows.Controls.UserControl` | `void InitializeComponent()`, internal fields: `dtsGridViewColumnHeader`, `mainGrid`, `TogglePopupButton`, `BtnArrow`, `ToggledPopup` |
**Note on `IComponentConnector.Connect`**: This interface method is implemented explicitly and is not intended for direct use. It is called by the WPF runtime during component initialization to wire up named elements and event handlers. Its behavior is fully determined by the corresponding `.xaml` file.
## 3. Invariants
- **`_contentLoaded` flag**: Each class maintains a private `bool _contentLoaded` field. `InitializeComponent()` is idempotent: it returns immediately if `_contentLoaded` is already `true`.
- **XAML resource URIs**: All calls to `Application.LoadComponent` use relative URIs of the form `/DTS.Common;component/controls/{filename}.xaml`, where `{filename}` matches the controls XAML file (case-insensitive, e.g., `roundedbox.xaml`, `testidview.xaml`).
- **Connection ID mapping**: The `Connect(int connectionId, object target)` method uses `connectionId` values to identify which XAML-declared element or style setter is being wired. These IDs are stable per XAML file and generated by the build tool.
- **No side effects in `Connect`**: The `Connect` method only assigns fields and adds event handlers; it does not mutate external state or perform validation beyond casting.
## 4. Dependencies
### Internal Dependencies (from imports)
- `System.Windows.*` (WPF core namespaces)
- `Microsoft.Windows.Controls` (likely from an external control library, e.g., Microsoft Toolkit or similar)
- `DTS.Common.Strings` (used only in `LookupPopup.g.cs` and `LookupPopup.g.i.cs`)
- `DTS.Common.Controls` (self-referential for internal field assignments)
### External Dependencies
- `System.dll`, `PresentationFramework.dll`, `WindowsBase.dll`, `PresentationCore.dll` (standard WPF assemblies)
- `Microsoft.Windows.Controls` (external assembly referenced at build time)
- XAML source files in `Controls/` directory (e.g., `RoundedBox.xaml`, `LookupPopup.xaml`)
### What Depends on This Module?
- The corresponding partial classes in the codebase (e.g., `RoundedBox.xaml.cs`, `LookupPopup.xaml.cs`) depend on these generated files to initialize their UI and event handlers.
- Any code that instantiates these controls (e.g., `new RoundedBox()`) implicitly relies on `InitializeComponent()` being called (typically via the constructor in the partial class).
## 5. Gotchas
- **Auto-generated only**: These files are *not* meant to be edited. Changes will be overwritten on rebuild. Custom logic must reside in the corresponding `.xaml.cs` files.
- **Case sensitivity**: XAML filenames (e.g., `roundedbox.xaml`, `testidview.xaml`) are referenced in URIs with lowercase names, but class names (e.g., `RoundedBox`, `TestIDView`) use PascalCase. Ensure XAML file names match exactly (case-sensitive on case-sensitive file systems).
- **Event handler naming**: Event handlers (e.g., `tbTestId_PreviewTextInput`, `LookupPopup_OnOpenedClosed`) are referenced in generated code but are *not defined in these files*. They must be implemented in the corresponding `.xaml.cs` files.
- **Field naming inconsistencies**: Some controls use camelCase for internal fields (`commonStatusRibbon`, `lookupPopup`, `dtsGridViewColumnHeader`), while others use PascalCase (`TestIdInfo`, `TestIdTextBoxControl`). This reflects naming conventions in the source XAML (`x:Name` attributes).
- **`IStyleConnector` usage**: The `checkbox` control implements `IStyleConnector`, meaning it wires event setters in styles (e.g., `ToolTipOpening` handlers). This implies the XAML defines styles with `x:Key` or implicit targeting, and handlers like `ToolTipEventHandler` must exist in the code-behind.
- **Missing source files**: The documentation cannot verify the actual behavior of controls (e.g., `LookupPopup`s `PossibleChannels_OnMouseDoubleClick` handler) because the corresponding `.xaml` and `.xaml.cs` files are not provided. Behavior is inferred only from event subscription in generated code.
None identified beyond the above.

View File

@@ -0,0 +1,78 @@
---
source_files:
- Common/DTS.Common/obj/x86/Debug/Dialogs/NotificationWindow.g.i.cs
- Common/DTS.Common/obj/x86/Debug/Dialogs/NotificationWindow.g.cs
- Common/DTS.Common/obj/x86/Debug/Dialogs/ConfirmationWindow.g.cs
- Common/DTS.Common/obj/x86/Debug/Dialogs/ConfirmationWindow.g.i.cs
generated_at: "2026-04-16T02:57:31.657940+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "5aeec8a3a4ec19d3"
---
# Documentation: NotificationWindow and ConfirmationWindow Classes
## 1. Purpose
This module contains auto-generated WPF window classes used for displaying simple notification and confirmation dialogs within the `DTS.Common.Dialogs` namespace. `NotificationWindow` provides a modal dialog with a single OK button (and a hidden copy-to-clipboard button referenced in generated code), while `ConfirmationWindow` provides a modal dialog with OK and Cancel buttons for user confirmation flows. These classes are generated from corresponding XAML files (`NotificationWindow.xaml` and `ConfirmationWindow.xaml`) and serve as the code-behind for lightweight, standardized UI prompts in the application.
## 2. Public Interface
Both classes are partial and inherit from `System.Windows.Window`. They implement `System.Windows.Markup.IComponentConnector` to support WPF's XAML loading and event wiring.
### `NotificationWindow`
- **`public void InitializeComponent()`**
Initializes the window by loading its XAML definition from `/DTS.Common;component/dialogs/notificationwindow.xaml`. Ensures initialization occurs only once via `_contentLoaded` flag.
- **`void IComponentConnector.Connect(int connectionId, object target)`** *(explicit interface implementation)*
Connects XAML-declared UI elements to fields in the generated code-behind. Handles four connection IDs:
- `1`: Assigns `this.notificationWindow` (self-reference).
- `2`: Assigns `LayoutRoot` (Grid).
- `3`: Attaches `CoppyToClibord_Click` handler to a buttons `Click` event (note: method name appears misspelled — *CoppyToClibord_Click*).
- `4`: Assigns `OKButton` (Button).
### `ConfirmationWindow`
- **`public void InitializeComponent()`**
Initializes the window by loading its XAML definition from `/DTS.Common;component/dialogs/confirmationwindow.xaml`. Ensures initialization occurs only once via `_contentLoaded` flag.
- **`void IComponentConnector.Connect(int connectionId, object target)`** *(explicit interface implementation)*
Connects XAML-declared UI elements to fields in the generated code-behind. Handles four connection IDs:
- `1`: Assigns `this.confirmationWindow` (self-reference).
- `2`: Assigns `LayoutRoot` (Grid).
- `3`: Assigns `OKButton` (Button).
- `4`: Assigns `CancelButton` (Button).
> **Note**: No custom logic (e.g., event handlers, properties, or methods beyond initialization) is defined in these generated files. All business logic must reside in the corresponding partial class definitions (e.g., `NotificationWindow.xaml.cs`), which are not provided here.
## 3. Invariants
- `_contentLoaded` is `false` before first call to `InitializeComponent()` and `true` afterward; subsequent calls to `InitializeComponent()` are no-ops.
- UI element fields (`LayoutRoot`, `OKButton`, `CancelButton`, `notificationWindow`, `confirmationWindow`) are assigned exactly once during `Connect()` based on `connectionId`.
- `NotificationWindow` expects a button (likely `OKButton`) to have a `Click` event handler named `CoppyToClibord_Click` defined elsewhere (in the non-generated partial class).
- `ConfirmationWindow` does not wire any event handlers in the generated code — event wiring for OK/Cancel must be done in the partial class.
## 4. Dependencies
### This module depends on:
- `System.Windows` (WPF core)
- `System.Windows.Markup` (for `IComponentConnector`)
- `System.Windows.Controls` (for `Window`, `Grid`, `Button`)
- `Microsoft.Windows.Controls` (likely Microsoft Expression SDK or similar)
- `Microsoft.Xaml.Behaviors.*` (various behavior namespaces — used in XAML, not directly in generated code)
### This module is depended upon by:
- Other parts of `DTS.Common` (e.g., code that instantiates `NotificationWindow` or `ConfirmationWindow`).
- XAML files (`NotificationWindow.xaml`, `ConfirmationWindow.xaml`) — the source from which this code is generated.
## 5. Gotchas
- **Typo in event handler name**: The generated code references `CoppyToClibord_Click` (likely intended to be `CopyToClipboard_Click`). Ensure the corresponding partial class defines this handler, or the app will throw a runtime `MissingMethodException` when the button is clicked.
- **No public constructors or properties defined here**: These classes are minimal and rely on the partial class (not provided) for constructor logic, content properties, or dialog behavior.
- **Hardcoded resource URI**: `InitializeComponent()` uses a fixed pack URI (`/DTS.Common;component/dialogs/notificationwindow.xaml`). Moving or renaming the XAML file will break initialization.
- **No explicit dialog result handling**: Unlike typical confirmation dialogs, `ConfirmationWindow` does not set `DialogResult` in the generated code — this must be handled manually in the partial class (e.g., on OK/Cancel button clicks).
- **Auto-generated files**: These files are regenerated on build; manual edits will be lost. Any custom logic must be placed in the corresponding `.xaml.cs` partial class.
- **Missing event wiring for `ConfirmationWindow`**: While `NotificationWindow` wires a `Click` handler in `Connect()`, `ConfirmationWindow` does not — OK/Cancel behavior must be wired explicitly in the partial class.
None identified beyond the above.

View File

@@ -0,0 +1,59 @@
---
source_files:
- Common/DTS.Common/obj/x86/Debug/Resources/MainTabControlResource.g.i.cs
- Common/DTS.Common/obj/x86/Debug/Resources/MainTabControlResource.g.cs
generated_at: "2026-04-16T02:57:06.316466+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "45fa1f39ee4a4148"
---
# Resources
## Documentation: `MainTabControlResource` Class
### 1. Purpose
`MainTabControlResource` is an auto-generated WPF `ResourceDictionary` subclass that loads and applies styling and behavior for a `TabControl` defined in the XAML file `MainTabControlResource.xaml`. Its role is to encapsulate resource definitions (e.g., styles, templates, event handlers) used to customize the appearance and interaction of a main tab control throughout the application—specifically, by attaching a `ToolTipOpening` event handler to elements using the associated style. This class is not intended for direct instantiation or manual modification; it is generated at build time by the WPF build tasks and should be treated as part of the compiled resource infrastructure.
### 2. Public Interface
The class exposes only one *public* method:
- **`void InitializeComponent()`**
- **Signature**: `public void InitializeComponent()`
- **Behavior**: Loads the XAML resource dictionary from the embedded URI `/DTS.Common;component/resources/maintabcontrolresource.xaml` using `Application.LoadComponent`. It ensures initialization occurs only once via the `_contentLoaded` flag. This method is automatically invoked by the WPF framework when the resource dictionary is instantiated (e.g., when merged into an `Application.Resources` or `UserControl.Resources`).
The class also implements two *explicit interface implementations* (not public in the traditional sense, but required for XAML infrastructure):
- **`void IComponentConnector.Connect(int connectionId, object target)`**
- Marks the object as initialized (`_contentLoaded = true`). No further logic is present.
- **`void IStyleConnector.Connect(int connectionId, object target)`**
- For `connectionId == 1`, creates an `EventSetter` for `FrameworkElement.ToolTipOpeningEvent`, assigns `this.ToolTipEventHandler` as the handler, and adds it to the styles setters.
- **Note**: The method `ToolTipEventHandler` is referenced but *not defined* in the generated code. Its implementation must reside in the corresponding `.xaml.cs` file (not provided here), or the build would fail.
### 3. Invariants
- `_contentLoaded` is `false` initially and set to `true` on first call to `InitializeComponent()` or `IComponentConnector.Connect()`. Subsequent calls to `InitializeComponent()` are no-ops.
- The `ToolTipEventHandler` method *must* exist (as a private/protected instance method) in the partial class (e.g., in `MainTabControlResource.xaml.cs`) for the `IStyleConnector.Connect` logic to compile and execute correctly.
- The XAML file `MainTabControlResource.xaml` must exist at the specified relative path (`..\..\..\..\Resources\MainTabControlResource.xaml`) and contain a style (with `x:Key` or implicit) that uses `connectionId=1` for its `IStyleConnector` mapping.
- The resource dictionary is loaded as a **component** (via `Application.LoadComponent`), meaning its resources are merged into the applications resource scope at runtime.
### 4. Dependencies
- **Build-time**: Requires `PresentationBuildTasks` (WPF build tools) to generate this file from `MainTabControlResource.xaml`.
- **Runtime**:
- `System.Windows.Application.LoadComponent` (WPF core)
- `System.Windows.ResourceDictionary` (base class)
- `Microsoft.Windows.Controls` (likely referencing an external control library, e.g., Microsoft Toolkit or similar—used for `using Microsoft.Windows.Controls;`)
- `System.Windows.Controls.ToolTipEventHandler` delegate
- `System.Windows.FrameworkElement.ToolTipOpeningEvent` routed event
- **Source file dependency**: `Resources/MainTabControlResource.xaml` (not included, but its existence and structure are required).
- **Consumers**: Implicitly used when `MainTabControlResource.xaml` is referenced in XAML (e.g., via `<ResourceDictionary Source="...">` or `MergedDictionaries`). No direct consumers are evident from this file alone.
### 5. Gotchas
- **Partial class requirement**: The class is `partial`, but the `ToolTipEventHandler` method is *not defined* in the generated code. Its absence in the `.xaml.cs` file will cause a compilation error.
- **Auto-generated warning**: Both files explicitly warn that manual changes will be lost on regeneration. This is standard for WPF build outputs.
- **No public API surface**: This class is not meant to be extended or used directly beyond its role as a resource dictionary loader. Attempting to subclass it without care may break XAML connectivity.
- **`connectionId=1` is hardcoded**: The `IStyleConnector.Connect` logic assumes exactly one style in the XAML uses `connectionId=1`. If the XAML changes (e.g., multiple styles with event setters), the mapping may break or require re-synchronization.
- **No validation of XAML content**: The class does not validate the XAML structure—malformed XAML in `MainTabControlResource.xaml` will cause runtime exceptions during `LoadComponent`.
- **No documentation of `ToolTipEventHandler` behavior**: Since the handlers implementation is external, its side effects (e.g., tooltip content logic, performance implications) are unknown from this source.
None identified beyond the above.

View File

@@ -0,0 +1,71 @@
---
source_files:
- Common/DTS.Common/obj/x86/Debug/Themes/CommonStyles.g.i.cs
- Common/DTS.Common/obj/x86/Debug/Themes/CommonStyles.g.cs
generated_at: "2026-04-16T02:57:35.324519+00:00"
model: "Qwen/Qwen3-Coder-Next-FP8"
schema_version: 1
sha256: "2e2061c5c6af1d0a"
---
# Themes
## Documentation: `DTS.Common.CommonStyles`
---
### 1. Purpose
This module defines a WPF `ResourceDictionary` subclass (`CommonStyles`) that encapsulates shared UI styles and event handlers for tooltips across the application. It is auto-generated from `Themes/CommonStyles.xaml` during the build process and serves as the runtime entry point for loading those styles into the WPF resource system. Its primary role is to ensure consistent tooltip behavior—specifically, attaching a common `ToolTipOpening` event handler (`ToolTipEventHandler`) to multiple named styles defined in the XAML source—without requiring manual wiring in application code.
---
### 2. Public Interface
The class `CommonStyles` is a partial class inheriting from `System.Windows.ResourceDictionary` and implementing `IComponentConnector` and `IStyleConnector`. It exposes only one *public* method:
- **`void InitializeComponent()`**
Initializes the component by loading the embedded XAML resource dictionary from `/DTS.Common;component/themes/commonstyles.xaml`. This method is idempotent: it checks `_contentLoaded` and returns early on subsequent calls. It must be called before the dictionary is used (typically invoked automatically by the WPF framework or in the constructor of a consuming class).
> **Note**: All other methods (`Connect(int, object)` for `IComponentConnector` and `IStyleConnector`) are *explicit interface implementations* and are not intended for direct public consumption. They are invoked internally by the WPF build/runtime infrastructure.
---
### 3. Invariants
- `_contentLoaded` is `false` initially and set to `true` on first call to `InitializeComponent()` or `IComponentConnector.Connect()`. Once `true`, it is never reset.
- `InitializeComponent()` must be called **exactly once** per instance before the dictionary is used; otherwise, styles may not be loaded.
- The `IStyleConnector.Connect()` implementation assumes exactly 12 styles (connection IDs 112) in `CommonStyles.xaml` each define a `ToolTipOpening` event handler. If the XAML changes (e.g., adds/removes styles), the generated code and XAML must be regenerated together to maintain correctness.
- All event setters attach to `FrameworkElement.ToolTipOpeningEvent` using the same handler: `this.ToolTipEventHandler`. The handler itself is not defined in this file—its implementation resides in the *other* partial part of `CommonStyles` (likely in `CommonStyles.xaml.cs`), which is not provided here.
---
### 4. Dependencies
- **Dependencies *of* this module**:
- `System.Windows.Application.LoadComponent()` — used to load the embedded XAML resource.
- `System.Windows.ResourceDictionary` — base type.
- `System.Windows.Markup.IComponentConnector`, `IStyleConnector` — required for WPFs build-time code generation contract.
- `System.Windows.Controls.ToolTipEventHandler` — delegate type for tooltip events.
- `System.Windows.EventSetter` — used to attach event handlers to styles.
- `Microsoft.Windows.Controls` — likely indicates dependency on Microsofts WPF Toolkit or similar (e.g., `Microsoft.Windows.Controls.DataVisualization` or `Charting`).
- **Dependencies *on* this module**:
- Any WPF application or library referencing `DTS.Common` that uses styles defined in `CommonStyles.xaml`.
- The `CommonStyles.xaml` file itself (source) — this generated code is tightly coupled to it. Changes to the XAML require regeneration.
---
### 5. Gotchas
- **Auto-generated code**: This file is auto-generated by `PresentationBuildTasks` (WPF build tasks). **Manual edits will be overwritten** on rebuild. Always modify `CommonStyles.xaml` (and its code-behind, if any) instead.
- **Missing handler definition**: The `ToolTipEventHandler` method is referenced but not defined in this file. Its implementation is assumed to exist in the corresponding `CommonStyles.xaml.cs` (not provided), which must be present at runtime—otherwise, a `MissingMethodException` will occur.
- **Hardcoded connection IDs**: The `IStyleConnector.Connect()` switch statement uses numeric IDs (112) that correspond to style definitions in `CommonStyles.xaml`. If styles are reordered, added, or removed in the XAML without regenerating, the event handlers may be attached to the wrong styles or not at all.
- **No public style keys exposed**: This module does not expose any public constants or properties for style keys (e.g., `x:Key="MyStyle"`). Consumers must know or inspect the XAML to reference styles.
- **No validation of `target` type**: The `IStyleConnector.Connect()` method casts `target` to `Style` without checking—passing a non-`Style` object will cause a runtime `InvalidCastException`.
> **None identified from source alone** beyond the above.
---
**Note**: Since the actual `CommonStyles.xaml` and `CommonStyles.xaml.cs` files are not provided, details about the specific styles, their keys, or the logic inside `ToolTipEventHandler` are inferred only from the generated codes structure and line references.