This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,128 @@
<base:BaseView x:Class="DTS.Viewer.TestSummaryList.TestSummaryListView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
xmlns:prism="http://prismlibrary.com/"
xmlns:classes="clr-namespace:DTS.Common.Classes;assembly=DTS.Common"
xmlns:strings="clr-namespace:DTS.Viewer.TestSummaryList"
HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
<base:BaseView.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Button" BasedOn="{StaticResource PageContentButton}">
<Setter Property="FontSize" Value="10" />
<Setter Property="Margin" Value="3,3" />
</Style>
<Style TargetType="TextBox" BasedOn="{StaticResource PageContentTextBoxStyle}">
<Setter Property="HorizontalAlignment" Value="Stretch" />
</Style>
<converters:DateTimeWithMillisecondsToStringConverter x:Key="dateToString" />
</ResourceDictionary>
</base:BaseView.Resources>
<Grid x:Name="TestListRegion" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Content="{strings:TranslateExtension Refresh}"
Command="{Binding Path=RefreshDataFolderCommand}"
AutomationProperties.AutomationId="RefreshTestsBtn" />
<Button Grid.Column="1" Content="{strings:TranslateExtension Browse}" HorizontalAlignment="Left"
Command="{Binding Path=SelectDataFolderCommand}" HorizontalContentAlignment="Center"
AutomationProperties.AutomationId="BrowseTestsBtn" />
<ContentControl Grid.Column="2" Content="{Binding FilterView}" IsEnabled="{Binding IsFilterEnabled}" />
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{strings:TranslateExtension Sort}" FontSize="12"/>
<ComboBox ItemsSource="{Binding SortableAttributes}" SelectedIndex="{Binding SelectedSortIndex}" Grid.Column="1" AutomationProperties.AutomationId="ComboBox_TestSummarySort"/>
</Grid>
<ListView x:Name="ListViewTestSummary" Grid.Row="2"
ScrollViewer.VerticalScrollBarVisibility="Visible"
ItemsSource="{Binding FilteredTestSummaryList, Mode=TwoWay}"
SelectedItem="{Binding SelectedTestSummary, Mode=TwoWay}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
AutomationProperties.AutomationId="ListViewTestSummary"
SelectionMode="Single" KeyUp="TestSummary_KeyUp">
<ListView.ItemTemplate>
<DataTemplate>
<Border CornerRadius="0" BorderThickness="2" BorderBrush="Transparent" Margin="0 0 0 0">
<Grid Margin="0,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox Grid.Column="0" Grid.Row="0" x:Name="CheckBox_TestSummary" IsChecked="{Binding Path=IsSelected}" HorizontalAlignment="Left" Margin="0,2,0,0" AutomationProperties.AutomationId="CheckBox_IsSelected"/>
<StackPanel Grid.Column="1" Grid.Row="0" Orientation="Horizontal">
<Expander IsExpanded="False" x:Name="Expander_TestSummary" FontSize="14" Margin="2,0,0,0"
AutomationProperties.AutomationId="Expander_TestSummary">
<Expander.Header>
<TextBlock Text="{Binding Id, FallbackValue=Id}" />
</Expander.Header>
<Grid Margin="23,0,0,0">
<Grid.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="12"/>
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension TestSetup}" FontWeight="Bold"/>
<TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding SetupName, FallbackValue=SetupName}" Margin="5,0" AutomationProperties.AutomationId="Label_SetupName" />
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension FileDate}" FontWeight="Bold"/>
<TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding FileDate, FallbackValue=FileDate}" Margin="5,0" AutomationProperties.AutomationId="Label_FileDate"/>
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension TimeStamp}" FontWeight="Bold"/>
<TextBlock Grid.Column="1" Grid.Row="2" Text="{Binding TimeStamp, FallbackValue=TimeStamp, Converter={StaticResource dateToString}}" Margin="5,0" AutomationProperties.AutomationId="Label_TimeStamp"/>
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension Type}" FontWeight="Bold"/>
<TextBlock Grid.Column="1" Grid.Row="3" Text="{Binding DataType, FallbackValue=DataType}" Margin="5,0" AutomationProperties.AutomationId="Label_DataType"/>
<TextBlock Grid.Column="0" Grid.Row="4" Text="{strings:TranslateExtension ChannelCount}" FontWeight="Bold"/>
<TextBlock Grid.Column="1" Grid.Row="4" Text="{Binding ChannelCount, FallbackValue=ChannelCount}" Margin="5,0" AutomationProperties.AutomationId="Label_ChannelCount"/>
<TextBlock Grid.Column="0" Grid.Row="5" Text="{strings:TranslateExtension Description}" FontWeight="Bold"/>
<TextBlock Grid.Column="1" Grid.Row="5" Text="{Binding Description, FallbackValue=Description}" Margin="5,0" TextWrapping="Wrap" AutomationProperties.AutomationId="Label_Description"/>
</Grid>
</Expander>
</StackPanel>
</Grid>
</Grid>
</Border>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</base:BaseView>

View File

@@ -0,0 +1,35 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using DTS.Common.Classes.Viewer.TestMetadata;
using DTS.Common.Interface;
using DTS.Common.Interface.TestDefinition;
// ReSharper disable CheckNamespace
namespace DTS.Viewer.TestSummaryList
{
/// <summary>
/// Interaction logic for TestSummaryListView.xaml
/// </summary>
public partial class TestSummaryListView : ITestSummaryListView
{
public TestSummaryListView()
{
InitializeComponent();
}
private void TestSummary_KeyUp(object sender, KeyEventArgs e)
{
if ((sender as ListView)?.SelectedItem is TestSummary ts)
{
if (e.Key == Key.Space)
{
ts.IsSelected = !ts.IsSelected;
e.Handled = true;
}
}
else { e.Handled = false; }
}
}
}

View File

@@ -0,0 +1,86 @@
<base:BaseView x:Class="DTS.Viewer.TestSummaryList.TestSummaryView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity">
<ContentControl x:Name="TestListRegion" Background="LightGray" Width="Auto">
<ContentControl.Template>
<ControlTemplate TargetType="ContentControl">
<xcdg:DataGridControl x:Name="_dataGridTestSummary" ItemsSource="{Binding TestSummaryList}"
AllowDrag="False" AutoCreateColumns="False" SelectedItem="{Binding SelectedTestSummary}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
SelectionMode="Single" Width="Auto">
<xcdg:DataGridControl.ReadOnly>True</xcdg:DataGridControl.ReadOnly>
<xcdg:DataGridControl.View>
<xcdg:TableflowView UseDefaultHeadersFooters="False">
<xcdg:TableflowView.FixedHeaders>
<DataTemplate>
<xcdg:ColumnManagerRow />
</DataTemplate>
</xcdg:TableflowView.FixedHeaders>
</xcdg:TableflowView>
</xcdg:DataGridControl.View>
<xcdg:DataGridControl.Columns>
<xcdg:Column FieldName="." Title="" Width="22" >
<xcdg:Column.CellContentTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Path=IsSelected}" HorizontalAlignment="Center"
Command="{Binding IsSelectedCommand}">
<!--<i:Interaction.Triggers>
<i:EventTrigger EventName="IsChecked">
<i:InvokeCommandAction Command="{Binding IsSelectedCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>-->
</CheckBox>
</DataTemplate>
</xcdg:Column.CellContentTemplate>
</xcdg:Column>
<xcdg:Column FieldName="Id" Title="Id" Width="160" />
<xcdg:Column FieldName="Name" Title="Name" Width="*" MaxWidth="200" />
<xcdg:Column FieldName="Description" Title="Description" Width="160" />
<xcdg:Column FieldName="ChannelCount" Title="Channel Count" Width="90" />
<xcdg:Column FieldName="TestDate" Title="Date" Width="100" />
<xcdg:Column FieldName="DataType" Title="Type" Width="60" />
</xcdg:DataGridControl.Columns>
</xcdg:DataGridControl>
</ControlTemplate>
</ContentControl.Template>
</ContentControl>
</base:BaseView>

View File

@@ -0,0 +1,16 @@
using DTS.Common.Interface;
namespace DTS.Viewer.TestSummaryList
{
/// <summary>
/// Interaction logic for TestListView.xaml
/// </summary>
public partial class TestSummaryView : ITestSummaryListView
{
public TestSummaryView()
{
InitializeComponent();
}
}
}