v1.15 — PowerShell edition + repo restructure
- New powershell/InstaSoftOfficeTool.ps1: single-file WPF GUI version - Same Fluent Design UI, no compilation needed - Runs on any Windows 7+ with PowerShell 5.1 (built-in) - Chrome won't flag .ps1 files as "rarely downloaded" - Auto-elevates to admin - Moved C# source to src/ subfolder - Updated .gitignore for nested bin/obj folders Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,63 +0,0 @@
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using InstaSoftOfficeTool.Models;
|
||||
using InstaSoftOfficeTool.Services;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace InstaSoftOfficeTool.Pages
|
||||
{
|
||||
public partial class SummaryPage : Page, IWizardPage
|
||||
{
|
||||
private readonly MainWindow _main;
|
||||
private readonly InstallConfig _config;
|
||||
private string _generatedXml;
|
||||
|
||||
public SummaryPage(MainWindow main, InstallConfig config)
|
||||
{
|
||||
InitializeComponent();
|
||||
_main = main;
|
||||
_config = config;
|
||||
|
||||
Loaded += (s, e) => RefreshSummary();
|
||||
}
|
||||
|
||||
private void RefreshSummary()
|
||||
{
|
||||
SumVersion.Text = _config.GetVersionDisplayName();
|
||||
SumEdition.Text = _config.Edition?.DisplayName ?? "-";
|
||||
SumArch.Text = _config.Architecture + "-bit";
|
||||
SumLanguage.Text = _config.GetLanguageDisplayName() + " (" + _config.Language + ")";
|
||||
SumKey.Text = string.IsNullOrEmpty(_config.ProductKey) ? "Nincs megadva" : _config.ProductKey;
|
||||
|
||||
if (_config.ExcludedApps.Count > 0)
|
||||
SumExcluded.Text = string.Join(", ", _config.ExcludedApps);
|
||||
else
|
||||
SumExcluded.Text = "Nincs (minden alkalmaz\u00e1s telep\u00fcl)";
|
||||
|
||||
_generatedXml = OdtXmlGenerator.Generate(_config);
|
||||
XmlPreview.Text = _generatedXml;
|
||||
}
|
||||
|
||||
private void BtnSaveXml_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var dlg = new SaveFileDialog
|
||||
{
|
||||
Filter = "XML f\u00e1jl (*.xml)|*.xml",
|
||||
FileName = "configuration.xml"
|
||||
};
|
||||
|
||||
if (dlg.ShowDialog() == true)
|
||||
{
|
||||
System.IO.File.WriteAllText(dlg.FileName, _generatedXml);
|
||||
MessageBox.Show("XML sikeresen mentve:\n" + dlg.FileName,
|
||||
"Ment\u00e9s", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
}
|
||||
|
||||
public bool Validate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user