aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ResolvedIssuesView.xaml
blob: 97c42d58d4c2934566fe46a47ce4f9de64b5f8ef (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
83
84
85
86
87
88
89
<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.ExternalBridge;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="130"/>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="200"/>
            </Grid.RowDefinitions>

            <Grid>
                <StackPanel Margin="10">
                    <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>

                    <TextBlock HorizontalAlignment="Left" Margin="10" TextWrapping="Wrap">
                        Below you can find issues reported by you that have been flagged as resolved by the development team.
                        Please verify each one and report back by pressing 'FIXED' or 'NOT FIXED'.
                    </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 DockPanel.Dock="Right" 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">NOT FIXED</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">FIXED</TextBlock>
                                            </StackPanel>
                                        </Button>
                                    </StackPanel>

                                    <StackPanel Orientation="Horizontal" Margin="0 0 10 0" Width="320" HorizontalAlignment="Left">
                                        <Image Source="/Images/bug.png" Width="24" RenderOptions.BitmapScalingMode="Fant"></Image>
                                        <StackPanel Margin="5 0 0 0" ToolTip="{Binding Comment}">
                                            <TextBlock Text="{Binding Title}" FontWeight="SemiBold" TextTrimming="CharacterEllipsis"></TextBlock>
                                            <TextBlock Text="{Binding Comment,TargetNullValue='Comment',FallbackValue='Comment'}" TextWrapping="Wrap" Foreground="Gray" FontSize="10"></TextBlock>
                                        </StackPanel>
                                    </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>
"p">} private set { _isInitialized = value; } } /// <summary> /// Sets a value indicating whether this module is loaded. /// </summary> public bool IsLoaded { get { return _isLoaded; } set { _isLoaded = value; IsLoadedChanged?.Invoke(this, value); } } private bool _inNewWindow; /// <summary> /// Gets or sets a value indicating whether this module is shown under a new window. /// </summary> public bool InNewWindow { get { return _inNewWindow; } set { _inNewWindow = value; RaisePropertyChangedAuto(); } } /// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public abstract void Dispose(); /// <summary> /// Perform any operations required to initialize this module. /// </summary> public void Initialize() { OnInitialized(); IsInitialized = true; } /// <summary> /// Called when machine studio initializes this module. /// </summary> protected virtual void OnInitialized() { } /// <summary> /// Raises the <see cref="IsLoadedChanged"/> event. /// </summary> /// <param name="loaded">if set to <c>true</c> the module is loaded.</param> protected virtual void OnLoadedChanged(bool loaded) { } } }