PrettyScreenSHOT is a WPF-based screenshot and screen recording application built with .NET 10.0. The architecture follows a clean separation of concerns with distinct layers for UI, business logic, and utilities.
PrettyScreenSHOT/
├── Views/ # UI Layer (Presentation)
│ ├── Windows/ # Main application windows (10 windows)
│ ├── Dialogs/ # Modal dialogs
│ └── Overlays/ # Non-modal overlays
│
├── Services/ # Business Logic Layer (21 services)
│ ├── Cloud/ # Cloud upload providers (6 classes)
│ ├── Screenshot/ # Screenshot capture & management (3 classes)
│ ├── Video/ # Video capture (1 class)
│ ├── Update/ # Auto-update system (4 classes)
│ ├── Security/ # Encryption & security (1 class)
│ ├── Settings/ # Configuration management (1 class)
│ └── Input/ # Keyboard shortcuts (1 class)
│
├── Models/ # Data Layer
│ └── UpdateInfo.cs # Data models
│
├── Helpers/ # Utility Layer
│ ├── DebugHelper.cs # Debug logging utilities
│ └── LocalizationHelper.cs # i18n utilities
│
├── Properties/ # Resources & Configuration
│ ├── Resources.resx # Localization files (5 languages)
│ └── AssemblyInfo.cs
│
├── Themes/ # UI Theming
│ └── WpfUiCustom.xaml
│
└── Tests/ # Testing Layer
├── Services/ # Service tests
└── Helpers/ # Helper tests
Used for application-wide state management:
SettingsManager- Centralized configurationScreenshotManager- Screenshot orchestration
Rationale: These classes manage global application state and should have only one instance throughout the application lifecycle.
Used for extensibility and dependency inversion:
ICloudUploadProvider- Abstracts cloud upload implementations- Implementations: Imgur, Cloudinary, S3, CustomServer
Rationale: Allows adding new cloud providers without modifying existing code, following the Open/Closed Principle.
Used for orchestrating complex operations:
CloudUploadManager- Coordinates cloud upload operationsUpdateManager- Manages update workflowScreenshotManager- Manages screenshot lifecycle
Rationale: Separates orchestration logic from implementation details, improving maintainability.
Used for stateless utility functions:
DebugHelper- Logging utilitiesLocalizationHelper- InternationalizationScreenshotHelper- Screenshot utilitiesScrollCaptureHelper- Scroll capture utilities
Rationale: These classes contain pure functions with no state, making them simple and reusable.
Purpose: User interface and user interaction
Responsibilities:
- Display data to users
- Capture user input
- Delegate business logic to Services
- Handle UI-specific state
Key Windows:
ScreenshotEditorWindow- Screenshot editing interfaceScreenshotHistoryWindow- Screenshot history managementSettingsWindow- Application settingsVideoCaptureWindow- Video recording interfaceUpdateWindow- Update management
Purpose: Business logic and application functionality
Responsibilities:
- Implement core application features
- Manage application state
- Coordinate operations across multiple components
- Interface with external systems (cloud, filesystem)
Key Services:
-
Cloud Upload (6 classes)
CloudUploadManager- Orchestrates uploads- Provider implementations for different cloud services
-
Screenshot (3 classes)
ScreenshotManager- Manages screenshot lifecycleScreenshotHelper- Capture utilitiesScrollCaptureHelper- Scrolling capture
-
Update (4 classes)
UpdateManager- Coordinates update processUpdateChecker- Checks for updatesUpdateDownloader- Downloads updatesUpdateInstaller- Installs updates
-
Security (1 class)
SecurityManager- AES-256 encryption
Purpose: Reusable utility functions
Responsibilities:
- Provide stateless utility functions
- Encapsulate common operations
- Support other layers without dependencies
Purpose: Data structures and domain objects
Responsibilities:
- Define data structures
- Encapsulate domain logic
- Provide data validation
| Metric | Value |
|---|---|
| Total C# Lines | ~7,612 |
| Total XAML Lines | ~1,620 |
| Service Classes | 21 |
| View Windows | 10 |
| Unit Tests | 40+ |
| Test Coverage | ~40% |
| Supported Languages | 5 (EN, PL, DE, ZH, FR) |
- WPF-UI - Modern Fluent Design UI components
- Newtonsoft.Json - JSON serialization
- xUnit - Testing framework
- Moq - Mocking framework (tests)
- .NET 10.0 - Target framework
- WPF - UI framework
- System.Diagnostics - Debug logging
- System.Security.Cryptography - AES-256 encryption
Decision: Use WPF for the UI layer Rationale:
- Mature and stable framework
- Rich UI capabilities for image editing
- Excellent theming support
- Native Windows integration
Decision: Custom debug logging using System.Diagnostics
Rationale:
- Zero overhead in RELEASE builds
- No external dependencies
- Simple debugging during development
- See LOGGING.md for details
Decision: Use singleton pattern for managers Rationale:
- Single source of truth for application state
- Simplified dependency management
- Thread-safe implementation
Decision: Abstract cloud uploads behind ICloudUploadProvider
Rationale:
- Easy to add new providers
- Testable through mocking
- Clear separation of concerns
- Location:
Tests/directory - Framework: xUnit
- Mocking: Moq
- Coverage: ~40% (target: 70%+)
- Service Tests - Business logic validation
- Helper Tests - Utility function validation
- Security Tests - Encryption/decryption validation
- See
Tests/README.mdfor detailed testing guidelines - Each service should have corresponding tests
- Focus on edge cases and error handling
- Mock external dependencies
- English (EN) - Default
- Polish (PL)
- German (DE)
- Chinese (ZH)
- French (FR)
- Resource files:
Properties/Resources.*.resx - Helper:
LocalizationHelper.cs - Runtime language switching supported
- Debug: Full logging, debug symbols, no optimizations
- Release: No logging, optimized, ready for distribution
- InnoSetup:
build/installer/Installer.iss - WiX:
build/installer/Installer.wxs - Build Script:
build/installer/build-installer.ps1
- GitHub Actions workflows in
.github/workflows/ - Automated testing on pull requests
- Automated release builds
- Algorithm: AES-256
- Implementation:
SecurityManager.cs - Use Cases: Sensitive settings storage
- IMPORTANT: All debug logging is removed in RELEASE builds
- No sensitive data logged in production
- Conditional compilation with
[Conditional("DEBUG")]
- Memory management
- Image processing optimization
- Resource cleanup
- Lazy loading of resources
- Asynchronous operations for I/O
- Proper disposal of WPF resources
See ROADMAP.md for planned features and improvements.
See ../CONTRIBUTING.md for contribution guidelines and coding standards.