mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user