├── _config.yml ├── CONTRIBUTING.md ├── Sources ├── WPFHexaEditor │ ├── Properties │ │ ├── Resources.fr-CA.Designer.cs │ │ ├── Resources.pl-PL.Designer.cs │ │ ├── Resources.pt-BR.Designer.cs │ │ ├── Resources.ru-RU.Designer.cs │ │ ├── Resources.zh-CN1.Designer.cs │ │ ├── Settings.settings │ │ ├── AssemblyInfo.cs │ │ └── Settings.Designer.cs │ ├── Resources │ │ ├── EBCDIC.tbl │ │ ├── Icon │ │ │ ├── 0x-Icon.ico │ │ │ ├── Copy-Icon.ico │ │ │ ├── Find-Icon.ico │ │ │ ├── Logo-Icon.ico │ │ │ ├── Logo-Icon.png │ │ │ ├── Undo-Icon.ico │ │ │ ├── Delete-Icon.ico │ │ │ ├── Paste-Icon.ico │ │ │ ├── Sans titre.png │ │ │ ├── Settings-Icon.ico │ │ │ ├── Add-Bookmark-Icon.ico │ │ │ ├── Clear-Bookmark-Icon.ico │ │ │ └── Remove-Bookmark-Icon.ico │ │ ├── EBCDIC-NoSpecialChar.tbl │ │ └── Dictionary │ │ │ ├── BrushesDictionary.xaml │ │ │ ├── MiscelanousDictionary.xaml │ │ │ └── ToolTipDictionary.xaml │ ├── Core │ │ ├── CharacterTable │ │ │ ├── DTE.cs │ │ │ ├── TBLStream.cs │ │ │ └── Enum.cs │ │ ├── MethodExtention │ │ │ ├── DoubleExtension.cs │ │ │ ├── WithMethodExtention.cs │ │ │ ├── ApplicationExtention.cs │ │ │ ├── StringExtension.cs │ │ │ ├── ByteArrayExtention.cs │ │ │ └── TrackExtention.cs │ │ ├── Interfaces │ │ │ ├── IByteModified.cs │ │ │ ├── IByte.cs │ │ │ └── IByteControl.cs │ │ ├── RandomBrushes.cs │ │ ├── ConstantReadOnly.cs │ │ ├── EventArguments │ │ │ ├── ByteDifferenceEventArgs.cs │ │ │ ├── CustomBackgroundBlockEventArgs.cs │ │ │ └── ByteEventArgs.cs │ │ ├── Converters │ │ │ ├── PathToFilenameConverter.cs │ │ │ ├── VisibilityToBooleanConverter.cs │ │ │ ├── HexToLongStringConverter.cs │ │ │ ├── BoolInverterConverter.cs │ │ │ ├── LongToHexStringConverter.cs │ │ │ ├── BooleanToVisibilityConverter.cs │ │ │ └── ByteToHexStringConverter.cs │ │ ├── Native │ │ │ └── NativeMethods.cs │ │ ├── BookMark.cs │ │ ├── Bytes │ │ │ ├── ByteDifference.cs │ │ │ └── ByteModified.cs │ │ └── CustomBackgroundBlock.cs │ ├── Dialog │ │ ├── ReplaceByteWindow.xaml.cs │ │ ├── GiveByteWindow.xaml.cs │ │ ├── GiveByteWindow.xaml │ │ ├── FindWindow.xaml.cs │ │ ├── ReplaceByteWindow.xaml │ │ ├── FindReplaceWindow.xaml.cs │ │ └── FindWindow.xaml │ ├── GlobalSuppressions.cs │ ├── HexBox.xaml │ ├── FastTextLine.cs │ ├── WpfHexEditorCore.csproj │ └── HexBox.xaml.cs ├── Samples │ ├── WpfHexEditor.Sample.VB │ │ ├── Resources │ │ │ └── Icon │ │ │ │ ├── 0x-Icon.ico │ │ │ │ ├── Close-Icon.ico │ │ │ │ ├── Logo-Icon.ico │ │ │ │ ├── Save-Icon.ico │ │ │ │ └── Open-File-Icon.ico │ │ ├── Application.xaml.vb │ │ ├── My Project │ │ │ ├── Settings.settings │ │ │ ├── AssemblyInfo.vb │ │ │ ├── Resources.Designer.vb │ │ │ ├── Settings.Designer.vb │ │ │ └── Resources.resx │ │ ├── Application.xaml │ │ ├── GlobalSuppressions.vb │ │ └── App.config │ ├── WPFHexEditor.Sample.CSharp │ │ ├── Resources │ │ │ └── Icon │ │ │ │ ├── 0x-Icon.ico │ │ │ │ ├── Close-Icon.ico │ │ │ │ ├── Logo-Icon.ico │ │ │ │ ├── Save-Icon.ico │ │ │ │ └── Open-File-Icon.ico │ │ ├── Properties │ │ │ ├── Settings.settings │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Settings.Designer.cs │ │ │ ├── Resources.Designer.cs │ │ │ └── Resources.resx │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Configs │ │ │ ├── NET45 │ │ │ │ └── App.config │ │ │ └── NET47 │ │ │ │ └── App.config │ │ └── WpfHexEditor.Sample.csproj │ ├── WpfHexEditor.Sample.Winform │ │ ├── App.config │ │ ├── Properties │ │ │ ├── Settings.settings │ │ │ ├── Settings.Designer.cs │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ └── Resources.resx │ │ ├── Program.cs │ │ ├── MainForm.cs │ │ └── WpfHexEditor.Sample.Winform.csproj │ ├── WpfHexEditor.Sample.AvalonDock │ │ ├── App.config │ │ ├── Properties │ │ │ ├── Settings.settings │ │ │ ├── Settings.Designer.cs │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ └── Resources.resx │ │ ├── packages.config │ │ ├── App.xaml.cs │ │ ├── App.xaml │ │ ├── MainWindow.xaml │ │ └── MainWindow.xaml.cs │ ├── WpfHexEditor.Sample.BarChart │ │ ├── App.xaml.cs │ │ ├── App.xaml │ │ ├── WpfHexEditor.Sample.BarChart.csproj │ │ ├── AssemblyInfo.cs │ │ ├── MainWindow.xaml.cs │ │ └── MainWindow.xaml │ ├── WpfHexEditor.Sample.InsertByteAnywhere │ │ ├── App.xaml.cs │ │ ├── App.xaml │ │ ├── AssemblyInfo.cs │ │ ├── WpfHexEditor.Sample.InsertByteAnywhere.csproj │ │ ├── MainWindow.xaml.cs │ │ └── MainWindow.xaml │ └── WpfHexEditor.Sample.BinaryFilesDifference │ │ ├── App.xaml.cs │ │ ├── WpfHexEditor.Sample.BinaryFilesDifference.csproj │ │ ├── AssemblyInfo.cs │ │ ├── App.xaml │ │ ├── ByteDifferenceListItem.xaml.cs │ │ ├── BlockListItem.xaml.cs │ │ ├── BlockListItem.xaml │ │ └── ByteDifferenceListItem.xaml ├── .editorconfig └── MigrationBackup │ └── 74a5b0ae │ └── Samples │ └── WpfHexEditor.Sample.CSharp │ └── packages.config ├── Images ├── Logo.png ├── Logo.docx ├── NewLogo.png ├── Logo-Icon.ico ├── Logo-Nuget.png ├── Sample9-TBL.png ├── TBLExplain.docx ├── TBLExplain.png ├── Sample11-NOTBL.png ├── Sample12-BarChart.png ├── Sample11-AvalonDock.png ├── Sample13-FindDialog.png ├── Sample12-FIXEDTBL-BYTESHIFT.png ├── Sample14-FindReplaceDialog.png ├── Sample15-FindReplaceDialog.png └── Sample15-CustomBackgroundBlock.png ├── ISSUE_TEMPLATE.md ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ └── bug_report.md ├── SECURITY.md ├── readme-nuget.md ├── CODE_OF_CONDUCT.md ├── README.md └── .gitignore /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-architect -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | You are welcome for help in the project :) 2 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Properties/Resources.fr-CA.Designer.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Properties/Resources.pl-PL.Designer.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Properties/Resources.pt-BR.Designer.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Properties/Resources.ru-RU.Designer.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Properties/Resources.zh-CN1.Designer.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Images/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Logo.png -------------------------------------------------------------------------------- /Images/Logo.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Logo.docx -------------------------------------------------------------------------------- /Images/NewLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/NewLogo.png -------------------------------------------------------------------------------- /Images/Logo-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Logo-Icon.ico -------------------------------------------------------------------------------- /Images/Logo-Nuget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Logo-Nuget.png -------------------------------------------------------------------------------- /Images/Sample9-TBL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Sample9-TBL.png -------------------------------------------------------------------------------- /Images/TBLExplain.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/TBLExplain.docx -------------------------------------------------------------------------------- /Images/TBLExplain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/TBLExplain.png -------------------------------------------------------------------------------- /Images/Sample11-NOTBL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Sample11-NOTBL.png -------------------------------------------------------------------------------- /Images/Sample12-BarChart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Sample12-BarChart.png -------------------------------------------------------------------------------- /Images/Sample11-AvalonDock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Sample11-AvalonDock.png -------------------------------------------------------------------------------- /Images/Sample13-FindDialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Sample13-FindDialog.png -------------------------------------------------------------------------------- /Images/Sample12-FIXEDTBL-BYTESHIFT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Sample12-FIXEDTBL-BYTESHIFT.png -------------------------------------------------------------------------------- /Images/Sample14-FindReplaceDialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Sample14-FindReplaceDialog.png -------------------------------------------------------------------------------- /Images/Sample15-FindReplaceDialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Sample15-FindReplaceDialog.png -------------------------------------------------------------------------------- /Images/Sample15-CustomBackgroundBlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Images/Sample15-CustomBackgroundBlock.png -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/EBCDIC.tbl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/EBCDIC.tbl -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/CharacterTable/DTE.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Core/CharacterTable/DTE.cs -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/0x-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/0x-Icon.ico -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Copy-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Copy-Icon.ico -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Find-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Find-Icon.ico -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Logo-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Logo-Icon.ico -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Logo-Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Logo-Icon.png -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Undo-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Undo-Icon.ico -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Delete-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Delete-Icon.ico -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Paste-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Paste-Icon.ico -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Sans titre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Sans titre.png -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Expected Behavior 2 | 3 | 4 | ## Actual Behavior 5 | 6 | 7 | ## Steps to Reproduce the Problem 8 | 9 | 1. 10 | 1. 11 | 1. 12 | 13 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/CharacterTable/TBLStream.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Core/CharacterTable/TBLStream.cs -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Settings-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Settings-Icon.ico -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/EBCDIC-NoSpecialChar.tbl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/EBCDIC-NoSpecialChar.tbl -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Add-Bookmark-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Add-Bookmark-Icon.ico -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Clear-Bookmark-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Clear-Bookmark-Icon.ico -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Icon/Remove-Bookmark-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/WPFHexaEditor/Resources/Icon/Remove-Bookmark-Icon.ico -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.VB/Resources/Icon/0x-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/Samples/WpfHexEditor.Sample.VB/Resources/Icon/0x-Icon.ico -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.VB/Resources/Icon/Close-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/Samples/WpfHexEditor.Sample.VB/Resources/Icon/Close-Icon.ico -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.VB/Resources/Icon/Logo-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/Samples/WpfHexEditor.Sample.VB/Resources/Icon/Logo-Icon.ico -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.VB/Resources/Icon/Save-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/Samples/WpfHexEditor.Sample.VB/Resources/Icon/Save-Icon.ico -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/Resources/Icon/0x-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/Samples/WPFHexEditor.Sample.CSharp/Resources/Icon/0x-Icon.ico -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/Resources/Icon/Close-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/Samples/WPFHexEditor.Sample.CSharp/Resources/Icon/Close-Icon.ico -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/Resources/Icon/Logo-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/Samples/WPFHexEditor.Sample.CSharp/Resources/Icon/Logo-Icon.ico -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/Resources/Icon/Save-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/Samples/WPFHexEditor.Sample.CSharp/Resources/Icon/Save-Icon.ico -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.VB/Resources/Icon/Open-File-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/Samples/WpfHexEditor.Sample.VB/Resources/Icon/Open-File-Icon.ico -------------------------------------------------------------------------------- /Sources/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # CS8509: L'expression switch ne prend pas en charge toutes les valeurs possibles de son type d'entrée (elle n'est pas exhaustive). 4 | dotnet_diagnostic.CS8509.severity = none 5 | -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/Resources/Icon/Open-File-Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abbaye/WpfHexEditorControl/HEAD/Sources/Samples/WPFHexEditor.Sample.CSharp/Resources/Icon/Open-File-Icon.ico -------------------------------------------------------------------------------- /Sources/MigrationBackup/74a5b0ae/Samples/WpfHexEditor.Sample.CSharp/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.VB/Application.xaml.vb: -------------------------------------------------------------------------------- 1 | Class Application 2 | 3 | ' Les événements de niveau application, par exemple Startup, Exit et DispatcherUnhandledException 4 | ' peuvent être gérés dans ce fichier. 5 | 6 | End Class 7 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.Winform/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.AvalonDock/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.AvalonDock/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.AvalonDock/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BarChart/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace WpfHexEditor.Sample.BarChart 4 | { 5 | /// 6 | /// Interaction logic for App.xaml 7 | /// 8 | public partial class App : Application 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.AvalonDock/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace WpfHexEditor.Sample.AvalonDock 4 | { 5 | /// 6 | /// Logique d'interaction pour App.xaml 7 | /// 8 | public partial class App : Application 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.InsertByteAnywhere/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace WpfHexEditor.Sample.InsertByteAnywhere 4 | { 5 | /// 6 | /// Interaction logic for App.xaml 7 | /// 8 | public partial class App : Application 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BinaryFilesDifference/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace WpfHexEditor.Sample.BinaryFilesDifference 4 | { 5 | /// 6 | /// Interaction logic for App.xaml 7 | /// 8 | public partial class App : Application 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.Winform/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BarChart/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.AvalonDock/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BarChart/WpfHexEditor.Sample.BarChart.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WinExe 5 | net70-windows 6 | true 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/MethodExtention/DoubleExtension.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2016-2020 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System; 7 | 8 | namespace WpfHexaEditor.Core.MethodExtention 9 | { 10 | public static class DoubleExtension 11 | { 12 | public static double Round(this double s, int digit = 2) => Math.Round(s, digit); 13 | } 14 | } -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.VB/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Wpf HexaEditor Control 7 | 8 | 9 | -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Wpf HexEditor control c# sample 7 | 8 | 9 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.InsertByteAnywhere/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.Winform/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace WpfHexEditor.Winform.Sample 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// Point d'entrée principal de l'application. 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.EnableVisualStyles(); 15 | Application.SetCompatibleTextRenderingDefault(false); 16 | Application.Run(new MainForm()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.VB/Application.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/MethodExtention/WithMethodExtention.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2020 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System; 7 | 8 | namespace WpfHexaEditor.Core.MethodExtention 9 | { 10 | public static class WithMethodExtention 11 | { 12 | /// 13 | /// C# like of the very good VB With statement 14 | /// 15 | public static void With(this T obj, Action act) => act(obj); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BinaryFilesDifference/WpfHexEditor.Sample.BinaryFilesDifference.csproj: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | WinExe 12 | net70-windows 13 | true 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Dialog/ReplaceByteWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2019 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System.Windows; 7 | 8 | namespace WpfHexaEditor.Dialog 9 | { 10 | /// 11 | /// This Window is used to give tow hex value for deal with. 12 | /// 13 | internal partial class ReplaceByteWindow 14 | { 15 | public ReplaceByteWindow() => InitializeComponent(); 16 | 17 | private void OKButton_Click(object sender, RoutedEventArgs e) => DialogResult = true; 18 | } 19 | } -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Dialog/GiveByteWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2018-2019 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System.Windows; 7 | 8 | namespace WpfHexaEditor.Dialog 9 | { 10 | /// 11 | /// This Window is used to give a hex value for fill the selection with. 12 | /// 13 | internal partial class GiveByteWindow 14 | { 15 | public GiveByteWindow() => InitializeComponent(); 16 | 17 | private void OKButton_Click(object sender, RoutedEventArgs e) => DialogResult = true; 18 | } 19 | } -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BarChart/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.InsertByteAnywhere/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: abbaye 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BinaryFilesDifference/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.InsertByteAnywhere/WpfHexEditor.Sample.InsertByteAnywhere.csproj: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | WinExe 14 | net70-windows 15 | true 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/Interfaces/IByteModified.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2017-2019 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using WpfHexaEditor.Core.Bytes; 7 | 8 | namespace WpfHexaEditor.Core.Interfaces 9 | { 10 | public interface IByteModified 11 | { 12 | //Properties 13 | ByteAction Action { get; set; } 14 | 15 | byte? Byte { get; set; } 16 | long BytePositionInStream { get; set; } 17 | bool IsValid { get; } 18 | long Length { get; set; } 19 | 20 | //Methods 21 | void Clear(); 22 | 23 | ByteModified GetCopy(); 24 | string ToString(); 25 | } 26 | } -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Dictionary/BrushesDictionary.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/App.xaml.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2016-2018 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System.Runtime.InteropServices; 7 | using System.Windows.Threading; 8 | 9 | namespace WPFHexaEditorExample 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App 15 | { 16 | private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) 17 | { 18 | if (e.Exception is COMException comException && comException.ErrorCode == -2147221040) 19 | e.Handled = true; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.VB/GlobalSuppressions.vb: -------------------------------------------------------------------------------- 1 | ' This file is used by Code Analysis to maintain SuppressMessage 2 | ' attributes that are applied to this project. 3 | ' Project-level suppressions either have no target or are given 4 | ' a specific target and scoped to a namespace, type, member, etc. 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/CharacterTable/Enum.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2003-2019 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | namespace WpfHexaEditor.Core.CharacterTable 7 | { 8 | /// 9 | /// Type of DTE used in TBL 10 | /// 11 | public enum DteType 12 | { 13 | Invalid = -1, 14 | Ascii = 0, 15 | Japonais, 16 | DualTitleEncoding, 17 | MultipleTitleEncoding, 18 | EndLine, 19 | EndBlock 20 | } 21 | 22 | public enum DefaultCharacterTableType 23 | { 24 | Ascii, 25 | EbcdicWithSpecialChar, 26 | EbcdicNoSpecialChar 27 | //MACINTOSH 28 | //DOS/IBM-ASCII 29 | } 30 | } -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Resources/Dictionary/MiscelanousDictionary.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/RandomBrushes.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2021 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System; 7 | using System.Reflection; 8 | using System.Windows.Media; 9 | 10 | namespace WpfHexaEditor.Core 11 | { 12 | public static class RandomBrushes 13 | { 14 | /// 15 | /// Pick a random bruch 16 | /// 17 | public static SolidColorBrush PickBrush() 18 | { 19 | var properties = typeof(Brushes).GetProperties(); 20 | 21 | return (SolidColorBrush)properties 22 | [ 23 | new Random().Next(properties.Length) 24 | ].GetValue(null, null); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BarChart/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Win32; 2 | using System.Windows; 3 | using WpfHexaEditor.Core.MethodExtention; 4 | 5 | namespace WpfHexEditor.Sample.BarChart 6 | { 7 | /// 8 | /// Interaction logic for MainWindow.xaml 9 | /// 10 | public partial class MainWindow : Window 11 | { 12 | public MainWindow() => InitializeComponent(); 13 | 14 | private void OpenButton_Click(object sender, RoutedEventArgs e) => 15 | new OpenFileDialog().With(o => 16 | { 17 | o.CheckFileExists = true; 18 | o.CheckPathExists = true; 19 | o.Multiselect = false; 20 | 21 | if (o.ShowDialog() ?? false) 22 | HexEditor.FileName = o.FileName; 23 | }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2016-2020 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System.Windows; 7 | 8 | [assembly: ThemeInfo( 9 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 10 | //(used if a resource is not found in the page, 11 | // or application resource dictionaries) 12 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 13 | //(used if a resource is not found in the page, 14 | // app, or any theme specific resource dictionaries) 15 | )] -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/ConstantReadOnly.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2016-2021 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | namespace WpfHexaEditor.Core 7 | { 8 | public static class ConstantReadOnly 9 | { 10 | public static readonly string HexLineInfoStringFormat = "x8"; 11 | public static readonly string Hex2StringFormat = "x2"; 12 | public static readonly string HexStringFormat = "x"; 13 | public static readonly string DefaultHex8String = "0x00000000"; 14 | public static readonly string DefaultHex2String = "0x00"; 15 | 16 | public const long Largefilelength = 52_428_800L; //50 MB 17 | public const int Copyblocksize = 131_072; //128 KB 18 | public const int Findblocksize = 1_048_576; //1 MB 19 | } 20 | } -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/EventArguments/ByteDifferenceEventArgs.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2021 3 | // Modified by : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System; 7 | using WpfHexaEditor.Core.Bytes; 8 | 9 | namespace WpfHexaEditor.Core.EventArguments 10 | { 11 | /// 12 | /// Custom event arguments used for pass somes informations to delegate 13 | /// 14 | public class ByteDifferenceEventArgs : EventArgs 15 | { 16 | public ByteDifferenceEventArgs() { } 17 | 18 | public ByteDifferenceEventArgs(ByteDifference byteDifference) => ByteDiff = byteDifference; 19 | 20 | /// 21 | /// ByteDifference to pass in arguments 22 | /// /// 23 | public ByteDifference ByteDiff; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/EventArguments/CustomBackgroundBlockEventArgs.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2021 3 | // Modified by : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System; 7 | 8 | namespace WpfHexaEditor.Core.EventArguments 9 | { 10 | /// 11 | /// Custom event arguments used for pass somes informations to delegate 12 | /// 13 | public class CustomBackgroundBlockEventArgs : EventArgs 14 | { 15 | public CustomBackgroundBlockEventArgs() { } 16 | 17 | public CustomBackgroundBlockEventArgs(CustomBackgroundBlock customBlock) => CustomBlock = customBlock; 18 | 19 | /// 20 | /// CustomBackgroundBlock to pass in arguments 21 | /// /// 22 | public CustomBackgroundBlock CustomBlock; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BinaryFilesDifference/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/Converters/PathToFilenameConverter.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2019 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System; 7 | using System.Globalization; 8 | using System.IO; 9 | using System.Windows.Data; 10 | 11 | namespace WpfHexaEditor.Core.Converters 12 | { 13 | /// 14 | /// Used to get the filename with extention. 15 | /// 16 | public sealed class PathToFilenameConverter : IValueConverter 17 | { 18 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => 19 | (value is string filename) 20 | ? Path.GetFileName(filename) 21 | : string.Empty; 22 | 23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => value; 24 | } 25 | } -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/Configs/NET45/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | WPF HexEditor control 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/Configs/NET47/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | WPF HexEditor control 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/Converters/VisibilityToBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2019 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System; 7 | using System.Globalization; 8 | using System.Windows; 9 | using System.Windows.Data; 10 | 11 | namespace WpfHexaEditor.Core.Converters 12 | { 13 | /// 14 | /// This VisibilityToBoolean converter convert Visibility <-> Boolean 15 | /// 16 | public sealed class VisibilityToBooleanConverter : IValueConverter 17 | { 18 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => 19 | (Visibility)value == Visibility.Visible; 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => 22 | (bool)value == true 23 | ? Visibility.Visible 24 | : Visibility.Collapsed; 25 | } 26 | } -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.VB/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Wpf HexaEditor Control 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/Converters/HexToLongStringConverter.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2016-2018 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System; 7 | using System.Globalization; 8 | using System.Windows.Data; 9 | using WpfHexaEditor.Core.Bytes; 10 | 11 | namespace WpfHexaEditor.Core.Converters 12 | { 13 | /// 14 | /// Used to convert hexadecimal to Long value. 15 | /// 16 | public sealed class HexToLongStringConverter : IValueConverter 17 | { 18 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 19 | { 20 | if (value is null) return string.Empty; 21 | 22 | var (success, val) = ByteConverters.IsHexValue(value.ToString()); 23 | 24 | return success 25 | ? (object)val 26 | : string.Empty; 27 | } 28 | 29 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => value; 30 | } 31 | } -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/Converters/BoolInverterConverter.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2016-2018 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System; 7 | using System.Globalization; 8 | using System.Windows.Data; 9 | 10 | namespace WpfHexaEditor.Core.Converters 11 | { 12 | /// 13 | /// Invert bool 14 | /// 15 | public sealed class BoolInverterConverter : IValueConverter 16 | { 17 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 18 | { 19 | bool? val = null; 20 | 21 | try 22 | { 23 | val = value is not null && (bool)value; 24 | } 25 | catch 26 | { 27 | // ignored 28 | } 29 | 30 | return !val; 31 | } 32 | 33 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => 34 | throw new NotImplementedException(); 35 | } 36 | } -------------------------------------------------------------------------------- /Sources/Samples/WPFHexEditor.Sample.CSharp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2016-2020 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System.Runtime.InteropServices; 7 | using System.Windows; 8 | 9 | // Setting ComVisible to false makes the types in this assembly not visible 10 | // to COM components. If you need to access a type in this assembly from 11 | // COM, set the ComVisible attribute to true on that type. 12 | [assembly: ComVisible(false)] 13 | 14 | [assembly: ThemeInfo( 15 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 16 | //(used if a resource is not found in the page, 17 | // or application resource dictionaries) 18 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 19 | //(used if a resource is not found in the page, 20 | // app, or any theme specific resource dictionaries) 21 | )] 22 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace WpfHexaEditor.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/Native/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using System.Text; 3 | 4 | namespace WpfHexaEditor.Core.Native 5 | { 6 | /// 7 | /// Used for key detection 8 | /// 9 | internal static class NativeMethods 10 | { 11 | internal enum MapType : uint 12 | { 13 | MapvkVkToVsc = 0x0, 14 | MapvkVscToVk = 0x1, 15 | MapvkVkToChar = 0x2, 16 | MapvkVscToVkEx = 0x3, 17 | } 18 | 19 | [DllImport("user32.dll")] 20 | internal static extern int ToUnicode(uint wVirtKey, 21 | uint wScanCode, 22 | byte[] lpKeyState, 23 | [Out, MarshalAs(UnmanagedType.LPWStr, SizeParamIndex = 4)] StringBuilder pwszBuff, 24 | int cchBuff, 25 | uint wFlags); 26 | 27 | [DllImport("user32.dll")] 28 | internal static extern bool GetKeyboardState(byte[] lpKeyState); 29 | 30 | [DllImport("user32.dll")] 31 | internal static extern uint MapVirtualKey(uint uCode, MapType uMapType); 32 | } 33 | } -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.Winform/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace WpfHexEditor.Winform.Sample.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.AvalonDock/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Ce code a été généré par un outil. 4 | // Version du runtime :4.0.30319.42000 5 | // 6 | // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si 7 | // le code est régénéré. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace WpfHexEditor.Sample.AvalonDock.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BinaryFilesDifference/ByteDifferenceListItem.xaml.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2021 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | // 5 | // 6 | // NOT A TRUE PROJECT! IT'S JUST A SAMPLE FOR TESTING THE HEXEDITOR IN VARIOUS SITUATIONS... 7 | ////////////////////////////////////////////// 8 | 9 | using System.Windows.Controls; 10 | using WpfHexaEditor.Core.Bytes; 11 | 12 | namespace WpfHexEditor.Sample.BinaryFilesDifference 13 | { 14 | public partial class ByteDifferenceListItem : UserControl 15 | { 16 | private ByteDifference _byteDiff; 17 | 18 | public ByteDifference ByteDiff 19 | { 20 | get => _byteDiff; 21 | set 22 | { 23 | _byteDiff = value; 24 | DataContext = value; 25 | } 26 | } 27 | 28 | public ByteDifferenceListItem() => InitializeComponent(); 29 | 30 | public ByteDifferenceListItem(ByteDifference byteDiff) 31 | { 32 | InitializeComponent(); 33 | 34 | ByteDiff = byteDiff; 35 | } 36 | 37 | private void PatchSecondFile_Click(object sender, System.Windows.RoutedEventArgs e) 38 | { 39 | 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/EventArguments/ByteEventArgs.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2020-2021 3 | // Author : ehsan69h 4 | // Modified by : Derek Tremblay (derektremblay666@gmail.com) 5 | ////////////////////////////////////////////// 6 | 7 | using System; 8 | 9 | namespace WpfHexaEditor.Core.EventArguments 10 | { 11 | /// 12 | /// Custom event arguments used for pass somes informations to delegate 13 | /// 14 | public class ByteEventArgs : EventArgs 15 | { 16 | #region Constructors 17 | public ByteEventArgs() { } 18 | 19 | public ByteEventArgs(long position) => BytePositionInStream = position; 20 | 21 | public ByteEventArgs(long position, int index) 22 | { 23 | BytePositionInStream = position; 24 | Index = index; 25 | } 26 | #endregion 27 | 28 | #region Properties 29 | /// 30 | /// Pass the position of byte 31 | /// 32 | public long BytePositionInStream { get; set; } 33 | 34 | /// 35 | /// Pass index if byte using with BytePositionInStream in somes situations 36 | /// 37 | public int Index { get; set; } 38 | #endregion 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/BookMark.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2016-2020 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using WpfHexaEditor.Core.Bytes; 7 | 8 | namespace WpfHexaEditor.Core 9 | { 10 | /// 11 | /// BookMark used in hexeditor 12 | /// 13 | public sealed class BookMark 14 | { 15 | public ScrollMarker Marker { get; set; } = ScrollMarker.Nothing; 16 | public long BytePositionInStream { get; set; } 17 | public string Description { get; set; } = string.Empty; 18 | 19 | public BookMark() { } 20 | 21 | public BookMark(string description, long position) 22 | { 23 | BytePositionInStream = position; 24 | Description = description; 25 | } 26 | 27 | public BookMark(string description, long position, ScrollMarker marker) 28 | { 29 | BytePositionInStream = position; 30 | Description = description; 31 | Marker = marker; 32 | } 33 | 34 | /// 35 | /// String representation 36 | /// 37 | public override string ToString() => $"({ByteConverters.LongToHex(BytePositionInStream)}h){Description}"; 38 | } 39 | } -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | // This file is used by Code Analysis to maintain SuppressMessage 2 | // attributes that are applied to this project. 3 | // Project-level suppressions either have no target or are given 4 | // a specific target and scoped to a namespace, type, member, etc. 5 | 6 | using System.Diagnostics.CodeAnalysis; 7 | 8 | [assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "", Scope = "member", Target = "~M:WpfHexaEditor.Core.Bytes.ByteProvider.OpenFile")] 9 | [assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "", Scope = "member", Target = "~M:WpfHexaEditor.Core.Bytes.ByteProvider.AddByteModified(System.Nullable{System.Byte},System.Int64,System.Int64)")] 10 | [assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "", Scope = "member", Target = "~M:WpfHexaEditor.Core.Bytes.ByteProvider.AddByteAdded(System.Nullable{System.Byte},System.Int64,System.Int64)")] 11 | [assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "", Scope = "member", Target = "~M:WpfHexaEditor.Core.MethodExtention.ApplicationExtention.DoEvents(System.Windows.Application,System.Windows.Threading.DispatcherPriority)")] 12 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/Interfaces/IByte.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2020-2021 3 | // Base author : ehsan69h 4 | // Modified by : Abbaye 5 | ////////////////////////////////////////////// 6 | 7 | using System.Collections.Generic; 8 | using System.Windows.Input; 9 | 10 | namespace WpfHexaEditor.Core.Interfaces 11 | { 12 | public delegate void D_ByteListProp(List newValue, int index); 13 | 14 | interface IByte 15 | { 16 | public List Byte { get; set; } 17 | public List OriginByte { get; set; } 18 | 19 | public string GetText(DataVisualType type, DataVisualState state, ByteOrderType order); 20 | 21 | public D_ByteListProp del_ByteOnChange { get; set; } 22 | 23 | public bool IsEqual(byte[] bytes); 24 | 25 | public (ByteAction, bool) Update(DataVisualType type, Key _key, ByteOrderType byteOrder, ref KeyDownLabel _keyDownLabel); 26 | 27 | public void ChangeByteValue(byte newValue, long position); 28 | 29 | /// 30 | /// GetText() need to be called before 31 | /// 32 | public string Text { get; } 33 | 34 | /// 35 | /// GetText() need to be called before 36 | /// 37 | public long LongText { get; } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.Winform/MainForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Windows.Forms; 4 | using System.Windows.Media; 5 | using WpfHexaEditor.Core; 6 | 7 | namespace WpfHexEditor.Winform.Sample 8 | { 9 | public partial class MainForm : Form 10 | { 11 | public MainForm() 12 | { 13 | InitializeComponent(); 14 | 15 | hexEditor.PreloadByteInEditorMode = PreloadByteInEditor.MaxScreenVisibleLineAtDataLoad; 16 | hexEditor.ForegroundSecondColor = Brushes.Blue; 17 | } 18 | 19 | private void OpenFileButton_Click(object sender, EventArgs e) 20 | { 21 | var fileDialog = new OpenFileDialog(); 22 | 23 | if (fileDialog.ShowDialog() == DialogResult.OK && File.Exists(fileDialog.FileName)) 24 | hexEditor.FileName = fileDialog.FileName; 25 | } 26 | 27 | private void OpenTBLButton_Click(object sender, EventArgs e) 28 | { 29 | var fileDialog = new OpenFileDialog(); 30 | 31 | if (fileDialog.ShowDialog() == DialogResult.OK && File.Exists(fileDialog.FileName)) 32 | { 33 | hexEditor.LoadTblFile(fileDialog.FileName); 34 | hexEditor.TypeOfCharacterTable = CharacterTableType.TblFile; 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Sources/WPFHexaEditor/Core/Converters/LongToHexStringConverter.cs: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////// 2 | // Apache 2.0 - 2016-2018 3 | // Author : Derek Tremblay (derektremblay666@gmail.com) 4 | ////////////////////////////////////////////// 5 | 6 | using System; 7 | using System.Globalization; 8 | using System.Windows.Data; 9 | 10 | namespace WpfHexaEditor.Core.Converters 11 | { 12 | /// 13 | /// Used to convert long value to hexadecimal string like this 0xFFFFFFFF. 14 | /// 15 | public sealed class LongToHexStringConverter : IValueConverter 16 | { 17 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => 18 | value is not null 19 | ? (long.TryParse(value.ToString(), out var longValue) 20 | ? (longValue > -1 21 | ? "0x" + longValue 22 | .ToString(ConstantReadOnly.HexLineInfoStringFormat, CultureInfo.InvariantCulture) 23 | .ToUpperInvariant() 24 | : ConstantReadOnly.DefaultHex8String) 25 | : ConstantReadOnly.DefaultHex8String) 26 | : ConstantReadOnly.DefaultHex8String; 27 | 28 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => value; 29 | } 30 | } -------------------------------------------------------------------------------- /Sources/Samples/WpfHexEditor.Sample.BarChart/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 41 | 42 | 48 | 50 | 51 |