init
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using DTS.Common.Enums.Hardware;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace DTS.Common.Interface.Hardware.AddEditHardware
|
||||
{
|
||||
/// <summary>
|
||||
/// describes interface used in AddEditHardware
|
||||
/// </summary>
|
||||
public interface IAddEditHardwareDASModule
|
||||
{
|
||||
HardwareTypes ModuleType { get; set; }
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// an image representing the das
|
||||
/// </summary>
|
||||
ImageSource DASImage { get; }
|
||||
IAddEditHardwareHardware OwningHardware { get; set; }
|
||||
SLICEBridgeTypes SLICEBridgeType { get; set; }
|
||||
/// <summary>
|
||||
/// returns the prefix for any modules of this moduletype
|
||||
/// </summary>
|
||||
string GetSerialNumberPrefix();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using DTS.Common.Enums.Hardware;
|
||||
using DTS.Common.Interface.DASFactory.Diagnostics;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace DTS.Common.Interface.Hardware.AddEditHardware
|
||||
{
|
||||
/// <summary>
|
||||
/// describes interface used in AddEditHardware
|
||||
/// </summary>
|
||||
public interface IAddEditHardwareHardware
|
||||
{
|
||||
/// <summary>
|
||||
/// the das type
|
||||
/// </summary>
|
||||
HardwareTypes HardwareType{ get; set; }
|
||||
/// <summary>
|
||||
/// the serial number for the das
|
||||
/// </summary>
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// the firmware version of the das
|
||||
/// </summary>
|
||||
string FirmwareVersion { get; set; }
|
||||
/// <summary>
|
||||
/// the ipaddress of the das (if supported)
|
||||
/// </summary>
|
||||
string IPAddress { get; set; }
|
||||
/// <summary>
|
||||
/// whether the das supports an ip address
|
||||
/// </summary>
|
||||
bool SupportsIPAddress { get; }
|
||||
/// <summary>
|
||||
/// whether the das supports rack sizes
|
||||
/// </summary>
|
||||
bool SupportsRackSize { get; }
|
||||
/// <summary>
|
||||
/// the configuration of the das (if supported)
|
||||
/// </summary>
|
||||
bool SupportsConfiguration { get; }
|
||||
/// <summary>
|
||||
/// the configuration of the das
|
||||
/// </summary>
|
||||
SLICEConfigurations SLICEConfiguration { get; set; }
|
||||
/// <summary>
|
||||
/// the size of the rack (if supported)
|
||||
/// </summary>
|
||||
RackSizes RackSize { get; set; }
|
||||
/// <summary>
|
||||
/// an image representing the das
|
||||
/// </summary>
|
||||
ImageSource DASImage { get; }
|
||||
|
||||
ObservableCollection<IAddEditHardwareDASModule> Modules { get; set; }
|
||||
void RemoveModule(IAddEditHardwareDASModule module);
|
||||
void AddModule();
|
||||
/// <summary>
|
||||
/// returns a new ISOHardware representation of the hardware
|
||||
/// </summary>
|
||||
IISOHardware ToISOHardware();
|
||||
/// <summary>
|
||||
/// whether this is actual physical hardware or just stand in hardware/not real hardware
|
||||
/// </summary>
|
||||
bool StandIn { get; set; }
|
||||
bool IsModule { get; set; }
|
||||
/// <summary>
|
||||
/// indicates whether this record already exists in the database or is a new entry
|
||||
/// </summary>
|
||||
bool IsAdd { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Interface.DASFactory.Diagnostics.HardwareList;
|
||||
|
||||
namespace DTS.Common.Interface.Hardware.AddEditHardware
|
||||
{
|
||||
public interface IAddEditHardwareView : IBaseView
|
||||
{
|
||||
/// <summary>
|
||||
/// used to notify the view that it has been activated and should handle any
|
||||
/// post activation work
|
||||
/// </summary>
|
||||
void Activated();
|
||||
|
||||
int ViewDbVersion { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Interface.DASFactory.Diagnostics;
|
||||
using DTS.Common.Interface.DASFactory.Diagnostics.HardwareList;
|
||||
using DTS.Common.Interface.DataRecorders;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DTS.Common.Interface.Hardware.AddEditHardware
|
||||
{
|
||||
public interface IAddEditHardwareViewModel : IBaseViewModel
|
||||
{
|
||||
IAddEditHardwareView View { get; set; }
|
||||
void Unset();
|
||||
/// <summary>
|
||||
/// hardware being operated on in viewmodel
|
||||
/// </summary>
|
||||
IAddEditHardwareHardware Hardware { get; set; }
|
||||
int? TestId{ get; set; }
|
||||
/// <summary>
|
||||
/// initializes the viewmodel with the given hardware
|
||||
/// </summary>
|
||||
void SetHardware(IDASHardware hw, IISOHardware isoHW);
|
||||
/// <summary>
|
||||
/// whether to send notifications of changes or not
|
||||
/// this can be used to avoid notifications when initializing things
|
||||
/// <summary>
|
||||
bool NotificationsOn { get; set; }
|
||||
/// <summary>
|
||||
/// returns true if the hardware can be committed, false otherwise
|
||||
/// </summary>
|
||||
bool Validate(IISOHardware isoHW, ref List<string> errors, ref List<string> warnings, bool displayWindow, bool IsAdd);
|
||||
/// <summary>
|
||||
/// commits any changes present
|
||||
/// </summary>
|
||||
void Save();
|
||||
IISOHardware GetISOHardware();
|
||||
/// <summary>
|
||||
/// Whether standin hardware is supported by the current model
|
||||
/// </summary>
|
||||
bool AllowStandin { get; set; }
|
||||
/// <summary>
|
||||
/// allows access to the SLICE6 treeview module
|
||||
/// </summary>
|
||||
void SetSLICE6TreeView(ISLICE6TreeView treeView, IHardwareListViewModel treeViewModel);
|
||||
/// <summary>
|
||||
/// access to the current SLICE6TreeView
|
||||
/// </summary>
|
||||
ISLICE6TreeView SLICE6TreeView { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user