v1.07 — Pre-install Office check before installation
- New PreInstallCheckPage between Summary and Progress - Detects existing Office installs, offers removal before new install - License cleanup option included - Skip button to proceed without removal - Auto-proceeds to install after removal completes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,12 +38,13 @@ namespace InstaSoftOfficeTool
|
||||
_config = new InstallConfig();
|
||||
_wizardPages = new List<Page>
|
||||
{
|
||||
new VersionPage(this, _config),
|
||||
new EditionPage(this, _config),
|
||||
new ConfigPage(this, _config),
|
||||
new ProductKeyPage(this, _config),
|
||||
new SummaryPage(this, _config),
|
||||
new ProgressPage(this, _config)
|
||||
new VersionPage(this, _config), // 0
|
||||
new EditionPage(this, _config), // 1
|
||||
new ConfigPage(this, _config), // 2
|
||||
new ProductKeyPage(this, _config), // 3
|
||||
new SummaryPage(this, _config), // 4
|
||||
new PreInstallCheckPage(this), // 5 — remove old Office
|
||||
new ProgressPage(this, _config) // 6
|
||||
};
|
||||
_currentPageIndex = 0;
|
||||
ShowCurrentPage();
|
||||
@@ -91,8 +92,8 @@ namespace InstaSoftOfficeTool
|
||||
StepIndicator.Children.Clear();
|
||||
if (_currentFlow != "install") return;
|
||||
|
||||
// Only show dots for install flow (6 steps, but last is progress - no dot)
|
||||
int totalDots = _wizardPages.Count - 1; // exclude progress page
|
||||
// Only show dots for install flow (exclude PreInstallCheck + Progress)
|
||||
int totalDots = _wizardPages.Count - 2;
|
||||
for (int i = 0; i < totalDots; i++)
|
||||
{
|
||||
var dot = new Ellipse
|
||||
@@ -122,14 +123,10 @@ namespace InstaSoftOfficeTool
|
||||
BtnBack.Visibility = _currentPageIndex > 0 ? Visibility.Visible : Visibility.Visible;
|
||||
BtnNext.Visibility = Visibility.Visible;
|
||||
|
||||
// Last step before progress = "Telep\u00edt\u00e9s ind\u00edt\u00e1sa"
|
||||
if (_currentPageIndex == _wizardPages.Count - 2)
|
||||
{
|
||||
BtnNext.Content = "Telep\u00edt\u00e9s ind\u00edt\u00e1sa";
|
||||
}
|
||||
// On progress page, hide both
|
||||
else if (_currentPageIndex == _wizardPages.Count - 1 &&
|
||||
_wizardPages[_currentPageIndex] is ProgressPage)
|
||||
// On SummaryPage = "Tov\u00e1bb"
|
||||
// On PreInstallCheckPage or ProgressPage = hide
|
||||
if (_wizardPages[_currentPageIndex] is PreInstallCheckPage ||
|
||||
_wizardPages[_currentPageIndex] is ProgressPage)
|
||||
{
|
||||
BtnNext.Visibility = Visibility.Collapsed;
|
||||
BtnBack.Visibility = Visibility.Collapsed;
|
||||
@@ -174,12 +171,18 @@ namespace InstaSoftOfficeTool
|
||||
}
|
||||
|
||||
ShowCurrentPage();
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-start if we're on progress page
|
||||
if (_wizardPages[_currentPageIndex] is ProgressPage progressPage)
|
||||
{
|
||||
progressPage.StartInstallation();
|
||||
}
|
||||
public void ProceedToInstall()
|
||||
{
|
||||
// Jump to ProgressPage (last page in the wizard)
|
||||
_currentPageIndex = _wizardPages.Count - 1;
|
||||
ShowCurrentPage();
|
||||
|
||||
if (_wizardPages[_currentPageIndex] is ProgressPage progressPage)
|
||||
{
|
||||
progressPage.StartInstallation();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user