feat: add controlled local PXP-OA parity workflow
This commit is contained in:
@@ -5,7 +5,11 @@ namespace Launcher.Next.App;
|
||||
public partial class MainWindow : System.Windows.Window
|
||||
{
|
||||
private readonly LegacyConfigurationAdapter adapter=new();
|
||||
private readonly LocalParityLaunchProfile? localProfile;
|
||||
private readonly LocalParityLaunchService localService=new();
|
||||
private LocalParityPrepared? prepared;
|
||||
public MainWindow() { InitializeComponent(); RefreshDiscovery(); Status.Text="Ready: choose a legacy Settings.xml to inspect approved configurations."; }
|
||||
internal MainWindow(LocalParityLaunchProfile profile) { localProfile=profile; InitializeComponent(); RefreshDiscovery(); LoadLocalProfile(profile); }
|
||||
private void RefreshDiscovery()
|
||||
{
|
||||
var product=new PlantProductDiscovery(new WindowsRegistryReader()).DiscoverPlant3D(2026);
|
||||
@@ -23,4 +27,21 @@ public partial class MainWindow : System.Windows.Window
|
||||
private void Patterns_SelectionChanged(object sender,System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{ if(Patterns.SelectedItem is not LegacyProductPattern pattern)return;PatternDetails.Text=$"Filter: {pattern.Filter}\nRoster: {pattern.Roster}\nLegacy plugins: {pattern.Plugins.Count}";PackageStatus.Text="Exact package requirements are derived only after approved overlay + ordered download_list.xml join.";Status.Text="Configuration selected; provide approved local compatibility inputs to prepare packages."; }
|
||||
private void Diagnostics_Click(object sender,System.Windows.RoutedEventArgs e)=>System.Windows.MessageBox.Show($"{AutodeskStatus.Text}\n{ConfigurationStatus.Text}\n{Status.Text}","Launcher Next diagnostics");
|
||||
private void LoadLocalProfile(LocalParityLaunchProfile profile)
|
||||
{
|
||||
try { var settings=adapter.ParseSettings(System.IO.File.ReadAllText(profile.SettingsPath)); Patterns.ItemsSource=settings.Patterns; Patterns.SelectedItem=settings.Patterns.Single(x=>x.Name==profile.PatternName); ConfigurationStatus.Text="Controlled Local PXP-OA"; PrepareButton.IsEnabled=true; LaunchButton.IsEnabled=false; Status.Text="Ready: local verified package preparation is available; Launch is disabled until activation succeeds."; }
|
||||
catch(Exception ex) { Status.Text="Blocked: "+ex.Message; }
|
||||
}
|
||||
private async void Prepare_Click(object sender,System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
if(localProfile is null) { Status.Text="Blocked: choose an explicit controlled local configuration."; return; }
|
||||
try { PrepareButton.IsEnabled=false; Status.Text="Preparing verified local package…"; prepared=await localService.PrepareAsync(localProfile,CancellationToken.None); PackageStatus.Text=$"Package: {prepared.Package.PackageId} {prepared.Package.Version}\nState: Active\nValidation: Passed"; LaunchButton.IsEnabled=true; Status.Text="Package active and verified. Launch Plant 3D is enabled."; }
|
||||
catch(Exception ex) { Status.Text="Prepare blocked: "+ex.Message; PrepareButton.IsEnabled=true; }
|
||||
}
|
||||
private async void Launch_Click(object sender,System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
if(prepared is null) { Status.Text="Launch blocked: package is not active."; return; }
|
||||
try { LaunchButton.IsEnabled=false; Status.Text="Launching interactive Plant 3D 2026…"; var result=await localService.LaunchAsync(prepared,CancellationToken.None); Status.Text=result.TerminalState=="Succeeded"?$"Plant 3D started (PID {result.ProcessId}); PXP-OA load confirmed.":$"Launch blocked; evidence written. PID {result.ProcessId}."; LaunchButton.IsEnabled=true; }
|
||||
catch(Exception ex) { Status.Text="Launch failed: "+ex.Message; LaunchButton.IsEnabled=true; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user