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,50 @@
using System;
using System.Globalization;
using System.IO;
using System.Windows.Data;
namespace DTS.Common.Converters
{
/// <summary>
/// Converter which converts percentage to String.
/// </summary>
public class FilePathsToShortStringConverter : IValueConverter
{
/// <summary>
///
/// </summary>
/// <param name="value">The decimal value to convert. This value can be a standard decimal value or a nullable decimal value.</param>
/// <param name="targetType">This parameter is not used.</param>
/// <param name="parameter">This parameter is not used.</param>
/// <param name="culture">The culture to use in the format operation.</param>
/// <returns>The value to be passed to the target dependency property.</returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var filePaths = value as string[];
if (null == filePaths || filePaths.Length < 1)
{
return string.Empty;
}
if (filePaths.Length > 1)
{
return Strings.Strings.MultipleFiles;
}
var fi = new FileInfo(filePaths[0]);
return fi.Name;
}
/// <summary>
/// Conversion back is not supported.
/// </summary>
/// <param name="value">A currency 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, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,100 @@
using System;
using System.IO.Ports;
using DTS.Common.Enums;
namespace DTS.Common.Interface.Sensors.SensorsList
{
public interface IUartIOSetting
{
/// <summary>
/// ID in the database for the uart i/o setting
/// only positive numbers are valid database ids
/// </summary>
int DatabaseId { get; set; }
/// <summary>
/// whether the uart i/o is checked in a list with a checkbox
/// </summary>
bool Included { get; set; }
/// <summary>
/// the serial number / setting name
/// </summary>
string SerialNumber { get; set; }
/// <summary>
/// description or comment of setting
/// </summary>
string Description { get; set; }
/// <summary>
/// the user who last modified setting
/// </summary>
string LastModifiedBy { get; set; }
/// <summary>
/// when the setting was last modified
/// </summary>
DateTime LastModified { get; set; }
/// <summary>
/// returns true if uart i/o matches filter criteria
/// </summary>
/// <param name="term"></param>
/// <returns></returns>
bool Filter(string term);
/// <summary>
/// whether the uart i/o is associated with a channel
/// </summary>
bool Assigned { get; set; }
/// <summary>
/// whether the uart i/o is online or not
/// </summary>
bool Online { get; set; }
/// <summary>
/// the isocode for the uart i/o
/// </summary>
string ISOCode { get; set; }
/// <summary>
/// the iso channel name for the uart i/o
/// </summary>
string ISOChannelName { get; set; }
/// <summary>
/// the user code for the uart i/o
/// </summary>
string UserCode { get; set; }
/// <summary>
/// the user channel name for the uart i/o
/// </summary>
string UserChannelName { get; set; }
/// <summary>
/// marks the uart i/o setting as broken or not
/// broken sensors do not appear in selectable lists of sensors in edit test setup or edit group
/// </summary>
bool Broken { get; set; }
/// <summary>
/// marks the uart i/o setting as donotuse
/// donotuse sensors do not appear in selectable lists of sensors in edit test setup or edit group
/// </summary>
bool DoNotUse { get; set; }
/// <summary>
/// uart baud rate
/// </summary>
uint BaudRate { get; set; }
/// <summary>
/// uart data bits
/// </summary>
uint DataBits { get; set; }
/// <summary>
/// uart stop bits
/// </summary>
StopBits StopBits { get; set; }
/// <summary>
/// uart parity
/// </summary>
Parity Parity { get; set; }
/// <summary>
/// uart flow control FB 30486 removed set. Always be NONE
/// </summary>
Handshake FlowControl { get; }
/// <summary>
/// the data format of incoming data
/// </summary>
UartDataFormat DataFormat { get; set; }
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using DTS.Common.Base;
using DTS.Common.Enums;
namespace DTS.Common.Interface.Channels.ChannelCodes
{
public interface IChannelCodesListViewModel : IBaseViewModel
{
IChannelCodesListView View { get; set; }
void Unset();
void SetPage(object page);
void OnSetActive();
bool Save();
ObservableCollection<IChannelCode> ISOChannelCodes { get; set; }
ObservableCollection<IChannelCode> UserChannelCodes { get; set; }
bool Validate(bool bDisplayWindow);
void CopySelected();
void DeleteSelected();
void Filter(object columnTag, string searchTerm);
void Sort(object columnTag, bool bColumnClick);
Func<IList<IChannelCode>> ChannelCodesFunc { get; }
bool ShowISOStringBuilder { get; set; }
bool UniqueISOCodesRequired { get; set; }
bool ShowChannelCodeLookupHelper { get; set; }
bool IsReadOnly { get; set; }
IChannelCode [] SelectedCodes { get; }
}
}

View File

@@ -0,0 +1,150 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using DTS.Common.Base;
using DTS.Common.Classes.Hardware;
using DTS.Common.Enums;
using DTS.Common.Interface.Pagination;
using DTS.Common.Interface.TestSetups.TestSetupsList;
namespace DTS.Common.Interface.DASFactory.Diagnostics.HardwareList
{
public interface IHardwareListViewModel : IBaseViewModel, IFilterableListView
{
/// <summary>
/// a user selected slice6
/// </summary>
ISLICE6TreeNode SelectedSLICE6 { get; set; }
/// <summary>
/// all slice6 which are not associated with a given S6DB
/// </summary>
ISLICE6TreeNode[] AvailableSLICE6 { get; set; }
/// <summary>
/// currently selected SLICE6DB
/// </summary>
IHardware SelectedSLICE6DB { get; set; }
/// <summary>
/// all available SLICE6DB
/// </summary>
IHardware [] AvailableSLICE6DB { get; set; }
bool IsEdit { get; set; }
int TDASCalPeriod { get; set; }
int G5CalPeriod { get; set; }
int SLICE1CalPeriod { get; set; }
int SLICE1_5CalPeriod { get; set; }
int SLICE2_CalPeriod { get; set; }
int SLICE6_CalPeriod { get; set; }
int POWERPRO_CalPeriod { get; set; }
int SLICE6Air_CalPeriod { get; set; }
int SLICE6DB_CalPeriod { get; set; }
int TSRAir_CalPeriod { get; set; }
/// <summary>
/// the hardware replacement view
/// </summary>
IHardwareListReplaceView ReplaceView { get; set; }
IHardwareListView View { get; set; }
IHardwareListOverdueView OverdueView { get; set; }
IHardwareListSelectView SelectView { get; set; }
ISLICE6TreeView SLICE6TreeView { get; set; }
IHardware [] Hardware { get; set; }
IHardware [] OverdueHardware { get; set; }
/// <summary>
/// the hardware in the test (replacementview)
/// </summary>
IHardware [] HardwareInTest { get; set; }
/// <summary>
/// the hardware to replace
/// </summary>
IHardware HardwareToReplace { get; set; }
/// <summary>
/// the hardware that is available to replace with
/// </summary>
IHardware [] AvailableHardware { get; set; }
/// <summary>
/// initializes the replacement view given a test id
/// </summary>
void InitializeReplace(ITestSetup setup, IsoViewMode viewMode);
void GetHardware(bool bIncludeModules, bool bIncludeOverdue, bool bIncludeBridges, int? testId, int? groupId);
void GetAvailableSampleRates(int[] availableSampleRates);
void SetTestSampleRates(Dictionary<string, double> testSampleRates);
void SetHasIncludedChildren();
void UpdateTestSampleRate(string childSerialNumber, double testSampleRate);
int TestAAFRateHzColumnWidth { get; set; }
void SetTestAAFRates(Dictionary<string, float> testAAFRates);
void UpdateTestAAFilterRate(string childSerialNumber, float testAAFilterRate);
Func<SerializableAAF.DAS_TYPE, int, float> GetAAFForHardwareFunc { get; set; }
void CheckForMixedDAS(string nonParentSerialNumber, double testSampleRate);
void SetParentMixedRates(string parentDAS, bool mixedRates);
int TestSampleRateColumnWidth { get; set; }
int TestClockMasterColumnWidth { get; set; }
int PTPDomainColumnWidth { get; set; }
void SetTestClockProfiles(DTS.Common.ClockSyncProfile masterProfile, DTS.Common.ClockSyncProfile slaveProfile);
void SetTestClockMasters(Dictionary<string, bool> testClockMasters);
void UpdateTestClockMaster(string childSerialNumber, bool testClockMaster);
void SetTestPTPDomainIDs(Dictionary<string, byte> testPTPDomainIDs);
void UpdateTestPTPDomainID(string childSerialNumber, byte ptpDomainId);
void Unset();
void Sort(object o, bool columnClick);
void SortOverdue(object o, bool columnClick);
void SetIncluded(string[] serialNumbers, bool included);
void SetIncluded(int[] dasId);
void Filter(string term);
void MouseDoubleClick(int index);
void SetCache(IISOHardware[] hardware);
/// <summary>
/// whether to show a compact view (no rack modules) or
/// expanded (show rack modules)
/// </summary>
bool ShowCompact { get; set; }
/// <summary>
/// loads tree for given hardware
/// </summary>
/// <param name="serialNumber"></param>
void LoadTreeView(string serialNumber);
/// <summary>
/// all the SLICE6 associated with a S6DB
/// (LoadTreeView will set this)
/// </summary>
ISLICE6TreeNode[] SLICE6TreeNodes{ get; set; }
/// <summary>
/// associates a SLICE6 with a SLICE6DB
/// [does not commit]
/// </summary>
/// <param name="node"></param>
void Associate(ISLICE6TreeNode node);
/// <summary>
/// associates units from one SLICE6DB
/// with another
/// [does not commit]
/// </summary>
/// <param name="node"></param>
void Associate(IHardware node);
/// <summary>
/// removes the association of a SLICE6 with a SLICE6DB
/// [does not commit]
/// </summary>
/// <param name="node"></param>
void UnAssociate(ISLICE6TreeNode node);
/// <summary>
/// associates or de-associates SLICE6 from a SLICE6DB
/// </summary>
void SaveSLICE6Associations(string serialNumber);
IHardware[] GetSelectedItems();
/// <summary>
/// Replaces HardwareToReplace with ReplacementHardware
/// </summary>
void Replace();
/// <summary>
/// the selected hardware to replace with
/// </summary>
IHardware ReplacementHardware { get; set; }
void SetCalPeriods(int g5CalPeriod, int slice1CalPeriod, int slice1_5CalPeriod, int slice2_CalPeriod, int slice6_CalPeriod, int tdasCalPeriod,
int powerpro_CalPeriod, int slice6Air_CalPeriod, int slice6DB_CalPeriod, int tsrAir_CalPeriod, int slice6AirBridge_CalPeriod);
}
}

View File

@@ -0,0 +1,10 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// Refresh test with ID
/// </summary>
public class RefreshTestRequestEvent : CompositePresentationEvent<string> { }
}