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,21 @@
using DTS.Common.Utils;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DTS.Common.XMLUtils
{
public static class DTSXMLFile
{
public static double GetItemsToCompleteCount(string fileName)
{
double importVersion = -1;
var node = FileUtils.GetImportXmlNode(fileName, null, out importVersion);
return Convert.ToDouble(node.GetAttribute("TotalItems"), CultureInfo.InvariantCulture);
}
}
}

View File

@@ -0,0 +1,46 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System;
namespace DTS.Common.Interface.TestMetaData
{
/// <summary>
/// Interface describing a record in the TestEngineerDetails table in the Db
/// </summary>
public interface ITestEngineerDetailsDbRecord
{
[Key]
[Column("TestEngineerId")]
/// <summary>
/// The id/key of the TestEngineerDetails record in the db
/// </summary>
int TestEngineerId { get; set; }
[Column("Name")]
string Name { get; set; }
[Column("TestEngineerName")]
string TestEngineerName { get; set; }
[Column("TestEngineerPhone")]
string TestEngineerPhone { get; set; }
[Column("TestEngineerFax")]
string TestEngineerFax { get; set; }
[Column("TestEngineerEmail")]
string TestEngineerEmail { get; set; }
[Column("LocalOnly")]
bool LocalOnly { get; set; }
[Column("LastModified")]
DateTime LastModified { get; set; }
[Column("LastModifiedBy")]
string LastModifiedBy { get; set; }
[Column("Version")]
int Version { get; set; }
}
}

View File

@@ -0,0 +1,40 @@
using DTS.Common.Enums;
namespace DTS.Common.Interface.Sensors
{
public interface IStreamOutputSettingDefaults
{
///<summary>
/// udp profile setting value for the channel
///</summary>
UDPStreamProfile Profile { get; set; }
///<summary>
/// udp address setting value for the channel
///</summary>
string UDPAddress { get; set; }
///<summary>
/// time channel id setting value for the channel
///</summary>
ushort TimeChannelId { get; set; }
///<summary>
/// data channel id setting value for the channel
///</summary>
ushort DataChannelId { get; set; }
///<summary>
/// tmns config setting value for the channel
///</summary>
string TmNSConfig { get; set; }
///<summary>
/// irig data packet interval setting value for the channel
///</summary>
ushort IRIGTimeDataPacketIntervalMs { get; set; }
/// <summary>
/// 31840 basic / advanced streaming profiles
/// </summary>
bool UseAdvancedUDPStreamProfiles { get; set; }
/// <summary>
/// </summary>
/// <returns></returns>
bool Validate();
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
using DataPro.Common.Base;
namespace DataPro.Common.Interface
{
public interface ITileListViewModel : IBaseViewModel
{
IMainViewModel Parent { get; set; }
ITileListView View { get; set; }
List<ITileView> GroupList { get; set; }
}
}

View File

@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DTS.Common
{
/// <summary>
/// The object definition which is adding to the Main Region.
/// </summary>
public class ViewDefinition
{
/// <summary>
/// Gets the region name in which a view is displayed.
/// </summary>
public string RegionName { get; private set; }
/// <summary>
/// Gets the type the View's interface.
/// </summary>
public Type ViewInterfaceType { get; private set; }
/// <summary>
/// Gets the type the View.
/// </summary>
// public Type ViewType { get; private set; }
/// <summary>
/// Gets the type of the viewmodel's interface.
/// </summary>
public Type ViewModelInterfaceType { get; private set; }
/// <summary>
/// Gets the type of the viewmodel.
/// </summary>
/// <param name="regionName">Region name</param>
/// <param name="viewInterfaceType">Type of the View's interface to be registered.</param>
/// <param name="viewModelInterfaceType">Type of the View Model to be registered.</param>
public ViewDefinition(string regionName, Type viewInterfaceType, Type viewModelInterfaceType)
{
RegionName = regionName;
ViewInterfaceType = viewInterfaceType;
ViewModelInterfaceType = viewModelInterfaceType;
}
///// <summary>
///// Creates a new instance of the object.
///// Creates a new instance of the object.
///// </summary>
///// <param name="viewInterfaceType">Type of the View's interface to be registered.</param>
///// <param name="viewType">Type of the View to be registered.</param>
///// <param name="viewModelInterfaceType">Type of the viewmodel's interface to be registered.</param>
///// <param name="viewModelType">Type of the viewmodel to be registered.</param>
////public ViewDefinition(Type viewInterfaceType, Type viewType, Type viewModelInterfaceType, Type viewModelType)
//{
// ViewInterfaceType = viewInterfaceType;
// ViewType = viewType;
// ViewModelInterfaceType = viewModelInterfaceType;
// ViewModelType = viewModelType;
//}
private ViewDefinition() { }
}
}

View File

@@ -0,0 +1,54 @@
using System;
using System.Windows.Markup;
namespace DTS.Common.Enums
{
public class EnumBindingSourceExtension : MarkupExtension
{
private Type _enumType;
public Type EnumType
{
get => _enumType;
set
{
if (value == _enumType) { return; }
if (null != value)
{
var enumType = Nullable.GetUnderlyingType(value) ?? value;
if (!enumType.IsEnum)
{
throw new ArgumentException("Type must be for an Enum.");
}
}
_enumType = value;
}
}
public EnumBindingSourceExtension() { }
public EnumBindingSourceExtension(Type enumType)
{
EnumType = enumType;
}
public override object ProvideValue(IServiceProvider serviceProvider)
{
if (null == _enumType)
{
throw new InvalidOperationException("The EnumType must be specified.");
}
var actualEnumType = Nullable.GetUnderlyingType(_enumType) ?? _enumType;
var enumValues = Enum.GetValues(actualEnumType);
if (actualEnumType == _enumType)
{
return enumValues;
}
var tempArray = Array.CreateInstance(actualEnumType, enumValues.Length + 1);
enumValues.CopyTo(tempArray, 1);
return tempArray;
}
}
}

View File

@@ -0,0 +1,11 @@
namespace DTS.Common.Classes.Hardware
{
public class ExternalTilt
{
public ExternalTilt() { }
public string SerialNumber { get; set; }
public byte TiltID { get; set; }
public string SystemID { get; set; }
public string SystemLocation { get; set; }
}
}