init
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Interface.Groups.GroupTemplateList;
|
||||
using DTS.Common.Interface.Pagination;
|
||||
|
||||
namespace DTS.Common.Interface.Groups.GroupList
|
||||
{
|
||||
public interface IGroupListViewModel : IBaseViewModel, IFilterableListView
|
||||
{
|
||||
IGroupListView View { get; set; }
|
||||
void Unset();
|
||||
void Sort(object o, bool columnClick);
|
||||
IGroup [] Groups { get; set; }
|
||||
void OnSetActive(object page, bool groupTile, object currentUser);
|
||||
void MouseDoubleClick(int index);
|
||||
void Filter(string term);
|
||||
IGroup GetGroup(int? id, bool updateTags = true);
|
||||
IGroup GetGroup(string displayName);
|
||||
IGroup [] GetGroups(int[] ids);
|
||||
IGroup[] GetAllGroups();
|
||||
void DeleteGroups(int[] ids);
|
||||
IGroup CreateGroup();
|
||||
IGroup CreateGroup(List<string> includedHardwareStringList);
|
||||
IGroup CreateGroup(System.Data.SqlClient.SqlDataReader reader, List<string> includedHardwareStringList, List<int> dasIdList);
|
||||
IGroup CreateGroup(IGroupDbRecord groupRecord, List<string> includedHardwareStringList, List<int> dasIdList);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.Net.NetworkInformation;
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface INetworkAdapterViewModel : IBaseViewModel
|
||||
{
|
||||
NetworkInterface SelectedNetworkInterface { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
public class FaultedTextConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value is bool b)
|
||||
{
|
||||
if (b) { return Strings.Strings.Faulted; }
|
||||
else { return Strings.Strings.FaultsClear; }
|
||||
}
|
||||
return Strings.Strings.FaultsClear;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
using System.ComponentModel;
|
||||
using DTS.Common.Converters;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using DTS.Common.Utils;
|
||||
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
|
||||
|
||||
namespace DTS.Common.Enums
|
||||
{
|
||||
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
|
||||
public enum RecordingModes
|
||||
{
|
||||
[Description("RecordingModes_CircularBuffer")]
|
||||
CircularBuffer,
|
||||
[Description("RecordingModes_Recorder")]
|
||||
Recorder,
|
||||
[Description("RecordingModes_HybridRecorder")]
|
||||
HybridRecorder,
|
||||
[Description("RecordingModes_S6A_DeviceStreamingOnly")]
|
||||
S6A_DeviceStreamingOnly,
|
||||
[Description("RecordingModes_CircularBufferPlusUART")]
|
||||
CircularBufferPlusUART,
|
||||
[Description("RecordingModes_RecorderPlusUART")]
|
||||
RecorderPlusUART,
|
||||
[Description("RecordingModes_MultipleEventCircularBuffer")]
|
||||
MultipleEventCircularBuffer,
|
||||
[Description("RecordingModes_MultipleEventRecorder")]
|
||||
MultipleEventRecorder,
|
||||
[Description("RecordingModes_ContinuousRecorder")]
|
||||
ContinuousRecorder,
|
||||
[Description("RecordingModes_RecorderAndStreamSubSample")]
|
||||
RecorderAndStreamSubSample,
|
||||
[Description("RecordingModes_CircularBufferAndStreamSubSample")]
|
||||
CircularBufferAndStreamSubSample,
|
||||
[Description("RecordingModes_Active")]
|
||||
Active,
|
||||
[Description("RecordingModes_MultipleEventActive")]
|
||||
MultipleEventActive,
|
||||
[Description("RecordingModes_MultipleEventHybridRecorder")]
|
||||
MultipleEventHybridRecorder,
|
||||
[Description("RecordingModes_Streaming")]
|
||||
Streaming,
|
||||
[Description("RecordingModes_Scheduled")]
|
||||
Scheduled,
|
||||
[Description("RecordingModes_Interval")]
|
||||
Interval,
|
||||
[Description("RecordingModes_MultipleEventCircularBufferPlusUART")]
|
||||
MultipleEventCircularBufferPlusUART,
|
||||
[Description("RecordingModes_MultipleEventRecorderPlusUART")]
|
||||
MultipleEventRecorderPlusUART,
|
||||
[Description("RecordingModes_ContinuousRecorderPlusUART")]
|
||||
ContinuousRecorderPlusUART,
|
||||
[Description("RecordingModes_RAMActive")]
|
||||
RAMActive,
|
||||
[Description("RecordingModes_MultipleEventRAMActive")]
|
||||
MultipleEventRAMActive,
|
||||
[Description("RecordingModes_RecordOnBoot")]
|
||||
RecordOnBoot,
|
||||
[Description("RecordingModes_RecordOnBootPlusUART")]
|
||||
RecordOnBootPlusUART,
|
||||
[Description("RecordingModes_MultipleEventHybridAndStream")]
|
||||
MultipleEventHybridAndStream,
|
||||
[Description("RecordingModes_HybridAndStream")]
|
||||
HybridAndStream,
|
||||
[Description("RecordingModes_MultipleEventCircularBufferAndStream")]
|
||||
MultipleEventCircularBufferAndStream,
|
||||
[Description("RecordingModes_MultipleEventRecorderAndStream")]
|
||||
MultipleEventRecorderAndStream
|
||||
|
||||
}
|
||||
|
||||
// FB15520 Restrict Recording Mode Test Setup Default selections to non-streaming
|
||||
public class NonStreamingRecordingModeItemsSource : RecordingModeItemsSource
|
||||
{
|
||||
public override ItemCollection GetValues()
|
||||
{
|
||||
return FromModes(Constants.NonStreamingRecordingModes);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class RecordingModeItemsSource : IItemsSource
|
||||
{
|
||||
protected ItemCollection FromModes(RecordingModes[] modes)
|
||||
{
|
||||
var values = new ItemCollection();
|
||||
foreach (var mode in modes)
|
||||
{
|
||||
values.Add(mode, Strings.Strings.ResourceManager.GetString(mode.GetEnumDescription()));
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
public virtual ItemCollection GetValues()
|
||||
{
|
||||
return FromModes(new RecordingModes[] { });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user