init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using 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 : PubSubEvent<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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace DTS.Common.Enums
|
||||
{
|
||||
public enum NetworkSelection
|
||||
{
|
||||
Default,
|
||||
NetworkId,
|
||||
NetworkDesc
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace DTS.Common.Base.Classes
|
||||
{
|
||||
public abstract class BaseUserControl : UserControl
|
||||
{
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
protected bool SetProperty<T>(ref T storage, T value, String propertyName = null)
|
||||
{
|
||||
if (Equals(storage, value)) return false;
|
||||
|
||||
storage = value;
|
||||
OnPropertyChanged(propertyName);
|
||||
return true;
|
||||
}
|
||||
protected void OnPropertyChanged(string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System.Windows.Media;
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Enums.Database;
|
||||
|
||||
namespace DTS.Common.Interface.Database
|
||||
{
|
||||
/// <summary>
|
||||
/// this viewmodel handles the logic for database status in a UI
|
||||
/// it handles the current connection and status
|
||||
/// </summary>
|
||||
public interface IDatabaseStatusBarViewModel : IBaseViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// the associated view for the model
|
||||
/// </summary>
|
||||
IDatabaseStatusBarView View { get; set; }
|
||||
//frees up any memory associated with viewmodel
|
||||
void Unset();
|
||||
/// <summary>
|
||||
/// gets the database type
|
||||
/// use initializevalues to populate
|
||||
/// </summary>
|
||||
DbType DatabaseType { get; }
|
||||
/// <summary>
|
||||
/// gets whether the remote database is connected
|
||||
/// use initializevalues to populate
|
||||
/// </summary>
|
||||
bool RemoteConnected { get; }
|
||||
/// <summary>
|
||||
/// the server (not db) name
|
||||
/// use initialize values to populate
|
||||
/// </summary>
|
||||
string ServerName { get; }
|
||||
/// <summary>
|
||||
/// sets the initial values for db type, server name, and remote connection status
|
||||
/// </summary>
|
||||
/// <param name="dbType"></param>
|
||||
/// <param name="serverName"></param>
|
||||
/// <param name="remoteConnected"></param>
|
||||
void InitializeValues(DbType dbType, string serverName, bool remoteConnected);
|
||||
/// <summary>
|
||||
/// returns the current active db name (either server name or local depending on db type and remote connection status)
|
||||
/// </summary>
|
||||
string ActiveDbName { get; }
|
||||
/// <summary>
|
||||
/// returns the background brush for the active db name
|
||||
/// </summary>
|
||||
Brush BackgroundBrush { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.RegionOfInterest.RegionOfInterestChannels
|
||||
{
|
||||
public interface IRegionOfInterestChannelsView : IBaseView { }
|
||||
}
|
||||
Reference in New Issue
Block a user