v1.10 — Activation with key dialog, auto-refresh, Access restriction, fixes

- Product key dialog: Fluent overlay with 5-field input + paste support
- Activate button on each license card asks for key first (/inpkey + /act)
- Auto-refresh lists after removal/activation on all pages
- Access checkbox disabled for Standard and Home & Business editions
- MSI uninstall: only accept {GUID} product codes (fix msiexec help popup)
- Window height properly resets when Details expander is collapsed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hariel1985
2026-03-31 08:38:08 +02:00
szülő eac8813cc0
commit 0e4253ba37
11 fájl változott, egészen pontosan 303 új sor hozzáadva és 22 régi sor törölve

Fájl megtekintése

@@ -29,7 +29,6 @@ namespace InstaSoftOfficeTool.Pages
BtnRemoveAll.Visibility = Visibility.Collapsed;
BtnRefresh.IsEnabled = false;
// Loading indicator
var loadingText = new TextBlock
{
Text = "Keres\u00e9s folyamatban...",
@@ -164,18 +163,38 @@ namespace InstaSoftOfficeTool.Pages
Grid.SetColumn(infoPanel, 0);
grid.Children.Add(infoPanel);
// Right side: Activate + Remove buttons
var btnPanel = new StackPanel
{
Orientation = Orientation.Horizontal,
VerticalAlignment = VerticalAlignment.Center
};
var activateBtn = new Button
{
Content = "Aktiv\u00e1l\u00e1s",
Style = (Style)FindResource("PrimaryButton"),
Padding = new Thickness(14, 6, 14, 6),
FontSize = 12,
Tag = entry.Last5
};
activateBtn.Click += BtnActivateSingle_Click;
btnPanel.Children.Add(activateBtn);
var removeBtn = new Button
{
Content = "Elt\u00e1vol\u00edt\u00e1s",
Style = (Style)FindResource("SecondaryButton"),
Padding = new Thickness(14, 6, 14, 6),
FontSize = 12,
VerticalAlignment = VerticalAlignment.Center,
Tag = entry.Last5
Tag = entry.Last5,
Margin = new Thickness(6, 0, 0, 0)
};
removeBtn.Click += BtnRemoveSingle_Click;
Grid.SetColumn(removeBtn, 1);
grid.Children.Add(removeBtn);
btnPanel.Children.Add(removeBtn);
Grid.SetColumn(btnPanel, 1);
grid.Children.Add(btnPanel);
return new Border
{
@@ -189,6 +208,37 @@ namespace InstaSoftOfficeTool.Pages
};
}
private async void BtnActivateSingle_Click(object sender, RoutedEventArgs e)
{
string key = await _main.AskProductKeyAsync();
if (string.IsNullOrEmpty(key)) return;
var btn = (Button)sender;
btn.IsEnabled = false;
btn.Content = "...";
DetailsExpander.IsExpanded = true;
OutputText.Text = "Term\u00e9kkulcs telep\u00edt\u00e9se: " + key + "\n";
try
{
string inpResult = await _licenseManager.InstallKeyAsync(key);
OutputText.Text += inpResult + "\n";
OutputText.Text += "Aktiv\u00e1l\u00e1s...\n";
string actResult = await _licenseManager.ActivateAsync();
OutputText.Text += actResult;
await RefreshStatus();
}
catch (Exception ex)
{
OutputText.Text += "\nHiba: " + ex.Message;
btn.IsEnabled = true;
btn.Content = "Aktiv\u00e1l\u00e1s";
}
}
private async void BtnRemoveSingle_Click(object sender, RoutedEventArgs e)
{
var btn = (Button)sender;
@@ -250,17 +300,12 @@ namespace InstaSoftOfficeTool.Pages
private void DetailsExpander_Expanded(object sender, RoutedEventArgs e)
{
// Grow window to fit details
var window = Window.GetWindow(this);
if (window != null && window.Height < 680)
window.Height = 680;
_main.Height = 680;
}
private void DetailsExpander_Collapsed(object sender, RoutedEventArgs e)
{
var window = Window.GetWindow(this);
if (window != null)
window.Height = 550;
_main.Height = 550;
}
}
}