How oliviaophia/smarttaskbar works
Main components
• Core Application Modules:
• “Views” and “Worker” folders indicate a clear separation between the presentation layer (the system tray/menu style components) and the background business logic (engine and taskbar helper code).
• Hooking Module:
• “SmartTaskbar.Win10.Hook”: This component, which includes EasyHook libraries (EasyHook32Svc.exe, EasyHook64Svc.exe) and injection code (InjectionEntryPoint.cs), is responsible for intercepting system events or window messages. Its role is to hook into Windows processes to monitor or enforce behavior when windows interact with the taskbar.
• Packaging/Deployment Module:
• “SmartTaskbar.WapProj”: This Windows Application Packaging project deals with packaging/distributing the app – potentially for distribution via the Microsoft Store. Although packaged separately, it integrates with the core functionality.
• Ancillary Assets and Configurations:
• Files such as package.appxmanifest, app.manifest, and configuration files (App.config, packages.config) indicate how the system is built and how components are wired up.
• The “Languages” directories (with multiple resource files) highlight internationalization support.
Relationships and interactions
• The core modules (SmartTaskbar/SmartTaskbar.Win10) interact with helper classes to monitor focused windows and, if certain conditions are met (e.g., windows intersecting the taskbar area), trigger the auto-hide behavior.
• The Hook module (SmartTaskbar.Win10.Hook) is deployed to work transparently in the background by injecting code into system processes (using EasyHook) to detect low-level events. It communicates (or signals) the core application to adjust the taskbar display.
• The packaging project (SmartTaskbar.WapProj) wraps around the core functionality for deployment purposes.
Important architectural patterns or design principles
• Separation of Concerns: The project is clearly divided into modules handling UI, business logic, hooking for system integration, and deployment packaging.
• Modularity and Extensibility: The use of dedicated projects for “Win10” functionality and for hooking means that each aspect of taskbar management is isolated, which eases maintenance and potential future enhancements.
• Client-Service-like interaction: Although it isn’t a full-blown client-server application, the communication between the hook module and the core application resembles a service interaction (receiving injected events and responding appropriately).
Relevant technologies, frameworks, or libraries
• C# and .NET Framework/Core (as visible from the csproj files and the use of C# code).
• EasyHook library (for code injection, visible in the Win10.Hook folder).
• Windows APIs for interacting with the taskbar (via native methods in the Helpers folder).
• The system leverages Visual Studio build tools and configuration files (like packages.config and app.manifest).
• Create clearly labeled nodes for each component:
• “Core Taskbar Logic” grouping SmartTaskbar and SmartTaskbar.Win10 components (with sub-nodes for “Helpers”, “Models”, “Worker/Engine”, and “Views”).
• “System Hook Module” representing SmartTaskbar.Win10.Hook (note the use of EasyHook services and injection points).
• “Packaging & Deployment” for the SmartTaskbar.WapProj.
• From the “User Interaction Layer” to the “Core Taskbar Logic” (commands like toggle auto mode).
• From the “Core Taskbar Logic” to the Windows OS APIs for adjusting the taskbar’s state.
• From the “System Hook Module” back into “Core Taskbar Logic” to signal detected events.
• UI layers versus backend logic.
• Local modules (core logic, helper classes) versus external dependencies (EasyHook, Windows APIs).
• Configuration files and support assets as annotations or side notes if necessary to indicate build and deployment pipelines.