--- source_files: - DataPRO/Modules/SystemSettings/PowerAndBattery/PowerAndBatteryModule.cs generated_at: "2026-04-17T16:46:28.309627+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "8af7653fca429cb0" --- # PowerAndBattery Module Documentation ## 1. Purpose This module provides Power and Battery settings functionality within the DTS modular application framework. It serves as a Prism module that registers its View and ViewModel with the Unity dependency injection container, enabling the main application shell to display and manage power-related system settings. The module also exposes metadata (via `PowerAndBatteryImageAttribute`) that allows the main screen to display it as an available component in the Administrative group. --- ## 2. Public Interface ### `PowerAndBatteryModule` (class) Implements `Prism.Modularity.IModule`. The primary module entry point. | Member | Signature | Description | |--------|-----------|-------------| | Constructor | `PowerAndBatteryModule(IUnityContainer unityContainer)` | Accepts a Unity container via dependency injection and stores it in `_unityContainer`. | | `Initialize` | `void Initialize()` | Registers `IPowerAndBatteryView` → `PowerAndBatteryView` and `IPowerAndBatteryViewModel` → `PowerAndBatteryViewModel` with the Unity container. | | `OnInitialized` | `void OnInitialized(IContainerProvider containerProvider)` | Empty implementation—no initialization logic executed. | | `RegisterTypes` | `void RegisterTypes(IContainerRegistry containerRegistry)` | Calls `Initialize()`. | ### `PowerAndBatteryImageAttribute` (class) Extends `ImageAttribute`. Provides assembly metadata for UI display. | Member | Signature | Description | |--------|-----------|-------------| | Constructor | `PowerAndBatteryImageAttribute()` | Default constructor; loads assembly image. | | Constructor | `PowerAndBatteryImageAttribute(string s)` | Overload that ignores the string parameter; loads assembly image. | | `AssemblyRegion` | `eAssemblyRegion AssemblyRegion { get; }` | **Throws `NotImplementedException`.** | | `AssemblyImage` | `BitmapImage AssemblyImage { get; }` | Returns a `BitmapImage` retrieved via `AssemblyInfo.GetImage(AssemblyNames.PowerAndBattery.ToString())`. | | `AssemblyName` | `string AssemblyName { get; }` | Returns `AssemblyNames.PowerAndBattery.ToString()`. | | `AssemblyGroup