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,211 @@
---
source_files:
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/Constants.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/LWRLegFlex.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/LWRLegPLI.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/PedestrianReportTab.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/PedestrianSetupTab.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/LWRLegARSReport.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/ReportProperty.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/ExportBase.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/UprLegReport.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/LWRLegFlexReport.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/HeadReport.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/LwrLegTRLReport.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/GraphChannel.cs
generated_at: "2026-04-17T15:44:40.495238+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "fe6fc1cbf68a5be0"
---
# Pedestrian and Head Reports Module Documentation
## 1. Purpose
This module provides the data structures, UI controls, and report generation logic for pedestrian and head impact safety testing reports. It supports multiple impactor types including adult/child head, upper leg (UPR), and lower leg variants (Flex, PLI, ARS, TRL/E-PLI). The module manages graph visualization, channel data processing with unit conversions, calculated channels (HIC, resultant acceleration, vector addition), and Excel export capabilities for crash test analysis.
---
## 2. Public Interface
### ConstantsAndEnums (Constants.cs)
```csharp
public const string HEAD_X_ID = "X軸加速度";
public const string HEAD_Y_ID = "Y軸加速度";
public const string HEAD_Z_ID = "Z軸加速度";
public enum HeadImpactorTypes { ADULT, CHILD }
public enum TimeUnits { Seconds, MilliSeconds }
```
### LWRLegFlex (UserControl)
```csharp
public LWRLegFlex() // Initializes ddlAccelerationUnits, ddlDummyType, ddlMomentUnits, ddlTime to index 0
```
### LWRLegPLI (UserControl)
```csharp
public LWRLegPLI() // Initializes ddlAccelerationUnits, ddlDummyType, ddlMomentUnits, ddlShearDisp, ddlTime to index 0
```
### PedestrianReportTab (C1DockingTabPage, INotifyPropertyChanged)
```csharp
public event PropertyChangedEventHandler PropertyChanged;
public ReportBase ReportBase { get; set; } // Setter throws NotSupportedException if re-assigned
protected bool SetProperty<T>(ref T storage, T value, String propertyName)
protected void OnPropertyChanged(string propertyName)
```
### PedestrianSetupTab (C1DockingTabPage, INotifyPropertyChanged)
```csharp
public event PropertyChangedEventHandler PropertyChanged;
public LWRLegReportExport UI { get; set; }
public ReportBase ReportBase { get; set; } // Setter throws NotSupportedException if re-assigned
protected bool SetProperty<T>(ref T storage, T value, String propertyName)
protected void OnPropertyChanged(string propertyName)
```
### LWRLegARSReport (ReportBase)
```csharp
public LWRLegARSReport(PedestrianAndHeadTest parent)
public override ReportTypes GetReportType() // Returns ReportTypes.LWRLegARS
public const string XAxialChannelId = "ARSXAxial";
public const string YAxialChannelId = "ARSYAxial";
public const string ZAxialChannelId = "ARSZAxial";
public const string XAccelerationId = "ARSXAccel";
```
### ReportProperty
```csharp
public ReportProperty(string id, string displayname, string[] possibleValues, Type propertyType)
public string Id { get; } // Read-only
public string DisplayName { get; set; }
public string Value { get; } // Set via SetValue()
public void SetValue(string value)
public string[] GetAvailableValues()
public void SetAvailableValues(string[] values)
```
### ExportBase
```csharp
protected string GetCell(string key) // Throws NotImplementedException if key missing
protected void AddCollectionReference(string key, string reference)
protected void InsertCalculation(string cellReference, int sheetid, bool newLevel)
protected int InsertSharedStringItem(string text)
protected Cell CreateTextCell(string reference, string value)
protected Cell CreateNumericCell(string column, double[] data, int index)
protected Cell CreateNumericCell(string reference, uint style, double value)
protected Cell CreateStylizedTextCell(string reference, UInt32Value style, string text)
protected Cell CreateStylizedTextCell(string reference, UInt32Value style, string text, string key)
```
### UprLegReport (ReportBase)
```csharp
public UprLegReport(PedestrianAndHeadTest parent)
public override ReportTypes GetReportType() // Returns ReportTypes.UPRLeg
public const string UPR_MOMENT_ID = "UPR_Moment";
public const string MID_MOMENT_ID = "MID_Moment";
public const string LWR_MOMENT_ID = "LWR_Moment";
public const string UPR_TOTALFORCE_ID = "UPR_ForceComined";
public const string UPR_FORCE_ID = "UPR_Force";
public const string LWR_FORCE_ID = "LWR_Force";
public override void DrawGraph(KnownGraphs graph, C1.Win.C1Chart.C1Chart chart)
```
### LWRLegFlexReport (ReportBase)
```csharp
public LWRLegFlexReport(PedestrianAndHeadTest parent)
public override ReportTypes GetReportType() // Returns ReportTypes.LWRLegFlex
public const string FEMUR1_ID, FEMUR2_ID, FEMUR3_ID, LCL_ID, MCL_ID, ACL_ID, PCL_ID, TIBIA1_ID, TIBIA2_ID, TIBIA3_ID, TIBIA4_ID
public string TestType { get; set; }
public string[] GetPossibleTestTypes()
```
### HeadReport (ReportBase)
```csharp
public HeadReport(PedestrianAndHeadTest parent)
public override ReportTypes GetReportType() // Returns ReportTypes.Head
public const string HEAD_X_ChannelID = "HEAD_X";
public const string HEAD_Y_ChannelID = "HEAD_Y";
public const string HEAD_Z_ChannelID = "HEAD_Z";
public const string HEAD_Displacement = "HEAD_DISPLACEMENT";
public const string HEAD_RESULTANT_CHANNELID = "HEAD_RESULTANT";
public string ClassificationAngle { get; set; }
public override void DrawGraph(KnownGraphs graph, C1.Win.C1Chart.C1Chart chart)
```
### LWRLegTRLReport (ReportBase)
```csharp
public LWRLegTRLReport(PedestrianAndHeadTest parent)
public override ReportTypes GetReportType() // Returns ReportTypes.LWRLegTRL
public const string AccelerationChannelId = "LWRLEGTRL_ACCEL";
public const string BendingChannelId = "LWRLEGTRL_BENDANGLE";
public const string ShearingChannelId = "LWRLEGTRL_SHEARING";
public const string BendingDisplacementId = "LWRLEGTRL_BENDDISPLACEMENT";
public const string ShearingDisplacementId = "LWRLEGTRL_SHEARDISPLACEMENT";
public override void DrawGraph(KnownGraphs graph, C1.Win.C1Chart.C1Chart chart)
```
### GraphChannel (INotifyPropertyChanged)
```csharp
public GraphChannel(string id, string displayName, string hint)
public event PropertyChangedEventHandler PropertyChanged
public string Id { get; } // Read-only
public string DisplayName { get; set; }
public string ChannelNameHint { get; set; }
public ReviewTestChannel Channel { get; set; }
public double DataMin { get; set; }
public double DataMax { get; set; }
public double TimeOfMin { get; set; }
public double TimeOfMax { get; set; }
public bool UseOffset { get; set; }
public double Offset { get; set; }
public virtual void SetValue(Fields field, string value)
public virtual string GetValue(Fields field)
public virtual string GetValue(Fields field, string format)
public virtual string GetValueTrunc2Places(Fields field)
public enum Fields { DataMin, DataMax, TimeOfMin, TimeOfMax, HIC, T1, T2, UseOffset, Offset }
```
### HICChannel (GraphChannel)
```csharp
public HICChannel(string id, string displayName, string hint)
public double HIC { get; set; }
public double T1 { get; set; }
public double T2 { get; set; }
public override string GetValue(Fields field)
```
### VectorAddition, BendingDisplacement, ShearingDisplacement
```csharp
// Subclasses of GraphChannel with no additional public members beyond constructors
public VectorAddition(string id, string displayName, string hint)
public BendingDisplacement(string id, string displayname, string hint)
public ShearingDisplacement(string id, string displayname, string hint)
```
---
## 3. Invariants
- **ReportBase assignment is single-use**: `PedestrianReportTab.ReportBase` and `PedestrianSetupTab.ReportBase` throw `NotSupportedException` if assigned when already non-null.
- **Null ReportBase values are ignored**: The setter silently returns without action if `value` is null.
- **ReportProperty.Id is immutable**: Set only at construction, no public setter exists.
- **GraphChannel.Id is immutable**: Set only at construction, no public setter exists.
- **ExportBase.GetCell throws for unknown keys**: Throws `NotImplementedException` with the key name; also writes to `System.Diagnostics.Trace`.
- **All report classes require a parent**: Each `ReportBase` subclass constructor requires a `PedestrianAndHeadTest` parameter.
- **Offset only applied when UseOffset is true**: In `GraphChannel.Offset` setter, the offset is only propagated to the channel if `UseOffset` is true.
---
## 4. Dependencies
### External Libraries
- `C1.Win.C1Command` - ComponentOne docking tab pages (`C1DockingTabPage`)
- `C1.Win.C1Chart` - Charting component for `DrawGraph` methods
- `DocumentFormat.OpenXml` - Excel spreadsheet generation (`SpreadsheetDocument`, `SharedStringTablePart`, `CalculationChain`, etc.)
- `System.Windows.Forms` - `UserControl` base class
### Internal Dependencies

View File

@@ -0,0 +1,63 @@
---
source_files:
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Properties/AssemblyInfo.cs
generated_at: "2026-04-17T16:47:15.105548+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "cab8fd99c2c43cd4"
---
# Documentation: AssemblyInfo.cs (PedestrianAndHeadReports)
## 1. Purpose
This file provides assembly-level metadata for the `PedestrianAndHeadReports` module within the DataPRO system. It defines version information, COM visibility settings, and identification attributes using .NET assembly attributes. This is a standard .NET Framework assembly information file that controls how the compiled DLL is identified and exposed to external systems.
---
## 2. Public Interface
This file contains no public functions, classes, or methods. It consists entirely of assembly-level attributes:
| Attribute | Value |
|-----------|-------|
| `AssemblyTitle` | `"PedestrianAndHeadReports"` |
| `AssemblyDescription` | `""` (empty) |
| `AssemblyConfiguration` | `""` (empty) |
| `AssemblyCompany` | `""` (empty) |
| `AssemblyProduct` | `"PedestrianAndHeadReportsModule"` |
| `AssemblyCopyright` | `"Copyright © 2017"` |
| `AssemblyTrademark` | `""` (empty) |
| `AssemblyCulture` | `""` (empty) |
| `ComVisible` | `false` |
| `Guid` | `"99a3fc18-ead0-4ead-bdee-777e0d286234"` |
| `AssemblyVersion` | `"1.0.0.0"` |
| `AssemblyFileVersion` | `"1.0.0.0"` |
---
## 3. Invariants
- **COM Visibility**: All types in this assembly are not visible to COM components (`ComVisible(false)`). If COM access is required for a specific type, `ComVisible(true)` must be applied at the type level.
- **Version Consistency**: Both `AssemblyVersion` and `AssemblyFileVersion` are set to `"1.0.0.0"` and should be updated in tandem when releasing new versions.
- **Assembly Identity**: The GUID `"99a3fc18-ead0-4ead-bdee-777e0d286234"` uniquely identifies this assembly's type library if exposed to COM.
---
## 4. Dependencies
**This module depends on:**
- `System.Reflection` - For assembly attribute support
- `System.Runtime.CompilerServices` - For compiler-related assembly attributes
- `System.Runtime.InteropServices` - For COM interop attributes (`ComVisible`, `Guid`)
**What depends on this module:**
- Cannot be determined from this file alone. The module name `PedestrianAndHeadReports` suggests it provides reporting functionality related to pedestrians and heads (possibly head impact analysis), but consumers are not identifiable from this metadata file.
---
## 5. Gotchas
- **Empty Metadata Fields**: `AssemblyDescription`, `AssemblyCompany`, and `AssemblyTrademark` are all empty strings. This may indicate incomplete configuration or intentional omission.
- **Hardcoded Version**: The version is explicitly set to `"1.0.0.0"` rather than using auto-increment (`"1.0.*"`). This requires manual version updates for each release.
- **Product Name Mismatch**: The `AssemblyProduct` value (`"PedestrianAndHeadReportsModule"`) differs slightly from `AssemblyTitle` (`"PedestrianAndHeadReports"`) - one includes "Module

View File

@@ -0,0 +1,49 @@
---
source_files:
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Resources/TranslateExtension.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Resources/StringResources.Designer.cs
generated_at: "2026-04-17T15:58:30.090059+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "262f426758521cfe"
---
# Documentation: PedestrianAndHeadReports Resources Module
## 1. Purpose
This module provides localization infrastructure for the `PedestrianAndHeadReports` reporting system. It consists of a XAML markup extension (`TranslateExtension`) that enables declarative string localization in WPF UI, backed by a strongly-typed resource accessor class (`StringResources`) that wraps a `.resx` resource file. The module supports multi-language display of crash test and pedestrian safety report terminology, with Japanese as the apparent default culture based on the resource values.
---
## 2. Public Interface
### `TranslateExtension` (class)
**Namespace:** `PedestrianAndHeadReports.Resources`
**Inheritance:** `System.Windows.Markup.MarkupExtension`
A XAML markup extension that resolves localization keys to translated strings at runtime.
| Member | Signature | Description |
|--------|-----------|-------------|
| Constructor | `TranslateExtension(string key)` | Initializes the extension with the resource key to look up. Stores the key in a private readonly field `_key`. |
| `ProvideValue` | `override object ProvideValue(IServiceProvider serviceProvider)` | Returns the localized string for `_key` via `StringResources.ResourceManager.GetString()`. Returns `NotFound` constant if `_key` is null or empty. Returns `NotFound + " " + _key` if the key is not found in resources. |
**Constants:**
- `private const string NotFound = "#stringnotfound#"` — Sentinel value returned when a key is missing or invalid.
---
### `StringResources` (class)
**Namespace:** `PedestrianAndHeadReports.Resources`
**Access Modifier:** `internal`
**Attributes:** `[GeneratedCode]`, `[DebuggerNonUserCode]`, `[CompilerGenerated]`
An auto-generated strongly-typed resource accessor class. **Not intended for direct manual editing.**
| Member | Signature | Description |
|--------|-----------|-------------|
| `ResourceManager` | `internal static global::System.Resources.ResourceManager ResourceManager { get; }` | Lazy-initialized cached `ResourceManager` instance pointing to `"PedestrianAndHeadReports.Resources.StringResources"` resource bundle. |
| `Culture` | `internal static global::System.Globalization.CultureInfo Culture { get; set; }` | Gets or sets the current UI culture for resource lookups. When set, overrides `Thread.CurrentUICulture` for all lookups via this class. |
**Resource String Properties (all `internal

View File

@@ -0,0 +1,52 @@
---
source_files:
- DataPRO/Modules/Reports/PedestrianAndHeadReports/View/TRLReportInputView.xaml.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/View/HeadReportInputView.xaml.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/View/TRLReportOutputView.xaml.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/View/HeadReportOutputView.xaml.cs
generated_at: "2026-04-17T16:11:25.311455+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "dd1581b1d8d1d806"
---
# View
### Purpose
This module provides UI helper classes for the DTS Viewer WPF application. It includes a `BindingProxy` for enabling data binding in contexts where the data context is not directly accessible (e.g., within style setters), and a `ComponentsGroupControl` custom control for displaying grouped UI components with an image and title. Several placeholder classes (`MenuItem`, `TabItem`, `NavigationItem`) exist but contain no implementation.
### Public Interface
**BindingProxy** (inherits `Freezable`)
- `protected override Freezable CreateInstanceCore()` - Creates a new instance of `BindingProxy`. Required override for `Freezable` inheritance.
- `public static readonly DependencyProperty DataProperty` - Dependency property identifier for `Data`.
- `public object Data { get; set; }` - Gets or sets the data object to proxy for binding purposes.
**ComponentsGroupControl** (inherits `Control`)
- `public class ClickEventArgs : EventArgs` - Nested event args class with default constructor.
- `public static RoutedCommand ClickCommand { get; }` - Static routed command for click handling.
- `public static readonly DependencyProperty ImageProperty` - Dependency property identifier for `Image`.
- `public ImageSource Image { get; set; }` - Gets or sets the image source for the control.
- `public static readonly DependencyProperty TitleProperty` - Dependency property identifier for `Title`.
- `public string Title { get; set; }` - Gets or sets the title text; default value is "Title".
**MenuItem**
- No public members defined (empty class).
**TabItem**
- No public members defined (empty class).
**NavigationItem**
- No public members defined (empty class).
### Invariants
- `BindingProxy` must inherit from `Freezable` to participate in the WPF property system and support data binding in style setters.
- `ComponentsGroupControl` registers a default style key via `DefaultStyleKeyProperty.OverrideMetadata` in its static constructor, implying a XAML style/template must exist elsewhere.
- `ComponentsGroupControl.ClickCommand` is registered at the class level via `CommandManager.RegisterClassCommandBinding`.
### Dependencies
- **Depends on**: `System.Windows`, `System.Windows.Controls`, `System.Windows.Input`, `System.Windows.Media`.
- **Depended on by**: Unclear from source alone; likely used in DTS Viewer views and XAML templates.
### Gotchas
- **Commented-out code**: `ComponentsGroupControl` contains commented

View File

@@ -0,0 +1,97 @@
---
source_files:
- DataPRO/Modules/Reports/PedestrianAndHeadReports/ViewModel/HeadReportViewModel.cs
- DataPRO/Modules/Reports/PedestrianAndHeadReports/ViewModel/TRLReportViewModel.cs
generated_at: "2026-04-17T15:58:37.824013+00:00"
model: "zai-org/GLM-5-FP8"
schema_version: 1
sha256: "bc7bfc2f44c9fcf7"
---
# Documentation: PedestrianAndHeadReports ViewModels
## 1. Purpose
This module provides ViewModel implementations for report generation within the DataPRO reporting system. It contains two primary ViewModels: `HeadReportViewModel` for head report functionality (currently limited to XML string handling per source comments), and `TRLReportViewModel` for TRL (Test Research Laboratory) reports that manage test data including acceleration, bending, and shear channel measurements. Both ViewModels follow the MVVM pattern using Microsoft Prism framework, providing input/output view management, event aggregation for cross-component communication, and lifecycle methods for initialization and cleanup.
---
## 2. Public Interface
### HeadReportViewModel
**Class Signature:**
```csharp
[Export(typeof(IHeadReportInputView))]
[Export(typeof(IHeadReportOutputView))]
[PartCreationPolicy(CreationPolicy.Shared)]
public class HeadReportViewModel : IHeadReportViewModel
```
**Constructor:**
```csharp
public HeadReportViewModel(
IHeadReportInputView inputView,
IHeadReportOutputView outputView,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer)
```
**Properties:**
| Property | Type | Description |
|----------|------|-------------|
| `InputView` | `IHeadReportInputView` | The input view instance; DataContext is set to `this` during construction |
| `OutputView` | `IHeadReportOutputView` | The output view instance; DataContext is set to `this` during construction |
| `NotificationRequest` | `InteractionRequest<Notification>` | Prism interaction request for displaying notifications |
| `ConfirmationRequest` | `InteractionRequest<Confirmation>` | Prism interaction request for displaying confirmations |
| `IsDirty` | `bool` | Indicates whether the view model has unsaved changes; private setter |
| `IsBusy` | `bool` | Controls busy indicator state; raises `PropertyChanged` on set |
| `IsMenuIncluded` | `bool` | Indicates whether menu is included; raises `PropertyChanged` on set |
| `IsNavigationIncluded` | `bool` | Indicates whether navigation is included; raises `PropertyChanged` on set |
| `HeaderInfo` | `string` | Returns constant string `"MainRegion"` |
**Methods:**
| Method | Return Type | Description |
|--------|-------------|-------------|
| `Cleanup()` | `void` | Empty implementation |
| `CleanupAsync()` | `Task` | Returns `null` |
| `Initialize()` | `void` | Empty implementation |
| `Initialize(object parameter)` | `void` | Empty implementation |
| `Initialize(object parameter, object model)` | `void` | Empty implementation |
| `InitializeAsync()` | `Task` | Returns `null` |
| `InitializeAsync(object parameter)` | `Task` | Returns `null` |
| `Activated()` | `void` | Empty implementation |
| `OnPropertyChanged(string propertyName)` | `void` | Raises `PropertyChanged` event |
**Events:**
- `PropertyChanged` - Standard `INotifyPropertyChanged` implementation
---
### TRLReportViewModel
**Class Signature:**
```csharp
[Export(typeof(ITRLReportInputView))]
[Export(typeof(ITRLReportOutputView))]
[PartCreationPolicy(CreationPolicy.Shared)]
public class TRLReportViewModel : ITRLReportViewModel
```
**Constructor:**
```csharp
public TRLReportViewModel(
ITRLReportInputView inputView,
ITRLReportOutputView outputView,
IRegionManager regionManager,
IEventAggregator eventAggregator,
IUnityContainer unityContainer,
DTS.Serialization.Test test)
```
**Properties (in addition to those inherited from base pattern):**
| Property | Type | Description |
|----------|------|-------------|
| `Test` | `DTS.Serialization.Test` | The test object containing channel data |
| `AvailableTimeUnits` | `ConstantsAndEnums.TimeUnits[]` | Initialized to