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,60 @@
<base:BaseView x:Class="DTS.Viewer.GraphList.ExportGraphMainView"
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:prism="http://prismlibrary.com/"
xmlns:classes="clr-namespace:DTS.Common.Classes;assembly=DTS.Common"
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
xmlns:graphList="clr-namespace:DTS.Viewer.GraphList">
<base:BaseView.Resources>
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
<converters:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter" />
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<converters:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter"/>
<converters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
<HierarchicalDataTemplate ItemsSource="{Binding Path=Events}" x:Key="Templatekey">
<StackPanel Orientation="Horizontal" Background="Transparent" AutomationProperties.AutomationId="TestContentItems">
<CheckBox IsChecked="{Binding Path=IsSelected, Mode=TwoWay}" Margin="1,1,3,1"
AutomationProperties.AutomationId="TestChanSelectionChkBx"/>
<TextBlock Text="{Binding Path=Name}" AutomationProperties.AutomationId="TestIDNameLbl" />
</StackPanel>
</HierarchicalDataTemplate>
<SolidColorBrush Color="LightBlue" x:Key="{x:Static SystemColors.HighlightBrushKey}"/>
<Style x:Key="TvItemStyle" TargetType="{x:Type TreeViewItem}">
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="IsSelected" Value="{Binding Path=IsSelected}"/>
<Setter Property="IsExpanded" Value="{Binding Path=IsExpanded}"/>
<Setter Property="KeyboardNavigation.AcceptsReturn" Value="True" />
<!--<Setter Property="graphList:VirtualToggleButton.IsVirtualToggleButton" Value="True" />
<Setter Property="graphList:VirtualToggleButton.IsLocked" Value="{Binding IsLocked}" />-->
<Setter Property="AutomationProperties.AutomationId" Value="TvTestItem" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="{x:Static SystemColors.HighlightTextBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</base:BaseView.Resources>
<Grid x:Name="GraphMainRegion" IsEnabled="{Binding TestModified, Converter={StaticResource InverseBooleanConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentControl Grid.Row="0" Content="{Binding FilterView}" IsEnabled="{Binding IsFilterEnabled}"/>
<TreeView Grid.Row="2" x:Name="TvTestIdChannels" ItemsSource="{Binding FilteredTestIdsTree}"
ItemTemplate="{StaticResource Templatekey}"
ItemContainerStyle="{StaticResource TvItemStyle}"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Width="{Binding ElementName=GraphMainRegion, Path=Width}" />
</Grid>
</base:BaseView>

View File

@@ -0,0 +1,29 @@
using System.Windows.Input;
using DTS.Common.Interface;
// ReSharper disable CheckNamespace
namespace DTS.Viewer.GraphList
{
/// <summary>
/// Interaction logic for ExportGraphMainView.xaml
/// </summary>
public partial class ExportGraphMainView : IExportGraphMainView
{
public ExportGraphMainView()
{
InitializeComponent();
CommandBindings.Add(
new CommandBinding(
ApplicationCommands.Undo,
(sender, e) => // Execute
{
e.Handled = true;
},
(sender, e) => // CanExecute
{
e.Handled = true;
}));
}
}
}

View File

@@ -0,0 +1,78 @@
<base:BaseView x:Class="DTS.Viewer.GraphList.GraphMainView"
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:prism="http://prismlibrary.com/"
xmlns:classes="clr-namespace:DTS.Common.Classes;assembly=DTS.Common"
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
xmlns:graphList="clr-namespace:DTS.Viewer.GraphList">
<base:BaseView.Resources>
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
<converters:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter" />
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<converters:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter"/>
<converters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
<HierarchicalDataTemplate ItemsSource="{Binding Path=Groups}" x:Key="Templatekey">
<TextBlock Text="{Binding Path=Name}" AutomationProperties.AutomationId="TestIDNameLbl" />
<HierarchicalDataTemplate.ItemTemplate >
<HierarchicalDataTemplate ItemsSource="{Binding Path=Channels}" >
<StackPanel Orientation="Horizontal" Background="Transparent" AutomationProperties.AutomationId="TestContentItems">
<CheckBox IsChecked="{Binding Path=IsLocked, Mode=TwoWay}" Margin="1,1,3,1" Visibility="{Binding Path=IsGraph, Converter={StaticResource BooleanToVisibilityConverter}, Mode=TwoWay}"
IsEnabled="{Binding Path=CanLock, Mode=TwoWay}" AutomationProperties.AutomationId="GraphChanSelectionChkBx"/>
<TextBlock VerticalAlignment="Center" Text="{Binding DisplayName}" AutomationProperties.AutomationId="TvTestViewItemNameLbl"/>
</StackPanel>
<HierarchicalDataTemplate.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Opacity="{Binding Path=IsError, Converter={StaticResource BooleanToOpacityConverter}, Mode=TwoWay}"
Background="Transparent" AutomationProperties.AutomationId="ChannelItem">
<CheckBox IsChecked="{Binding Path=IsLocked, Mode=TwoWay}" Margin="0,1,3,1"
Visibility="{Binding Path=IsGraphChannel, Converter={StaticResource InverseBooleanToVisibilityConverter}, Mode=TwoWay}" Focusable="False"
IsEnabled="{Binding Path=CanLock, Mode=OneWay}" AutomationProperties.AutomationId="ChanLockChkBx"
/>
<Rectangle Width="15" Height="15" Fill="{Binding Path=ChannelColor, Converter={StaticResource ColorToSolidColorBrushConverter}, Mode=TwoWay}" Visibility="Visible" />
<TextBlock VerticalAlignment="Center" Text="{Binding Path=ChannelDisplayName}" Foreground="{Binding Path=ErrorColor, Mode=TwoWay, Converter={StaticResource ColorToSolidColorBrushConverter}}" Margin="5,0,0,0" AutomationProperties.AutomationId="ChanNameLbl"/>
<TextBlock VerticalAlignment="Center" Text="{Binding Path=ErrorMessage}" FontWeight="Bold" Foreground="{Binding Path=ErrorColor, Mode=TwoWay, Converter={StaticResource ColorToSolidColorBrushConverter}}" Margin="5,0,0,0"/>
</StackPanel>
</DataTemplate>
</HierarchicalDataTemplate.ItemTemplate>
</HierarchicalDataTemplate>
</HierarchicalDataTemplate.ItemTemplate>
</HierarchicalDataTemplate>
<SolidColorBrush Color="LightBlue" x:Key="{x:Static SystemColors.HighlightBrushKey}"/>
<Style x:Key="TvItemStyle" TargetType="{x:Type TreeViewItem}">
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="IsSelected" Value="{Binding Path=IsSelected}"/>
<Setter Property="IsExpanded" Value="{Binding Path=IsExpanded}"/>
<Setter Property="KeyboardNavigation.AcceptsReturn" Value="True" />
<Setter Property="graphList:VirtualToggleButton.IsVirtualToggleButton" Value="True" />
<Setter Property="graphList:VirtualToggleButton.IsLocked" Value="{Binding IsLocked}" />
<Setter Property="AutomationProperties.AutomationId" Value="TvTestItem" />
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="{x:Static SystemColors.HighlightTextBrush}"/>
</Trigger>
</Style.Triggers>
</Style>
</base:BaseView.Resources>
<Grid x:Name="GraphMainRegion" IsEnabled="{Binding TestModified, Converter={StaticResource InverseBooleanConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentControl Grid.Row="0" Content="{Binding FilterView}" IsEnabled="{Binding IsFilterEnabled}"/>
<TreeView Grid.Row="1" x:Name="TvTestChannels" ItemsSource="{Binding TestChannelsTree}"
ItemTemplate="{StaticResource Templatekey}"
ItemContainerStyle="{StaticResource TvItemStyle}"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Width="{Binding ElementName=GraphMainRegion, Path=Width}" />
</Grid>
</base:BaseView>

View File

@@ -0,0 +1,38 @@
using System.Windows.Input;
using DTS.Common.Interface;
// ReSharper disable CheckNamespace
namespace DTS.Viewer.GraphList
{
/// <summary>
/// Interaction logic for GraphMainView.xaml
/// </summary>
public partial class GraphMainView : IGraphMainView
{
public GraphMainView()
{
InitializeComponent();
CommandBindings.Add(
new CommandBinding(
ApplicationCommands.Undo,
(sender, e) => // Execute
{
e.Handled = true;
//root.IsChecked = false;
//TvTestChannels.Focus();
},
(sender, e) => // CanExecute
{
e.Handled = true;
//e.CanExecute = (root.IsChecked != false);
}));
//TvTestChannels.Focus();
}
//public void SetTvFocus()
//{
// TvTestChannels.Focus();
//}
}
}