rainmeter-studio/RainmeterStudio/UI/Dialogs/CreateProjectDialog.xaml

88 lines
4.0 KiB
XML

<Window x:Class="RainmeterStudio.UI.Dialogs.CreateProjectDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:r="clr-namespace:RainmeterStudio.Resources"
Title="{x:Static r:Strings.CreateProjectDialog_Title}" Height="320" Width="480"
WindowStartupLocation="CenterOwner"
WindowStyle="ToolWindow" ShowInTaskbar="False">
<Grid Background="WhiteSmoke">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListView Name="listTemplates" Grid.Row="0" Margin="1px"
SelectionChanged="listTemplates_SelectionChanged">
<ListView.ItemTemplate>
<DataTemplate>
<DockPanel>
<Image DockPanel.Dock="Left" Source="{Binding Icon}"
Width="32" Height="32" Margin="2"
Stretch="Uniform" VerticalAlignment="Top" />
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<TextBlock Text="{Binding DisplayText}" FontWeight="Bold" />
<TextBlock Text="{Binding Description}" />
</StackPanel>
</DockPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Name -->
<TextBlock Grid.Row="0" Text="{x:Static r:Strings.CreateProjectDialog_Name}" />
<TextBox Name="textName"
Grid.Row="0" Grid.Column="1"
TextChanged="textName_TextChanged"/>
<!-- Location -->
<TextBlock Grid.Row="1" Text="{x:Static r:Strings.CreateProjectDialog_Location}" />
<ComboBox Name="textLocation" IsEditable="True"
Grid.Row="1" Grid.Column="1" />
<Button Grid.Row="1" Grid.Column="2" Content="{x:Static r:Strings.Dialog_Browse}"/>
<CheckBox Name="checkLocationDefault"
Grid.Row="1" Grid.Column="3"
Content="{x:Static r:Strings.CreateProjectDialog_LocationDefault}"
VerticalAlignment="Center"/>
<!-- Path -->
<TextBlock Grid.Row="2" Text="{x:Static r:Strings.CreateProjectDialog_Path}"/>
<ComboBox Name="textPath"
IsEditable="True"
Grid.Row="2" Grid.Column="1" />
<Button Grid.Row="2" Grid.Column="2" Content="{x:Static r:Strings.Dialog_Browse}" />
<CheckBox Name="checkCreateDirectory"
Grid.Row="2" Grid.Column="3"
Content="{x:Static r:Strings.CreateProjectDialog_PathCreateFolder}"
IsChecked="True"
Checked="checkCreateDirectory_CheckChanged"
Unchecked="checkCreateDirectory_CheckChanged"
VerticalAlignment="Center"/>
</Grid>
<StackPanel Grid.Row="2" Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Command="{Binding CreateCommand}" IsDefault="True" Content="{x:Static r:Strings.Dialog_Create}" />
<Button Command="{Binding CancelCommand}" IsCancel="True" Content="{x:Static r:Strings.Dialog_Cancel}" />
</StackPanel>
</Grid>
</Window>