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

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@@ -0,0 +1,39 @@
using System;
using System.Windows;
using System.Windows.Data;
namespace DTS.Common.Converters
{
/// <summary>
/// Represents the converter that converts Text (GroupName) values to and from <see cref="Visibility">Visibility</see> enumeration values.
/// </summary>
public class GroupNameToVisibilityConverter : IValueConverter
{
/// <summary>
/// Converts a Group Name value to a Visibility enumeration value.
/// </summary>
/// <param name="value">The Boolean value to convert. This value can be a standard Boolean value or a nullable Boolean value.</param>
/// <param name="targetType">This parameter is not used.</param>
/// <param name="parameter">The converter parameter to use.</param>
/// <param name="culture">This parameter is not used.</param>
/// <returns>The value to be passed to the target dependency property.</returns>
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value != null && value.ToString().Trim().StartsWith("Graph")) { return Visibility.Visible; }
return Visibility.Collapsed;
}
/// <summary>
///
/// </summary>
/// <param name="value">A Visibility enumeration value.</param>
/// <param name="targetType">This parameter is not used.</param>
/// <param name="parameter">This parameter is not used.</param>
/// <param name="culture">This parameter is not used.</param>
/// <returns>The value to be passed to the source object.</returns>
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return null;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,20 @@
using System;
namespace DTS.Common.Interface.Sensors
{
public interface ISoftwareFilter
{
int Id{ get; set; }
char ISOCode { get; set; }
string Description { get; set; }
double Frequency { get; set; }
DateTime LastModified { get; set; }
string LastModifiedBy { get; set; }
//FB 13120 determine if the software filter is default
bool IsDefault { get; set; }
bool IsBlank();
void Delete();
void Commit(bool updateDateTime = true, string user = "");
}
}

View File

@@ -0,0 +1,31 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform app that it should mark itself busy or available
/// </summary>
/// <remarks>
///
/// </remarks>
public class PageModifiedEvent : CompositePresentationEvent<PageModifiedArg> { }
public class PageModifiedArg
{
public enum Status
{
Clear,
Modified,
Saved
}
public Status PageStatus { get; }
public object Page { get; }
public bool Handled { get; set; }
public PageModifiedArg(Status status, object page)
{
PageStatus = status;
Page = page;
}
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using DTS.Common.Interface.ISO.ExtraProperties;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.ISO
{
public class ExtraPropertiesChangedEvent : CompositePresentationEvent<ExtraPropertiesChangedEventArgs> { }
public class ExtraPropertiesChangedEventArgs
{
public IList<IExtraProperty> ExtraProperties { get; private set; }
public object Producer { get; private set; }
public object Consumer { get; private set; }
public ExtraPropertiesChangedEventArgs(IList<IExtraProperty> extraProperties, object producer, object consumer)
{
ExtraProperties = extraProperties;
Producer = producer;
Consumer = consumer;
}
}
}

View File

@@ -0,0 +1,47 @@
<UserControl x:Class="DTS.Common.Controls.GridViewColumnHeaderSelectable"
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:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DTS.Common.Controls"
xmlns:strings="clr-namespace:DTS.Common.Strings"
mc:Ignorable="d"
x:Name="dtsGridViewColumnHeader"
d:DesignHeight="20" d:DesignWidth="200">
<UserControl.Resources>
<ResourceDictionary>
<Geometry x:Key="DownArrowIconGeometry">F0 M 0,0L 10,0L 5,7L 0,0 Z</Geometry>
<local:BoolToInvertedBoolConverter x:Key="BoolToInvertedBoolConverter"/>
<Style TargetType="Button" BasedOn="{StaticResource PageContentButtonDark}" />
</ResourceDictionary>
</UserControl.Resources>
<Grid DataContext="{Binding ElementName=dtsGridViewColumnHeader}" x:Name="mainGrid" Height="20" MaxHeight="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Border BorderThickness="0" Grid.Column="0" PreviewMouseLeftButtonDown="PreviewLeftButtonUp">
<TextBlock Text="{Binding Path=HeaderTitle, FallbackValue='I Should Not Be Here'}" HorizontalAlignment="Left" Margin="5,0,5,0" />
</Border>
<!--<Button Grid.Column="0" Content="{Binding Path=HeaderTitle, FallbackValue='I should not be here'}" HorizontalAlignment="Left" Margin="5,0,5,0" Click="ButtonClick" /> -->
<ToggleButton Grid.Column="1" x:Name="TogglePopupButton" Width="20" Height="20" MaxWidth="20" MaxHeight="20" IsEnabled="{Binding ElementName=ToggledPopup, Path=IsOpen, Converter={StaticResource BoolToInvertedBoolConverter}}"
IsChecked="{Binding ToggleButtonIsChecked, Mode=TwoWay, FallbackValue=True}">
<Path x:Name="BtnArrow" VerticalAlignment="Center" HorizontalAlignment="Center" Width="8" Fill="#FF527DB5" Stretch="Uniform"
Data="{Binding ToggleIconGeometry, FallbackValue={StaticResource DownArrowIconGeometry}}"/>
</ToggleButton>
<Popup Grid.Column="0" Grid.ColumnSpan="2" x:Name="ToggledPopup" HorizontalAlignment="Stretch" Placement="Bottom" VerticalAlignment="Stretch" StaysOpen="False" IsOpen="{Binding ToggleButtonIsChecked, Mode=TwoWay}" >
<Border Background="#FFEEEEEE" BorderBrush="#FF888888" BorderThickness="1">
<Grid HorizontalAlignment="Stretch" Margin="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Padding="10 5" Content="{x:Static strings:Strings.SelectAll}" Click="SelectAllButton_OnClick" />
<Button Grid.Column="1" Padding="10 5" Content="{x:Static strings:Strings.ClearAll}" Click="ClearAllButton_OnClick"/>
</Grid>
</Border>
</Popup>
</Grid>
<!--</GridViewColumnHeader>-->
</UserControl>

View File

@@ -0,0 +1,182 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using DTS.Common.Base;
using DTS.Common.Enums;
using DTS.Common.Enums.Sensors;
using DTS.Common.Enums.Sensors.SensorsList;
using DTS.Common.Interface.Channels;
using DTS.Common.Interface.Channels.ChannelCodes;
using DTS.Common.Interface.DataRecorders;
using DTS.Common.Interface.Groups.GroupList;
using DTS.Common.Interface.Pagination;
using DTS.Common.Interface.Sensors;
using DTS.Common.Interface.TestSetups.TestSetupsList;
namespace DTS.Common.Interface.Groups.GroupChannelList
{
/// <summary>
/// this class describes the view module for the group import module
/// this handles interaction betweens the views and the application, as well as
/// the logic and intermediate data for the module
/// </summary>
public interface IGroupChannelListViewModel : IBaseViewModel, IFilterableListView
{
IGroupChannelListView View { get; set; }
IGroupChannelSettingsListView SettingsView { get; set; }
/// <summary>
/// populates the channels to be displayed in views
/// </summary>
/// <param name="page"></param>
/// <param name="sensorLookup"></param>
/// <param name="hardwareLookup"></param>
/// <param name="channelDefaults"></param>
/// <returns></returns>
IDictionary<IGroup, Channels.IGroupChannel[]> PopulateChannels(object page,
IDictionary<int, ISensorData> sensorLookup,
IDictionary<int, IDASHardware> hardwareLookup,
IChannelSetting[] channelDefaults,
bool allowChannelDeletionByNonAdminUser = true,
bool userIsAdmin = true,
bool allowSensorPushAndPull = false,
bool keepExistingChannels = false,
bool allowChannelDeletionFromFixedGroup = true);
/// <summary>
/// whether voltage insertion channels should be created when dragging on an analog hardware channel onto
/// a blank channel with no sensor set yet
/// </summary>
bool CreateVoltageInputChannels { get; set; }
/// <summary>
/// Check to see if any of the channel's values that can be modified
/// in the Parameters step are different than the corresponding
/// sensor's values in the sensor database, so that they can be
/// decorated, along with the Parameters step (FB 15245)
/// </summary>
/// <param name="ch"></param>
/// <returns></returns>
bool CompareAndMarkChannelParameters(Channels.IGroupChannel ch);
/// <summary>
/// any work that needs to be done when a view is loaded
/// </summary>
void OnSetActive();
/// <summary>
/// any work that needs to be done when view is unloaded
/// </summary>
void Unset();
/// <summary>
/// filters content on the screen given a string term
/// </summary>
/// <param name="term"></param>
void Filter(string term);
/// <summary>
/// The format of a string double (usually "N2")
/// </summary>
string CapacityFormat { get; set; }
/// <summary>
/// All available channels [prior to filtering/searching/sorting]
/// </summary>
List<Channels.IGroupChannel> AllChannels { get; }
Func<IList<IChannelCode>> ChannelCodesFunc { get; }
/// <summary>
/// channels displayed in channel list view
/// </summary>
ObservableCollection<Channels.IGroupChannel> Channels { get; set; }
/// <summary>
/// channels display in settings view, essentially the same as channels
/// but snap-shot in onsetactive with just the blank channels removed
/// </summary>
ObservableCollection<Channels.IGroupChannel> SettingChannels { get; set; }
/// <summary>
/// indicates that the attached SettingsView has loaded
/// </summary>
bool SettingsViewLoaded { get; set; }
/// <summary>
/// indicates that the SettingChannel UI elements were created
/// </summary>
bool SettingChannelsLoaded { get; set; }
/// <summary>
/// group being viewed (when editing a group)
/// </summary>
IGroup Group { get; set; }
/// <summary>
/// test setup being viewed (when editing a test setup)
/// </summary>
ITestSetup TestSetup { get; set; }
//whether to always match the CFC to the iso code and vice versa
bool UseISOCodeFilterMapping { get; set; }
/// <summary>
/// sets which typeof channels are displayed by sensor type
/// </summary>
/// <param name="bridgeFilter"></param>
void SetFilter(PossibleFilters bridgeFilter);
/// <summary>
/// indicates whether to show isocodes
/// </summary>
bool ShowISOCodes { get; }
/// <summary>
/// indicates whether to show user codes
/// </summary>
bool ShowUserCodes { get; }
/// <summary>
/// indicates whether to show Dallas Id column or not
/// http://manuscript.dts.local/f/cases/31802/Add-Dallas-ID-column-to-quickcheckout
/// </summary>
bool ShowDallasIdColumn { get; set; }
/// <summary>
/// gets/sets what the iso view mode is
/// </summary>
IsoViewMode ISOViewMode { get; set; }
bool ShowISOStringBuilder { get; set; }
/// <summary>
/// gets/sets whether complete and unique isocodes are required
/// </summary>
bool UniqueISOCodesRequired { get; set; }
bool ShowChannelCodeLookupHelper { get; set; }
bool UseTestSetupOrder { get; }
bool ShowSensorChannelUserValues { get; set; }
void MoveDown(Channels.IGroupChannel [] channel);
void MoveBottom(Channels.IGroupChannel [] channel);
void MoveUp(Channels.IGroupChannel [] channel);
void MoveTop(Channels.IGroupChannel [] channel);
void Filter(PossibleFilters filter);
void AddChannels(DTS.Common.Interface.Sensors.SensorsList.IDragAndDropItem[] sensors);
void AddChannels(IHardwareChannel[] hardwareChannels);
void AddChannels(Channels.IGroupChannel[] groupChannels);
void Remove(Channels.IGroupChannel channel, bool notifyChanged = true);
IGroup CreateGroupIfNeeded(ITestSetup testSetup, string groupName);
//used to count channels for the label at the top of the view
void SetIncludedHardware(IDASHardware[] hardwares);
/// <summary>
/// modifies how meta data is handled when sensors are dragged onto channels without sensors
/// </summary>
bool ApplySensorDataToBlankChannels { get; set; }
bool AllowChannelDeletionByNonAdminUser { get; set; }
bool UserIsAdmin { get; set; }
bool AllowSensorPushAndPull { get; set; }
/// <summary>
/// sets the range of all analog sensors according to input
/// </summary>
/// <param name="option"></param>
void SetRange(CACOption option);
/// <summary>
/// sets the view (settings)
/// </summary>
/// <param name="columnTag"></param>
/// <param name="bUserClick"></param>
void Sort(object columnTag, bool bUserClick);
bool ReadOnlyParametersMode { get; set; }
bool ReadOnlyChannelsMode { get; set; }
int UserID { get; set; }
}
}