[Workspaces] Saving app properties on launch and recapture (#36751)

* [Workspaces] Implementing set and get GUID to/from HWND to distinguish windows moved by the Workspaces tool

* After launch and capture copy the CLI args from the "original" project

* Fix getting GUID

* spell check

* modification to be able to handle different data sizes on different systems

* code optimisation

* Replacing string parameter by InvokePoint

* renaming variable
This commit is contained in:
Laszlo Nemeth
2025-01-16 10:56:38 +01:00
committed by GitHub
parent 603379a1ad
commit f5f332cbba
11 changed files with 107 additions and 26 deletions

View File

@@ -342,12 +342,22 @@ namespace WorkspacesEditor.Models
return new Rectangle((int)minX, (int)minY, (int)(maxX - minX), (int)(maxY - minY));
}
public void UpdateAfterLaunchAndEdit(Project other)
public void UpdateAfterLaunchAndEdit(Project projectBeforeLaunch)
{
Id = other.Id;
Name = other.Name;
Id = projectBeforeLaunch.Id;
Name = projectBeforeLaunch.Name;
IsRevertEnabled = true;
MoveExistingWindows = other.MoveExistingWindows;
MoveExistingWindows = projectBeforeLaunch.MoveExistingWindows;
foreach (Application app in Applications)
{
var sameAppBefore = projectBeforeLaunch.Applications.Where(x => x.Id.Equals(app.Id, StringComparison.OrdinalIgnoreCase));
if (sameAppBefore.Any())
{
var appBefore = sameAppBefore.FirstOrDefault();
app.CommandLineArguments = appBefore.CommandLineArguments;
app.IsElevated = appBefore.IsElevated;
}
}
}
internal void CloseExpanders()