2.4 KiB
2.4 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-17T16:45:06.957738+00:00 | zai-org/GLM-5-FP8 | 1 | efc40e7dad9708c9 |
HardwareList.Converters Documentation
1. Purpose
This module provides WPF IValueConverter implementations for the HardwareList UI layer. These converters transform HardwareModel data into display-friendly values for data-bound controls, handling edge cases such as missing data, invalid states, and stand-in hardware representations. The converters ensure consistent display formatting (e.g., returning "---" or "N/A" placeholders) across the hardware list views.
2. Public Interface
FirstUseDateConverter
Implements: System.Windows.Data.IValueConverter
| Method | Signature | Description |
|---|---|---|
Convert |
(object value, Type targetType, object parameter, CultureInfo culture) → object |
Returns the first use date display value. If value is not a HardwareModel, returns Strings.Table_NA. If model.IsFirstUseValid is false, returns Strings.NotApplicable. If model.FirstUseDate is non-null, returns that date. Otherwise returns Strings.Table_NA. |
ConvertBack |
(object value, Type targetType, object parameter, CultureInfo culture) → object |
Returns the input DateTime unchanged if value is a DateTime; otherwise returns Strings.Table_NA. |
StandInFieldConverter
Implements: System.Windows.Data.IValueConverter
| Method | Signature | Description |
|---|---|---|
Convert |
(object value, Type targetType, object parameter, CultureInfo culture) → object |
Returns field values for non-stand-in hardware. If value is not a HardwareModel, returns Strings.Table_NA. If model.Hardware is not an IISOHardware, returns string.Empty. If isoHW.StandIn is true, returns Strings.Table_NA. Otherwise, uses the string parameter to select: "CalDueDate" → model.CalDueDate, "CalDate" → model.CalDate, "Firmware" → model.Firmware. Unrecognized parameters return Strings.Table_NA. |
ConvertBack |
(object value, Type targetType, object parameter, CultureInfo culture) → object |
Returns the input DateTime unchanged if value is a DateTime; otherwise returns Strings.Table_NA. |