[Projects] Add Select all checkbox, Delete selected button

This commit is contained in:
donlaci
2024-06-27 18:58:16 +02:00
parent dc9af4bc30
commit 4960af8a13
9 changed files with 138 additions and 63 deletions

View File

@@ -121,7 +121,7 @@ namespace ProjectsEditor.Models
public bool CanBeSaved
{
get => Name.Length > 0 && Applications.Where(x => x.IsSelected).Any();
get => Name.Length > 0 && Applications.Count > 0;
}
private bool _isPopupVisible;
@@ -177,11 +177,13 @@ namespace ProjectsEditor.Models
{
get
{
int count = Applications.Where(x => x.IsSelected).Count();
int count = Applications.Count;
return count.ToString(CultureInfo.InvariantCulture) + " " + (count == 1 ? Properties.Resources.App : Properties.Resources.Apps);
}
}
public bool IsAnySelected { get => Applications?.Any(x => x.IsSelected) == true; }
public List<MonitorSetup> Monitors { get; set; }
private BitmapImage _previewIcons;
@@ -216,7 +218,7 @@ namespace ProjectsEditor.Models
PackageFullName = item.PackageFullName,
Minimized = item.Minimized,
Maximized = item.Maximized,
IsSelected = item.IsSelected,
IsSelected = false,
MonitorNumber = item.MonitorNumber,
IsNotFound = item.IsNotFound,
Position = new Application.WindowPosition() { X = item.Position.X, Y = item.Position.Y, Height = item.Position.Height, Width = item.Position.Width },