init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Interface.Pagination;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SoftwareFilters
|
||||
{
|
||||
public interface ISoftwareFiltersViewModel : IBaseViewModel, IFilterableListView
|
||||
{
|
||||
ISoftwareFiltersView View { get; set; }
|
||||
void Sort(object sortBy, bool bColumnClick);
|
||||
void Unset();
|
||||
void Filter(string currentFilter);
|
||||
ObservableCollection<ISoftwareFilter> SoftwareFilters { get; set; }
|
||||
ISoftwareFilter [] GetSoftwareFilters();
|
||||
void PopulateView();
|
||||
string CurrentUser{ get; set; }
|
||||
bool ValidateAndSave();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Classes.Groups
|
||||
{
|
||||
public abstract class GroupHelper
|
||||
{
|
||||
#region StaticGroupNames
|
||||
private static Dictionary<int, string> StaticGroupNames = new Dictionary<int, string>();
|
||||
public static void ClearStaticGroupNames()
|
||||
{
|
||||
StaticGroupNames.Clear();
|
||||
}
|
||||
public static void SetStaticGroupName(int id, string name)
|
||||
{
|
||||
StaticGroupNames[id] = name;
|
||||
}
|
||||
public static string GetStaticGroupName(int Id)
|
||||
{
|
||||
var name = string.Empty;
|
||||
|
||||
if (StaticGroupNames.ContainsKey(Id))
|
||||
{
|
||||
name = StaticGroupNames[Id];
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
#endregion StaticGroupNames
|
||||
|
||||
#region EmbeddedGroupIdList
|
||||
private static List<int> EmbeddedGroupIdList = new List<int>();
|
||||
|
||||
public static void ClearEmbeddedGroupIdList()
|
||||
{
|
||||
EmbeddedGroupIdList.Clear();
|
||||
}
|
||||
public static void SetEmbeddedGroupId(int id)
|
||||
{
|
||||
EmbeddedGroupIdList.Add(id);
|
||||
}
|
||||
public static bool IsGroupEmbedded(int Id)
|
||||
{
|
||||
return EmbeddedGroupIdList.Contains(Id);
|
||||
}
|
||||
#endregion EmbeddedGroupIdList
|
||||
|
||||
#region TestSetupGroupIds
|
||||
private static Dictionary<int, int> TestSetupGroupIds = new Dictionary<int, int>();
|
||||
public static void ClearTestSetupGroupIds()
|
||||
{
|
||||
TestSetupGroupIds.Clear();
|
||||
}
|
||||
public static void SetTestSetupGroupId(int groupId, int testSetupId)
|
||||
{
|
||||
TestSetupGroupIds[groupId] = testSetupId;
|
||||
}
|
||||
public static int GetTestSetupGroupId(int groupId)
|
||||
{
|
||||
var testSetupGroupId = 0;
|
||||
|
||||
if (TestSetupGroupIds.ContainsKey(groupId))
|
||||
{
|
||||
testSetupGroupId = TestSetupGroupIds[groupId];
|
||||
}
|
||||
|
||||
return testSetupGroupId;
|
||||
}
|
||||
#endregion TestSetupGroupIds
|
||||
|
||||
#region GroupChannelIds
|
||||
private static Dictionary<int, List<int>> GroupChannelIds = new Dictionary<int, List<int>>();
|
||||
public static void ClearGroupChannelIds()
|
||||
{
|
||||
GroupChannelIds.Clear();
|
||||
}
|
||||
public static void AddGroupChannelId(int sensorId, int groupId)
|
||||
{
|
||||
if (!GroupChannelIds.ContainsKey(sensorId))
|
||||
{
|
||||
GroupChannelIds.Add(sensorId, new List<int>());
|
||||
}
|
||||
GroupChannelIds[sensorId].Add(groupId);
|
||||
}
|
||||
public static List<int> GetGroupIdsFromChannels(int sensorId)
|
||||
{
|
||||
var groupIdList = new List<int>();
|
||||
|
||||
if (GroupChannelIds.ContainsKey(sensorId))
|
||||
{
|
||||
groupIdList = GroupChannelIds[sensorId];
|
||||
}
|
||||
|
||||
return groupIdList;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DASIds
|
||||
private static Dictionary<string, int> DASIds = new Dictionary<string, int>();
|
||||
public static void ClearDASIds()
|
||||
{
|
||||
DASIds.Clear();
|
||||
}
|
||||
public static void SetDASId(string serialNumber, int dasId)
|
||||
{
|
||||
DASIds[serialNumber] = dasId;
|
||||
}
|
||||
public static int GetDASId(string serialNumber)
|
||||
{
|
||||
return DASIds[serialNumber];
|
||||
}
|
||||
#endregion DASIds
|
||||
|
||||
#region BaseModuleChannelIndexList
|
||||
public static Dictionary<string, Dictionary<string, List<int>>> BaseModuleChannelIndexList = new Dictionary<string, Dictionary<string, List<int>>>();
|
||||
public static void ClearBaseModuleChannelIndexList()
|
||||
{
|
||||
BaseModuleChannelIndexList.Clear();
|
||||
}
|
||||
public static void SetBaseModuleChannelIndexList(string baseSerialNumberSubstring, Dictionary<string, List<int>> tempDictionary)
|
||||
{
|
||||
BaseModuleChannelIndexList[baseSerialNumberSubstring] = tempDictionary;
|
||||
}
|
||||
public static List<int> GetChannelIndexes(string targetBaseSerialNumber, string targetModuleSerialNumber)
|
||||
{
|
||||
var channelIndexList = new List<int>();
|
||||
|
||||
foreach (var baseModuleIndexListTriple in BaseModuleChannelIndexList)
|
||||
{
|
||||
if (baseModuleIndexListTriple.Key == targetBaseSerialNumber)
|
||||
{
|
||||
var moduleIndexListTuple = baseModuleIndexListTriple.Value;
|
||||
foreach (var moduleSerialNumber in moduleIndexListTuple.Keys)
|
||||
{
|
||||
if (moduleSerialNumber == targetModuleSerialNumber)
|
||||
{
|
||||
channelIndexList = moduleIndexListTuple[moduleSerialNumber];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return channelIndexList;
|
||||
}
|
||||
#endregion BaseModuleChannelIndexList
|
||||
|
||||
#region DASIdChannelIndexGroupIdList
|
||||
public static Dictionary<int, Dictionary<int, int>> DASIdChannelIndexGroupIdList = new Dictionary<int, Dictionary<int, int>>();
|
||||
public static void ClearDASIdChannelIndexGroupIdList()
|
||||
{
|
||||
DASIdChannelIndexGroupIdList.Clear();
|
||||
}
|
||||
public static void SetDASIdChannelIndexGroupIdList(int dasId, Dictionary<int, int> tempDictionary)
|
||||
{
|
||||
DASIdChannelIndexGroupIdList[dasId] = tempDictionary;
|
||||
}
|
||||
public static List<int> GetGroupIds(int targetDasId, List<int> targetChannelIndexList)
|
||||
{
|
||||
var groupIdList = new List<int>();
|
||||
|
||||
foreach (var dasIdChannelIndexGroupIdTriple in DASIdChannelIndexGroupIdList)
|
||||
{
|
||||
if (dasIdChannelIndexGroupIdTriple.Key == targetDasId)
|
||||
{
|
||||
var channelIndexGroupIdTuple = dasIdChannelIndexGroupIdTriple.Value;
|
||||
foreach (var channelIndex in channelIndexGroupIdTuple.Keys)
|
||||
{
|
||||
if (targetChannelIndexList.Contains(channelIndex))
|
||||
{
|
||||
groupIdList.Add(channelIndexGroupIdTuple[channelIndex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return groupIdList;
|
||||
}
|
||||
#endregion BaseModuleChannelIndexList
|
||||
|
||||
#region TestSetupHardwareIds
|
||||
private static Dictionary<int, List<int>> TestSetupHardwareIds = new Dictionary<int, List<int>>();
|
||||
public static void ClearTestSetupHardwareIds()
|
||||
{
|
||||
TestSetupHardwareIds.Clear();
|
||||
}
|
||||
public static void AddTestSetupHardwareId(int dasId, int testSetupId)
|
||||
{
|
||||
if (!TestSetupHardwareIds.ContainsKey(dasId))
|
||||
{
|
||||
TestSetupHardwareIds.Add(dasId, new List<int>());
|
||||
}
|
||||
TestSetupHardwareIds[dasId].Add(testSetupId);
|
||||
}
|
||||
public static List<int> GetTestSetupHardwareIds(int DASId)
|
||||
{
|
||||
var testSetupIdList = new List<int>();
|
||||
|
||||
if (TestSetupHardwareIds.ContainsKey(DASId))
|
||||
{
|
||||
testSetupIdList = TestSetupHardwareIds[DASId];
|
||||
}
|
||||
|
||||
return testSetupIdList;
|
||||
}
|
||||
#endregion TestSetupHardwareIds
|
||||
|
||||
#region GroupHardwareIds
|
||||
private static Dictionary<int, List<int>> GroupHardwareIds = new Dictionary<int, List<int>>();
|
||||
public static void ClearGroupHardwareIds()
|
||||
{
|
||||
GroupHardwareIds.Clear();
|
||||
}
|
||||
public static void AddGroupHardwareId(int dasId, int groupId)
|
||||
{
|
||||
if (!GroupHardwareIds.ContainsKey(dasId))
|
||||
{
|
||||
GroupHardwareIds.Add(dasId, new List<int>());
|
||||
}
|
||||
GroupHardwareIds[dasId].Add(groupId);
|
||||
}
|
||||
public static List<int> GetGroupHardwareIds(int DASId)
|
||||
{
|
||||
var groupIdList = new List<int>();
|
||||
|
||||
if (GroupHardwareIds.ContainsKey(DASId))
|
||||
{
|
||||
groupIdList = GroupHardwareIds[DASId];
|
||||
}
|
||||
|
||||
return groupIdList;
|
||||
}
|
||||
#endregion GroupHardwareIds
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
G\PN:{NAME OF PROGRAM};
|
||||
G\TA:{TEST ID}_{DAS SERIAL NUMBER};
|
||||
G\106:17;
|
||||
G\DSI\N:1;
|
||||
G\DSI-1:{TEST ID};
|
||||
G\DST-1:STO;
|
||||
R-1\ID:{TEST ID};
|
||||
R-1\RID:S6A_1;
|
||||
R-1\R1:generated from XML CH10 mapping;
|
||||
R-1\TC1:OTHR;
|
||||
R-1\COM:=========================================================================;
|
||||
R-1\COM: This simple settings for PCM stream
|
||||
R-1\COM: Mapping defined in the CH10 Programmers Handbook (RCC document 123-16) ;
|
||||
R-1\COM: appendix P/Q from the definition of a user defined external XML file;
|
||||
R-1\COM:=========================================================================;
|
||||
R-1\RML:E;
|
||||
R-1\ERBS:AUTO;
|
||||
R-1\NSB:0;
|
||||
R-1\RI1:Data Bus Tools GmbH;
|
||||
R-1\RI2:S6A_1;
|
||||
R-1\RI3:N;
|
||||
R-1\RI6:N;
|
||||
R-1\CRE:F;
|
||||
R-1\RSS:R;
|
||||
R-1\N:2;
|
||||
R-1\TK1-1:1;
|
||||
R-1\TK4-1:1;
|
||||
R-1\COM: ======================= Time Channel ========================;
|
||||
R-1\COM: == Format 2 with PTP timestamp ==;
|
||||
R-1\TK1-1:65535;
|
||||
R-1\DSI-1:Time;
|
||||
R-1\TK4-1:65535;
|
||||
R-1\CHE-1:T;
|
||||
R-1\CDT-1:TIMEIN;
|
||||
R-1\CDLN-1:Time;
|
||||
R-1\IDX\E:T;
|
||||
R-1\IDX\IT:T;
|
||||
R-1\IDX\ITV:200;
|
||||
R-1\TTF-1:1;
|
||||
R-1\TFMT-1:B;
|
||||
R-1\TSRC-1:I;
|
||||
R-1\COM: ====================== START CHANNELS =======================;
|
||||
@@ -0,0 +1,11 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Menu.HamburgerMenu
|
||||
{
|
||||
/// <summary>
|
||||
/// view for group channels
|
||||
/// </summary>
|
||||
public interface IHamburgerMenuView:IBaseView
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface ILegendViewModel : IBaseViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Tab View.
|
||||
/// </summary>
|
||||
ILegendView View { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using DTS.Common.Interface.TestSetups.Imports.TTS.ReadFile;
|
||||
using Microsoft.Practices.Prism.Events;
|
||||
|
||||
namespace DTS.Common.Events.TTSImport
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The TTSImportTestSetupChangedEvent event.
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>This event is published whenever the Test Setup is changed.</remarks>
|
||||
///
|
||||
public class TTSImportTestSetupChangedEvent : CompositePresentationEvent<ITTSSetup> { }
|
||||
}
|
||||
Reference in New Issue
Block a user