aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml
blob: d70e57786fbafbe7d6082e6e3c1d0060ad1c5f30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<UserControl x:Class="Tango.MachineStudio.UI.Views.ResolvedIssuesView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
             xmlns:integration="clr-namespace:Tango.Integration.Services;assembly=Tango.Integration"
             xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
             xmlns:vm="clr-namespace:Tango.MachineStudio.UI.ViewModels"
             xmlns:tfs="clr-namespace:Tango.TFS;assembly=Tango.TFS"
             xmlns:tfss="clr-namespace:Tango.MachineStudio.UI.TFS"
             xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
             mc:Ignorable="d" Width="530" Height="580" Background="White" d:DataContext="{d:DesignInstance Type=vm:ResolvedIssuesViewVM, IsDesignTimeCreatable=False}">
    <Grid>
        <Grid IsEnabled="{Binding IsAvailable}">
            <Grid.RowDefinitions>
                <RowDefinition Height="90"/>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="200"/>
            </Grid.RowDefinitions>

            <Grid>
                <StackPanel Orientation="Horizontal">
                    <Image Source="/Images/bug-resolved.png" Width="48" RenderOptions.BitmapScalingMode="Fant"></Image>
                    <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20">Resolved Issues</TextBlock>
                </StackPanel>
            </Grid>

            <Grid Grid.Row="1">
                <ListBox x:Name="list" ItemsSource="{Binding TFSClient.ResolvedWorkItems}" HorizontalContentAlignment="Stretch">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Border BorderBrush="#E6E6E6" BorderThickness="0 0 0 1" Padding="5">
                                <DockPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="/Images/bug.png" Width="24" RenderOptions.BitmapScalingMode="Fant"></Image>
                                        <StackPanel Margin="5 0 0 0">
                                            <TextBlock Text="{Binding Title}" FontWeight="SemiBold" TextTrimming="CharacterEllipsis"></TextBlock>
                                            <TextBlock Text="{Binding Comment,TargetNullValue='Comment',FallbackValue='Comment'}" Foreground="Gray" FontSize="10"></TextBlock>
                                        </StackPanel>
                                    </StackPanel>

                                    <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
                                        <Button Background="#FF8282" BorderBrush="#FF8282" Padding="0" Width="90" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DeclineCommand}" CommandParameter="{Binding}">
                                            <StackPanel Orientation="Horizontal">
                                                <materialDesign:PackIcon VerticalAlignment="Center" Kind="Close" />
                                                <TextBlock Margin="10 0 0 0" FontSize="11" VerticalAlignment="Center">DECLINE</TextBlock>
                                            </StackPanel>
                                        </Button>
                                        <Button Background="#91D66D" BorderBrush="#91D66D" Padding="0" Width="90" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ApproveCommand}" CommandParameter="{Binding}">
                                            <StackPanel Orientation="Horizontal">
                                                <materialDesign:PackIcon VerticalAlignment="Center" Kind="Check" />
                                                <TextBlock Margin="10 0 0 0" FontSize="11" VerticalAlignment="Center">APPROVE</TextBlock>
                                            </StackPanel>
                                        </Button>
                                    </StackPanel>
                                </DockPanel>
                            </Border>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Grid>

            <Grid Grid.Row="2">
                <Border BorderBrush="#FFA5A5" BorderThickness="0 1 0 0" Margin="5">
                    <DockPanel>
                        <DockPanel Margin="0 10 0 0" DockPanel.Dock="Top">
                            <materialDesign:PackIcon Kind="ChartTimeline" Width="24" Height="24" VerticalAlignment="Center" Margin="0 0 10 0" />
                            <TextBlock VerticalAlignment="Center" FontSize="16">Steps To Reproduce</TextBlock>
                        </DockPanel>

                        <Grid>
                            <TextBox Margin="5 10 10 10" Style="{x:Null}" BorderThickness="0" AcceptsReturn="True" TextWrapping="Wrap" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Text="{Binding ElementName=list,Path=SelectedItem.StepsToReproduce}" IsReadOnly="True"></TextBox>
                        </Grid>
                    </DockPanel>
                </Border>
            </Grid>
        </Grid>
    </Grid>
</UserControl>