Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects

This commit is contained in:
seraphima
2024-06-23 23:15:32 +02:00
4 changed files with 40 additions and 6 deletions

View File

@@ -123,7 +123,34 @@
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding EditorWindowTitle}" FontSize="24" FontWeight="SemiBold" Margin="0,20,0,20" Foreground="{DynamicResource PrimaryForegroundBrush}"/>
<StackPanel Grid.Row="0" Orientation="Horizontal">
<Button
Margin="0,20,0,20"
Click="CancelButtonClicked"
Background="Transparent"
VerticalAlignment="Center">
<TextBlock
Text="{x:Static props:Resources.Projects}"
FontSize="24"
FontWeight="Normal"
Foreground="{DynamicResource PrimaryForegroundBrush}"
VerticalAlignment="Center"/>
</Button>
<TextBlock
FontFamily="{DynamicResource SymbolThemeFontFamily}"
Foreground="{DynamicResource PrimaryForegroundBrush}"
FontSize="16"
Margin="10,0,0,0"
Text="&#xE76C;"
VerticalAlignment="Center"/>
<TextBlock
Text="{Binding EditorWindowTitle}"
FontSize="24"
FontWeight="SemiBold"
Margin="10,0,0,0"
Foreground="{DynamicResource PrimaryForegroundBrush}"
VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Vertical">
<TextBlock Text="{x:Static props:Resources.ProjectName}" FontSize="14" FontWeight="Normal" Foreground="{DynamicResource PrimaryForegroundBrush}"/>
<TextBox

View File

@@ -376,7 +376,7 @@ namespace ProjectsEditor.Properties {
}
/// <summary>
/// Looks up a localized string similar to Name project.
/// Looks up a localized string similar to Project name.
/// </summary>
public static string ProjectName {
get {

View File

@@ -223,7 +223,7 @@
<value>Pin Project to Taskbar</value>
</data>
<data name="ProjectName" xml:space="preserve">
<value>Name project</value>
<value>Project name</value>
</data>
<data name="Projects" xml:space="preserve">
<value>Projects</value>

View File

@@ -158,10 +158,17 @@ namespace ProjectsEditor.ViewModels
editedProject.Name = projectToSave.Name;
editedProject.IsShortcutNeeded = projectToSave.IsShortcutNeeded;
editedProject.PreviewImage = projectToSave.PreviewImage;
for (int appIndex = 0; appIndex < editedProject.Applications.Count; appIndex++)
for (int appIndex = editedProject.Applications.Count - 1; appIndex >= 0; appIndex--)
{
editedProject.Applications[appIndex].IsSelected = projectToSave.Applications[appIndex].IsSelected;
editedProject.Applications[appIndex].CommandLineArguments = projectToSave.Applications[appIndex].CommandLineArguments;
if (!projectToSave.Applications[appIndex].IsSelected)
{
editedProject.Applications.RemoveAt(appIndex);
}
else
{
editedProject.Applications[appIndex].IsSelected = true;
editedProject.Applications[appIndex].CommandLineArguments = projectToSave.Applications[appIndex].CommandLineArguments;
}
}
editedProject.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs("AppsCountString"));