Files
OfficeTool/Pages/VersionPage.xaml.cs
hariel1985 486589f9bc v1.16 — Remove PowerShell edition, restore flat project structure
PowerShell version removed — will use OV code signing certificate instead.
Files moved back from src/ to project root.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 07:07:27 +02:00

35 sor
1.1 KiB
C#

using System.Windows.Controls;
using InstaSoftOfficeTool.Models;
namespace InstaSoftOfficeTool.Pages
{
public partial class VersionPage : Page, IWizardPage
{
private readonly MainWindow _main;
private readonly InstallConfig _config;
public VersionPage(MainWindow main, InstallConfig config)
{
InitializeComponent();
_main = main;
_config = config;
// Restore selection
switch (_config.Version)
{
case OfficeVersion.Office2024: Rb2024.IsChecked = true; break;
case OfficeVersion.Office2021: Rb2021.IsChecked = true; break;
case OfficeVersion.Office2019: Rb2019.IsChecked = true; break;
}
}
public bool Validate()
{
if (Rb2024.IsChecked == true) _config.Version = OfficeVersion.Office2024;
else if (Rb2021.IsChecked == true) _config.Version = OfficeVersion.Office2021;
else if (Rb2019.IsChecked == true) _config.Version = OfficeVersion.Office2019;
return true;
}
}
}