|
| 1 | +<UserControl xmlns="https://github.com/avaloniaui" |
| 2 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 4 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 5 | + xmlns:vm="using:SourceGit.ViewModels" |
| 6 | + xmlns:v="using:SourceGit.Views" |
| 7 | + xmlns:c="using:SourceGit.Converters" |
| 8 | + mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
| 9 | + x:Class="SourceGit.Views.OpenLocalRepository" |
| 10 | + x:DataType="vm:OpenLocalRepository"> |
| 11 | + <StackPanel Orientation="Vertical" Margin="8,0,0,0"> |
| 12 | + <StackPanel Orientation="Horizontal"> |
| 13 | + <Path Width="16" Height="16" |
| 14 | + Margin="0,2,0,0" |
| 15 | + Data="{StaticResource Icons.Folder.Open}"/> |
| 16 | + |
| 17 | + <TextBlock FontSize="18" |
| 18 | + Margin="8,0,0,0" |
| 19 | + Classes="bold" |
| 20 | + Text="{DynamicResource Text.OpenLocalRepository}"/> |
| 21 | + </StackPanel> |
| 22 | + |
| 23 | + <Grid Margin="8,16,0,0" RowDefinitions="32,32,32" ColumnDefinitions="Auto,*"> |
| 24 | + <TextBlock Grid.Row="0" Grid.Column="0" |
| 25 | + HorizontalAlignment="Right" |
| 26 | + Margin="0,0,8,0" |
| 27 | + Text="{DynamicResource Text.OpenLocalRepository.Path}"/> |
| 28 | + <TextBox Grid.Row="0" Grid.Column="1" |
| 29 | + Height="28" |
| 30 | + CornerRadius="3" |
| 31 | + Text="{Binding RepoPath, Mode=TwoWay}"> |
| 32 | + <TextBox.InnerRightContent> |
| 33 | + <Button Classes="icon_button" Width="28" Height="28" Margin="4,0,0,0" Click="OnSelectRepositoryFolder"> |
| 34 | + <Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/> |
| 35 | + </Button> |
| 36 | + </TextBox.InnerRightContent> |
| 37 | + </TextBox> |
| 38 | + |
| 39 | + <TextBlock Grid.Row="1" Grid.Column="0" |
| 40 | + HorizontalAlignment="Right" |
| 41 | + Margin="0,0,8,0" |
| 42 | + Text="{DynamicResource Text.OpenLocalRepository.Group}"/> |
| 43 | + <ComboBox Grid.Row="1" Grid.Column="1" |
| 44 | + Height="28" Padding="8,0" |
| 45 | + VerticalAlignment="Center" HorizontalAlignment="Stretch" |
| 46 | + ItemsSource="{Binding Groups}" |
| 47 | + SelectedItem="{Binding Group, Mode=TwoWay}"> |
| 48 | + <ComboBox.ItemTemplate> |
| 49 | + <DataTemplate DataType="vm:RepositoryNode"> |
| 50 | + <TextBlock Text="{Binding Name, Mode=OneWay}"/> |
| 51 | + </DataTemplate> |
| 52 | + </ComboBox.ItemTemplate> |
| 53 | + </ComboBox> |
| 54 | + |
| 55 | + <TextBlock Grid.Row="2" Grid.Column="0" |
| 56 | + HorizontalAlignment="Right" |
| 57 | + Margin="0,0,8,0" |
| 58 | + Text="{DynamicResource Text.OpenLocalRepository.Bookmark}"/> |
| 59 | + <ComboBox Grid.Row="2" Grid.Column="1" |
| 60 | + Height="28" Padding="8,0" |
| 61 | + VerticalAlignment="Center" |
| 62 | + ItemsSource="{Binding Bookmarks}" |
| 63 | + SelectedItem="{Binding Bookmark, Mode=TwoWay}"> |
| 64 | + <ComboBox.ItemTemplate> |
| 65 | + <DataTemplate> |
| 66 | + <Grid Height="20"> |
| 67 | + <Path Width="12" Height="12" |
| 68 | + Fill="{Binding Converter={x:Static c:IntConverters.ToBookmarkBrush}}" |
| 69 | + HorizontalAlignment="Center" VerticalAlignment="Center" |
| 70 | + Data="{StaticResource Icons.Bookmark}"/> |
| 71 | + </Grid> |
| 72 | + </DataTemplate> |
| 73 | + </ComboBox.ItemTemplate> |
| 74 | + </ComboBox> |
| 75 | + </Grid> |
| 76 | + </StackPanel> |
| 77 | +</UserControl> |
0 commit comments