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,44 @@
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 AppStatusEvent : CompositePresentationEvent<AppStatusArg> { }
/// <summary>
/// app status extended event
/// app status event notification providing additional information
/// 15648 Need busy cursor for view data tab
/// </summary>
public class AppStatusExEvent : CompositePresentationEvent<AppStatusExArg> { }
public class AppStatusExArg
{
/// <summary>
/// status being notified
/// </summary>
public AppStatusArg Status { get; private set; }
/// <summary>
/// name of process notifying of status
/// </summary>
public string Name { get; private set; }
public AppStatusExArg(AppStatusArg status, string name)
{
Status = status;
Name = name;
}
}
public enum AppStatusArg
{
Busy,
Available,
Shutdown, //called when windows or the user session is ended (logged out)
Close, //called when the application is closed
UserLogout //called when a user is logged out
}
}

View File

@@ -0,0 +1,29 @@
using System.Collections.Generic;
using System.Reflection;
using Microsoft.Practices.Prism.Events;
// ReSharper disable ClassNeverInstantiated.Global
namespace DTS.Common.Events
{
/// <summary>
/// The <see cref="AssemblyListNotification"/> event.
/// </summary>
/// <remarks>
/// The <see cref="AssemblyListNotification"/> event is used to display the notification content such as message and icon.
/// </remarks>
public class AssemblyListNotification : CompositePresentationEvent<AssemblyListInfo> { }
public class AssemblyListNotificationViewer : CompositePresentationEvent<AssemblyListInfo> { }
public class AssemblyListInfo : EventBase
{
public AssemblyListInfo()
{
}
public AssemblyListInfo(List<Assembly> assemblyList)
{
AssemblyList = assemblyList;
}
public List<Assembly> AssemblyList { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform app that Automatic Mode status has changed
/// </summary>
/// <remarks>
///
/// </remarks>
public class AutomaticModeStatusEvent : CompositePresentationEvent<AutomaticModeStatusEventArgs> { }
public class AutomaticModeStatusEventArgs
{
public bool TextSet { get; set; } = false;
public string Text { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,13 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// The BusyIndicator changed event.
/// </summary>
/// <remarks>
/// The Busy Indicator changed event is used to ...
/// </remarks>
public class BusyIndicatorChangeNotification : CompositePresentationEvent<bool> { }
}

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// The CancelProcess event.
/// </summary>
///
/// <remarks>This event is used by the services to display the current status.</remarks>
///
public class CancelProcessEvent : CompositePresentationEvent<CancelProcess> { }
/// <summary>
/// The CancelProces is used by <see cref="CancelProcessEvent">CancelProcessEvent</see> event to cancel current process.
/// </summary>
public class CancelProcess
{
/// <summary>
/// Gets or sets a value indicating whether this object is busy.
/// </summary>
public bool IsBusy { get; set; }
/// <summary>
/// Gets or sets the id of the process.
/// </summary>
public int ProcessId { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
using DTS.Common.Enums.Channels;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.ChannelCodes
{
public class ChannelCodeCommittedEvent: CompositePresentationEvent<ChannelCodeCommittedEventArgs []> { }
public class ChannelCodeCommittedEventArgs
{
public ChannelEnumsAndConstants.ChannelCodeType ChannelCodeType{ get; private set; }
public string Code{ get; private set; }
public string Name { get; private set; }
// indicates whether the user submitting the event has write privilege
// for channel codes
public bool CanUserCommitChannelCodes { get; private set; }
public ChannelCodeCommittedEventArgs(ChannelEnumsAndConstants.ChannelCodeType channelCodeType,
string code,
string name,
bool canUserCommitChannelCodes)
{
ChannelCodeType = channelCodeType;
Code = code;
Name = name;
CanUserCommitChannelCodes = canUserCommitChannelCodes;
}
}
}

View File

@@ -0,0 +1,7 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
public class ChannelCodesViewChangedEvent : CompositePresentationEvent<DTS.Common.Enums.IsoViewMode> { }
}

View File

@@ -0,0 +1,12 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// The CloseApplicationRequested event.
/// </summary>
///
/// <remarks>This event is used by the Application to notify subscribers that the Application is requested to be closed.</remarks>
///
public class CloseApplicationRequested : CompositePresentationEvent<object> { }
}

View File

@@ -0,0 +1,18 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform app that com status has changed
/// </summary>
/// <remarks>
///
/// </remarks>
public class CommActiveEvent : CompositePresentationEvent<ComStatusArg> { }
public enum ComStatusArg
{
CommandStart,
ResponseStart
}
}

View File

@@ -0,0 +1,12 @@
using DTS.Common.Interface.DASFactory;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.DASFactory
{
/// <summary>
/// this event notifies on configuration information
/// currently only used to notify when blank or missing configurations occur
/// 17872 Use DASConfig XMLs on disk when performing an emergency download with DAS that have blank filestore(s)
/// </summary>
public class DASConfigurationEvent : CompositePresentationEvent<IDASConfigurationArg> { }
}

View File

@@ -0,0 +1,19 @@
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 DBConnectionEvent : CompositePresentationEvent<DBConnectionArg> { }
public class DBConnectionArg
{
public bool Connected { get; set; }
public string DBName { get; set; }
public string Server { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using DTS.Common.Base;
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
public class PSDReportGRMSValuesUpdatedEvent : CompositePresentationEvent<PSDReportGRMSValuesUpdatedEventArg> { }
public class PSDReportGRMSValuesUpdatedEventArg
{
public IChannelGRMSSummary[] Values { get; set; }
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using DTS.Common.Base;
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
public class PSDReportSettingsChangedEvent : CompositePresentationEvent<PSDReportSettingsChangedEventArg> { }
public class PSDReportSettingsChangedEventArg
{
public IPSDReportSettingsModel Model { get; set; }
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DTS.Common.Events
{
public class SaveReportToCSVRequestedEvent : CompositePresentationEvent<SaveReportToCSVRequestedEventArgs> { }
public class SaveReportToCSVRequestedEventArgs
{
public string Directory { get; set; }
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DTS.Common.Events
{
public class SaveReportToPDFRequestedEvent : CompositePresentationEvent<SaveReportToPDFRequestedEventArgs> { }
public class SaveReportToPDFRequestedEventArgs
{
public string Directory { get; set; }
public IBaseViewModel ParentVM { get; set; }
}
}

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> { }
}

View File

@@ -0,0 +1,12 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// sets the property UseZeroForUnfiltered
/// this controls whether 0 or P is used in isocode filter field
/// when modifying an isocode from a filter
/// </summary>
public class SetUseZeroForUnfilteredEvent : CompositePresentationEvent<bool> { }
}

View File

@@ -0,0 +1,34 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
public class ShiftT0Event : CompositePresentationEvent<ShiftT0EventArguments> { }
public class ShiftT0EventArguments
{
public double T0Time { get; }
public bool IsInitialization {get; }
/// <summary>
/// the steps/samples from T0 to shift
/// </summary>
public int T0Steps{ get; }
/// <summary>
/// whether shift is caused by a keypress (left/right arrow)
/// </summary>
public bool IsKeyPress { get; }
public ShiftT0EventArguments(double t0, bool isInitialization)
{
T0Time = t0;
IsInitialization = isInitialization;
T0Steps = 0;
IsKeyPress = false;
}
public ShiftT0EventArguments( int steps, bool isInitialization, bool isKeyPress)
{
T0Time = 0D;
IsInitialization = isInitialization;
IsKeyPress = isKeyPress;
T0Steps = steps;
}
}
}

View File

@@ -0,0 +1,11 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// Show/Hide T0 Cursor
/// </summary>
public class ShowT0CursorEvent : CompositePresentationEvent<bool> { }
}

View File

@@ -0,0 +1,12 @@
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The Data Folder changed event.
/// </summary>
public class TestModificationChangedEvent : CompositePresentationEvent<ITestModificationModel> { }
}

View File

@@ -0,0 +1,23 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// this event is called currently whenever a test is modified by the viewer
/// it's used currently by datapro to regenerate an roi when an event is modified
/// </summary>
public class TestModificationEvent : CompositePresentationEvent<TestModificationArgs> { }
public class TestModificationArgs
{
public string DataSetDirectory{ get; private set; }
public string TestId{get; private set;}
public TestModificationArgs(string dtsFilePath, string testId)
{
DataSetDirectory = dtsFilePath;
TestId = testId;
}
}
}

View File

@@ -0,0 +1,15 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
public class ChartAxisChangedEvent : CompositePresentationEvent<ChartAxisChangedEventArg> { }
public class ChartAxisChangedEventArg
{
public IBaseViewModel ParentVM { get; set; }
public string Axis { get; set; }
public double MinValue { get; set; }
public double MaxValue { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using DTS.Common.Base;
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The Data Folder changed event.
/// </summary>
public class ChartOptionsChangedEvent : CompositePresentationEvent<ChartOptionsChangedEventArg> { }
public class ChartOptionsChangedEventArg
{
public IBaseViewModel ParentVM { get; set; }
public IChartOptionsModel Model { get; set; }
public string ChartType { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The Data Folder changed event.
/// </summary>
public class CursorShowChangedEvent : CompositePresentationEvent<bool> { }
}

View File

@@ -0,0 +1,11 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The Data Folder changed event.
/// </summary>
public class CursorShowMinMaxChangedEvent : CompositePresentationEvent<bool> { }
}

View File

@@ -0,0 +1,11 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The Data Folder changed event.
/// </summary>
public class CursorsAlailableChangedEvent : CompositePresentationEvent<bool> { }
}

View File

@@ -0,0 +1,11 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The Data Folder changed event.
/// </summary>
public class CursorsClearChangedEvent : CompositePresentationEvent<bool> { }
}

View File

@@ -0,0 +1,11 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The Data Folder changed event.
/// </summary>
public class ResetZoomChangedEvent : CompositePresentationEvent<bool> { }
}

View File

@@ -0,0 +1,11 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// A request was made to save the current chart to PDF.
/// </summary>
public class SaveToPDFRequestedEvent : CompositePresentationEvent<string> { }
}

View File

@@ -0,0 +1,20 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
public class FilterParameterArgs
{
/// <summary>
/// Filter requester
/// </summary>
public IBaseViewModel Requester { get; set; }
/// <summary>
/// Filter parameter
/// </summary>
public string Param { get; set; }
}
public class FilterParameterChangedEvent : CompositePresentationEvent<FilterParameterArgs> { }
}

View File

@@ -0,0 +1,7 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
public class CalibrationBehaviorSettableInViewerChangedEvent : CompositePresentationEvent<bool> { }
}

View File

@@ -0,0 +1,8 @@
using System.Windows;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
public class ViewerSettingsVisibilityChangedEvent : CompositePresentationEvent<Visibility> { }
}

View File

@@ -0,0 +1,12 @@
using System.Collections.Generic;
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
// ReSharper disable ClassNeverInstantiated.Global
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The selected Test Summary list changed event.
/// </summary>
public class ChannelSelectionChangeNotification : CompositePresentationEvent<List<ITestChannel>> { }
}

View File

@@ -0,0 +1,10 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable ClassNeverInstantiated.Global
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The selected Test Summary list changed event.
/// </summary>
public class ChannelSelectionCountNotification : CompositePresentationEvent<int> { }
}

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of selected Graphs changed event.
/// </summary>
public class ChannelsModificationLineFitNotification : CompositePresentationEvent<LineFitArgs> { }
public class LineFitArgs
{
public ITestChannel Channel { get; }
public ulong StartIndex { get; }
public ulong EndIndex { get; }
public LineFitArgs(ITestChannel channel, ulong startIndex, ulong endIndex)
{
Channel = channel;
StartIndex = startIndex;
EndIndex = endIndex;
}
}
}

View File

@@ -0,0 +1,12 @@
using System.Collections.Generic;
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of selected Graphs changed event.
/// </summary>
public class ChannelsModificationNotification : CompositePresentationEvent<List<ITestChannel>> { }
}

View File

@@ -0,0 +1,16 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
//A datafile was selected, but don't want to trip all of the DataFolderChangedEvent subscriptions
public class DataFileSelectedEvent : CompositePresentationEvent<DataFileSelectionArg> { }
public class DataFileSelectionArg
{
public string File { get; set; }
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The Data Folder changed event.
/// </summary>
public class DataFolderChangedEvent : CompositePresentationEvent<DataFolderSelectionArg> { }
public class DataFolderSelectionArg
{
public string Path{ get; set; }
public string File { get; set; }
/// <summary>
/// whether to set the given test as selected in ui and viewer
/// 16158 Browse button on View Data tab not functiona
/// </summary>
public bool SetSelected { get; set; } = false;
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
public class GraphChannelReadCalcProgressChangedEvent : CompositePresentationEvent<GraphChannelReadCalcProgressChangedEventArgs> { }
public class GraphChannelReadCalcProgressChangedEventArgs
{
public string ProgressMessage { get; set; }
public double ProgressPercent { get; set; }
public IBaseViewModel GraphVM { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of selected Tests changed event.
/// </summary>
public class GraphChannelsReadCompletedNotification : CompositePresentationEvent<GraphChannelsReadCompletedNotificationArgs> { }
public class GraphChannelsReadCompletedNotificationArgs
{
public bool IsReadCompleted { get; set; }
public IBaseViewModel GraphVM { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using DTS.Common.Base;
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of selected Tests changed event.
/// </summary>
public class GraphClearNotification : CompositePresentationEvent<GraphClearNotificationArg>{ }
public class GraphClearNotificationArg
{
public bool GraphClear { get; set; }
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of selected Tests changed event.
/// </summary>
public class GraphLoadedCountNotification : CompositePresentationEvent<GraphLoadedCountNotificationArg> { }
public class GraphLoadedCountNotificationArg
{
public int LoadedCount { get; set; }
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of loaded Tests changed event.
/// </summary>
public class GraphSelectedChannelCountNotification : CompositePresentationEvent<GraphSelectedChannelCountNotificationArg> { }
public class GraphSelectedChannelCountNotificationArg
{
public int SelectedChannelCount { get; set; }
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using System.Collections.Generic;
using DTS.Common.Base;
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of selected Tests changed event.
/// </summary>
public class GraphSelectedChannelsNotification : CompositePresentationEvent<GraphSelectedChannelsNotificationArg> { }
public class GraphSelectedChannelsNotificationArg
{
public List<ITestChannel> SelectedChannels { get; set; }
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of loaded Tests changed event.
/// </summary>
public class TestLoadedCountNotification : CompositePresentationEvent<TestLoadedCountNotificationArg> { }
public class TestLoadedCountNotificationArg
{
public int LoadedCount { get; set; }
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
using System.Collections.Generic;
using DTS.Common.Base;
using DTS.Common.Interface.TestDefinition;
using Microsoft.Practices.Prism.Events;
// ReSharper disable ClassNeverInstantiated.Global
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The selected Test Summary list changed event.
/// </summary>
public class TestSummaryChangeNotification : CompositePresentationEvent<TestSummaryChangeNotificationArg> { }
public class TestSummaryChangeNotificationArg
{
public List<ITestSummary> SummaryList { get; set; }
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of selected Tests changed event.
/// </summary>
public class TestSummaryCountNotification : CompositePresentationEvent<TestSummaryCountNotificationArg> { }
public class TestSummaryCountNotificationArg
{
public int SummaryCount { get; set; }
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,36 @@
using System;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Database
{
/// <summary>
/// Event to inform app that a db switch event has occurred
/// </summary>
/// <remarks>
///
/// </remarks>
public class DbStatusEvent : CompositePresentationEvent<DbStatusArg> { }
public class DbStatusArg
{
public enum EventTypes
{
FailedToConnectToRemote,
FailedToBackupLocal,
FailedToCopy,
FailedToRestoreLocal,
FailedToBackupLocalFileNotFound,
Complete,
LegacyStatus
}
public EventTypes Status { get; }
public Exception Exception { get; }
public DbStatusArg(EventTypes error, Exception exception)
{
Status = error;
Exception = exception;
}
}
}

View File

@@ -0,0 +1,17 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform app that database version has changed
/// </summary>
/// <remarks>
///
/// </remarks>
public class DatabaseVersionChangedEvent : CompositePresentationEvent<DatabaseVersionChangedEventArgs> { }
public class DatabaseVersionChangedEventArgs
{
public string Version { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,20 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Diagnostics
{
public class CheckDataToDownloadEvent : CompositePresentationEvent<CheckDataToDownloadEventArgs>
{
}
public class CheckDataToDownloadEventArgs
{
public bool BypassCheck { get; private set; }
public object Producer { get; private set; }
public CheckDataToDownloadEventArgs(bool bypassCheck, object o)
{
BypassCheck = bypassCheck;
Producer = o;
}
}
}

View File

@@ -0,0 +1,40 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform feedback page to get updated
/// FB 22323
/// </summary>
/// <remarks>
///
/// </remarks>
public class FeedbackEvent : CompositePresentationEvent<FeedbackArg> { }
public class FeedbackArg
{
/// <summary>
/// Severity being notified
/// </summary>
public Severity Severity { get; private set; }
/// <summary>
/// Message that is logged
/// </summary>
public string Message { get; private set; }
public FeedbackArg(Severity severity, string message)
{
Severity = severity;
Message = message;
}
}
public enum Severity
{
Information,
Warning,
Error,
ResponseStarting,
CommandStarting
}
}

View File

@@ -0,0 +1,14 @@
using DTS.Common.Base;
using Microsoft.Practices.Prism.Events;
// ReSharper disable ClassNeverInstantiated.Global
namespace DTS.Common.Events
{
/// <summary>
/// The Selected Group Template changed event.
/// </summary>
/// <remarks>
/// The Selected Group Template changed event is used to ...
/// </remarks>
public class GroupTemplateChangeNotification : CompositePresentationEvent<IBaseModel> { }
}

View File

@@ -0,0 +1,13 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.GroupTemplates.CustomChannels
{
/// <summary>
/// Event to inform app that it should mark itself busy or available
/// </summary>
/// <remarks>
///
/// </remarks>
public class CustomChannelExportFileSetEvent : CompositePresentationEvent<string> { }
}

View File

@@ -0,0 +1,27 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.GroupTemplates.CustomChannels
{
/// <summary>
/// Event to inform of custom channel import status
/// </summary>
/// <remarks>
///
/// </remarks>
public class CustomChannelImportEvent : CompositePresentationEvent<CustomChannelImportEventArgs> { }
public class CustomChannelImportEventArgs
{
public enum Status
{
Done
}
public Status ImportStatus { get; }
public CustomChannelImportEventArgs(Status status)
{
ImportStatus = status;
}
}
}

View File

@@ -0,0 +1,13 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.GroupTemplates.GroupTemplateList
{
/// <summary>
/// The GroupTemplateListGroupTemplateSelectedEvent event.
/// </summary>
///
/// <remarks>called when a template is selected.</remarks>
///
public class GroupTemplateListGroupDoubleClickEvent : CompositePresentationEvent<string> { }
}

View File

@@ -0,0 +1,13 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.GroupTemplates.GroupTemplateList
{
/// <summary>
/// The GroupTemplateListGroupTemplateSelectedEvent event.
/// </summary>
///
/// <remarks>called when a template is selected.</remarks>
///
public class GroupTemplateListGroupTemplateSelectedEvent : CompositePresentationEvent<string[]> { }
}

View File

@@ -0,0 +1,14 @@
using DTS.Common.Interface.GroupTemplate;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.GroupTemplates.TemplateChannelList
{
/// <summary>
/// The GroupTemplateListGroupTemplateSelectedEvent event.
/// </summary>
///
/// <remarks>called when a template is selected.</remarks>
///
public class TemplateChannelListOrderChangedEvent : CompositePresentationEvent<IGroupTemplateChannel> { }
}

View File

@@ -0,0 +1,27 @@
using DTS.Common.Interface.GroupTemplate;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.GroupTemplates.TemplateChannelList
{
/// <summary>
/// The GroupTemplateListGroupTemplateSelectedEvent event.
/// </summary>
///
/// <remarks>called when a template is selected.</remarks>
///
public class TemplateChannelListRequiredChangedEvent : CompositePresentationEvent<TemplateChannelListRequiredChangeEventArgs> { }
public class TemplateChannelListRequiredChangeEventArgs
{
public object Consumer { get; }
public IGroupTemplateChannel [] Channels { get; }
public TemplateChannelListRequiredChangeEventArgs(object o, IGroupTemplateChannel[] channels)
{
Consumer = o;
Channels = channels;
}
}
}

View File

@@ -0,0 +1,14 @@
using DTS.Common.Interface.GroupTemplate;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.GroupTemplates.TemplateChannelList
{
/// <summary>
/// The GroupTemplateListGroupTemplateSelectedEvent event.
/// </summary>
///
/// <remarks>called when a template is selected.</remarks>
///
public class TemplateChannelListSelectionChangedEvent : CompositePresentationEvent<IGroupTemplateChannel> { }
}

View File

@@ -0,0 +1,19 @@
using DTS.Common.Interface.Channels;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Groups.GroupChannelList
{
public class GroupChannelDeleteRequestEvent : CompositePresentationEvent<GroupChannelDeleteRequestEventArgs> { }
public class GroupChannelDeleteRequestEventArgs
{
public object Page { get; }
public IGroupChannel Channel { get; }
public GroupChannelDeleteRequestEventArgs(object page, IGroupChannel channel)
{
Page = page;
Channel = channel;
}
}
}

View File

@@ -0,0 +1,25 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Groups.GroupChannelList
{
/// <summary>
/// The GroupUpdated event.
/// </summary>
///
/// <remarks>called when a template is selected.</remarks>
///
public class GroupChannelsChangedEvent : CompositePresentationEvent<GroupChannelsChangedEventArgs> { }
public class GroupChannelsChangedEventArgs
{
public object Group { get; }
public int ChannelCount { get; }
public GroupChannelsChangedEventArgs(object group, int channelCount)
{
Group = group;
ChannelCount = channelCount;
}
}
}

View File

@@ -0,0 +1,30 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Groups.GroupChannelList
{
/// <summary>
/// The GroupUpdated event.
/// </summary>
///
/// <remarks>called when a template is selected.</remarks>
///
public class GroupUpdatedEvent: CompositePresentationEvent<GroupUpdatedEventArgs> { }
public class GroupUpdatedEventArgs
{
public object Page { get; }
public enum Status
{
ChannelsInserted,
AssignmentsMade
}
public Status UpdateStatus { get; }
public GroupUpdatedEventArgs(object page, Status status)
{
Page = page;
UpdateStatus = status;
}
}
}

View File

@@ -0,0 +1,13 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Groups.GroupList
{
/// <summary>
/// The GroupTemplateListGroupTemplateSelectedEvent event.
/// </summary>
///
/// <remarks>called when a template is selected.</remarks>
///
public class GroupListEditGroupEvent : CompositePresentationEvent<int> { }
}

View File

@@ -0,0 +1,13 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Groups.GroupList
{
/// <summary>
/// The GroupTemplateListGroupTemplateSelectedEvent event.
/// </summary>
///
/// <remarks>called when a template is selected.</remarks>
///
public class GroupListGroupSelectedEvent : CompositePresentationEvent<int[]> { }
}

View File

@@ -0,0 +1,14 @@
using DTS.Common.Interface.DASFactory.Diagnostics.HardwareList;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Hardware.HardwareList
{
/// <summary>
/// The HardwareListHardwareSelectedEvent event.
/// </summary>
///
/// <remarks>This event is used to indicate hardware was selected.</remarks>
///
public class HardwareListEditHardwareEvent : CompositePresentationEvent<string> { }
}

View File

@@ -0,0 +1,27 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Hardware.HardwareList
{
/// <summary>
/// The HardwareListHardwareSelectedEvent event.
/// </summary>
///
/// <remarks>This event is used to indicate hardware was selected.</remarks>
///
public class HardwareListHardwareIncludedEvent : CompositePresentationEvent<HardwareListHardwareIncludedEventArgs> { }
public class HardwareListHardwareIncludedEventArgs
{
public string SerialNumber { get; private set; }
public int DASId { get; private set; }
public bool Included { get; private set; }
public HardwareListHardwareIncludedEventArgs(string serial, bool included, int dasId)
{
DASId = dasId;
SerialNumber = serial;
Included = included;
}
}
}

View File

@@ -0,0 +1,14 @@
using DTS.Common.Interface.DASFactory.Diagnostics.HardwareList;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Hardware.HardwareList
{
/// <summary>
/// The HardwareListHardwareSelectedEvent event.
/// </summary>
///
/// <remarks>This event is used to indicate hardware was selected.</remarks>
///
public class HardwareListHardwareSelectedEvent : CompositePresentationEvent<string[]> { }
}

View File

@@ -0,0 +1,27 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Hardware.HardwareList
{
/// <summary>
/// The HardwareListHardwareTestAAFilterRateEvent event.
/// </summary>
///
/// <remarks>This event is used to indicate the hardware's sample rate in this test was changed.</remarks>
///
public class HardwareListHardwareTestAAFilterRateEvent : CompositePresentationEvent<HardwareListHardwareTestAAFilterRateEventArgs> { }
public class HardwareListHardwareTestAAFilterRateEventArgs
{
public string SerialNumber { get; private set; }
public int DASId { get; private set; }
public float TestAAFilterRate { get; private set; }
public HardwareListHardwareTestAAFilterRateEventArgs(string serial, float testAAFilterRate, int dasId)
{
DASId = dasId;
SerialNumber = serial;
TestAAFilterRate = testAAFilterRate;
}
}
}

View File

@@ -0,0 +1,27 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Hardware.HardwareList
{
/// <summary>
/// The HardwareListHardwareTestClockMasterEvent event.
/// </summary>
///
/// <remarks>This event is used to indicate the hardware's clock master status in this test was changed.</remarks>
///
public class HardwareListHardwareTestClockMasterEvent : CompositePresentationEvent<HardwareListHardwareTestClockMasterEventArgs> { }
public class HardwareListHardwareTestClockMasterEventArgs
{
public string SerialNumber { get; private set; }
public int DASId { get; private set; }
public bool IsClockMaster { get; private set; }
public HardwareListHardwareTestClockMasterEventArgs(string serial, bool isClockMaster, int dasId)
{
DASId = dasId;
SerialNumber = serial;
IsClockMaster = isClockMaster;
}
}
}

View File

@@ -0,0 +1,25 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Hardware.HardwareList
{
/// <summary>
/// The HardwareListHardwareTestPTPDomainIDEvent event.
/// </summary>
///
/// <remarks>This event is used to indicate the hardware's ptp domain id in this test was changed.</remarks>
///
public class HardwareListHardwareTestPTPDomainIDEvent : CompositePresentationEvent<HardwareListHardwareTestPTPDomainIDEventArgs> { }
public class HardwareListHardwareTestPTPDomainIDEventArgs
{
public string SerialNumber { get; private set; }
public int DASId { get; private set; }
public byte PTPDomainId { get; private set; }
public HardwareListHardwareTestPTPDomainIDEventArgs(string serial, int dasId, byte ptpDomainId)
{
SerialNumber = serial;
DASId = dasId;
PTPDomainId = ptpDomainId;
}
}
}

View File

@@ -0,0 +1,27 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Hardware.HardwareList
{
/// <summary>
/// The HardwareListHardwareTestSampleRateEvent event.
/// </summary>
///
/// <remarks>This event is used to indicate the hardware's sample rate in this test was changed.</remarks>
///
public class HardwareListHardwareTestSampleRateEvent : CompositePresentationEvent<HardwareListHardwareTestSampleRateEventArgs> { }
public class HardwareListHardwareTestSampleRateEventArgs
{
public string SerialNumber { get; private set; }
public int DASId { get; private set; }
public double TestSampleRate { get; private set; }
public HardwareListHardwareTestSampleRateEventArgs(string serial, double testSampleRate, int dasId)
{
DASId = dasId;
SerialNumber = serial;
TestSampleRate = testSampleRate;
}
}
}

View File

@@ -0,0 +1,13 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Hardware.HardwareList
{
/// <summary>
/// The HardwareListShowCompact event.
/// </summary>
///
/// <remarks>This event is used to indicate show compact/expanded was changed.</remarks>
///
public class HardwareListShowCompactEvent : CompositePresentationEvent<bool> { }
}

View File

@@ -0,0 +1,15 @@
using DTS.Common.Interface.DASFactory.Diagnostics.HardwareList;
using Microsoft.Practices.Prism.Events;
using System;
namespace DTS.Common.Events.Hardware.HardwareList
{
/// <summary>
/// The HardwareReplaceEvent event.
/// </summary>
///
/// <remarks>This event is used to indicate hardware replacement was requested
/// </remarks>
public class HardwareReplaceEvent : CompositePresentationEvent<Tuple<IHardware, IHardware>> { }
}

View File

@@ -0,0 +1,16 @@
using Microsoft.Practices.Prism.Events;
using System;
namespace DTS.Common.Events.Hardware.HardwareList
{
/// <summary>
/// The HardwareAddedEvent event.
/// </summary>
///
/// <remarks>This event is used to indicate hardware was added or updated
/// integer is database id of hardware, string is serial number of hardware
/// </remarks>
///
public class HardwareSavedEvent : CompositePresentationEvent<Tuple<int,string>> { }
}

View File

@@ -0,0 +1,32 @@
using System.Windows;
using Microsoft.Practices.Prism.Events;
using System.Windows.Media;
using System.Windows.Controls;
namespace DTS.Common.Events
{
/// <summary>
/// Progress bar event
/// </summary>
/// <remarks>
/// notification event for progress bars
/// </remarks>
public class HelpTextEvent : CompositePresentationEvent<HelpTextEventArg> { }
public class HelpTextEventArg
{
public object Sender { get; set; }
public ToolTipEventArgs E { get; set; }
public HelpTextEventArg(object sender, ToolTipEventArgs e)
{
Sender = sender;
E = e;
}
public HelpTextEventArg()
{
}
}
}

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,30 @@
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 ListViewStatusEvent : CompositePresentationEvent<ListViewStatusArg> { }
public class ListViewStatusArg
{
public enum ListViewStatus
{
Unloaded,
ScrollToBottom
}
public ListViewStatus Status { get; }
public string Id { get; }
public ListViewStatusArg(ListViewStatus status, string id)
{
Status = status;
Id = id;
}
}
}

View File

@@ -0,0 +1,11 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
public class LoginUserEvent : CompositePresentationEvent<LoginUserArg> { }
public class LoginUserArg
{
public string UserName { get; set; }
}
}

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,73 @@
using DTS.Common.Enums;
namespace DTS.Common.Events
{
/// <summary>
/// Event args for the <see cref="Microsoft.Practices.Prism.Interactivity.InteractionRequest.Notification.Content"/> event.
/// </summary>
public class NotificationContentEventArgs
{
/// <summary>
/// Gets the message of the notification.
/// </summary>
public string Message { get; }
/// <summary>
/// Gets the notification details.
/// </summary>
public string MessageDetails { get; }
/// <summary>
/// Gets the image for the notification window.
/// </summary>
public PopupWindowImage Image { get; }
public string Title { get; }
/// <summary>
/// Constructs a new instance of <see cref="NotificationContentEventArgs"/>
/// </summary>
/// <param name="message">The message of the notification.</param>
/// <param name="messageDetails">Notification details</param>
/// <param name="image">The image for the notification window. The default is <see cref="PopupWindowImage.Error"/>.</param>
/// <param name="title">The title of the notification window.</param>
public NotificationContentEventArgs(string message, string messageDetails = "", PopupWindowImage image = PopupWindowImage.Error, string title = "")
{
Message = message;
MessageDetails = messageDetails;
Image = image;
Title = title;
}
}
public class NotificationContentEventArgsWithoutTitle
{
/// <summary>
/// Gets the message of the notification.
/// </summary>
public string Message { get; }
/// <summary>
/// Gets the notification details.
/// </summary>
public string MessageDetails { get; }
/// <summary>
/// Gets the image for the notification window.
/// </summary>
public PopupWindowImage Image { get; }
/// <summary>
/// Constructs a new instance of <see cref="NotificationContentEventArgs"/>
/// </summary>
/// <param name="message">The message of the notification.</param>
/// <param name="messageDetails">Notification details</param>
/// <param name="image">The image for the notification window. The default is <see cref="PopupWindowImage.Error"/>.</param>
public NotificationContentEventArgsWithoutTitle(string message, string messageDetails = "", PopupWindowImage image = PopupWindowImage.Error)
{
Message = message;
Image = image;
MessageDetails = messageDetails;
}
}
}

View File

@@ -0,0 +1,46 @@
using DTS.Common.Utilities.Logging;
using Microsoft.Practices.Prism.Events;
using Microsoft.Practices.ServiceLocation;
using System;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform app that it should mark itself busy or available
/// </summary>
/// <remarks>
///
/// </remarks>
public class PageErrorEvent : CompositePresentationEvent<PageErrorArg>
{
/// <summary>
/// surfaces an error to the application, if applicable
/// http://manuscript.dts.local/f/cases/28312/Surface-Read-does-not-match-write-to-user
/// </summary>
/// <param name="msg"></param>
public static void SurfaceApplicationError(string msg)
{
try
{
var eventAggregator = ServiceLocator.Current.GetInstance<IEventAggregator>();
eventAggregator.GetEvent<PageErrorEvent>().Publish(new PageErrorArg(new[] { msg }, null));
}
catch (Exception ex)
{
APILogger.Log(ex);
}
}
}
public class PageErrorArg
{
public string [] Errors { get; }
public object Page { get; }
public bool Handled { get; set; }
public PageErrorArg(string[] errors, object page)
{
Errors = errors;
Page = page;
}
}
}

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,23 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform app that a page name had been updated
/// </summary>
/// <remarks>
///
/// </remarks>
public class PageNameEvent : CompositePresentationEvent<PageNameEventArg> { }
public class PageNameEventArg
{
public string Name { get; private set; }
public object Page { get; private set; }
public PageNameEventArg(object page, string name)
{
Page = page;
Name = name;
}
}
}

View File

@@ -0,0 +1,48 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform app that page navigation has been requested
/// 15125 Navigate to selected sensor from run test diagnostics
/// </summary>
/// <remarks>
///
/// </remarks>
public class PageNavigationRequestEvent : CompositePresentationEvent<PageNavigationRequest> { }
/// <summary>
/// a page navigation request, specifies who requested, and where they requested to go
/// </summary>
public class PageNavigationRequest
{
/// <summary>
/// places to go
/// </summary>
public enum Destinations
{
Sensor,
//16056 Default landing page after login should be Test Setup
TestSetups
}
/// <summary>
/// where to go
/// </summary>
public Destinations Destination{ get; private set; }
/// <summary>
/// any information needed to navigate to the destination
/// </summary>
public object DestinationArg { get; private set; }
/// <summary>
/// who requested the navigation
/// </summary>
public object Caller { get; private set; }
public PageNavigationRequest(Destinations destination, object destinationArg, object caller)
{
Destination = destination;
DestinationArg = destinationArg;
Caller = caller;
}
}
}

View File

@@ -0,0 +1,25 @@
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 PageSelectionChanged : CompositePresentationEvent<PageSelectionChangedArg> { }
public class PageSelectionChangedArg
{
public object Page { get; }
public int Count { get; }
public PageSelectionChangedArg(int count, object page)
{
Page = page;
Count = count;
}
}
}

View File

@@ -0,0 +1,18 @@
using DTS.Common.Interface;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform a page has been set active
/// </summary>
/// <remarks>
///
/// </remarks>
public class PageSetActiveEvent : CompositePresentationEvent<PageSetActiveEventArg> { }
public class PageSetActiveEventArg
{
public IDataPROPage Page{ get; set; }
}
}

View File

@@ -0,0 +1,59 @@
using System.Windows;
using Microsoft.Practices.Prism.Events;
using System.Windows.Media;
namespace DTS.Common.Events
{
/// <summary>
/// Progress bar event
/// </summary>
/// <remarks>
/// notification event for progress bars
/// </remarks>
public class ProgressBarEvent : CompositePresentationEvent<ProgressBarEventArg> { }
public class ProgressBarEventArg
{
/// <summary>
/// progress bar the event belongs to
/// </summary>
public string ProgressBarName { get; }
/// <summary>
/// the AggregateStatusColor bar color
/// </summary>
public Color ProgressBarColor { get; set; }
public bool SetPercentage{ get; set; } = false;
/// <summary>
/// progress bar percentage to set (1-100)
/// </summary>
public double ProgressBarPercentage { get; set; }
public bool SetText{ get; set; } = false;
/// <summary>
/// the Aggregate status text to set on the progress bar
/// </summary>
public string ProgressBarText { get; set; }
public bool SetVisibility { get; set; } = false;
/// <summary>
/// the visibility for the progress bar
/// </summary>
public Visibility ProgressBarVisibility { get; set; }
public ProgressBarEventArg(string name, Color color, Visibility visibility=Visibility.Visible, double percentage = double.NaN, string text = null)
{
ProgressBarName = name;
ProgressBarColor = color;
ProgressBarPercentage = percentage;
ProgressBarText = text;
ProgressBarVisibility = visibility;
}
public ProgressBarEventArg()
{
ProgressBarName = "Footer";
}
}
}

View File

@@ -0,0 +1,11 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// The <see cref="RaiseNotification"/> event.
/// </summary>
/// <remarks>
/// The <see cref="RaiseNotification"/> event is used to display the notification content such as message and icon.
/// </remarks>
public class RaiseNotification : CompositePresentationEvent<NotificationContentEventArgs> { }
}

View File

@@ -0,0 +1,13 @@
using DTS.Common.Interface.Realtime;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Realtime
{
/// <summary>
/// The RealtimeChannelSelectedEvent event.
/// this event is called whenever a realtime channel is selected and is used to notify realtime
/// </summary>
///
public class RealtimeChannelSelectedEvent : CompositePresentationEvent<IRealtimeChannel> { }
}

View File

@@ -0,0 +1,7 @@
using DTS.Common.Interface.RegionOfInterest;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.RegionOfInterest
{
public class RegionOfInterestChangedEvent : CompositePresentationEvent<IRegionOfInterest> { }
}

View File

@@ -0,0 +1,21 @@
using Microsoft.Practices.Prism.Events;
using Microsoft.Practices.Prism.Regions;
namespace DTS.Common.Events.RegionOfInterest.RegionOfInterestChannels
{
public class RegionOfInterestChannelsSelectedEvent : CompositePresentationEvent<RegionOfInterestChannelsSelectedEventArgs> { }
public class RegionOfInterestChannelsSelectedEventArgs
{
public string RegionOfInterestSuffix { get; private set; }
public string[] ChannelNames { get; private set; }
public object Consumer { get; private set; }
public RegionOfInterestChannelsSelectedEventArgs(string roiSuffix, string[] selectedChannelNames, object o)
{
RegionOfInterestSuffix = roiSuffix;
ChannelNames = selectedChannelNames;
Consumer = o;
}
}
}

View File

@@ -0,0 +1,32 @@
using DTS.Common.Enums;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// The SLICE6MulticastPropertyEventChanged event.
/// </summary>
///
/// <remarks>This event has to be used when SLICE6 multicast property(s) have changed.</remarks>
///
public class SLICE6MulticastPropertyEventChanged : CompositePresentationEvent<SLICE6MulticastPropertyEventArgs>
{
}
public class SLICE6MulticastPropertyEventArgs
{
public SLICE6Properties SLICE6Property { get; private set; }
public string SLICE6MulticastAddress { get; private set; }
public int SLICE6MulticastCommandPort { get; private set; }
public int SLICE6MulticastResponsePort { get; private set; }
public SLICE6MulticastPropertyEventArgs(SLICE6Properties property, string address, int commandPort, int responsePort)
{
SLICE6Property = property;
SLICE6MulticastAddress = address;
SLICE6MulticastCommandPort = commandPort;
SLICE6MulticastResponsePort = responsePort;
}
}
}

View File

@@ -0,0 +1,7 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
public class CalibrationBehaviorSettingChangedEvent : CompositePresentationEvent<DTS.Common.Enums.Sensors.CalibrationBehaviors> { }
}

View File

@@ -0,0 +1,43 @@
using DTS.Common.Enums.Sensors;
using DTS.Common.Interface.Sensors;
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events.Sensors
{
/// <summary>
/// this event is used to notify that the sensor filter ( or the iso code filter field) has changed
/// this is used to update the ISOCodes or filters
/// </summary>
public class SensorFilterTypeChangedEvent : CompositePresentationEvent<SensorFilterTypeChangedEventArgs> { }
public class SensorFilterTypeChangedEventArgs
{
public char ISOCodeChar { get; private set; }
public enum EventTypes { ISOCodeChar, FilterClass };
public EventTypes EventType { get; private set; }
public FilterClassType FilterClass{ get; private set; }
public ISensorCalibration Calibration { get; private set; }
public ISensorData Sensor { get; private set; }
public bool UseISOCodeFilterMapping{ get; private set; }
public bool UseZeroForUnfiltered { get; private set; }
public SensorFilterTypeChangedEventArgs(char code, ISensorData sensor, ISensorCalibration sensorCalibration, bool useISOCodeFilterMapping, bool bUseZeroForUnfiltered)
{
ISOCodeChar = code;
EventType = EventTypes.ISOCodeChar;
Sensor = sensor;
Calibration = sensorCalibration;
UseISOCodeFilterMapping = useISOCodeFilterMapping;
UseZeroForUnfiltered = bUseZeroForUnfiltered;
}
public SensorFilterTypeChangedEventArgs( FilterClassType filterClassType, ISensorData sensor, ISensorCalibration sensorCalibration, bool useISOCodeFilterMapping, bool bUseZeroForUnfiltered)
{
FilterClass = filterClassType;
Sensor = sensor;
Calibration = sensorCalibration;
EventType = EventTypes.FilterClass;
UseISOCodeFilterMapping = useISOCodeFilterMapping;
UseZeroForUnfiltered = bUseZeroForUnfiltered;
}
}
}

View File

@@ -0,0 +1,74 @@
using Microsoft.Practices.Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events.Sensors.SensorsList
{
/// <summary>
/// FB 13120 this event is used to notify the save function when the new sensor has been added in the setting menu
/// </summary>
public class SensorSavedEvent : CompositePresentationEvent<double>
{
}
/// <summary>
/// FB 13120 this event is used in selecting the default filter in filter list when adding or deleting a sensor
/// </summary>
public class SensorUpdatedEvent : CompositePresentationEvent<bool>
{
}
/// <summary>
/// used to indicate a sensor has changed
/// currently used for sensitivity controls (supported excitation/sensitivity) to notify other consumers that the
/// user has changed a value
/// </summary>
public class SensorChangedEvent : CompositePresentationEvent<SensorChangedArgs>
{
}
public class SensorChangedArgs
{
/// <summary>
/// serial number of the sensor that changed (currently not used)
/// This has been put in place for future use
/// </summary>
public string SerialNumber { get; }
/// <summary>
/// database id of the sensor that changed (currently not used)
/// this has been put in place for future use
/// </summary>
public int DatabaseId { get; }
/// <summary>
/// used to signify the Current Model is being loaded
/// </summary>
public bool CurrentModelLoading { get; }
/// <summary>
/// used to signify NonLinear has changed
/// </summary>
public bool NonLinearChanged { get; }
/// <summary>
/// used to signify sensitivity has changed
/// </summary>
public bool SensitivityChanged { get; }
/// <summary>
/// used to indicate proportionality has changed
/// </summary>
public bool IsProportionalChanged { get; }
/// <summary>
/// used to indicate an excitation setting changed
/// </summary>
public bool ExcitationChanged { get; }
public SensorChangedArgs(string serialNumber, int databaseId, bool currentModelLoading, bool nonLinearChanged, bool sensitivityChanged,
bool isProportionalChanged, bool excitationChanged)
{
SerialNumber = serialNumber;
DatabaseId = databaseId;
CurrentModelLoading = currentModelLoading;
NonLinearChanged = nonLinearChanged;
SensitivityChanged = sensitivityChanged;
IsProportionalChanged = isProportionalChanged;
ExcitationChanged = excitationChanged;
}
}
}

View File

@@ -0,0 +1,13 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events.Sensors.SensorsList
{
/// <summary>
/// The TTSImportSummaryImportEvent event.
/// </summary>
///
/// <remarks>This event is used by the Summary step to indicate that the Import button was clicked.</remarks>
///
public class SensorsListSensorSelectedEvent : CompositePresentationEvent<string[]> { }
}

View File

@@ -0,0 +1,19 @@
using Microsoft.Practices.Prism.Events;
using System.Windows;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform app that it should mark itself busy or available
/// </summary>
/// <remarks>
///
/// </remarks>
public class SetPageHeaderVisibilityEvent : CompositePresentationEvent<SetPageHeaderVisibilityEventArgs> { }
public class SetPageHeaderVisibilityEventArgs
{
public bool SetVisiblity { get; set; } = false;
public Visibility Visibility{ get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// The SetSaveButton event
/// </summary>
public class SetSaveButton : CompositePresentationEvent<SaveButtonUsability> { }
/// <summary>
/// The SaveButtonUsability is used by <see cref="ShowStatus">SetSaveButton</see> event to enable/disable the Save button.
/// </summary>
public class SaveButtonUsability
{
public bool IsUsable { get; set; }
}
}

View File

@@ -0,0 +1,107 @@
using System;
using Microsoft.Practices.Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// The ShowStatus event.
/// </summary>
///
/// <remarks>This event is used by the services to display the current status.</remarks>
///
public class ShowStatus : CompositePresentationEvent<StatusInfo>
{
}
/// <summary>
/// The StatusInfo is used by <see cref="ShowStatus">ShowStatus</see> event to display the current status.
/// </summary>
public class StatusInfo
{
/// <summary>
/// the current state of a process
/// </summary>
public enum StatusState
{
Idle, //Ready state, no longer doing anything
Busy, //busy, currently doing something
DoneNoError, //no longer working, done, no errors
DoneFailed //no longer working, did not complete process
}
public StatusState CurrentState
{
get;
private set;
}
/// <summary>
/// Gets or sets a value indicating whether this object is busy.
/// </summary>
public bool IsBusy => CurrentState == StatusState.Busy;
/// <summary>
/// Gets or sets the IsOk flag.
/// </summary>
public bool IsOk
{
get;
set;
}
/// <summary>
/// Gets or sets the progress bar percentage.
/// </summary>
public decimal Percentage
{
get;
set;
}
/// <summary>
/// Gets or sets the status information.
/// </summary>
public string Text
{
get;
set;
}
/// <summary>
/// Gets or sets the id of the process.
/// </summary>
public int ProcessId
{
get;
set;
}
/// <summary>
/// creates a new status info, sets the text to the default for the state
/// note that consumers are free not to use the Text Property of the Status Info,
/// but we set it anyhow.
/// </summary>
/// <param name="state"></param>
/// <param name="percentage"></param>
/// <param name="processId"></param>
/// <param name="text"></param>
/// <param name="isOk"></param>
public StatusInfo(StatusState state, string text = null, decimal percentage = -1, int processId = -1,bool isOk = true)
{
CurrentState = state;
IsOk = isOk;
Percentage = percentage;
Text = text;
ProcessId = processId;
if (null == text)
{
Text = Strings.Strings.ResourceManager.GetString("StatusState_" + state) ?? state.ToString();
}
}
public void Unsubscribe(ShowStatus showStatus)
{
Text = String.Empty;
CurrentState = StatusState.Idle;
}
}
}

View File

@@ -0,0 +1,16 @@
using Microsoft.Practices.Prism.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DTS.Common.Events.TSRAIRGo
{
public class ArmEvent : CompositePresentationEvent<ArmArg> { }
public class ArmArg
{
public bool Arm { get; set; }
}
}

Some files were not shown because too many files have changed in this diff Show More