2024-05-21 16:55:15 +02:00
|
|
|
<Page x:Class="ProjectsEditor.ProjectEditor"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:props="clr-namespace:ProjectsEditor.Properties"
|
|
|
|
|
xmlns:local="clr-namespace:ProjectsEditor"
|
|
|
|
|
xmlns:models="clr-namespace:ProjectsEditor.Models"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
Title="Project Editor"
|
|
|
|
|
Background="{DynamicResource PrimaryBackgroundBrush}">
|
|
|
|
|
<Page.Resources>
|
2024-06-10 10:19:57 +02:00
|
|
|
<BooleanToVisibilityConverter x:Key="BoolToVis" />
|
|
|
|
|
|
2024-05-21 16:55:15 +02:00
|
|
|
<DataTemplate x:Key="headerTemplate">
|
2024-06-27 20:10:44 +02:00
|
|
|
<Border
|
|
|
|
|
HorizontalAlignment="Stretch">
|
|
|
|
|
<DockPanel
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
>
|
|
|
|
|
<TextBlock
|
|
|
|
|
DockPanel.Dock="Left"
|
|
|
|
|
Text="{Binding MonitorName}"
|
|
|
|
|
Foreground="{DynamicResource PrimaryForegroundBrush}"
|
|
|
|
|
FontSize="14"
|
|
|
|
|
FontWeight="Normal"
|
|
|
|
|
Margin="0,0,20,0"
|
|
|
|
|
VerticalAlignment="Center"/>
|
|
|
|
|
<CheckBox
|
|
|
|
|
DockPanel.Dock="Right"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
x:Name="SelectAllOnMonitorCheckBox"
|
|
|
|
|
Tag="{Binding MonitorName}"
|
|
|
|
|
Margin="10,0,0,0"
|
|
|
|
|
FontSize="14"
|
|
|
|
|
Content="{Binding SelectString}"
|
|
|
|
|
Checked="SelectAllOnMonitorCheckBox_Modified"
|
|
|
|
|
Unchecked="SelectAllOnMonitorCheckBox_Modified"/>
|
|
|
|
|
</DockPanel>
|
2024-05-21 16:55:15 +02:00
|
|
|
</Border>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
<DataTemplate x:Key="appTemplate">
|
|
|
|
|
<Border
|
|
|
|
|
Background="{DynamicResource SecondaryBackgroundBrush}"
|
|
|
|
|
MouseEnter="AppBorder_MouseEnter"
|
|
|
|
|
MouseLeave="AppBorder_MouseLeave">
|
|
|
|
|
<Grid Margin="5">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
2024-06-10 10:19:57 +02:00
|
|
|
<ColumnDefinition Width="20"/>
|
2024-05-21 16:55:15 +02:00
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="3*"/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2024-06-10 10:19:57 +02:00
|
|
|
<TextBlock
|
2024-06-10 15:57:28 +02:00
|
|
|
Text=""
|
|
|
|
|
Foreground="#EED202"
|
2024-06-10 10:19:57 +02:00
|
|
|
FontSize="14"
|
|
|
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
|
|
|
FontWeight="Normal"
|
2024-06-10 15:57:28 +02:00
|
|
|
Margin="5 0 0 0"
|
2024-06-10 10:19:57 +02:00
|
|
|
ToolTip="{x:Static props:Resources.NotFoundTooltip}"
|
|
|
|
|
Visibility="{Binding IsNotFound, Converter={StaticResource BoolToVis}, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
VerticalAlignment="Center"/>
|
2024-05-21 16:55:15 +02:00
|
|
|
<Image
|
2024-06-10 10:19:57 +02:00
|
|
|
Grid.Column="1"
|
2024-05-21 16:55:15 +02:00
|
|
|
Width="20"
|
|
|
|
|
Height="20"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Margin="10"
|
|
|
|
|
Source="{Binding IconBitmapImage}"/>
|
|
|
|
|
<TextBlock
|
2024-06-10 10:19:57 +02:00
|
|
|
Grid.Column="2"
|
2024-05-21 16:55:15 +02:00
|
|
|
Text="{Binding RepeatIndexString, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
Foreground="{DynamicResource PrimaryForegroundBrush}"
|
|
|
|
|
FontSize="14"
|
|
|
|
|
FontWeight="Normal"
|
|
|
|
|
Width="20"
|
|
|
|
|
VerticalAlignment="Center"/>
|
|
|
|
|
<TextBlock
|
2024-06-10 10:19:57 +02:00
|
|
|
Grid.Column="3"
|
2024-05-21 16:55:15 +02:00
|
|
|
Text="{Binding AppName}"
|
|
|
|
|
Foreground="{DynamicResource PrimaryForegroundBrush}"
|
|
|
|
|
FontSize="14"
|
|
|
|
|
FontWeight="Normal"
|
|
|
|
|
VerticalAlignment="Center"/>
|
|
|
|
|
<TextBox
|
|
|
|
|
x:Name="CommandLineTextBox"
|
2024-06-10 10:19:57 +02:00
|
|
|
Grid.Column="4"
|
2024-05-21 16:55:15 +02:00
|
|
|
Text="{Binding CommandLineArguments, Mode=TwoWay}"
|
|
|
|
|
Foreground="{DynamicResource PrimaryForegroundBrush}"
|
|
|
|
|
Background="{DynamicResource TertiaryBackgroundBrush}"
|
|
|
|
|
BorderThickness="0"
|
|
|
|
|
FontSize="14"
|
|
|
|
|
FontWeight="Normal"
|
|
|
|
|
VerticalContentAlignment="Center" />
|
|
|
|
|
<TextBlock
|
2024-06-10 10:19:57 +02:00
|
|
|
Grid.Column="4"
|
2024-05-21 16:55:15 +02:00
|
|
|
IsHitTestVisible="False"
|
|
|
|
|
Text="{x:Static props:Resources.WriteArgs}"
|
|
|
|
|
Foreground="{DynamicResource SecondaryForegroundBrush}"
|
|
|
|
|
Background="{DynamicResource TertiaryBackgroundBrush}"
|
|
|
|
|
FontSize="14"
|
|
|
|
|
FontWeight="Normal"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Margin="12,0,12,0">
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
<Style TargetType="{x:Type TextBlock}">
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding Text, ElementName=CommandLineTextBox}" Value="">
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
</TextBlock>
|
|
|
|
|
<CheckBox
|
2024-06-10 10:19:57 +02:00
|
|
|
Grid.Column="5"
|
2024-06-27 18:58:16 +02:00
|
|
|
IsChecked="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
2024-05-21 16:55:15 +02:00
|
|
|
Checked="CheckBox_Checked"
|
|
|
|
|
Unchecked="CheckBox_Checked"
|
|
|
|
|
Margin="10"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
<models:AppListDataTemplateSelector
|
|
|
|
|
HeaderTemplate="{StaticResource headerTemplate}"
|
|
|
|
|
AppTemplate="{StaticResource appTemplate}"
|
|
|
|
|
x:Key="AppListDataTemplateSelector"/>
|
|
|
|
|
</Page.Resources>
|
|
|
|
|
<Grid Margin="40,0,40,40">
|
|
|
|
|
<Grid.RowDefinitions>
|
2024-05-31 19:09:45 +02:00
|
|
|
<RowDefinition Height="Auto"/>
|
2024-05-21 16:55:15 +02:00
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
2024-06-20 13:22:02 +02:00
|
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
|
|
|
|
<Button
|
|
|
|
|
Margin="0,20,0,20"
|
2024-06-20 13:25:32 +02:00
|
|
|
Click="CancelButtonClicked"
|
2024-06-20 13:22:02 +02:00
|
|
|
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>
|
2024-06-27 18:58:16 +02:00
|
|
|
<DockPanel Grid.Row="1">
|
|
|
|
|
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" >
|
|
|
|
|
<Button x:Name="DeleteButton"
|
|
|
|
|
Margin="10,0,0,0"
|
|
|
|
|
Height="36"
|
|
|
|
|
Padding="24,0,24,0"
|
|
|
|
|
Content="{x:Static props:Resources.DeleteSelected}"
|
|
|
|
|
Background="{DynamicResource SecondaryBackgroundBrush}"
|
|
|
|
|
AutomationProperties.Name="{x:Static props:Resources.Cancel}"
|
|
|
|
|
IsEnabled="{Binding IsAnySelected, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
Click="RemoveSelectedButtonClicked"/>
|
|
|
|
|
<CheckBox
|
|
|
|
|
x:Name="SelectAllCheckBox"
|
|
|
|
|
Margin="10,0,0,0"
|
|
|
|
|
FontSize="14"
|
|
|
|
|
Content="{x:Static props:Resources.SelectedAllInProject}"
|
|
|
|
|
Checked="SelectAllCheckBox_Modified"
|
|
|
|
|
Unchecked="SelectAllCheckBox_Modified"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel DockPanel.Dock="Left" Orientation="Vertical">
|
|
|
|
|
<TextBlock Text="{x:Static props:Resources.ProjectName}" FontSize="14" FontWeight="Normal" Foreground="{DynamicResource PrimaryForegroundBrush}"/>
|
|
|
|
|
<TextBox
|
|
|
|
|
x:Name="EditNameTextBox"
|
|
|
|
|
Width="320"
|
|
|
|
|
Text="{Binding Name, Mode=TwoWay}"
|
|
|
|
|
Background="{DynamicResource SecondaryBackgroundBrush}"
|
|
|
|
|
BorderBrush="{DynamicResource PrimaryBorderBrush}"
|
|
|
|
|
BorderThickness="2"
|
|
|
|
|
Margin="0,6,0,6"
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
GotFocus="EditNameTextBox_GotFocus"
|
|
|
|
|
TextChanged="EditNameTextBox_TextChanged"
|
|
|
|
|
KeyDown="EditNameTextBoxKeyDown" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</DockPanel>
|
2024-05-31 19:09:45 +02:00
|
|
|
<Border
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
Background="{DynamicResource MonitorViewBackgroundBrush}"
|
|
|
|
|
CornerRadius="5">
|
2024-06-24 09:34:47 +02:00
|
|
|
<Image
|
|
|
|
|
Width="{Binding PreviewImageWidth, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
Height="200"
|
|
|
|
|
Source="{Binding PreviewImage, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
Stretch="Fill"
|
|
|
|
|
Margin="2"/>
|
2024-05-31 19:09:45 +02:00
|
|
|
</Border>
|
2024-05-21 16:55:15 +02:00
|
|
|
<ScrollViewer
|
2024-05-31 19:09:45 +02:00
|
|
|
Margin="0,10,0,0"
|
2024-05-21 16:55:15 +02:00
|
|
|
VerticalScrollBarVisibility="Auto"
|
2024-05-31 19:09:45 +02:00
|
|
|
Grid.Row="3">
|
2024-05-21 16:55:15 +02:00
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<ItemsControl
|
2024-06-27 18:58:16 +02:00
|
|
|
ItemsSource="{Binding ApplicationsListed, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
|
2024-05-21 16:55:15 +02:00
|
|
|
ItemTemplateSelector="{StaticResource AppListDataTemplateSelector}">
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
</Grid>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</ScrollViewer>
|
2024-05-31 19:09:45 +02:00
|
|
|
<DockPanel Grid.Row="4" Margin="0,20,0,20">
|
2024-05-21 16:55:15 +02:00
|
|
|
<CheckBox
|
|
|
|
|
DockPanel.Dock="Left"
|
|
|
|
|
Content="{x:Static props:Resources.CreateShortcut}"
|
|
|
|
|
IsChecked="{Binding IsShortcutNeeded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
FontSize="14"/>
|
|
|
|
|
<StackPanel
|
|
|
|
|
DockPanel.Dock="Right"
|
|
|
|
|
Orientation="Horizontal"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
Margin="40,0,0,0">
|
|
|
|
|
<Button
|
|
|
|
|
x:Name="CancelButton"
|
|
|
|
|
Margin="20,0,0,0"
|
|
|
|
|
Height="36"
|
2024-06-05 19:10:38 +02:00
|
|
|
Padding="24,0,24,0"
|
|
|
|
|
Content="{x:Static props:Resources.Cancel}"
|
2024-06-05 09:53:01 +02:00
|
|
|
Background="{DynamicResource SecondaryBackgroundBrush}"
|
2024-05-21 16:55:15 +02:00
|
|
|
AutomationProperties.Name="{x:Static props:Resources.Cancel}"
|
|
|
|
|
Click="CancelButtonClicked">
|
|
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
x:Name="SaveButton"
|
|
|
|
|
Margin="20,0,0,0"
|
2024-06-05 19:10:38 +02:00
|
|
|
Padding="24,0,24,0"
|
2024-05-21 16:55:15 +02:00
|
|
|
Height="36"
|
2024-06-17 15:21:13 +02:00
|
|
|
IsEnabled="{Binding CanBeSaved, UpdateSourceTrigger=PropertyChanged}"
|
2024-06-05 19:10:38 +02:00
|
|
|
Content="{x:Static props:Resources.Save_project}"
|
2024-05-21 16:55:15 +02:00
|
|
|
AutomationProperties.Name="{x:Static props:Resources.Save_project}"
|
|
|
|
|
Click="SaveButtonClicked"
|
|
|
|
|
Style="{StaticResource AccentButtonStyle}">
|
|
|
|
|
</Button>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</DockPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Page>
|