mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Merge branch 'dev/feature/projects' of https://github.com/microsoft/PowerToys into dev/feature/projects
This commit is contained in:
@@ -123,7 +123,34 @@
|
|||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</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=""
|
||||||
|
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">
|
<StackPanel Grid.Row="1" Orientation="Vertical">
|
||||||
<TextBlock Text="{x:Static props:Resources.ProjectName}" FontSize="14" FontWeight="Normal" Foreground="{DynamicResource PrimaryForegroundBrush}"/>
|
<TextBlock Text="{x:Static props:Resources.ProjectName}" FontSize="14" FontWeight="Normal" Foreground="{DynamicResource PrimaryForegroundBrush}"/>
|
||||||
<TextBox
|
<TextBox
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ namespace ProjectsEditor.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Name project.
|
/// Looks up a localized string similar to Project name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ProjectName {
|
public static string ProjectName {
|
||||||
get {
|
get {
|
||||||
|
|||||||
@@ -223,7 +223,7 @@
|
|||||||
<value>Pin Project to Taskbar</value>
|
<value>Pin Project to Taskbar</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ProjectName" xml:space="preserve">
|
<data name="ProjectName" xml:space="preserve">
|
||||||
<value>Name project</value>
|
<value>Project name</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Projects" xml:space="preserve">
|
<data name="Projects" xml:space="preserve">
|
||||||
<value>Projects</value>
|
<value>Projects</value>
|
||||||
|
|||||||
@@ -158,10 +158,17 @@ namespace ProjectsEditor.ViewModels
|
|||||||
editedProject.Name = projectToSave.Name;
|
editedProject.Name = projectToSave.Name;
|
||||||
editedProject.IsShortcutNeeded = projectToSave.IsShortcutNeeded;
|
editedProject.IsShortcutNeeded = projectToSave.IsShortcutNeeded;
|
||||||
editedProject.PreviewImage = projectToSave.PreviewImage;
|
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;
|
if (!projectToSave.Applications[appIndex].IsSelected)
|
||||||
editedProject.Applications[appIndex].CommandLineArguments = projectToSave.Applications[appIndex].CommandLineArguments;
|
{
|
||||||
|
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"));
|
editedProject.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs("AppsCountString"));
|
||||||
|
|||||||
Reference in New Issue
Block a user