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

89 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"
xmlns:p="clr-namespace:RainmeterStudio.Properties"
Title="{x:Static r:Strings.CreateProjectDialog_Title}" Width="600" Height="400"
WindowStartupLocation="CenterOwner"
WindowStyle="ToolWindow" ShowInTaskbar="False"
Closed="Window_Closed">
<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 Name="buttonBrowse"
Grid.Row="1" Grid.Column="2"
Content="{x:Static r:Strings.Dialog_Browse}"
Click="buttonBrowse_Click" />
<CheckBox Name="checkLocationDefault"
Grid.Row="1" Grid.Column="3"
Content="{x:Static r:Strings.CreateProjectDialog_LocationDefault}"
VerticalAlignment="Center"/>
<!-- Path -->
<CheckBox Name="checkCreateDirectory"
Grid.Row="2" Grid.Column="3"
Content="{x:Static r:Strings.CreateProjectDialog_PathCreateFolder}"
IsChecked="{Binding Source={x:Static p:Settings.Default}, Path=CreateProjectDialog_CreateDirectoryCheckbox, Mode=TwoWay}"
VerticalAlignment="Center"/>
</Grid>
<StackPanel Grid.Row="2" Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Name="buttonCreate" IsDefault="True" Content="{x:Static r:Strings.Dialog_Create}" Click="buttonCreate_Click"/>
<Button Name="buttonCancel" IsCancel="True" Content="{x:Static r:Strings.Dialog_Cancel}" Click="buttonCancel_Click" />
</StackPanel>
</Grid>
</Window>