Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RegistryPreview] Enhanced preview for value data #37689

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8d45aba
button and dummy dialog
htcfreek Feb 28, 2025
a8a75db
fill dialog with real data from datagrid
htcfreek Feb 28, 2025
56ab216
last changes
htcfreek Feb 28, 2025
9c48b9e
implement different layouts and improve dialoge
htcfreek Feb 28, 2025
e602563
code changes
htcfreek Feb 28, 2025
c8d1d5e
fix typos
htcfreek Feb 28, 2025
a9a9585
binary preview
htcfreek Feb 28, 2025
691b9ee
changes
htcfreek Feb 28, 2025
6bd2d55
changes
htcfreek Feb 28, 2025
b7ec010
fixes and code improvements
htcfreek Mar 1, 2025
15a89c5
add HexBox control
htcfreek Mar 1, 2025
dddb4c4
finally implement hex box
htcfreek Mar 1, 2025
7bb40dc
spell check + Notice.md
htcfreek Mar 1, 2025
8d14497
spell check
htcfreek Mar 1, 2025
6c95eae
translation and cleanup usings
htcfreek Mar 1, 2025
d60b83c
refactor code
htcfreek Mar 2, 2025
08f935f
changes for different view in binary preview
htcfreek Mar 2, 2025
f0fe236
finish implementation of extendet binary preview
htcfreek Mar 2, 2025
52e4d44
fix typos
htcfreek Mar 2, 2025
7db3c89
last changes
htcfreek Mar 2, 2025
a533c9d
cleanup
htcfreek Mar 3, 2025
12e4645
Color adjustments
htcfreek Mar 5, 2025
f4918f7
code styling
htcfreek Mar 5, 2025
ea9a239
use converter
htcfreek Mar 5, 2025
c06d4bc
Bump versions of HexBox.WinUI and Microsoft.Windows.CsWinRT
htcfreek Mar 6, 2025
62ca584
code fixes
htcfreek Mar 6, 2025
1fc2a88
last changes
htcfreek Mar 6, 2025
7393a33
High contrast fixes
htcfreek Mar 6, 2025
420e1eb
code improvements
htcfreek Mar 6, 2025
a918707
update Notice.md
htcfreek Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes and code improvements
  • Loading branch information
htcfreek committed Mar 1, 2025
commit b7ec010dd6fb252f09c91ded7073343c1c6815fe
Original file line number Diff line number Diff line change
@@ -15,6 +15,12 @@ public sealed partial class RegistryPreviewMainPage : Page
{
internal void ShowEnhancedDataPreview(string name, string type, string value)
{
// Format value based on type
if (type == "REG_NONE" || type == "REG_BINARY")
{
value = string.Join("\r", Regex.Matches(value, ".{0,24}").Select(x => x.Value.ToUpper(System.Globalization.CultureInfo.CurrentCulture).Trim().Replace(" ", "\t")));
}

// Create dialog
var panel = new StackPanel()
{
@@ -38,42 +44,30 @@ internal void ShowEnhancedDataPreview(string name, string type, string value)
{
Header = "Hexadecimal",
IsReadOnly = true,
FontSize = 14,
Text = value.Split(" ")[0],
};
var decimalBox = new TextBox()
{
Header = "Decimal",
IsReadOnly = true,
FontSize = 14,
Text = value.Split(" ")[1].TrimStart('(').TrimEnd(')'),
};
panel.Children.Add(hexBox);
panel.Children.Add(decimalBox);
break;
case "REG_NONE":
case "REG_BINARY":
value = string.Join("\n", Regex.Matches(value, ".{0,24}").Select(x => x.Value.ToUpper(System.Globalization.CultureInfo.CurrentCulture).Trim().Replace(" ", "\t")));
var binaryTextBox = new TextBox()
{
IsReadOnly = true,
Text = value,
AcceptsReturn = true,
MinHeight = 200,
MaxHeight = 200,
TextWrapping = TextWrapping.NoWrap,
};
ScrollViewer.SetVerticalScrollBarVisibility(binaryTextBox, ScrollBarVisibility.Auto);
ScrollViewer.SetHorizontalScrollBarVisibility(binaryTextBox, ScrollBarVisibility.Auto);
panel.Children.Add(binaryTextBox);
break;
case "REG_MULTI_SZ":
var multiLineBox = new TextBox()
{
IsReadOnly = true,
Text = "line 1 \r\n line 2 \n line 3",
AcceptsReturn = true,
MinHeight = 200,
MaxHeight = 200,
TextWrapping = TextWrapping.NoWrap,
MaxHeight = 200,
FontSize = 14,
Text = value,
};
ScrollViewer.SetVerticalScrollBarVisibility(multiLineBox, ScrollBarVisibility.Auto);
ScrollViewer.SetHorizontalScrollBarVisibility(multiLineBox, ScrollBarVisibility.Auto);
@@ -84,12 +78,14 @@ internal void ShowEnhancedDataPreview(string name, string type, string value)
{
Header = "Raw value",
IsReadOnly = true,
FontSize = 14,
Text = value,
};
var stringBoxExp = new TextBox()
{
Header = "Expanded value",
IsReadOnly = true,
FontSize = 14,
Text = Environment.ExpandEnvironmentVariables(value),
};
panel.Children.Add(stringBoxRaw);
@@ -99,6 +95,7 @@ internal void ShowEnhancedDataPreview(string name, string type, string value)
var stringBox = new TextBox()
{
IsReadOnly = true,
FontSize = 14,
Text = value,
};
panel.Children.Add(stringBox);