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,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace DTS.Common.Converters
{
public class DoubleFromThousandthUnitToBaseUnit : IValueConverter
{
/// <summary>
/// Used to convert a Thousandth value to its base unit.
/// For example to convert millivolts to volts
/// </summary>
/// <param name="value"></param>
/// <param name="targetType"></param>
/// <param name="parameter"></param>
/// <param name="culture"></param>
/// <returns></returns>
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is double milliUnit)
{
if (double.IsNaN(milliUnit)) { return 0D; }
return milliUnit / 1000.0D;
}
else
{
return 0D;
}
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is double unit)
{
if (double.IsNaN(unit)) { return 0D; }
return unit * 1000.0D;
}
else
{
return 0D;
}
}
}
}

View File

@@ -0,0 +1,24 @@
using System;
using System.Windows.Data;
using System.Windows.Media;
namespace DTS.Common.Converters
{
public class FaultedColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is bool b)
{
if (b) { return BrushesAndColors.Brush_ApplicationStatus_Failed.Color; }
else { return BrushesAndColors.Brush_ApplicationStatus_Complete.Color; }
}
return Brushes.Transparent.Color;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return null;
}
}
}

View File

@@ -0,0 +1,11 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface ISummaryChannel : IBaseClass
{
string ChannelType { get; set; }
int Assigned { get; set; }
string Unassigned { get; set; }
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,26 @@
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 LogoutUserEvent : CompositePresentationEvent<LogoutUserArg> { }
public class LogoutUserArg
{
public enum Reasons
{
DatabaseSwitch
}
public Reasons Reason { get; }
public LogoutUserArg(Reasons reason)
{
Reason = reason;
}
}
}

View File

@@ -0,0 +1,12 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface IDiagViewModel : IBaseViewModel
{
/// <summary>
/// Gets the Tab View.
/// </summary>
IDiagView View { get; }
}
}