Dialog
User interface dialogs for find and replace operations in the hex editor.
π Contents
This folder contains WPF dialog windows that provide interactive UI for search and replace functionality:
π Find Dialogs
- FindWindow.xaml.cs - Basic find dialog
- Search for byte sequences
- Find First, Next, Last, All operations
- Uses embedded HexEditor control for input
- Binds to parent HexEditor for search results
- FindReplaceWindow.xaml.cs - Combined find and replace dialog
- Search for byte patterns
- Replace found sequences with new bytes
- Replace First, Next, All operations
- Two embedded HexEditor controls (find/replace input)
π Replace Dialogs
- ReplaceByteWindow.xaml.cs - Simple byte replacement dialog
- Replace single byte value with another
- Text input for byte values
- Direct integration with HexEditorβs ReplaceByte method
- GiveByteWindow.xaml.cs - Byte input dialog
- Generic byte value input window
- Used for fill operations and byte insertion
- Validates hexadecimal input
π― Purpose
These dialogs provide a user-friendly interface for complex search and replace operations that would be difficult to perform directly in the hex view.
π Integration
All dialogs:
- Accept a
HexEditorparent reference in constructor - Call methods on the parent HexEditor control
- Use the
FindReplaceServiceindirectly through HexEditor API - Follow WPF MVVM-lite pattern (code-behind for simplicity)
π Related Components
- HexEditor.xaml.cs - Parent control that hosts these dialogs
- FindReplaceService - Backend service for search/replace logic
- ClipboardService - Used for data transfer operations
π Usage Example
// Opening the Find dialog from HexEditor
var findWindow = new FindWindow(this, existingSearchBytes);
findWindow.ShowDialog();
// Opening Find/Replace dialog
var findReplaceWindow = new FindReplaceWindow(this);
findReplaceWindow.ShowDialog();
// Simple byte replacement
var replaceWindow = new ReplaceByteWindow(this);
replaceWindow.ShowDialog();
β¨ Features
- Embedded HexEditors: Use HexEditor control for byte pattern input
- Live Search: Results appear immediately in parent HexEditor
- Clear/Reset: Reset search patterns quickly
- Validation: Input validation for hexadecimal values
- Keyboard Support: Standard dialog keyboard shortcuts
β¨ User-friendly dialogs for hex editor find and replace operations