This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1 @@
12

View File

@@ -0,0 +1 @@
12

View File

@@ -0,0 +1,15 @@
using DTS.Common.Interface;
namespace RealtimeSettings
{
/// <summary>
/// Interaction logic for RealtimeSettingsView.xaml
/// </summary>
public partial class RealtimeSettingsView : IRealtimeSettingsView
{
public RealtimeSettingsView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DelayBetweenPolls" xml:space="preserve">
<value>Delay between polls</value>
</data>
<data name="DelayBetweenPollsHelp" xml:space="preserve">
<value>period between retrieving data from DAS (ms). Too high of a setting may result in data drop out, too low of a setting may result in putting a stress on available resources.</value>
</data>
<data name="HighDelay" xml:space="preserve">
<value>High draw delay</value>
</data>
<data name="HighDelayHelp" xml:space="preserve">
<value>Maximum time (ms) between UI updates when data is available.</value>
</data>
<data name="LowDelay" xml:space="preserve">
<value>Low draw delay</value>
</data>
<data name="LowDelayHelp" xml:space="preserve">
<value>Minimum time (ms) between UI updates when data is available. Too low of a setting may cause UI to become unresponsive. Too high of a delay may result in jerky realtime performance.</value>
</data>
<data name="RealtimeSampleRate" xml:space="preserve">
<value>Realtime sample rate</value>
</data>
<data name="RealtimeSampleRates" xml:space="preserve">
<value>Realtime sample rates</value>
</data>
<data name="RealtimeSampleRateSliceIP" xml:space="preserve">
<value>Realtime sample rate (Slice IP)</value>
</data>
<data name="RealtimeSampleRateSliceUSB" xml:space="preserve">
<value>Realtime sample rate (Slice USB)</value>
</data>
<data name="RealtimeSampleRateTDASG5" xml:space="preserve">
<value>Realtime sample rate (TDAS G5)</value>
</data>
<data name="SampleRate" xml:space="preserve">
<value>Sample rate</value>
</data>
<data name="SampleRateHelp" xml:space="preserve">
<value>Samples per second for realtime data acquisition. Too high of a setting may cause data drop out, and too low of a setting may cause aliasing.</value>
</data>
<data name="UseMeterModeHelp" xml:space="preserve">
<value>Polls all active sensors and allows selecting sensors by tag in meter mode</value>
</data>
<data name="UseMeterModeTableStyle" xml:space="preserve">
<value>Use meter mode table style</value>
</data>
</root>

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RealtimeSettings")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RealtimeSettings")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7446722e-490d-4f6a-beaf-907947e576d5")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,149 @@
using System.ComponentModel.Composition;
using System.Threading.Tasks;
using DTS.Common.Base;
using DTS.Common.Events;
using DTS.Common.Interactivity;
using DTS.Common.Interface;
using Prism.Events;
using Prism.Regions;
using Unity;
namespace RealtimeSettings
{
[Export(typeof(IRealtimeSettingsView))]
[PartCreationPolicy(CreationPolicy.Shared)]
public class RealtimeSettingsViewModel : BasePropertyChanged, IRealtimeSettingsViewModel
{
public IRealtimeSettingsView View { get; private set; }
private IEventAggregator _eventAggregator { get; set; }
private IRegionManager _regionManager;
private IUnityContainer UnityContainer { get; set; }
public InteractionRequest<Notification> NotificationRequest { get; private set; }
public InteractionRequest<Confirmation> ConfirmationRequest { get; private set; }
/// <summary>
/// Creates a new instance of the TechnologyDomainEditViewModel.
/// </summary>
/// <param name="view">The ShellView View.</param>
/// <param name="regionManager">The logical placeholder defined within the application's UI (in the shell or within views) into which views are displayed.</param>
/// <param name="eventAggregator">The EventAggregator which allows different components to publish/subscribe to events without being coupled to each other.</param>
/// <param name="unityContainer">The unityContainer.</param>
public RealtimeSettingsViewModel(IRealtimeSettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
{
View = view;
View.DataContext = this;
NotificationRequest = new InteractionRequest<Notification>();
ConfirmationRequest = new InteractionRequest<Confirmation>();
_eventAggregator = eventAggregator;
UnityContainer = unityContainer;
_regionManager = regionManager;
_eventAggregator.GetEvent<RaiseNotification>().Subscribe(OnRaiseNotification);
_eventAggregator.GetEvent<BusyIndicatorChangeNotification>().Subscribe(OnBusyIndicatorNotification, ThreadOption.PublisherThread, true);
}
#region Methods
public void Cleanup() { }
public Task CleanupAsync() { return Task.CompletedTask; }
public void Initialize() { }
public void Initialize(object parameter)
{
}
public void Initialize(object parameter, object model)
{
}
public Task InitializeAsync() { return Task.CompletedTask; }
public Task InitializeAsync(object parameter) { return Task.CompletedTask; }
public void Activated() { }
/// <summary>
/// Private Event handler for RaiseNotification event.
/// </summary>
private void OnBusyIndicatorNotification(bool eventArg)
{
IsBusy = eventArg;
}
/// <summary>
/// Private Event handler for RaiseNotification event.
/// </summary>
private void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)
{
// The NotificationRequest.Raise triggers the Invoke() method of the .Infrastructure.PopupWindowAction object
// to show the .Infrastructure.NotificationWindow window
// Notification object expects a NotificationContentEventArgsWithoutTitle object and a Title string.
var eventArgsWithoutTitle = new NotificationContentEventArgs(eventArgsWithTitle.Message, "", eventArgsWithTitle.Image, "");
NotificationRequest.Raise(new Notification { Content = eventArgsWithoutTitle, Title = eventArgsWithTitle.Title });
}
#endregion
#region Properties
private string _realtimeSampleRate = string.Empty;
public string RealtimeSampleRate
{
get => _realtimeSampleRate;
set => SetProperty(ref _realtimeSampleRate, value, "RealtimeSampleRate");
}
private string _realtimeSampleRates = string.Empty;
public string RealtimeSampleRates
{
get => _realtimeSampleRates;
set
{
SetProperty(ref _realtimeSampleRates, value, "RealtimeSampleRates");
OnPropertyChanged("RealtimeSampleRate");
}
}
private string _realtimeDelayText = string.Empty;
public string RealtimeDelayText
{
get => _realtimeDelayText;
set => SetProperty(ref _realtimeDelayText, value, "RealtimeDelayText");
}
public bool IsDirty { get; private set; }
private bool _isBusy = false;
public bool IsBusy
{
get => _isBusy;
set => SetProperty(ref _isBusy, value, "IsBusy");
}
private bool _isMenuIncluded = false;
public bool IsMenuIncluded
{
get => _isMenuIncluded;
set => SetProperty(ref _isMenuIncluded, value, "IsMenuIncluded");
}
private bool _isNavigationIncluded = false;
public bool IsNavigationIncluded
{
get => _isNavigationIncluded;
set => SetProperty(ref _isNavigationIncluded, value, "IsNavigationIncluded");
}
/// <summary>
/// Gets the HeaderInfo.
/// </summary>
public string HeaderInfo => "MainRegion";
#endregion Properties
}
}

View File

@@ -0,0 +1,58 @@
<base:BaseView x:Class="RealtimeSettings.RealtimeSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:strings="clr-namespace:RealtimeSettings.Resources"
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<base:BaseView.Resources>
<ResourceDictionary>
<Style x:Key="TextStyle" TargetType="TextBlock" BasedOn="{StaticResource BasicTextStyle}">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Margin" Value="5,0,10,0" />
<Setter Property="Width" Value="170" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="TextBoxStyle" TargetType="TextBox" >
<Setter Property="Foreground" Value="Black"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Margin" Value="5,0,10,0" />
<Setter Property="Width" Value="170" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="StackPanelHstyle" TargetType="StackPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="Margin" Value="0,0,0,5" />
</Style>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</base:BaseView.Resources>
<StackPanel Orientation="Vertical">
<StackPanel Style="{StaticResource StackPanelHstyle}">
<TextBlock Text="{strings:TranslateExtension DelayBetweenPolls}" Style="{StaticResource TextStyle}" />
<TextBox Text="{Binding RealtimeDelayText}" Style="{StaticResource TextBoxStyle}"/>
<TextBlock Text="{strings:TranslateExtension DelayBetweenPollsHelp}" TextWrapping="WrapWithOverflow"/>
</StackPanel>
<StackPanel Style="{StaticResource StackPanelHstyle}">
<TextBlock Text="{strings:TranslateExtension RealtimeSampleRateSliceIP}" Style="{StaticResource TextStyle}" />
<TextBox Text="{Binding RealtimeSampleRateSliceIP}" Style="{StaticResource TextBoxStyle}"/>
</StackPanel>
<StackPanel Style="{StaticResource StackPanelHstyle}">
<TextBlock Text="{strings:TranslateExtension RealtimeSampleRateSliceUSB}" Style="{StaticResource TextStyle}" />
<TextBox Text="{Binding RealtimeSampleRateSliceUSB}" Style="{StaticResource TextBoxStyle}"/>
</StackPanel>
<StackPanel Style="{StaticResource StackPanelHstyle}">
<TextBlock Text="{strings:TranslateExtension RealtimeSampleRateTDASG5}" Style="{StaticResource TextStyle}" />
<TextBox Text="{Binding RealtimeSampleRateTDASG5}" Style="{StaticResource TextBoxStyle}"/>
</StackPanel>
<StackPanel Style="{StaticResource StackPanelHstyle}">
<TextBlock Text="{strings:TranslateExtension UseMeterModeTableStyle}" Style="{StaticResource TextStyle}" />
<CheckBox IsChecked="{Binding UseMeterModeTable}" />
<TextBlock Text="{strings:TranslateExtension UseMeterModeHelp}" />
</StackPanel>
</StackPanel>
</base:BaseView>

View File

@@ -0,0 +1,198 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace RealtimeSettings.Resources {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class StringResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal StringResources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RealtimeSettings.Resources.StringResources", typeof(StringResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Delay between polls.
/// </summary>
internal static string DelayBetweenPolls {
get {
return ResourceManager.GetString("DelayBetweenPolls", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to period between retrieving data from DAS (ms). Too high of a setting may result in data drop out, too low of a setting may result in putting a stress on available resources..
/// </summary>
internal static string DelayBetweenPollsHelp {
get {
return ResourceManager.GetString("DelayBetweenPollsHelp", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to High draw delay.
/// </summary>
internal static string HighDelay {
get {
return ResourceManager.GetString("HighDelay", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Maximum time (ms) between UI updates when data is available..
/// </summary>
internal static string HighDelayHelp {
get {
return ResourceManager.GetString("HighDelayHelp", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Low draw delay.
/// </summary>
internal static string LowDelay {
get {
return ResourceManager.GetString("LowDelay", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Minimum time (ms) between UI updates when data is available. Too low of a setting may cause UI to become unresponsive. Too high of a delay may result in jerky realtime performance..
/// </summary>
internal static string LowDelayHelp {
get {
return ResourceManager.GetString("LowDelayHelp", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Realtime sample rate.
/// </summary>
internal static string RealtimeSampleRate {
get {
return ResourceManager.GetString("RealtimeSampleRate", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Realtime sample rates.
/// </summary>
internal static string RealtimeSampleRates {
get {
return ResourceManager.GetString("RealtimeSampleRates", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Realtime sample rate (Slice IP).
/// </summary>
internal static string RealtimeSampleRateSliceIP {
get {
return ResourceManager.GetString("RealtimeSampleRateSliceIP", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Realtime sample rate (Slice USB).
/// </summary>
internal static string RealtimeSampleRateSliceUSB {
get {
return ResourceManager.GetString("RealtimeSampleRateSliceUSB", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Realtime sample rate (TDAS G5).
/// </summary>
internal static string RealtimeSampleRateTDASG5 {
get {
return ResourceManager.GetString("RealtimeSampleRateTDASG5", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Sample rate.
/// </summary>
internal static string SampleRate {
get {
return ResourceManager.GetString("SampleRate", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Samples per second for realtime data acquisition. Too high of a setting may cause data drop out, and too low of a setting may cause aliasing..
/// </summary>
internal static string SampleRateHelp {
get {
return ResourceManager.GetString("SampleRateHelp", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Polls all active sensors and allows selecting sensors by tag in meter mode.
/// </summary>
internal static string UseMeterModeHelp {
get {
return ResourceManager.GetString("UseMeterModeHelp", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Use meter mode table style.
/// </summary>
internal static string UseMeterModeTableStyle {
get {
return ResourceManager.GetString("UseMeterModeTableStyle", resourceCulture);
}
}
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Windows.Markup;
namespace RealtimeSettings.Resources
{
[MarkupExtensionReturnType(typeof(string))]
public class TranslateExtension : MarkupExtension
{
private readonly string _key;
public TranslateExtension(string key) { _key = key; }
private const string NotFound = "#stringnotfound#";
public override object ProvideValue(IServiceProvider serviceProvider)
{
if (string.IsNullOrEmpty(_key)) { return NotFound; }
return StringResources.ResourceManager.GetString(_key) ?? NotFound + " " + _key;
}
}
}

View File

@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0BB41087-1D3A-4F16-AB8C-280D311CB3A1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RealtimeSettings</RootNamespace>
<AssemblyName>RealtimeSettings</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Xaml.Behaviors">
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Microsoft.Xaml.Behaviors.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="Prism">
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.dll</HintPath>
</Reference>
<Reference Include="Prism.Unity.Wpf">
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Unity.Wpf.dll</HintPath>
</Reference>
<Reference Include="Prism.Wpf">
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Wpf.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Unity.Abstractions">
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Unity.Container">
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Container.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="Xceed.Wpf.Toolkit">
<HintPath>..\..\..\..\Common\DTS.Common\lib\Xceed.Wpf.Toolkit\Xceed.Wpf.Toolkit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="RealtimeSettingsModule.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources\StringResources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>StringResources.resx</DependentUpon>
</Compile>
<Compile Include="Resources\TranslateExtension.cs" />
<Compile Include="ViewModel\RealtimeSettingsViewModel.cs" />
<Compile Include="View\RealtimeSettingsView.xaml.cs">
<DependentUpon>RealtimeSettingsView.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Page Include="View\RealtimeSettingsView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\StringResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Common\DTS.Common\DTS.Common.csproj">
<Project>{114edc77-f3b5-4576-a91b-40818d503b55}</Project>
<Name>DTS.Common</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,100 @@
using System;
using System.ComponentModel.Composition;
using System.Windows.Media.Imaging;
using DTS.Common;
using DTS.Common.Interface;
using Prism.Ioc;
using Prism.Modularity;
using Unity;
namespace RealtimeSettings
{
[Export(typeof(IModule))]
[Module(ModuleName = "RealtimeSettings")]
public class RealtimeSettingsModule : IModule
{
/// <summary>
/// Injected unity container
/// </summary>
private readonly IUnityContainer _unityContainer;
/// <summary>
/// Initializes a new instance of the <see cref="RealtimeSettingsModule"/> class.
/// </summary>
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
public RealtimeSettingsModule(IUnityContainer unityContainer)
{
_unityContainer = unityContainer;
}
public void Initialize()
{
// Register View & View-Model with Unity dependency injection container as a singleton.
_unityContainer.RegisterType<IRealtimeSettingsView, RealtimeSettingsView>();
_unityContainer.RegisterType<IRealtimeSettingsViewModel, RealtimeSettingsViewModel>();
}
public void OnInitialized(IContainerProvider containerProvider)
{
}
public void RegisterTypes(IContainerRegistry containerRegistry)
{
Initialize();
}
}
/// <summary>
/// Attribute class contains assembly image and name - used on the Main screen to display available components
/// </summary>
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
public class RealtimeSettingsImageAttribute : ImageAttribute
{
private BitmapImage _img;
public RealtimeSettingsImageAttribute() : this(null) { }
public override eAssemblyRegion AssemblyRegion => throw new NotImplementedException();
public override BitmapImage AssemblyImage
{
get { _img = AssemblyInfo.GetImage(AssemblyNames.RealtimeSettings.ToString()); return _img; }
}
public RealtimeSettingsImageAttribute(string s)
{
_img = AssemblyInfo.GetImage(AssemblyNames.RealtimeSettings.ToString());
}
public override Type GetAttributeType()
{
return typeof(ImageAttribute);
}
public override BitmapImage GetAssemblyImage()
{
return AssemblyImage;
}
private string _name;
public override string AssemblyName
{
get { _name = AssemblyNames.RealtimeSettings.ToString(); return _name; }
}
public override string GetAssemblyName()
{
return AssemblyName;
}
public override eAssemblyRegion GetAssemblyRegion()
{
throw new NotImplementedException();
}
private string _group;
public override string AssemblyGroup
{
get { _group = eAssemblyGroups.Administrative.ToString(); return _group; }
}
public override string GetAssemblyGroup()
{
return AssemblyGroup;
}
}
}