Skip to content

Commit

Permalink
Working in Insert byte anywhere sample
Browse files Browse the repository at this point in the history
  • Loading branch information
abbaye committed Feb 27, 2021
1 parent ed1a1a5 commit 9620600
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
// Author : Derek Tremblay (derektremblay666@gmail.com)
//
// INSERT BYTE ANYWHERE SAMPLE / DEVELOPMENT TEST
//
// THIS SAMPLE IS FOR DEVELOP THE POSSIBILITY TO INSERT BYTE ANYWHERE.
// IT'S WILL BE THE NEXT MAJOR UPDATE OF "WPF HEX EDITOR CONTROL"
//
//////////////////////////////////////////////

using Microsoft.Win32;
Expand All @@ -26,9 +30,20 @@ private void OpenButton_Click(object sender, RoutedEventArgs e) =>
HexEditor.FileName = o.FileName;
});

private void AddByteButton_Click(object sender, RoutedEventArgs e)
{
HexEditor.InsertByte(224, 15);
}
/// <summary>
/// Test of adding somes byte
///
/// IN DEVELOPMENT, NOT WORKING PROPRELY :)
/// </summary>
private void AddByteButton_Click(object sender, RoutedEventArgs e) =>
HexEditor.With(c =>
{
c.InsertByte(224, 15);
c.InsertByte(245, 16);
c.InsertByte(226, 17);

//Actually the visual not show the result. I'm working on this :)
c.RefreshView();
});
}
}
1 change: 1 addition & 0 deletions Sources/WPFHexaEditor/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<En attente>", Scope = "member", Target = "~M:WpfHexaEditor.Core.Bytes.ByteProvider.OpenFile")]
[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<En attente>", Scope = "member", Target = "~M:WpfHexaEditor.Core.Bytes.ByteProvider.AddByteModified(System.Nullable{System.Byte},System.Int64,System.Int64)")]
[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<En attente>", Scope = "member", Target = "~M:WpfHexaEditor.Core.Bytes.ByteProvider.AddByteAdded(System.Nullable{System.Byte},System.Int64,System.Int64)")]
[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<En attente>", Scope = "member", Target = "~M:WpfHexaEditor.Core.MethodExtention.ApplicationExtention.DoEvents(System.Windows.Application,System.Windows.Threading.DispatcherPriority)")]

0 comments on commit 9620600

Please sign in to comment.