init
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.ISO.ExtraProperties
|
||||
{
|
||||
public interface IExtraPropertiesListViewModel : IBaseViewModel
|
||||
{
|
||||
void SetPage(IDataPROPage page);
|
||||
void SetParent(object parent);
|
||||
IExtraPropertiesListView View { get; set; }
|
||||
|
||||
void CopySelected();
|
||||
void DeleteSelected();
|
||||
ObservableCollection<IExtraProperty> ExtraProperties { get; set; }
|
||||
void SetExtraProperties(IList<IExtraProperty> properties);
|
||||
void Filter(object tag, string term);
|
||||
|
||||
void Sort(object o, bool columnClick);
|
||||
bool Validate(ref List<string> errors);
|
||||
|
||||
bool IsReadOnly { get; set; }
|
||||
IExtraProperty[] SelectedProperties { get; }
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface ICustomerDetailsViewModel : IBaseViewModel
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface ITabItemView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using DTS.Common.Enums.TSRAIRGo;
|
||||
|
||||
namespace DTS.Common.Interface.TSRAIRGo
|
||||
{
|
||||
public interface INavigationButtonInfo
|
||||
{
|
||||
NavigationButtonId Id { get; }
|
||||
string Text { get; set; }
|
||||
string Tooltip { get; set; }
|
||||
bool Enabled { get; set; }
|
||||
bool ShowBorder { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
using DTS.Common.Interface.Channels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Data;
|
||||
|
||||
namespace DTS.Common.Classes.Channels
|
||||
{
|
||||
/// <summary>
|
||||
/// represents a record of a channel in the db
|
||||
/// <inheritdoc cref="IChannelDbRecord"/>
|
||||
/// </summary>
|
||||
public class ChannelDbRecord : Base.BasePropertyChanged, IChannelDbRecord
|
||||
{
|
||||
protected long _id = -1;
|
||||
/// <summary>
|
||||
/// The database id of the Channel
|
||||
/// </summary>
|
||||
[Key]
|
||||
public long Id
|
||||
{
|
||||
get => _id;
|
||||
set => SetProperty(ref _id, value, "Id");
|
||||
}
|
||||
|
||||
private int _groupId = -1;
|
||||
public int GroupId
|
||||
{
|
||||
get => _groupId;
|
||||
set => SetProperty(ref _groupId, value, "GroupId");
|
||||
}
|
||||
|
||||
private string _isoCode = "";
|
||||
public string IsoCode
|
||||
{
|
||||
get => _isoCode;
|
||||
set => SetProperty(ref _isoCode, value, "IsoCode");
|
||||
}
|
||||
|
||||
private string _isoChannelName = "";
|
||||
public string IsoChannelName
|
||||
{
|
||||
get => _isoChannelName;
|
||||
set => SetProperty(ref _isoChannelName, value, "IsoChannelName");
|
||||
}
|
||||
private string _userCode;
|
||||
public string UserCode
|
||||
{
|
||||
get => _userCode;
|
||||
set => SetProperty(ref _userCode, value, "UserCode");
|
||||
}
|
||||
private string _userChannelName = "";
|
||||
public string UserChannelName
|
||||
{
|
||||
get => _userChannelName;
|
||||
set => SetProperty(ref _userChannelName, value, "UserChannelName");
|
||||
}
|
||||
|
||||
private int _dasId = -1;
|
||||
public int DASId
|
||||
{
|
||||
get => _dasId;
|
||||
set => SetProperty(ref _dasId, value, "DASId");
|
||||
}
|
||||
|
||||
protected int _dasChannelIndex = -1;
|
||||
public int DASChannelIndex
|
||||
{
|
||||
get => _dasChannelIndex;
|
||||
set => SetProperty(ref _dasChannelIndex, value, "DASChannelIndex");
|
||||
}
|
||||
private int _groupChannelOrder = -1;
|
||||
public int GroupChannelOrder
|
||||
{
|
||||
get => _groupChannelOrder;
|
||||
set => SetProperty(ref _groupChannelOrder, value, "GroupChannelOrder");
|
||||
}
|
||||
private int _testSetupOrder = -1;
|
||||
public int TestSetupOrder
|
||||
{
|
||||
get => _testSetupOrder;
|
||||
set => SetProperty(ref _testSetupOrder, value, "TestSetupOrder");
|
||||
}
|
||||
|
||||
private int _sensorId = -1;
|
||||
public int SensorId
|
||||
{
|
||||
get => _sensorId;
|
||||
set => SetProperty(ref _sensorId, value, "SensorId");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IsDisabled is declared here, and redirects to Disabled so that
|
||||
/// existing uses of IsDisabled do not need to be modified.
|
||||
/// </summary>
|
||||
|
||||
public bool IsDisabled
|
||||
{
|
||||
get => Disabled;
|
||||
set
|
||||
{
|
||||
Disabled = value;
|
||||
OnPropertyChanged("IsDisabled");
|
||||
}
|
||||
}
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
private DateTime _lastModified = DateTime.Today;
|
||||
public DateTime LastModified
|
||||
{
|
||||
get => _lastModified;
|
||||
set => SetProperty(ref _lastModified, value, "LastModified");
|
||||
}
|
||||
private string _lastModifiedBy = "";
|
||||
public string LastModifiedBy
|
||||
{
|
||||
get => _lastModifiedBy;
|
||||
set => SetProperty(ref _lastModifiedBy, value, "LastModifiedBy");
|
||||
}
|
||||
|
||||
public ChannelDbRecord() { }
|
||||
public ChannelDbRecord(IChannelDbRecord copy)
|
||||
{
|
||||
Id = copy.Id;
|
||||
GroupId = copy.GroupId;
|
||||
IsoCode = copy.IsoCode;
|
||||
IsoChannelName = copy.IsoChannelName;
|
||||
UserCode = copy.UserCode;
|
||||
UserChannelName = copy.UserChannelName;
|
||||
DASId = copy.DASId;
|
||||
DASChannelIndex = copy.DASChannelIndex;
|
||||
GroupChannelOrder = copy.GroupChannelOrder;
|
||||
TestSetupOrder = copy.TestSetupOrder;
|
||||
SensorId = copy.SensorId;
|
||||
Disabled = copy.Disabled;
|
||||
LastModified = copy.LastModified;
|
||||
LastModifiedBy = copy.LastModifiedBy;
|
||||
}
|
||||
public ChannelDbRecord(IDataReader reader)
|
||||
{
|
||||
Id = Utility.GetInt(reader, "Id", -1);
|
||||
GroupId = Utility.GetInt(reader, "GroupId", -1);
|
||||
IsoCode = Utility.GetString(reader, "IsoCode");
|
||||
IsoChannelName = Utility.GetString(reader, "IsoChannelName");
|
||||
UserCode = Utility.GetString(reader, "UserCode");
|
||||
UserChannelName = Utility.GetString(reader, "UserChannelName");
|
||||
DASId = Utility.GetInt(reader, "DASId", -1);
|
||||
DASChannelIndex = Utility.GetInt(reader, "DASChannelIndex", -1);
|
||||
GroupChannelOrder = Utility.GetInt(reader, "GroupChannelOrder", -1);
|
||||
TestSetupOrder = Utility.GetInt(reader, "TestSetupOrder", -1);
|
||||
SensorId = Utility.GetInt(reader, "SensorId", -1);
|
||||
Disabled = Utility.GetBool(reader, "Disabled");
|
||||
LastModified = Utility.GetDateTime(reader, "LastModified", DateTime.MinValue);
|
||||
LastModifiedBy = Utility.GetString(reader, "LastModifiedBy");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface IPropertyView : IBaseView { }
|
||||
}
|
||||
Reference in New Issue
Block a user