Wizard improvements: version info, 64-bit label, paste fix
- Version cards show technical info (Version 16.0 · LTSC · OS support) - 64-bit option labeled as "(ajánlott)" - Full product key paste distributes across all 5 input fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -34,9 +34,33 @@ namespace InstaSoftOfficeTool.Pages
|
||||
if (_suppressAutoTab) return;
|
||||
|
||||
var tb = (TextBox)sender;
|
||||
var raw = tb.Text;
|
||||
|
||||
var cleaned = Regex.Replace(tb.Text, "[^A-Za-z0-9]", "");
|
||||
if (cleaned != tb.Text)
|
||||
// Detect full key paste (contains dash or longer than 5 chars with alphanumerics)
|
||||
var allAlphaNum = Regex.Replace(raw, "[^A-Za-z0-9]", "");
|
||||
if (allAlphaNum.Length > 5 && tb == _keyBoxes[0])
|
||||
{
|
||||
// Full key pasted — distribute across all boxes
|
||||
_suppressAutoTab = true;
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int start = i * 5;
|
||||
if (start < allAlphaNum.Length)
|
||||
{
|
||||
int len = System.Math.Min(5, allAlphaNum.Length - start);
|
||||
_keyBoxes[i].Text = allAlphaNum.Substring(start, len).ToUpper();
|
||||
}
|
||||
}
|
||||
_suppressAutoTab = false;
|
||||
_keyBoxes[4].Focus();
|
||||
_keyBoxes[4].CaretIndex = _keyBoxes[4].Text.Length;
|
||||
ValidationMessage.Visibility = Visibility.Collapsed;
|
||||
return;
|
||||
}
|
||||
|
||||
// Clean non-alphanumeric chars
|
||||
var cleaned = Regex.Replace(raw, "[^A-Za-z0-9]", "");
|
||||
if (cleaned != raw)
|
||||
{
|
||||
_suppressAutoTab = true;
|
||||
tb.Text = cleaned;
|
||||
@@ -44,6 +68,7 @@ namespace InstaSoftOfficeTool.Pages
|
||||
_suppressAutoTab = false;
|
||||
}
|
||||
|
||||
// Auto-tab to next box when 5 chars entered
|
||||
if (tb.Text.Length == 5)
|
||||
{
|
||||
for (int i = 0; i < _keyBoxes.Length - 1; i++)
|
||||
|
||||
Reference in New Issue
Block a user