init
This commit is contained in:
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1,39 @@
|
||||
<base:BaseView x:Class="DBImportExport.DBExportView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:root="clr-namespace:DBImportExport.Resources"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{root:TranslateExtension ExportView_File}" Margin="5"/>
|
||||
<TextBox Width="200" Text="{Binding ExportFileName}" Margin="5"/>
|
||||
<Button Content="{root:TranslateExtension ExportView_Browse}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ExportBrowseCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,15 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace DBImportExport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PowerAndBatteryView.xaml
|
||||
/// </summary>
|
||||
public partial class DBImportView : IDBImportView
|
||||
{
|
||||
public DBImportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace DBImportExport.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
<?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="ExportFileBrowse_Filter" xml:space="preserve">
|
||||
<value>DataPRO DB XML File (*.dbxml)|*.dbxml|All Files (*.*)|*.*</value>
|
||||
</data>
|
||||
<data name="ExportFileData_Empty" xml:space="preserve">
|
||||
<value>No data to export</value>
|
||||
</data>
|
||||
<data name="ExportFileName_Empty" xml:space="preserve">
|
||||
<value>No export file name specified</value>
|
||||
</data>
|
||||
<data name="ExportView_Browse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
</data>
|
||||
<data name="ExportView_File" xml:space="preserve">
|
||||
<value>File</value>
|
||||
</data>
|
||||
<data name="ImportFileBrowse_Filter" xml:space="preserve">
|
||||
<value>DataPRO DB XML File (*.dbxml)|*.dbxml|All Files (*.*)|*.*</value>
|
||||
</data>
|
||||
<data name="ImportView_Browse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
</data>
|
||||
<data name="ImportView_File" xml:space="preserve">
|
||||
<value>File</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,15 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace DBImportExport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PowerAndBatteryView.xaml
|
||||
/// </summary>
|
||||
public partial class DBExportView : IDBExportView
|
||||
{
|
||||
public DBExportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interface;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
using Unity;
|
||||
using DTS.Common.Utils;
|
||||
using System.Text;
|
||||
using DTS.Common.Interactivity;
|
||||
using Prism.Commands;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace DBImportExport
|
||||
{
|
||||
/// <summary>
|
||||
/// this class handles DB import/export functionality
|
||||
/// (note that since a lot of of DataPRO objects still live in the datapro project it's functionality is limited to the xml string going back and forth right now)
|
||||
/// </summary>
|
||||
[Export(typeof(IDBImportView))]
|
||||
[Export(typeof(IDBExportView))]
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class DBViewModel : IDBViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// the import view
|
||||
/// </summary>
|
||||
public IDBImportView ImportView { get; set; }
|
||||
/// <summary>
|
||||
/// the export view
|
||||
/// </summary>
|
||||
public IDBExportView ExportView { get; 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 Power And Battery 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 DBViewModel(IDBImportView importView, IDBExportView exportView, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
{
|
||||
ImportView = importView;
|
||||
ImportView.DataContext = this;
|
||||
|
||||
ExportView = exportView;
|
||||
ExportView.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 PopupWindowAction object to show the NotificationWindow window
|
||||
// Notification object expects a NotificationContentEventArgsWithoutTitle object and a Title string.
|
||||
var eventArgsWithoutTitle = new NotificationContentEventArgs(eventArgsWithTitle.Message, "", eventArgsWithTitle.Image, string.Empty);
|
||||
|
||||
NotificationRequest.Raise(new Notification { Content = eventArgsWithoutTitle, Title = eventArgsWithTitle.Title });
|
||||
}
|
||||
/// <summary>
|
||||
/// exports ExportData to ExportFileName
|
||||
/// </summary>
|
||||
public void Export()
|
||||
{
|
||||
//System.IO.File.WriteAllText(_exportFile, sb.ToString(), Encoding.Unicode);
|
||||
if (string.IsNullOrWhiteSpace(ExportFileName))
|
||||
{
|
||||
_eventAggregator.GetEvent<ShowStatus>()
|
||||
.Publish(new StatusInfo(StatusInfo.StatusState.DoneFailed,
|
||||
Resources.StringResources.ExportFileName_Empty));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(ExportData))
|
||||
{
|
||||
_eventAggregator.GetEvent<ShowStatus>().Publish(new StatusInfo(StatusInfo.StatusState.DoneFailed,
|
||||
Resources.StringResources.ExportFileData_Empty));
|
||||
return;
|
||||
}
|
||||
if (System.IO.File.Exists(ExportFileName))
|
||||
{
|
||||
FileUtils.DeleteFileOrMove(ExportFileName, LogDummyFunc);
|
||||
}
|
||||
System.IO.File.WriteAllText(ExportFileName, ExportData, Encoding.Unicode);
|
||||
}
|
||||
|
||||
private void LogDummyFunc(params object[] paramlist)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
public bool IsDirty { get; private set; }
|
||||
private bool _isBusy = false;
|
||||
public bool IsBusy { get => _isBusy; set { _isBusy = value; OnPropertyChanged("IsBusy"); } }
|
||||
private bool _isMenuIncluded = false;
|
||||
public bool IsMenuIncluded { get => _isMenuIncluded; set { _isMenuIncluded = value; OnPropertyChanged("IsMenuIncluded"); } }
|
||||
private bool _isNavigationIncluded = false;
|
||||
public bool IsNavigationIncluded { get => _isNavigationIncluded; set { _isNavigationIncluded = value; OnPropertyChanged("IsNavigationIncluded"); } }
|
||||
/// <summary>
|
||||
/// Gets the HeaderInfo.
|
||||
/// </summary>
|
||||
public string HeaderInfo => "MainRegion";
|
||||
/// <summary>
|
||||
/// xml string containing all data imported
|
||||
/// </summary>
|
||||
public string ImportData { get; set; }
|
||||
/// <summary>
|
||||
/// xml string containing all data exported
|
||||
/// </summary>
|
||||
public string ExportData { get; set; }
|
||||
/// <summary>
|
||||
/// exports ExportData to the ExportFileName
|
||||
/// </summary>
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
/// <summary>
|
||||
/// browse to a file to import, should be xml, maybe needs a few other criteria
|
||||
/// </summary>
|
||||
private DelegateCommand _importBrowseCommand;
|
||||
public DelegateCommand ImportBrowseCommand => _importBrowseCommand ?? (_importBrowseCommand = new DelegateCommand(ImportBrowseMethod));
|
||||
private void ImportBrowseMethod()
|
||||
{
|
||||
using (var dlg = new System.Windows.Forms.OpenFileDialog())
|
||||
{
|
||||
dlg.CheckFileExists = true;
|
||||
dlg.CheckPathExists = true;
|
||||
dlg.Filter = Resources.StringResources.ImportFileBrowse_Filter;
|
||||
dlg.FilterIndex = 0;
|
||||
|
||||
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
ImportFileName = dlg.FileName;
|
||||
ImportStatusText = "Pressing the Import button will delete your existing database and replace it using " + ImportFileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// browse to a file to import, should be xml, maybe needs a few other criteria
|
||||
/// </summary>
|
||||
private DelegateCommand _exportBrowseCommand;
|
||||
public DelegateCommand ExportBrowseCommand => _exportBrowseCommand ?? (_exportBrowseCommand = new DelegateCommand(ExportBrowseMethod));
|
||||
private void ExportBrowseMethod()
|
||||
{
|
||||
using (var dlg = new System.Windows.Forms.SaveFileDialog())
|
||||
{
|
||||
dlg.CheckFileExists = false;
|
||||
dlg.CheckPathExists = true;
|
||||
dlg.OverwritePrompt = false;
|
||||
dlg.Filter = Resources.StringResources.ExportFileBrowse_Filter;
|
||||
dlg.FilterIndex = 0;
|
||||
|
||||
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
ExportFileName = dlg.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
/// <summary>
|
||||
/// all properties that are exposed
|
||||
/// </summary>
|
||||
public enum PropertyNames
|
||||
{
|
||||
ExportFileName,
|
||||
ImportFileName,
|
||||
ImportStatusText
|
||||
}
|
||||
private string _exportFileName = "";
|
||||
/// <summary>
|
||||
/// full path to export file
|
||||
/// </summary>
|
||||
public string ExportFileName
|
||||
{
|
||||
get => _exportFileName;
|
||||
set
|
||||
{
|
||||
_exportFileName = value;
|
||||
OnPropertyChanged(PropertyNames.ExportFileName.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private string _importFileName = "";
|
||||
/// <summary>
|
||||
/// full path to import file
|
||||
/// </summary>
|
||||
public string ImportFileName
|
||||
{
|
||||
get => _importFileName;
|
||||
set
|
||||
{
|
||||
_importFileName = value;
|
||||
OnPropertyChanged(PropertyNames.ImportFileName.ToString());
|
||||
}
|
||||
}
|
||||
private string _importStatusText;
|
||||
public string ImportStatusText
|
||||
{
|
||||
get => _importStatusText;
|
||||
set
|
||||
{
|
||||
_importStatusText = value;
|
||||
OnPropertyChanged(PropertyNames.ImportStatusText.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
///<summary>
|
||||
///Occurs when a property value changes.
|
||||
///</summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
var eventHandler = PropertyChanged;
|
||||
if (eventHandler != null) { eventHandler(this, new PropertyChangedEventArgs(propertyName)); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<base:BaseView x:Class="DBImportExport.DBImportView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:root="clr-namespace:DBImportExport.Resources"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{root:Translate ImportView_File}" />
|
||||
<TextBox Width="200" Text="{Binding ImportFileName}" />
|
||||
<Button Content="{root:Translate ImportView_Browse}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ImportBrowseCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</WrapPanel>
|
||||
<TextBlock Grid.Row="1" Text="{Binding ImportStatusText}"/>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using Prism.Modularity;
|
||||
using Prism.Ioc;
|
||||
using Unity;
|
||||
|
||||
|
||||
namespace DBImportExport
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "DBImportExportModule")]
|
||||
public class DBImportExportModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DBImportExportModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public DBImportExportModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IDBImportView, DBImportView>();
|
||||
_unityContainer.RegisterType<IDBExportView, DBExportView>();
|
||||
_unityContainer.RegisterType<IDBViewModel, DBViewModel>();
|
||||
}
|
||||
|
||||
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 DBImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public DBImageAttribute() : this(null) { }
|
||||
public override eAssemblyRegion AssemblyRegion => throw new NotImplementedException();
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.DB.ToString()); return _img; }
|
||||
}
|
||||
public DBImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.DB.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.PowerAndBattery.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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("DBImportExportModule")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DBImportExportModule")]
|
||||
[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("bc9afa01-e327-4133-8818-141281f9b3a0")]
|
||||
|
||||
// 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")]
|
||||
@@ -0,0 +1,135 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 DBImportExport.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("DBImportExport.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 DataPRO DB XML File (*.dbxml)|*.dbxml|All Files (*.*)|*.*.
|
||||
/// </summary>
|
||||
internal static string ExportFileBrowse_Filter {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportFileBrowse_Filter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No data to export.
|
||||
/// </summary>
|
||||
internal static string ExportFileData_Empty {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportFileData_Empty", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No export file name specified.
|
||||
/// </summary>
|
||||
internal static string ExportFileName_Empty {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportFileName_Empty", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Browse.
|
||||
/// </summary>
|
||||
internal static string ExportView_Browse {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportView_Browse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to File.
|
||||
/// </summary>
|
||||
internal static string ExportView_File {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportView_File", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to DataPRO DB XML File (*.dbxml)|*.dbxml|All Files (*.*)|*.*.
|
||||
/// </summary>
|
||||
internal static string ImportFileBrowse_Filter {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportFileBrowse_Filter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Browse.
|
||||
/// </summary>
|
||||
internal static string ImportView_Browse {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportView_Browse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to File.
|
||||
/// </summary>
|
||||
internal static string ImportView_File {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportView_File", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
<?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>{CA9BD55B-2BB9-4889-B255-2C392E2D2CFA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DBImportExport</RootNamespace>
|
||||
<AssemblyName>DBImportExport</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.Windows.Forms" />
|
||||
<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="DBImportExportModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\StringResources.Designer.cs">
|
||||
<DependentUpon>StringResources.resx</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Resources\TranslateExtension.cs" />
|
||||
<Compile Include="ViewModel\DBViewModel.cs" />
|
||||
<Compile Include="View\DBExportView.xaml.cs">
|
||||
<DependentUpon>DBExportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\DBImportView.xaml.cs">
|
||||
<DependentUpon>DBImportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\DBExportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\DBImportView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StringResources.de.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.es.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.fr.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.ja.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\StringResources.ru.resx" />
|
||||
</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>
|
||||
BIN
DataPRO/Modules/SystemSettings/DBImportExport/.svn/wc.db
Normal file
BIN
DataPRO/Modules/SystemSettings/DBImportExport/.svn/wc.db
Normal file
Binary file not shown.
@@ -0,0 +1,152 @@
|
||||
<?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>{CA9BD55B-2BB9-4889-B255-2C392E2D2CFA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DBImportExport</RootNamespace>
|
||||
<AssemblyName>DBImportExport</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.Windows.Forms" />
|
||||
<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="DBImportExportModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\StringResources.Designer.cs">
|
||||
<DependentUpon>StringResources.resx</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Resources\TranslateExtension.cs" />
|
||||
<Compile Include="ViewModel\DBViewModel.cs" />
|
||||
<Compile Include="View\DBExportView.xaml.cs">
|
||||
<DependentUpon>DBExportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\DBImportView.xaml.cs">
|
||||
<DependentUpon>DBImportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\DBExportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\DBImportView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StringResources.de.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.es.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.fr.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.ja.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\StringResources.ru.resx" />
|
||||
</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>
|
||||
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using Prism.Modularity;
|
||||
using Prism.Ioc;
|
||||
using Unity;
|
||||
|
||||
|
||||
namespace DBImportExport
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "DBImportExportModule")]
|
||||
public class DBImportExportModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DBImportExportModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public DBImportExportModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IDBImportView, DBImportView>();
|
||||
_unityContainer.RegisterType<IDBExportView, DBExportView>();
|
||||
_unityContainer.RegisterType<IDBViewModel, DBViewModel>();
|
||||
}
|
||||
|
||||
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 DBImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public DBImageAttribute() : this(null) { }
|
||||
public override eAssemblyRegion AssemblyRegion => throw new NotImplementedException();
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.DB.ToString()); return _img; }
|
||||
}
|
||||
public DBImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.DB.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.PowerAndBattery.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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("DBImportExportModule")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DBImportExportModule")]
|
||||
[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("bc9afa01-e327-4133-8818-141281f9b3a0")]
|
||||
|
||||
// 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")]
|
||||
135
DataPRO/Modules/SystemSettings/DBImportExport/Resources/StringResources.Designer.cs
generated
Normal file
135
DataPRO/Modules/SystemSettings/DBImportExport/Resources/StringResources.Designer.cs
generated
Normal file
@@ -0,0 +1,135 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 DBImportExport.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("DBImportExport.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 DataPRO DB XML File (*.dbxml)|*.dbxml|All Files (*.*)|*.*.
|
||||
/// </summary>
|
||||
internal static string ExportFileBrowse_Filter {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportFileBrowse_Filter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No data to export.
|
||||
/// </summary>
|
||||
internal static string ExportFileData_Empty {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportFileData_Empty", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No export file name specified.
|
||||
/// </summary>
|
||||
internal static string ExportFileName_Empty {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportFileName_Empty", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Browse.
|
||||
/// </summary>
|
||||
internal static string ExportView_Browse {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportView_Browse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to File.
|
||||
/// </summary>
|
||||
internal static string ExportView_File {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportView_File", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to DataPRO DB XML File (*.dbxml)|*.dbxml|All Files (*.*)|*.*.
|
||||
/// </summary>
|
||||
internal static string ImportFileBrowse_Filter {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportFileBrowse_Filter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Browse.
|
||||
/// </summary>
|
||||
internal static string ImportView_Browse {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportView_Browse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to File.
|
||||
/// </summary>
|
||||
internal static string ImportView_File {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportView_File", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,144 @@
|
||||
<?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="ExportFileBrowse_Filter" xml:space="preserve">
|
||||
<value>DataPRO DB XML File (*.dbxml)|*.dbxml|All Files (*.*)|*.*</value>
|
||||
</data>
|
||||
<data name="ExportFileData_Empty" xml:space="preserve">
|
||||
<value>No data to export</value>
|
||||
</data>
|
||||
<data name="ExportFileName_Empty" xml:space="preserve">
|
||||
<value>No export file name specified</value>
|
||||
</data>
|
||||
<data name="ExportView_Browse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
</data>
|
||||
<data name="ExportView_File" xml:space="preserve">
|
||||
<value>File</value>
|
||||
</data>
|
||||
<data name="ImportFileBrowse_Filter" xml:space="preserve">
|
||||
<value>DataPRO DB XML File (*.dbxml)|*.dbxml|All Files (*.*)|*.*</value>
|
||||
</data>
|
||||
<data name="ImportView_Browse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
</data>
|
||||
<data name="ImportView_File" xml:space="preserve">
|
||||
<value>File</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace DBImportExport.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<base:BaseView x:Class="DBImportExport.DBExportView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:root="clr-namespace:DBImportExport.Resources"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{root:TranslateExtension ExportView_File}" Margin="5"/>
|
||||
<TextBox Width="200" Text="{Binding ExportFileName}" Margin="5"/>
|
||||
<Button Content="{root:TranslateExtension ExportView_Browse}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ExportBrowseCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,15 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace DBImportExport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PowerAndBatteryView.xaml
|
||||
/// </summary>
|
||||
public partial class DBExportView : IDBExportView
|
||||
{
|
||||
public DBExportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<base:BaseView x:Class="DBImportExport.DBImportView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:root="clr-namespace:DBImportExport.Resources"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{root:Translate ImportView_File}" />
|
||||
<TextBox Width="200" Text="{Binding ImportFileName}" />
|
||||
<Button Content="{root:Translate ImportView_Browse}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ImportBrowseCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</WrapPanel>
|
||||
<TextBlock Grid.Row="1" Text="{Binding ImportStatusText}"/>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,15 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace DBImportExport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PowerAndBatteryView.xaml
|
||||
/// </summary>
|
||||
public partial class DBImportView : IDBImportView
|
||||
{
|
||||
public DBImportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interface;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
using Unity;
|
||||
using DTS.Common.Utils;
|
||||
using System.Text;
|
||||
using DTS.Common.Interactivity;
|
||||
using Prism.Commands;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace DBImportExport
|
||||
{
|
||||
/// <summary>
|
||||
/// this class handles DB import/export functionality
|
||||
/// (note that since a lot of of DataPRO objects still live in the datapro project it's functionality is limited to the xml string going back and forth right now)
|
||||
/// </summary>
|
||||
[Export(typeof(IDBImportView))]
|
||||
[Export(typeof(IDBExportView))]
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class DBViewModel : IDBViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// the import view
|
||||
/// </summary>
|
||||
public IDBImportView ImportView { get; set; }
|
||||
/// <summary>
|
||||
/// the export view
|
||||
/// </summary>
|
||||
public IDBExportView ExportView { get; 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 Power And Battery 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 DBViewModel(IDBImportView importView, IDBExportView exportView, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
{
|
||||
ImportView = importView;
|
||||
ImportView.DataContext = this;
|
||||
|
||||
ExportView = exportView;
|
||||
ExportView.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 PopupWindowAction object to show the NotificationWindow window
|
||||
// Notification object expects a NotificationContentEventArgsWithoutTitle object and a Title string.
|
||||
var eventArgsWithoutTitle = new NotificationContentEventArgs(eventArgsWithTitle.Message, "", eventArgsWithTitle.Image, string.Empty);
|
||||
|
||||
NotificationRequest.Raise(new Notification { Content = eventArgsWithoutTitle, Title = eventArgsWithTitle.Title });
|
||||
}
|
||||
/// <summary>
|
||||
/// exports ExportData to ExportFileName
|
||||
/// </summary>
|
||||
public void Export()
|
||||
{
|
||||
//System.IO.File.WriteAllText(_exportFile, sb.ToString(), Encoding.Unicode);
|
||||
if (string.IsNullOrWhiteSpace(ExportFileName))
|
||||
{
|
||||
_eventAggregator.GetEvent<ShowStatus>()
|
||||
.Publish(new StatusInfo(StatusInfo.StatusState.DoneFailed,
|
||||
Resources.StringResources.ExportFileName_Empty));
|
||||
return;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(ExportData))
|
||||
{
|
||||
_eventAggregator.GetEvent<ShowStatus>().Publish(new StatusInfo(StatusInfo.StatusState.DoneFailed,
|
||||
Resources.StringResources.ExportFileData_Empty));
|
||||
return;
|
||||
}
|
||||
if (System.IO.File.Exists(ExportFileName))
|
||||
{
|
||||
FileUtils.DeleteFileOrMove(ExportFileName, LogDummyFunc);
|
||||
}
|
||||
System.IO.File.WriteAllText(ExportFileName, ExportData, Encoding.Unicode);
|
||||
}
|
||||
|
||||
private void LogDummyFunc(params object[] paramlist)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
public bool IsDirty { get; private set; }
|
||||
private bool _isBusy = false;
|
||||
public bool IsBusy { get => _isBusy; set { _isBusy = value; OnPropertyChanged("IsBusy"); } }
|
||||
private bool _isMenuIncluded = false;
|
||||
public bool IsMenuIncluded { get => _isMenuIncluded; set { _isMenuIncluded = value; OnPropertyChanged("IsMenuIncluded"); } }
|
||||
private bool _isNavigationIncluded = false;
|
||||
public bool IsNavigationIncluded { get => _isNavigationIncluded; set { _isNavigationIncluded = value; OnPropertyChanged("IsNavigationIncluded"); } }
|
||||
/// <summary>
|
||||
/// Gets the HeaderInfo.
|
||||
/// </summary>
|
||||
public string HeaderInfo => "MainRegion";
|
||||
/// <summary>
|
||||
/// xml string containing all data imported
|
||||
/// </summary>
|
||||
public string ImportData { get; set; }
|
||||
/// <summary>
|
||||
/// xml string containing all data exported
|
||||
/// </summary>
|
||||
public string ExportData { get; set; }
|
||||
/// <summary>
|
||||
/// exports ExportData to the ExportFileName
|
||||
/// </summary>
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
/// <summary>
|
||||
/// browse to a file to import, should be xml, maybe needs a few other criteria
|
||||
/// </summary>
|
||||
private DelegateCommand _importBrowseCommand;
|
||||
public DelegateCommand ImportBrowseCommand => _importBrowseCommand ?? (_importBrowseCommand = new DelegateCommand(ImportBrowseMethod));
|
||||
private void ImportBrowseMethod()
|
||||
{
|
||||
using (var dlg = new System.Windows.Forms.OpenFileDialog())
|
||||
{
|
||||
dlg.CheckFileExists = true;
|
||||
dlg.CheckPathExists = true;
|
||||
dlg.Filter = Resources.StringResources.ImportFileBrowse_Filter;
|
||||
dlg.FilterIndex = 0;
|
||||
|
||||
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
ImportFileName = dlg.FileName;
|
||||
ImportStatusText = "Pressing the Import button will delete your existing database and replace it using " + ImportFileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// browse to a file to import, should be xml, maybe needs a few other criteria
|
||||
/// </summary>
|
||||
private DelegateCommand _exportBrowseCommand;
|
||||
public DelegateCommand ExportBrowseCommand => _exportBrowseCommand ?? (_exportBrowseCommand = new DelegateCommand(ExportBrowseMethod));
|
||||
private void ExportBrowseMethod()
|
||||
{
|
||||
using (var dlg = new System.Windows.Forms.SaveFileDialog())
|
||||
{
|
||||
dlg.CheckFileExists = false;
|
||||
dlg.CheckPathExists = true;
|
||||
dlg.OverwritePrompt = false;
|
||||
dlg.Filter = Resources.StringResources.ExportFileBrowse_Filter;
|
||||
dlg.FilterIndex = 0;
|
||||
|
||||
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
ExportFileName = dlg.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
/// <summary>
|
||||
/// all properties that are exposed
|
||||
/// </summary>
|
||||
public enum PropertyNames
|
||||
{
|
||||
ExportFileName,
|
||||
ImportFileName,
|
||||
ImportStatusText
|
||||
}
|
||||
private string _exportFileName = "";
|
||||
/// <summary>
|
||||
/// full path to export file
|
||||
/// </summary>
|
||||
public string ExportFileName
|
||||
{
|
||||
get => _exportFileName;
|
||||
set
|
||||
{
|
||||
_exportFileName = value;
|
||||
OnPropertyChanged(PropertyNames.ExportFileName.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private string _importFileName = "";
|
||||
/// <summary>
|
||||
/// full path to import file
|
||||
/// </summary>
|
||||
public string ImportFileName
|
||||
{
|
||||
get => _importFileName;
|
||||
set
|
||||
{
|
||||
_importFileName = value;
|
||||
OnPropertyChanged(PropertyNames.ImportFileName.ToString());
|
||||
}
|
||||
}
|
||||
private string _importStatusText;
|
||||
public string ImportStatusText
|
||||
{
|
||||
get => _importStatusText;
|
||||
set
|
||||
{
|
||||
_importStatusText = value;
|
||||
OnPropertyChanged(PropertyNames.ImportStatusText.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
///<summary>
|
||||
///Occurs when a property value changes.
|
||||
///</summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
var eventHandler = PropertyChanged;
|
||||
if (eventHandler != null) { eventHandler(this, new PropertyChangedEventArgs(propertyName)); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = "")]
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
||||
Binary file not shown.
Binary file not shown.
1
DataPRO/Modules/SystemSettings/ISOSettings/.svn/entries
Normal file
1
DataPRO/Modules/SystemSettings/ISOSettings/.svn/entries
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
1
DataPRO/Modules/SystemSettings/ISOSettings/.svn/format
Normal file
1
DataPRO/Modules/SystemSettings/ISOSettings/.svn/format
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,121 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interactivity;
|
||||
using DTS.Common.Interface;
|
||||
using ISOSettings.Model;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
using Unity;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace ISOSettings
|
||||
{
|
||||
[Export(typeof(IISOSettingsView))]
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public class ISOSettingsViewModel : IISOSettingsViewModel
|
||||
{
|
||||
public IISOSettingsView View { get; set; }
|
||||
public IISOSettingsModel Model { get; 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 ISOSettingsViewModel.
|
||||
/// </summary>
|
||||
/// <param name="view">The ISO Settings 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 ISOSettingsViewModel(IISOSettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
{
|
||||
View = view;
|
||||
|
||||
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);
|
||||
Model = new ISOSettingsModel(_eventAggregator);
|
||||
ISOData = Model.LoadData();
|
||||
View.DataContext = ISOData;
|
||||
}
|
||||
|
||||
#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 PopupWindowAction object to show the 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 });
|
||||
}
|
||||
|
||||
public void SaveData()
|
||||
{
|
||||
Model.SaveData(ISOData);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
private IISOSettingsData _isoData;
|
||||
public IISOSettingsData ISOData { get => _isoData; set { _isoData = value; OnPropertyChanged("ISOData"); } }
|
||||
|
||||
public bool IsDirty { get; private set; }
|
||||
private bool _isBusy = false;
|
||||
public bool IsBusy { get => _isBusy; set { _isBusy = value; OnPropertyChanged("IsBusy"); } }
|
||||
private bool _isMenuIncluded = false;
|
||||
public bool IsMenuIncluded { get => _isMenuIncluded; set { _isMenuIncluded = value; OnPropertyChanged("IsMenuIncluded"); } }
|
||||
private bool _isNavigationIncluded = false;
|
||||
public bool IsNavigationIncluded { get => _isNavigationIncluded; set { _isNavigationIncluded = value; OnPropertyChanged("IsNavigationIncluded"); } }
|
||||
/// <summary>
|
||||
/// Gets the HeaderInfo.
|
||||
/// </summary>
|
||||
public string HeaderInfo => "MainRegion";
|
||||
#endregion Properties
|
||||
|
||||
///<summary>
|
||||
///Occurs when a property value changes.
|
||||
///</summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
var eventHandler = PropertyChanged;
|
||||
if (eventHandler != null) { eventHandler(this, new PropertyChangedEventArgs(propertyName)); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Interface;
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace ISOSettings
|
||||
{
|
||||
public class ISOSettingsData : DTS.Common.Base.BasePropertyChanged, IISOSettingsData
|
||||
{
|
||||
private bool _bValidateTestPositionAndTestObject = false;
|
||||
|
||||
/// <summary>
|
||||
/// whether the TestObject and position iso fields should be validated when validating a test setup
|
||||
/// 15457 add error validation against valid ISO test object and position controlled by a site bool in system settings
|
||||
/// </summary>
|
||||
public bool ValidateTestObjectAndPosition
|
||||
{
|
||||
get => _bValidateTestPositionAndTestObject;
|
||||
set => SetProperty(ref _bValidateTestPositionAndTestObject, value, "ValidateTestObjectAndPosition");
|
||||
}
|
||||
|
||||
private bool _uniqueISOCodesRequired;
|
||||
public bool UniqueISOCodesRequired
|
||||
{
|
||||
get => _uniqueISOCodesRequired;
|
||||
set => SetProperty(ref _uniqueISOCodesRequired, value, "UniqueISOCodesRequired");
|
||||
}
|
||||
|
||||
public bool UniqueISOCodesRequiredAndShowISOCodes => UniqueISOCodesRequired && ShowISOCodes;
|
||||
|
||||
public bool ShowISOCodes
|
||||
{
|
||||
get => ISOViewMode == IsoViewMode.ISOAndUserCode || ISOViewMode == IsoViewMode.ISOOnly;
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
switch (ISOViewMode)
|
||||
{
|
||||
case IsoViewMode.ISOOnly:
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
break;
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
ISOViewMode = IsoViewMode.ISOAndUserCode;
|
||||
break;
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
ISOViewMode = IsoViewMode.ISOOnly;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ISOViewMode)
|
||||
{
|
||||
case IsoViewMode.ISOOnly:
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
break;
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
ISOViewMode = IsoViewMode.UserCodeOnly;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
OnPropertyChanged("ShowISOStringBuilder");
|
||||
OnPropertyChanged("UniqueISOCodesRequired");
|
||||
OnPropertyChanged("UseISOCodeFilterMapping");
|
||||
OnPropertyChanged("UniqueISOCodesRequiredAndShowISOCodes");
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowUserCodes
|
||||
{
|
||||
get => ISOViewMode == IsoViewMode.ISOAndUserCode || ISOViewMode == IsoViewMode.UserCodeOnly;
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
switch (ISOViewMode)
|
||||
{
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
break;
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
ISOViewMode = IsoViewMode.UserCodeOnly;
|
||||
break;
|
||||
case IsoViewMode.ISOOnly:
|
||||
ISOViewMode = IsoViewMode.ISOAndUserCode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ISOViewMode)
|
||||
{
|
||||
case IsoViewMode.ISOOnly:
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
break;
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
ISOViewMode = IsoViewMode.ISOOnly;
|
||||
break;
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
ISOViewMode = IsoViewMode.ChannelNameOnly;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool _showISOStringBuilder;
|
||||
public bool ShowISOStringBuilder
|
||||
{
|
||||
get => _showISOStringBuilder;
|
||||
set => SetProperty(ref _showISOStringBuilder, value, "ShowISOStringBuilder");
|
||||
}
|
||||
|
||||
private bool _showChannelCodeLookupHelper;
|
||||
public bool ShowChannelCodeLookupHelper
|
||||
{
|
||||
get => _showChannelCodeLookupHelper;
|
||||
set => SetProperty(ref _showChannelCodeLookupHelper, value, "ShowChannelCodeLookupHelper");
|
||||
}
|
||||
private bool _useISOCodeFilterMapping;
|
||||
public bool UseISOCodeFilterMapping
|
||||
{
|
||||
get => _useISOCodeFilterMapping;
|
||||
set => SetProperty(ref _useISOCodeFilterMapping, value, "UseISOCodeFilterMapping");
|
||||
}
|
||||
|
||||
public bool ChannelNamesOnly
|
||||
{
|
||||
get => ISOViewMode == IsoViewMode.ChannelNameOnly;
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
ISOViewMode = IsoViewMode.ChannelNameOnly;
|
||||
}
|
||||
//there is no else, the only way to turn it false is by clicking on iso or user, which turns this false implicitly
|
||||
}
|
||||
}
|
||||
|
||||
private IsoViewMode _viewMode;
|
||||
public IsoViewMode ISOViewMode
|
||||
{
|
||||
get => _viewMode;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _viewMode, value, "ISOViewMode");
|
||||
OnPropertyChanged("ShowISOCodes");
|
||||
OnPropertyChanged("ShowUserCodes");
|
||||
OnPropertyChanged("ChannelNamesOnly");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 ISOSettings.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("ISOSettings.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 Support Non-ISO Mode.
|
||||
/// </summary>
|
||||
internal static string AllowNonISO {
|
||||
get {
|
||||
return ResourceManager.GetString("AllowNonISO", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show channel names only.
|
||||
/// </summary>
|
||||
internal static string ChannelNamesOnly {
|
||||
get {
|
||||
return ResourceManager.GetString("ChannelNamesOnly", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ISO 13499.
|
||||
/// </summary>
|
||||
internal static string ISOOnly {
|
||||
get {
|
||||
return ResourceManager.GetString("ISOOnly", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ISO Level.
|
||||
/// </summary>
|
||||
internal static string ISOSupportLevel {
|
||||
get {
|
||||
return ResourceManager.GetString("ISOSupportLevel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No ISO.
|
||||
/// </summary>
|
||||
internal static string NoISO {
|
||||
get {
|
||||
return ResourceManager.GetString("NoISO", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Require unique ISO codes.
|
||||
/// </summary>
|
||||
internal static string RequireUniqueISOCodes {
|
||||
get {
|
||||
return ResourceManager.GetString("RequireUniqueISOCodes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display channel code lookup table UI.
|
||||
/// </summary>
|
||||
internal static string ShowChannelCodeLookupHelper {
|
||||
get {
|
||||
return ResourceManager.GetString("ShowChannelCodeLookupHelper", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show ISO codes.
|
||||
/// </summary>
|
||||
internal static string ShowISOCodes {
|
||||
get {
|
||||
return ResourceManager.GetString("ShowISOCodes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display ISO string builder UI.
|
||||
/// </summary>
|
||||
internal static string ShowISOStringBuilder {
|
||||
get {
|
||||
return ResourceManager.GetString("ShowISOStringBuilder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show user codes.
|
||||
/// </summary>
|
||||
internal static string ShowUserCodes {
|
||||
get {
|
||||
return ResourceManager.GetString("ShowUserCodes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Support Transitional Mode.
|
||||
/// </summary>
|
||||
internal static string SupportTransitional {
|
||||
get {
|
||||
return ResourceManager.GetString("SupportTransitional", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User specified channel codes.
|
||||
/// </summary>
|
||||
internal static string Transitory {
|
||||
get {
|
||||
return ResourceManager.GetString("Transitory", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use ISO Code Filter Mapping.
|
||||
/// </summary>
|
||||
internal static string UseISOCodeFilterMapping {
|
||||
get {
|
||||
return ResourceManager.GetString("UseISOCodeFilterMapping", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use user codes (instead of ISO).
|
||||
/// </summary>
|
||||
internal static string UseUserCodes {
|
||||
get {
|
||||
return ResourceManager.GetString("UseUserCodes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Validate test object and position.
|
||||
/// </summary>
|
||||
internal static string ValidateTestObjectAndPositionFields {
|
||||
get {
|
||||
return ResourceManager.GetString("ValidateTestObjectAndPositionFields", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<base:BaseView x:Class="ISOSettings.ISOSettingsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:strings="clr-namespace:ISOSettings.Resources"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:local="clr-namespace:ISOSettings"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:enums="clr-namespace:DTS.Common.Enums;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
DataContext="{Binding Path=ISOData}">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<converters:InverseEnumEnabledConverter x:Key="InverseEnumConverter" />
|
||||
<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="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 ChannelNamesOnly}" Margin="5,10,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ChannelNamesOnly" />
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ChannelNamesOnly}" IsEnabled="{Binding Path=ISOData.ISOViewMode, Converter={StaticResource InverseEnumConverter}, ConverterParameter={x:Static enums:IsoViewMode.ChannelNameOnly}}" Margin="5,10,0,0" AutomationProperties.AutomationId="chk_ChannelNamesOnly" />
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}">
|
||||
<TextBlock Text="{strings:TranslateExtension ShowISOCodes}" Margin="5,10,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ShowISOCodes"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ShowISOCodes}" IsEnabled="{Binding Path=ISOData.ISOViewMode, Converter={StaticResource InverseEnumConverter}, ConverterParameter={x:Static enums:IsoViewMode.ISOOnly}}" Margin="5,10,0,0" AutomationProperties.AutomationId="chk_ShowISOCodes"/>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}">
|
||||
<TextBlock Text="{strings:TranslateExtension ShowUserCodes}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ShowUserCodes"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ShowUserCodes}" IsEnabled="{Binding Path=ISOData.ISOViewMode, Converter={StaticResource InverseEnumConverter}, ConverterParameter={x:Static enums:IsoViewMode.UserCodeOnly}}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_ShowUserCodes"/>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}">
|
||||
<TextBlock Text="{strings:TranslateExtension ShowChannelCodeLookupHelper}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ShowChannelCodeLookupHelper"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ShowChannelCodeLookupHelper}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_ShowChannelCodeLookupHelper"
|
||||
IsEnabled="{Binding Path=ISOData.ISOViewMode, Converter={StaticResource InverseEnumConverter}, ConverterParameter={x:Static enums:IsoViewMode.ChannelNameOnly}}" />
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}" IsEnabled="{Binding Path=ISOData.ShowISOCodes}">
|
||||
<TextBlock Text="{strings:TranslateExtension ShowISOStringBuilder}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ShowISOStringBuilder"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ShowISOStringBuilder}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_ShowISOStringBuilder"/>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}" IsEnabled="{Binding Path=ISOData.ShowISOCodes}">
|
||||
<TextBlock Text="{strings:TranslateExtension RequireUniqueISOCodes}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_RequireUniqueISOCodes"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.UniqueISOCodesRequired}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_RequireUniqueISOCodes"/>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}" IsEnabled="{Binding Path=ISOData.ShowISOCodes}">
|
||||
<TextBlock Text="{strings:TranslateExtension UseISOCodeFilterMapping}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_UseISOCodeFilterMapping"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.UseISOCodeFilterMapping}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_UseISOCodeFilterMapping"/>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}" IsEnabled="{Binding Path=ISOData.ShowISOCodes}">
|
||||
<TextBlock Text="{strings:TranslateExtension ValidateTestObjectAndPositionFields}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ValidateTestObjectAndPosition" />
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ValidateTestObjectAndPosition}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_ValidateTestObjectAndPosition" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</base:BaseView>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.ComponentModel;
|
||||
using DTS.Common.Converters;
|
||||
|
||||
namespace ISOSettings
|
||||
{
|
||||
|
||||
public enum Keys
|
||||
{
|
||||
ISOSupportAllowTransitional,
|
||||
ISOSupport_Allow_NonISO,
|
||||
ShowISOCodes,
|
||||
ShowUserCodes,
|
||||
UseUserCodes,
|
||||
IsoSupportLevel,
|
||||
UniqueISOCodesRequired,
|
||||
ShowISOStringBuilder,
|
||||
ShowChannelCodeLookupHelper,
|
||||
UseISOCodeFilterMapping,
|
||||
ValidateTestPositionAndTestObject
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
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 ISOSettings
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "ISOSettings")]
|
||||
public class ISOSettingsModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ISOSettingsModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public ISOSettingsModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IISOSettingsView, ISOSettingsView>();
|
||||
_unityContainer.RegisterType<IISOSettingsViewModel, ISOSettingsViewModel>();
|
||||
}
|
||||
|
||||
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 ISOSettingsImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public ISOSettingsImageAttribute() : this(null) { }
|
||||
public override eAssemblyRegion AssemblyRegion => throw new NotImplementedException();
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.IsoSettings.ToString()); return _img; }
|
||||
}
|
||||
public ISOSettingsImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.IsoSettings.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.IsoSettings.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace ISOSettings.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
<?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>{41A9E3B1-F85B-49C2-88CA-52FEAAE4E925}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ISOSettings</RootNamespace>
|
||||
<AssemblyName>ISOSettings</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="Classes\ISOSettingsData.cs" />
|
||||
<Compile Include="ISOSettingsModule.cs" />
|
||||
<Compile Include="Model\Enums.cs" />
|
||||
<Compile Include="Model\ISOSettingsModel.cs" />
|
||||
<Compile Include="Properties\Annotations.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\ISOSettingsViewModel.cs" />
|
||||
<Compile Include="View\ISOSettingsView.xaml.cs">
|
||||
<DependentUpon>ISOSettingsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Storage\DTS.Common.Storage.csproj">
|
||||
<Project>{E3BE457C-0AC7-4A9C-BC81-EAFEB3217878}</Project>
|
||||
<Name>DTS.Common.Storage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Utilities\DTS.Common.Utilities.csproj">
|
||||
<Project>{D6DA1B74-C711-43C2-91B1-1908A8D04DBF}</Project>
|
||||
<Name>DTS.Common.Utilities</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{114edc77-f3b5-4576-a91b-40818d503b55}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.SettingsDB\DTS.Common.Settings.csproj">
|
||||
<Project>{61017104-d8ee-41d1-b9ca-dad863ff78b2}</Project>
|
||||
<Name>DTS.Common.Settings</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\ISOSettingsView.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>
|
||||
<Folder Include="Classes\Converters\" />
|
||||
</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>
|
||||
@@ -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="ISOSupportLevel" xml:space="preserve">
|
||||
<value>ISO Level</value>
|
||||
</data>
|
||||
<data name="ShowISOCodes" xml:space="preserve">
|
||||
<value>Show ISO codes</value>
|
||||
</data>
|
||||
<data name="SupportTransitional" xml:space="preserve">
|
||||
<value>Support Transitional Mode</value>
|
||||
</data>
|
||||
<data name="UseUserCodes" xml:space="preserve">
|
||||
<value>Use user codes (instead of ISO)</value>
|
||||
</data>
|
||||
<data name="AllowNonISO" xml:space="preserve">
|
||||
<value>Support Non-ISO Mode</value>
|
||||
</data>
|
||||
<data name="ISOOnly" xml:space="preserve">
|
||||
<value>ISO 13499</value>
|
||||
</data>
|
||||
<data name="NoISO" xml:space="preserve">
|
||||
<value>No ISO</value>
|
||||
</data>
|
||||
<data name="Transitory" xml:space="preserve">
|
||||
<value>User specified channel codes</value>
|
||||
</data>
|
||||
<data name="RequireUniqueISOCodes" xml:space="preserve">
|
||||
<value>Require unique ISO codes</value>
|
||||
</data>
|
||||
<data name="ShowChannelCodeLookupHelper" xml:space="preserve">
|
||||
<value>Display channel code lookup table UI</value>
|
||||
</data>
|
||||
<data name="ShowISOStringBuilder" xml:space="preserve">
|
||||
<value>Display ISO string builder UI</value>
|
||||
</data>
|
||||
<data name="UseISOCodeFilterMapping" xml:space="preserve">
|
||||
<value>Use ISO Code Filter Mapping</value>
|
||||
</data>
|
||||
<data name="ShowUserCodes" xml:space="preserve">
|
||||
<value>Show user codes</value>
|
||||
</data>
|
||||
<data name="ChannelNamesOnly" xml:space="preserve">
|
||||
<value>Show channel names only</value>
|
||||
</data>
|
||||
<data name="ValidateTestObjectAndPositionFields" xml:space="preserve">
|
||||
<value>Validate test object and position</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,253 @@
|
||||
using DTS.Common.Settings;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Storage;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Prism.Events;
|
||||
|
||||
namespace ISOSettings.Model
|
||||
{
|
||||
public class ISOSettingsModel : IISOSettingsModel
|
||||
{
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
}
|
||||
|
||||
public ISOSettingsModel(IEventAggregator eventAggregator)
|
||||
{
|
||||
EventAggregator = eventAggregator;
|
||||
}
|
||||
|
||||
private IEventAggregator EventAggregator { get; set; }
|
||||
public IISOSettingsData LoadData()
|
||||
{
|
||||
return new ISOSettingsData
|
||||
{
|
||||
ISOViewMode = ISOViewMode,
|
||||
ShowISOStringBuilder = ShowISOStringBuilder,
|
||||
ShowChannelCodeLookupHelper = ShowChannelCodeLookupHelper,
|
||||
UseISOCodeFilterMapping = UseISOCodeFilterMapping,
|
||||
UniqueISOCodesRequired = UniqueISOCodesRequired,
|
||||
ValidateTestObjectAndPosition = ValidateTestObjectAndPosition
|
||||
};
|
||||
}
|
||||
|
||||
public void SaveData(IISOSettingsData data)
|
||||
{
|
||||
try
|
||||
{
|
||||
ShowISOCodes = ((ISOSettingsData)data).ShowISOCodes;
|
||||
ShowUserCodes = ((ISOSettingsData)data).ShowUserCodes;
|
||||
ISOViewMode = ((ISOSettingsData)data).ISOViewMode;
|
||||
ShowISOStringBuilder = ((ISOSettingsData)data).ShowISOStringBuilder;
|
||||
ShowChannelCodeLookupHelper = ((ISOSettingsData)data).ShowChannelCodeLookupHelper;
|
||||
UseISOCodeFilterMapping = ((ISOSettingsData)data).UseISOCodeFilterMapping;
|
||||
var previousValue = UniqueISOCodesRequired;
|
||||
UniqueISOCodesRequired = ((ISOSettingsData)data).UniqueISOCodesRequired;
|
||||
var previousTestObjectAndPosition = ValidateTestObjectAndPosition;
|
||||
ValidateTestObjectAndPosition = ((ISOSettingsData)data).ValidateTestObjectAndPosition;
|
||||
//14215 Not able to Run Test, if this setting is changed we have to re-evaluate "IsComplete" for all tests
|
||||
//we have options for future optimization by selectively marking tests dirty based on whether they are already complete/dirty etc
|
||||
//for example there's no point in marking a tests setup that's already marked as dirty as dirty again, or if
|
||||
//we are going to UniqueISOCodesRequired as true and the test is already incomplete, we don't need to mark it dirty, etc.
|
||||
//16235 'Validate Test Object and Position' turned off, but both of my test setups are marked as not ready
|
||||
//revalidate on change of validate TestObject & Position
|
||||
if (UniqueISOCodesRequired != previousValue || ValidateTestObjectAndPosition != previousTestObjectAndPosition)
|
||||
{
|
||||
MarkAllTestsDirty();
|
||||
}
|
||||
IsSaved = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
EventAggregator.GetEvent<RaiseNotification>().Publish(new NotificationContentEventArgs(ex.Message, ex.StackTrace, PopupWindowImage.Information, "DataPro"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// gets a list of all test names in the db
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private IList<string> GetAllTests()
|
||||
{
|
||||
var tests = new List<string>();
|
||||
var hr = DbOperations.TestSetupsGet(null, null, double.NaN, double.NaN, false, false, out var records, out var errors);
|
||||
if (0 == hr && null != records && records.Any())
|
||||
{
|
||||
foreach (var record in records)
|
||||
{
|
||||
if (!tests.Contains(record.Name))
|
||||
{
|
||||
tests.Add(record.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
return tests;
|
||||
}
|
||||
/// <summary>
|
||||
/// marks a given test as dirty
|
||||
/// </summary>
|
||||
/// <param name="test"></param>
|
||||
private void MarkTestDirty(string test)
|
||||
{
|
||||
_ = DbOperations.TestSetupsMarkIsCompleteIsDirty(test, true, false, string.Empty);
|
||||
}
|
||||
/// <summary>
|
||||
/// 14215 Not able to Run Test
|
||||
/// when iso restrictions tests may become incomplete or complete, by setting tests to dirty the tests will be re-evaluated at a later point
|
||||
/// </summary>
|
||||
private void MarkAllTestsDirty()
|
||||
{
|
||||
var tests = GetAllTests();
|
||||
|
||||
if (tests.Any())
|
||||
{
|
||||
foreach (var test in tests)
|
||||
{
|
||||
MarkTestDirty(test);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private const IsoSupportLevels ISOSupportLevelDefault = IsoSupportLevels.ISO_ONLY;
|
||||
public IsoSupportLevels ISOSupportLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
var s = SettingsDB.GetGlobalValue(Keys.IsoSupportLevel.ToString(), ISOSupportLevelDefault.ToString());
|
||||
return !Enum.TryParse(s, out IsoSupportLevels level) ? IsoSupportLevels.ISO_ONLY : level;
|
||||
}
|
||||
set => SettingsDB.SetGlobalValue(Keys.IsoSupportLevel.ToString(), value.ToString());
|
||||
}
|
||||
|
||||
private const bool ShowISOCodesDefault = true;
|
||||
/// <summary>
|
||||
/// controls whether ISOCodes are shown when user is in ISO mode some customers may run in ISO mode but still not care to see ISOCodes
|
||||
/// </summary>
|
||||
public bool ShowISOCodes
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ShowISOCodes.ToString(), ShowISOCodesDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), value);
|
||||
}
|
||||
private const bool ShowUserCodesDefault = false;
|
||||
/// <summary>
|
||||
/// controls whether User Codes are shown
|
||||
/// </summary>
|
||||
public bool ShowUserCodes
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ShowUserCodes.ToString(), ShowUserCodesDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), value);
|
||||
}
|
||||
|
||||
public bool ValidChannelCodes => ShowISOCodes || ShowUserCodes;
|
||||
|
||||
public IsoViewMode ISOViewMode
|
||||
{
|
||||
get
|
||||
{
|
||||
var showISO = ShowISOCodes;
|
||||
var showUser = ShowUserCodes;
|
||||
if (showISO && showUser) { return IsoViewMode.ISOAndUserCode; }
|
||||
|
||||
if (!showISO && !showUser)
|
||||
{
|
||||
return IsoViewMode.ChannelNameOnly;
|
||||
}
|
||||
return showUser ? IsoViewMode.UserCodeOnly : IsoViewMode.ISOOnly;
|
||||
}
|
||||
set
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), true);
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), true);
|
||||
break;
|
||||
case IsoViewMode.ISOOnly:
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), true);
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), false);
|
||||
break;
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), false);
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), true);
|
||||
break;
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), false);
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
private const bool ShowISOStringBuilderDefault = true;
|
||||
/// <summary>
|
||||
/// controls whether ISOStringBuilder are shown when user is in ISO mode some customers may run in ISO mode but still not care to see ISOStringBuilder
|
||||
/// </summary>
|
||||
public bool ShowISOStringBuilder
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ShowISOStringBuilder.ToString(), ShowISOStringBuilderDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowISOStringBuilder.ToString(), value);
|
||||
}
|
||||
|
||||
private const bool ShowChannelCodeLookupHelperDefault = true;
|
||||
/// <summary>
|
||||
/// controls whether ChannelCodeLookupHelper are shown when user is in ISO mode some customers may run in ISO mode but still not care to see ChannelCodeLookupHelper
|
||||
/// </summary>
|
||||
public bool ShowChannelCodeLookupHelper
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ShowChannelCodeLookupHelper.ToString(), ShowChannelCodeLookupHelperDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowChannelCodeLookupHelper.ToString(), value);
|
||||
}
|
||||
private const bool UseISOCodeFilterMappingDefault = true;
|
||||
public bool UseISOCodeFilterMapping
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.UseISOCodeFilterMapping.ToString(), UseISOCodeFilterMappingDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.UseISOCodeFilterMapping.ToString(), value);
|
||||
}
|
||||
private const bool UniqueISOCodesRequiredDefault = true;
|
||||
|
||||
public bool UniqueISOCodesRequired
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.UniqueISOCodesRequired.ToString(), UniqueISOCodesRequiredDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.UniqueISOCodesRequired.ToString(), value);
|
||||
}
|
||||
private const bool AllowTransitionalDefault = false;
|
||||
public bool AllowTransitional
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ISOSupportAllowTransitional.ToString(), AllowTransitionalDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ISOSupportAllowTransitional.ToString(), value);
|
||||
}
|
||||
private const bool AllowNonIsoDefault = false;
|
||||
public bool AllowNonISO
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ISOSupport_Allow_NonISO.ToString(), AllowNonIsoDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ISOSupport_Allow_NonISO.ToString(), value);
|
||||
}
|
||||
|
||||
private const bool UseUserCodeDefault = false;
|
||||
public bool UseUserCodes
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.UseUserCodes.ToString(), UseUserCodeDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.UseUserCodes.ToString(), value);
|
||||
}
|
||||
|
||||
private const bool ValidateTestObjectAndPositionDefault = false;
|
||||
/// <summary>
|
||||
/// Whether the ISO test object and position fields should be validated with respect to
|
||||
/// test setup validation
|
||||
/// 15457 add error validation against valid ISO test object and position controlled by a site bool in system settings
|
||||
/// </summary>
|
||||
public bool ValidateTestObjectAndPosition
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ValidateTestPositionAndTestObject.ToString(),
|
||||
ValidateTestObjectAndPositionDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ValidateTestPositionAndTestObject.ToString(), value);
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
public bool IsSaved { get; private set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel;
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace ISOSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ISOSettingsView.xaml
|
||||
/// </summary>
|
||||
public partial class ISOSettingsView : IISOSettingsView
|
||||
{
|
||||
public ISOSettingsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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("ISOSettings")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ISOSettings")]
|
||||
[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")]
|
||||
BIN
DataPRO/Modules/SystemSettings/ISOSettings/.svn/wc.db
Normal file
BIN
DataPRO/Modules/SystemSettings/ISOSettings/.svn/wc.db
Normal file
Binary file not shown.
@@ -0,0 +1,156 @@
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Interface;
|
||||
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace ISOSettings
|
||||
{
|
||||
public class ISOSettingsData : DTS.Common.Base.BasePropertyChanged, IISOSettingsData
|
||||
{
|
||||
private bool _bValidateTestPositionAndTestObject = false;
|
||||
|
||||
/// <summary>
|
||||
/// whether the TestObject and position iso fields should be validated when validating a test setup
|
||||
/// 15457 add error validation against valid ISO test object and position controlled by a site bool in system settings
|
||||
/// </summary>
|
||||
public bool ValidateTestObjectAndPosition
|
||||
{
|
||||
get => _bValidateTestPositionAndTestObject;
|
||||
set => SetProperty(ref _bValidateTestPositionAndTestObject, value, "ValidateTestObjectAndPosition");
|
||||
}
|
||||
|
||||
private bool _uniqueISOCodesRequired;
|
||||
public bool UniqueISOCodesRequired
|
||||
{
|
||||
get => _uniqueISOCodesRequired;
|
||||
set => SetProperty(ref _uniqueISOCodesRequired, value, "UniqueISOCodesRequired");
|
||||
}
|
||||
|
||||
public bool UniqueISOCodesRequiredAndShowISOCodes => UniqueISOCodesRequired && ShowISOCodes;
|
||||
|
||||
public bool ShowISOCodes
|
||||
{
|
||||
get => ISOViewMode == IsoViewMode.ISOAndUserCode || ISOViewMode == IsoViewMode.ISOOnly;
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
switch (ISOViewMode)
|
||||
{
|
||||
case IsoViewMode.ISOOnly:
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
break;
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
ISOViewMode = IsoViewMode.ISOAndUserCode;
|
||||
break;
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
ISOViewMode = IsoViewMode.ISOOnly;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ISOViewMode)
|
||||
{
|
||||
case IsoViewMode.ISOOnly:
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
break;
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
ISOViewMode = IsoViewMode.UserCodeOnly;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
OnPropertyChanged("ShowISOStringBuilder");
|
||||
OnPropertyChanged("UniqueISOCodesRequired");
|
||||
OnPropertyChanged("UseISOCodeFilterMapping");
|
||||
OnPropertyChanged("UniqueISOCodesRequiredAndShowISOCodes");
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowUserCodes
|
||||
{
|
||||
get => ISOViewMode == IsoViewMode.ISOAndUserCode || ISOViewMode == IsoViewMode.UserCodeOnly;
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
switch (ISOViewMode)
|
||||
{
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
break;
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
ISOViewMode = IsoViewMode.UserCodeOnly;
|
||||
break;
|
||||
case IsoViewMode.ISOOnly:
|
||||
ISOViewMode = IsoViewMode.ISOAndUserCode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ISOViewMode)
|
||||
{
|
||||
case IsoViewMode.ISOOnly:
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
break;
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
ISOViewMode = IsoViewMode.ISOOnly;
|
||||
break;
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
ISOViewMode = IsoViewMode.ChannelNameOnly;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool _showISOStringBuilder;
|
||||
public bool ShowISOStringBuilder
|
||||
{
|
||||
get => _showISOStringBuilder;
|
||||
set => SetProperty(ref _showISOStringBuilder, value, "ShowISOStringBuilder");
|
||||
}
|
||||
|
||||
private bool _showChannelCodeLookupHelper;
|
||||
public bool ShowChannelCodeLookupHelper
|
||||
{
|
||||
get => _showChannelCodeLookupHelper;
|
||||
set => SetProperty(ref _showChannelCodeLookupHelper, value, "ShowChannelCodeLookupHelper");
|
||||
}
|
||||
private bool _useISOCodeFilterMapping;
|
||||
public bool UseISOCodeFilterMapping
|
||||
{
|
||||
get => _useISOCodeFilterMapping;
|
||||
set => SetProperty(ref _useISOCodeFilterMapping, value, "UseISOCodeFilterMapping");
|
||||
}
|
||||
|
||||
public bool ChannelNamesOnly
|
||||
{
|
||||
get => ISOViewMode == IsoViewMode.ChannelNameOnly;
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
ISOViewMode = IsoViewMode.ChannelNameOnly;
|
||||
}
|
||||
//there is no else, the only way to turn it false is by clicking on iso or user, which turns this false implicitly
|
||||
}
|
||||
}
|
||||
|
||||
private IsoViewMode _viewMode;
|
||||
public IsoViewMode ISOViewMode
|
||||
{
|
||||
get => _viewMode;
|
||||
set
|
||||
{
|
||||
SetProperty(ref _viewMode, value, "ISOViewMode");
|
||||
OnPropertyChanged("ShowISOCodes");
|
||||
OnPropertyChanged("ShowUserCodes");
|
||||
OnPropertyChanged("ChannelNamesOnly");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
159
DataPRO/Modules/SystemSettings/ISOSettings/ISOSettings.csproj
Normal file
159
DataPRO/Modules/SystemSettings/ISOSettings/ISOSettings.csproj
Normal file
@@ -0,0 +1,159 @@
|
||||
<?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>{41A9E3B1-F85B-49C2-88CA-52FEAAE4E925}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ISOSettings</RootNamespace>
|
||||
<AssemblyName>ISOSettings</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="Classes\ISOSettingsData.cs" />
|
||||
<Compile Include="ISOSettingsModule.cs" />
|
||||
<Compile Include="Model\Enums.cs" />
|
||||
<Compile Include="Model\ISOSettingsModel.cs" />
|
||||
<Compile Include="Properties\Annotations.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\ISOSettingsViewModel.cs" />
|
||||
<Compile Include="View\ISOSettingsView.xaml.cs">
|
||||
<DependentUpon>ISOSettingsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Storage\DTS.Common.Storage.csproj">
|
||||
<Project>{E3BE457C-0AC7-4A9C-BC81-EAFEB3217878}</Project>
|
||||
<Name>DTS.Common.Storage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Utilities\DTS.Common.Utilities.csproj">
|
||||
<Project>{D6DA1B74-C711-43C2-91B1-1908A8D04DBF}</Project>
|
||||
<Name>DTS.Common.Utilities</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{114edc77-f3b5-4576-a91b-40818d503b55}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.SettingsDB\DTS.Common.Settings.csproj">
|
||||
<Project>{61017104-d8ee-41d1-b9ca-dad863ff78b2}</Project>
|
||||
<Name>DTS.Common.Settings</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\ISOSettingsView.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>
|
||||
<Folder Include="Classes\Converters\" />
|
||||
</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>
|
||||
@@ -0,0 +1,99 @@
|
||||
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 ISOSettings
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "ISOSettings")]
|
||||
public class ISOSettingsModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ISOSettingsModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public ISOSettingsModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IISOSettingsView, ISOSettingsView>();
|
||||
_unityContainer.RegisterType<IISOSettingsViewModel, ISOSettingsViewModel>();
|
||||
}
|
||||
|
||||
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 ISOSettingsImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public ISOSettingsImageAttribute() : this(null) { }
|
||||
public override eAssemblyRegion AssemblyRegion => throw new NotImplementedException();
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.IsoSettings.ToString()); return _img; }
|
||||
}
|
||||
public ISOSettingsImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.IsoSettings.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.IsoSettings.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
21
DataPRO/Modules/SystemSettings/ISOSettings/Model/Enums.cs
Normal file
21
DataPRO/Modules/SystemSettings/ISOSettings/Model/Enums.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.ComponentModel;
|
||||
using DTS.Common.Converters;
|
||||
|
||||
namespace ISOSettings
|
||||
{
|
||||
|
||||
public enum Keys
|
||||
{
|
||||
ISOSupportAllowTransitional,
|
||||
ISOSupport_Allow_NonISO,
|
||||
ShowISOCodes,
|
||||
ShowUserCodes,
|
||||
UseUserCodes,
|
||||
IsoSupportLevel,
|
||||
UniqueISOCodesRequired,
|
||||
ShowISOStringBuilder,
|
||||
ShowChannelCodeLookupHelper,
|
||||
UseISOCodeFilterMapping,
|
||||
ValidateTestPositionAndTestObject
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,253 @@
|
||||
using DTS.Common.Settings;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Storage;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Prism.Events;
|
||||
|
||||
namespace ISOSettings.Model
|
||||
{
|
||||
public class ISOSettingsModel : IISOSettingsModel
|
||||
{
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
}
|
||||
|
||||
public ISOSettingsModel(IEventAggregator eventAggregator)
|
||||
{
|
||||
EventAggregator = eventAggregator;
|
||||
}
|
||||
|
||||
private IEventAggregator EventAggregator { get; set; }
|
||||
public IISOSettingsData LoadData()
|
||||
{
|
||||
return new ISOSettingsData
|
||||
{
|
||||
ISOViewMode = ISOViewMode,
|
||||
ShowISOStringBuilder = ShowISOStringBuilder,
|
||||
ShowChannelCodeLookupHelper = ShowChannelCodeLookupHelper,
|
||||
UseISOCodeFilterMapping = UseISOCodeFilterMapping,
|
||||
UniqueISOCodesRequired = UniqueISOCodesRequired,
|
||||
ValidateTestObjectAndPosition = ValidateTestObjectAndPosition
|
||||
};
|
||||
}
|
||||
|
||||
public void SaveData(IISOSettingsData data)
|
||||
{
|
||||
try
|
||||
{
|
||||
ShowISOCodes = ((ISOSettingsData)data).ShowISOCodes;
|
||||
ShowUserCodes = ((ISOSettingsData)data).ShowUserCodes;
|
||||
ISOViewMode = ((ISOSettingsData)data).ISOViewMode;
|
||||
ShowISOStringBuilder = ((ISOSettingsData)data).ShowISOStringBuilder;
|
||||
ShowChannelCodeLookupHelper = ((ISOSettingsData)data).ShowChannelCodeLookupHelper;
|
||||
UseISOCodeFilterMapping = ((ISOSettingsData)data).UseISOCodeFilterMapping;
|
||||
var previousValue = UniqueISOCodesRequired;
|
||||
UniqueISOCodesRequired = ((ISOSettingsData)data).UniqueISOCodesRequired;
|
||||
var previousTestObjectAndPosition = ValidateTestObjectAndPosition;
|
||||
ValidateTestObjectAndPosition = ((ISOSettingsData)data).ValidateTestObjectAndPosition;
|
||||
//14215 Not able to Run Test, if this setting is changed we have to re-evaluate "IsComplete" for all tests
|
||||
//we have options for future optimization by selectively marking tests dirty based on whether they are already complete/dirty etc
|
||||
//for example there's no point in marking a tests setup that's already marked as dirty as dirty again, or if
|
||||
//we are going to UniqueISOCodesRequired as true and the test is already incomplete, we don't need to mark it dirty, etc.
|
||||
//16235 'Validate Test Object and Position' turned off, but both of my test setups are marked as not ready
|
||||
//revalidate on change of validate TestObject & Position
|
||||
if (UniqueISOCodesRequired != previousValue || ValidateTestObjectAndPosition != previousTestObjectAndPosition)
|
||||
{
|
||||
MarkAllTestsDirty();
|
||||
}
|
||||
IsSaved = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
EventAggregator.GetEvent<RaiseNotification>().Publish(new NotificationContentEventArgs(ex.Message, ex.StackTrace, PopupWindowImage.Information, "DataPro"));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// gets a list of all test names in the db
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private IList<string> GetAllTests()
|
||||
{
|
||||
var tests = new List<string>();
|
||||
var hr = DbOperations.TestSetupsGet(null, null, double.NaN, double.NaN, false, false, out var records, out var errors);
|
||||
if (0 == hr && null != records && records.Any())
|
||||
{
|
||||
foreach (var record in records)
|
||||
{
|
||||
if (!tests.Contains(record.Name))
|
||||
{
|
||||
tests.Add(record.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
return tests;
|
||||
}
|
||||
/// <summary>
|
||||
/// marks a given test as dirty
|
||||
/// </summary>
|
||||
/// <param name="test"></param>
|
||||
private void MarkTestDirty(string test)
|
||||
{
|
||||
_ = DbOperations.TestSetupsMarkIsCompleteIsDirty(test, true, false, string.Empty);
|
||||
}
|
||||
/// <summary>
|
||||
/// 14215 Not able to Run Test
|
||||
/// when iso restrictions tests may become incomplete or complete, by setting tests to dirty the tests will be re-evaluated at a later point
|
||||
/// </summary>
|
||||
private void MarkAllTestsDirty()
|
||||
{
|
||||
var tests = GetAllTests();
|
||||
|
||||
if (tests.Any())
|
||||
{
|
||||
foreach (var test in tests)
|
||||
{
|
||||
MarkTestDirty(test);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private const IsoSupportLevels ISOSupportLevelDefault = IsoSupportLevels.ISO_ONLY;
|
||||
public IsoSupportLevels ISOSupportLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
var s = SettingsDB.GetGlobalValue(Keys.IsoSupportLevel.ToString(), ISOSupportLevelDefault.ToString());
|
||||
return !Enum.TryParse(s, out IsoSupportLevels level) ? IsoSupportLevels.ISO_ONLY : level;
|
||||
}
|
||||
set => SettingsDB.SetGlobalValue(Keys.IsoSupportLevel.ToString(), value.ToString());
|
||||
}
|
||||
|
||||
private const bool ShowISOCodesDefault = true;
|
||||
/// <summary>
|
||||
/// controls whether ISOCodes are shown when user is in ISO mode some customers may run in ISO mode but still not care to see ISOCodes
|
||||
/// </summary>
|
||||
public bool ShowISOCodes
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ShowISOCodes.ToString(), ShowISOCodesDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), value);
|
||||
}
|
||||
private const bool ShowUserCodesDefault = false;
|
||||
/// <summary>
|
||||
/// controls whether User Codes are shown
|
||||
/// </summary>
|
||||
public bool ShowUserCodes
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ShowUserCodes.ToString(), ShowUserCodesDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), value);
|
||||
}
|
||||
|
||||
public bool ValidChannelCodes => ShowISOCodes || ShowUserCodes;
|
||||
|
||||
public IsoViewMode ISOViewMode
|
||||
{
|
||||
get
|
||||
{
|
||||
var showISO = ShowISOCodes;
|
||||
var showUser = ShowUserCodes;
|
||||
if (showISO && showUser) { return IsoViewMode.ISOAndUserCode; }
|
||||
|
||||
if (!showISO && !showUser)
|
||||
{
|
||||
return IsoViewMode.ChannelNameOnly;
|
||||
}
|
||||
return showUser ? IsoViewMode.UserCodeOnly : IsoViewMode.ISOOnly;
|
||||
}
|
||||
set
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), true);
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), true);
|
||||
break;
|
||||
case IsoViewMode.ISOOnly:
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), true);
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), false);
|
||||
break;
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), false);
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), true);
|
||||
break;
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowISOCodes.ToString(), false);
|
||||
SettingsDB.SetGlobalValueBoolean(Keys.ShowUserCodes.ToString(), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
private const bool ShowISOStringBuilderDefault = true;
|
||||
/// <summary>
|
||||
/// controls whether ISOStringBuilder are shown when user is in ISO mode some customers may run in ISO mode but still not care to see ISOStringBuilder
|
||||
/// </summary>
|
||||
public bool ShowISOStringBuilder
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ShowISOStringBuilder.ToString(), ShowISOStringBuilderDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowISOStringBuilder.ToString(), value);
|
||||
}
|
||||
|
||||
private const bool ShowChannelCodeLookupHelperDefault = true;
|
||||
/// <summary>
|
||||
/// controls whether ChannelCodeLookupHelper are shown when user is in ISO mode some customers may run in ISO mode but still not care to see ChannelCodeLookupHelper
|
||||
/// </summary>
|
||||
public bool ShowChannelCodeLookupHelper
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ShowChannelCodeLookupHelper.ToString(), ShowChannelCodeLookupHelperDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ShowChannelCodeLookupHelper.ToString(), value);
|
||||
}
|
||||
private const bool UseISOCodeFilterMappingDefault = true;
|
||||
public bool UseISOCodeFilterMapping
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.UseISOCodeFilterMapping.ToString(), UseISOCodeFilterMappingDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.UseISOCodeFilterMapping.ToString(), value);
|
||||
}
|
||||
private const bool UniqueISOCodesRequiredDefault = true;
|
||||
|
||||
public bool UniqueISOCodesRequired
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.UniqueISOCodesRequired.ToString(), UniqueISOCodesRequiredDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.UniqueISOCodesRequired.ToString(), value);
|
||||
}
|
||||
private const bool AllowTransitionalDefault = false;
|
||||
public bool AllowTransitional
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ISOSupportAllowTransitional.ToString(), AllowTransitionalDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ISOSupportAllowTransitional.ToString(), value);
|
||||
}
|
||||
private const bool AllowNonIsoDefault = false;
|
||||
public bool AllowNonISO
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ISOSupport_Allow_NonISO.ToString(), AllowNonIsoDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ISOSupport_Allow_NonISO.ToString(), value);
|
||||
}
|
||||
|
||||
private const bool UseUserCodeDefault = false;
|
||||
public bool UseUserCodes
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.UseUserCodes.ToString(), UseUserCodeDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.UseUserCodes.ToString(), value);
|
||||
}
|
||||
|
||||
private const bool ValidateTestObjectAndPositionDefault = false;
|
||||
/// <summary>
|
||||
/// Whether the ISO test object and position fields should be validated with respect to
|
||||
/// test setup validation
|
||||
/// 15457 add error validation against valid ISO test object and position controlled by a site bool in system settings
|
||||
/// </summary>
|
||||
public bool ValidateTestObjectAndPosition
|
||||
{
|
||||
get => SettingsDB.GetGlobalValueBool(Keys.ValidateTestPositionAndTestObject.ToString(),
|
||||
ValidateTestObjectAndPositionDefault);
|
||||
set => SettingsDB.SetGlobalValueBoolean(Keys.ValidateTestPositionAndTestObject.ToString(), value);
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
public bool IsSaved { get; private set; }
|
||||
|
||||
}
|
||||
}
|
||||
1039
DataPRO/Modules/SystemSettings/ISOSettings/Properties/Annotations.cs
Normal file
1039
DataPRO/Modules/SystemSettings/ISOSettings/Properties/Annotations.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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("ISOSettings")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ISOSettings")]
|
||||
[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")]
|
||||
198
DataPRO/Modules/SystemSettings/ISOSettings/Resources/StringResources.Designer.cs
generated
Normal file
198
DataPRO/Modules/SystemSettings/ISOSettings/Resources/StringResources.Designer.cs
generated
Normal 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 ISOSettings.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("ISOSettings.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 Support Non-ISO Mode.
|
||||
/// </summary>
|
||||
internal static string AllowNonISO {
|
||||
get {
|
||||
return ResourceManager.GetString("AllowNonISO", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show channel names only.
|
||||
/// </summary>
|
||||
internal static string ChannelNamesOnly {
|
||||
get {
|
||||
return ResourceManager.GetString("ChannelNamesOnly", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ISO 13499.
|
||||
/// </summary>
|
||||
internal static string ISOOnly {
|
||||
get {
|
||||
return ResourceManager.GetString("ISOOnly", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ISO Level.
|
||||
/// </summary>
|
||||
internal static string ISOSupportLevel {
|
||||
get {
|
||||
return ResourceManager.GetString("ISOSupportLevel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No ISO.
|
||||
/// </summary>
|
||||
internal static string NoISO {
|
||||
get {
|
||||
return ResourceManager.GetString("NoISO", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Require unique ISO codes.
|
||||
/// </summary>
|
||||
internal static string RequireUniqueISOCodes {
|
||||
get {
|
||||
return ResourceManager.GetString("RequireUniqueISOCodes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display channel code lookup table UI.
|
||||
/// </summary>
|
||||
internal static string ShowChannelCodeLookupHelper {
|
||||
get {
|
||||
return ResourceManager.GetString("ShowChannelCodeLookupHelper", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show ISO codes.
|
||||
/// </summary>
|
||||
internal static string ShowISOCodes {
|
||||
get {
|
||||
return ResourceManager.GetString("ShowISOCodes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display ISO string builder UI.
|
||||
/// </summary>
|
||||
internal static string ShowISOStringBuilder {
|
||||
get {
|
||||
return ResourceManager.GetString("ShowISOStringBuilder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show user codes.
|
||||
/// </summary>
|
||||
internal static string ShowUserCodes {
|
||||
get {
|
||||
return ResourceManager.GetString("ShowUserCodes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Support Transitional Mode.
|
||||
/// </summary>
|
||||
internal static string SupportTransitional {
|
||||
get {
|
||||
return ResourceManager.GetString("SupportTransitional", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User specified channel codes.
|
||||
/// </summary>
|
||||
internal static string Transitory {
|
||||
get {
|
||||
return ResourceManager.GetString("Transitory", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use ISO Code Filter Mapping.
|
||||
/// </summary>
|
||||
internal static string UseISOCodeFilterMapping {
|
||||
get {
|
||||
return ResourceManager.GetString("UseISOCodeFilterMapping", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use user codes (instead of ISO).
|
||||
/// </summary>
|
||||
internal static string UseUserCodes {
|
||||
get {
|
||||
return ResourceManager.GetString("UseUserCodes", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Validate test object and position.
|
||||
/// </summary>
|
||||
internal static string ValidateTestObjectAndPositionFields {
|
||||
get {
|
||||
return ResourceManager.GetString("ValidateTestObjectAndPositionFields", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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="ISOSupportLevel" xml:space="preserve">
|
||||
<value>ISO Level</value>
|
||||
</data>
|
||||
<data name="ShowISOCodes" xml:space="preserve">
|
||||
<value>Show ISO codes</value>
|
||||
</data>
|
||||
<data name="SupportTransitional" xml:space="preserve">
|
||||
<value>Support Transitional Mode</value>
|
||||
</data>
|
||||
<data name="UseUserCodes" xml:space="preserve">
|
||||
<value>Use user codes (instead of ISO)</value>
|
||||
</data>
|
||||
<data name="AllowNonISO" xml:space="preserve">
|
||||
<value>Support Non-ISO Mode</value>
|
||||
</data>
|
||||
<data name="ISOOnly" xml:space="preserve">
|
||||
<value>ISO 13499</value>
|
||||
</data>
|
||||
<data name="NoISO" xml:space="preserve">
|
||||
<value>No ISO</value>
|
||||
</data>
|
||||
<data name="Transitory" xml:space="preserve">
|
||||
<value>User specified channel codes</value>
|
||||
</data>
|
||||
<data name="RequireUniqueISOCodes" xml:space="preserve">
|
||||
<value>Require unique ISO codes</value>
|
||||
</data>
|
||||
<data name="ShowChannelCodeLookupHelper" xml:space="preserve">
|
||||
<value>Display channel code lookup table UI</value>
|
||||
</data>
|
||||
<data name="ShowISOStringBuilder" xml:space="preserve">
|
||||
<value>Display ISO string builder UI</value>
|
||||
</data>
|
||||
<data name="UseISOCodeFilterMapping" xml:space="preserve">
|
||||
<value>Use ISO Code Filter Mapping</value>
|
||||
</data>
|
||||
<data name="ShowUserCodes" xml:space="preserve">
|
||||
<value>Show user codes</value>
|
||||
</data>
|
||||
<data name="ChannelNamesOnly" xml:space="preserve">
|
||||
<value>Show channel names only</value>
|
||||
</data>
|
||||
<data name="ValidateTestObjectAndPositionFields" xml:space="preserve">
|
||||
<value>Validate test object and position</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace ISOSettings.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<base:BaseView x:Class="ISOSettings.ISOSettingsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:strings="clr-namespace:ISOSettings.Resources"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:local="clr-namespace:ISOSettings"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:enums="clr-namespace:DTS.Common.Enums;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
DataContext="{Binding Path=ISOData}">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<converters:InverseEnumEnabledConverter x:Key="InverseEnumConverter" />
|
||||
<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="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 ChannelNamesOnly}" Margin="5,10,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ChannelNamesOnly" />
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ChannelNamesOnly}" IsEnabled="{Binding Path=ISOData.ISOViewMode, Converter={StaticResource InverseEnumConverter}, ConverterParameter={x:Static enums:IsoViewMode.ChannelNameOnly}}" Margin="5,10,0,0" AutomationProperties.AutomationId="chk_ChannelNamesOnly" />
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}">
|
||||
<TextBlock Text="{strings:TranslateExtension ShowISOCodes}" Margin="5,10,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ShowISOCodes"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ShowISOCodes}" IsEnabled="{Binding Path=ISOData.ISOViewMode, Converter={StaticResource InverseEnumConverter}, ConverterParameter={x:Static enums:IsoViewMode.ISOOnly}}" Margin="5,10,0,0" AutomationProperties.AutomationId="chk_ShowISOCodes"/>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}">
|
||||
<TextBlock Text="{strings:TranslateExtension ShowUserCodes}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ShowUserCodes"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ShowUserCodes}" IsEnabled="{Binding Path=ISOData.ISOViewMode, Converter={StaticResource InverseEnumConverter}, ConverterParameter={x:Static enums:IsoViewMode.UserCodeOnly}}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_ShowUserCodes"/>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}">
|
||||
<TextBlock Text="{strings:TranslateExtension ShowChannelCodeLookupHelper}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ShowChannelCodeLookupHelper"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ShowChannelCodeLookupHelper}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_ShowChannelCodeLookupHelper"
|
||||
IsEnabled="{Binding Path=ISOData.ISOViewMode, Converter={StaticResource InverseEnumConverter}, ConverterParameter={x:Static enums:IsoViewMode.ChannelNameOnly}}" />
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}" IsEnabled="{Binding Path=ISOData.ShowISOCodes}">
|
||||
<TextBlock Text="{strings:TranslateExtension ShowISOStringBuilder}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ShowISOStringBuilder"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ShowISOStringBuilder}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_ShowISOStringBuilder"/>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}" IsEnabled="{Binding Path=ISOData.ShowISOCodes}">
|
||||
<TextBlock Text="{strings:TranslateExtension RequireUniqueISOCodes}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_RequireUniqueISOCodes"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.UniqueISOCodesRequired}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_RequireUniqueISOCodes"/>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}" IsEnabled="{Binding Path=ISOData.ShowISOCodes}">
|
||||
<TextBlock Text="{strings:TranslateExtension UseISOCodeFilterMapping}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_UseISOCodeFilterMapping"/>
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.UseISOCodeFilterMapping}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_UseISOCodeFilterMapping"/>
|
||||
</StackPanel>
|
||||
<StackPanel Style="{StaticResource StackPanelHstyle}" IsEnabled="{Binding Path=ISOData.ShowISOCodes}">
|
||||
<TextBlock Text="{strings:TranslateExtension ValidateTestObjectAndPositionFields}" Margin="5,0,0,0" Width="200" Style="{StaticResource TextStyle}" AutomationProperties.AutomationId="txt_ValidateTestObjectAndPosition" />
|
||||
<CheckBox IsChecked="{Binding Path=ISOData.ValidateTestObjectAndPosition}" Margin="5,0,0,0" AutomationProperties.AutomationId="chk_ValidateTestObjectAndPosition" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</base:BaseView>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel;
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace ISOSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ISOSettingsView.xaml
|
||||
/// </summary>
|
||||
public partial class ISOSettingsView : IISOSettingsView
|
||||
{
|
||||
public ISOSettingsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interactivity;
|
||||
using DTS.Common.Interface;
|
||||
using ISOSettings.Model;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
using Unity;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace ISOSettings
|
||||
{
|
||||
[Export(typeof(IISOSettingsView))]
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public class ISOSettingsViewModel : IISOSettingsViewModel
|
||||
{
|
||||
public IISOSettingsView View { get; set; }
|
||||
public IISOSettingsModel Model { get; 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 ISOSettingsViewModel.
|
||||
/// </summary>
|
||||
/// <param name="view">The ISO Settings 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 ISOSettingsViewModel(IISOSettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
{
|
||||
View = view;
|
||||
|
||||
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);
|
||||
Model = new ISOSettingsModel(_eventAggregator);
|
||||
ISOData = Model.LoadData();
|
||||
View.DataContext = ISOData;
|
||||
}
|
||||
|
||||
#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 PopupWindowAction object to show the 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 });
|
||||
}
|
||||
|
||||
public void SaveData()
|
||||
{
|
||||
Model.SaveData(ISOData);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
private IISOSettingsData _isoData;
|
||||
public IISOSettingsData ISOData { get => _isoData; set { _isoData = value; OnPropertyChanged("ISOData"); } }
|
||||
|
||||
public bool IsDirty { get; private set; }
|
||||
private bool _isBusy = false;
|
||||
public bool IsBusy { get => _isBusy; set { _isBusy = value; OnPropertyChanged("IsBusy"); } }
|
||||
private bool _isMenuIncluded = false;
|
||||
public bool IsMenuIncluded { get => _isMenuIncluded; set { _isMenuIncluded = value; OnPropertyChanged("IsMenuIncluded"); } }
|
||||
private bool _isNavigationIncluded = false;
|
||||
public bool IsNavigationIncluded { get => _isNavigationIncluded; set { _isNavigationIncluded = value; OnPropertyChanged("IsNavigationIncluded"); } }
|
||||
/// <summary>
|
||||
/// Gets the HeaderInfo.
|
||||
/// </summary>
|
||||
public string HeaderInfo => "MainRegion";
|
||||
#endregion Properties
|
||||
|
||||
///<summary>
|
||||
///Occurs when a property value changes.
|
||||
///</summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
var eventHandler = PropertyChanged;
|
||||
if (eventHandler != null) { eventHandler(this, new PropertyChangedEventArgs(propertyName)); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = "")]
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1,130 @@
|
||||
<?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>{4205DCD6-CE24-40CE-8C21-88B9A117C04D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PowerAndBattery</RootNamespace>
|
||||
<AssemblyName>PowerAndBattery</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="PowerAndBatteryModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ViewModel\PowerAndBatteryViewModel.cs" />
|
||||
<Compile Include="View\PowerAndBatteryView.xaml.cs">
|
||||
<DependentUpon>PowerAndBatteryView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\PowerAndBatteryView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</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>
|
||||
@@ -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("PowerAndBattery")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PowerAndBattery")]
|
||||
[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")]
|
||||
@@ -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 PowerAndBattery
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "PowerAndBattery")]
|
||||
public class PowerAndBatteryModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PowerAndBatteryModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public PowerAndBatteryModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IPowerAndBatteryView, PowerAndBatteryView>();
|
||||
_unityContainer.RegisterType<IPowerAndBatteryViewModel, PowerAndBatteryViewModel>();
|
||||
}
|
||||
|
||||
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 PowerAndBatteryImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public PowerAndBatteryImageAttribute() : this(null) { }
|
||||
public override eAssemblyRegion AssemblyRegion => throw new NotImplementedException();
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.PowerAndBattery.ToString()); return _img; }
|
||||
}
|
||||
public PowerAndBatteryImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.PowerAndBattery.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.PowerAndBattery.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace PowerAndBattery
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PowerAndBatteryView.xaml
|
||||
/// </summary>
|
||||
public partial class PowerAndBatteryView : IPowerAndBatteryView
|
||||
{
|
||||
public PowerAndBatteryView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
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 PowerAndBattery
|
||||
{
|
||||
[Export(typeof(IPowerAndBatteryView))]
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class PowerAndBatteryViewModel : BasePropertyChanged, IPowerAndBatteryViewModel
|
||||
{
|
||||
public IPowerAndBatteryView 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 PowerAndBatteryViewModel(IPowerAndBatteryView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
//: base(regionManager, eventAggregator, 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
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<base:BaseView x:Class="PowerAndBattery.PowerAndBatteryView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
BIN
DataPRO/Modules/SystemSettings/PowerAndBattery/.svn/wc.db
Normal file
BIN
DataPRO/Modules/SystemSettings/PowerAndBattery/.svn/wc.db
Normal file
Binary file not shown.
@@ -0,0 +1,130 @@
|
||||
<?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>{4205DCD6-CE24-40CE-8C21-88B9A117C04D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PowerAndBattery</RootNamespace>
|
||||
<AssemblyName>PowerAndBattery</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="PowerAndBatteryModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ViewModel\PowerAndBatteryViewModel.cs" />
|
||||
<Compile Include="View\PowerAndBatteryView.xaml.cs">
|
||||
<DependentUpon>PowerAndBatteryView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\PowerAndBatteryView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</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>
|
||||
@@ -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 PowerAndBattery
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "PowerAndBattery")]
|
||||
public class PowerAndBatteryModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PowerAndBatteryModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public PowerAndBatteryModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IPowerAndBatteryView, PowerAndBatteryView>();
|
||||
_unityContainer.RegisterType<IPowerAndBatteryViewModel, PowerAndBatteryViewModel>();
|
||||
}
|
||||
|
||||
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 PowerAndBatteryImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public PowerAndBatteryImageAttribute() : this(null) { }
|
||||
public override eAssemblyRegion AssemblyRegion => throw new NotImplementedException();
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.PowerAndBattery.ToString()); return _img; }
|
||||
}
|
||||
public PowerAndBatteryImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.PowerAndBattery.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.PowerAndBattery.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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("PowerAndBattery")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PowerAndBattery")]
|
||||
[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")]
|
||||
@@ -0,0 +1,9 @@
|
||||
<base:BaseView x:Class="PowerAndBattery.PowerAndBatteryView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common">
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,15 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace PowerAndBattery
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PowerAndBatteryView.xaml
|
||||
/// </summary>
|
||||
public partial class PowerAndBatteryView : IPowerAndBatteryView
|
||||
{
|
||||
public PowerAndBatteryView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
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 PowerAndBattery
|
||||
{
|
||||
[Export(typeof(IPowerAndBatteryView))]
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class PowerAndBatteryViewModel : BasePropertyChanged, IPowerAndBatteryViewModel
|
||||
{
|
||||
public IPowerAndBatteryView 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 PowerAndBatteryViewModel(IPowerAndBatteryView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
//: base(regionManager, eventAggregator, 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
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = "")]
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
||||
Binary file not shown.
Binary file not shown.
1
DataPRO/Modules/SystemSettings/QASettings/.svn/entries
Normal file
1
DataPRO/Modules/SystemSettings/QASettings/.svn/entries
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
1
DataPRO/Modules/SystemSettings/QASettings/.svn/format
Normal file
1
DataPRO/Modules/SystemSettings/QASettings/.svn/format
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1,215 @@
|
||||
using System.ComponentModel;
|
||||
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.Commands;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
using Unity;
|
||||
|
||||
namespace QASettings
|
||||
{
|
||||
[Export(typeof(IQASettingsView))]
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class QASettingsViewModel : IQASettingsViewModel
|
||||
{
|
||||
public IQASettingsView 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 QASettingsViewModel(IQASettingsView view, IRegionManager regionManager, IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
//: base(regionManager, eventAggregator, 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 Commands
|
||||
/// <summary>
|
||||
/// Reload list of the available networks
|
||||
/// </summary>
|
||||
private DelegateCommand _createCommand;
|
||||
public DelegateCommand CreateCommand { get { return _createCommand ?? (_createCommand = new DelegateCommand(CreateMethod)); } }
|
||||
private async void CreateMethod()
|
||||
{
|
||||
//do something useful
|
||||
}
|
||||
#endregion Commands
|
||||
|
||||
#region Properties
|
||||
|
||||
private int _numberOfSensorModels = 200;
|
||||
public string NumberOfSensorModelsText
|
||||
{
|
||||
get { return _numberOfSensorModels.ToString("N0"); }
|
||||
set
|
||||
{
|
||||
_numberOfSensorModels = int.Parse(value);
|
||||
OnPropertyChanged("NumberOfSensorModelsText");
|
||||
}
|
||||
}
|
||||
|
||||
private int _numberOfTestSetups = 150;
|
||||
public string NumberOfTestSetupsText
|
||||
{
|
||||
get { return _numberOfTestSetups.ToString("N0"); }
|
||||
set
|
||||
{
|
||||
_numberOfTestSetups = int.Parse(value);
|
||||
OnPropertyChanged("NumberOfTestSetupsText");
|
||||
}
|
||||
}
|
||||
|
||||
private int _numberOfGroups = 50;
|
||||
public string NumberOfGroupsText
|
||||
{
|
||||
get { return _numberOfGroups.ToString("N0"); }
|
||||
set
|
||||
{
|
||||
_numberOfGroups = int.Parse(value);
|
||||
OnPropertyChanged("NumberOfGroupsText");
|
||||
}
|
||||
}
|
||||
|
||||
private int _numberOfSensors = 500;
|
||||
public string NumberOfSensorsText
|
||||
{
|
||||
get { return _numberOfSensors.ToString("N0"); }
|
||||
set { _numberOfSensors = int.Parse(value); OnPropertyChanged("NumberOfSensorsText"); }
|
||||
}
|
||||
|
||||
private int _numberOfGroupTemplates = 50;
|
||||
public string NumberOfGroupTemplatesText
|
||||
{
|
||||
get { return _numberOfGroupTemplates.ToString("N0"); }
|
||||
set
|
||||
{
|
||||
_numberOfGroupTemplates = int.Parse(value);
|
||||
OnPropertyChanged("NumberOfGroupTemplatesText");
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsDirty { get; private set; }
|
||||
|
||||
private bool _isBusy = false;
|
||||
public bool IsBusy
|
||||
{
|
||||
get { return _isBusy; }
|
||||
set { _isBusy = value; OnPropertyChanged("IsBusy"); }
|
||||
}
|
||||
|
||||
private bool _isMenuIncluded = false;
|
||||
public bool IsMenuIncluded
|
||||
{
|
||||
get { return _isMenuIncluded; }
|
||||
set
|
||||
{
|
||||
_isMenuIncluded = value;
|
||||
OnPropertyChanged("IsMenuIncluded");
|
||||
}
|
||||
}
|
||||
private bool _isNavigationIncluded = false;
|
||||
public bool IsNavigationIncluded
|
||||
{
|
||||
get { return _isNavigationIncluded; }
|
||||
set
|
||||
{
|
||||
_isNavigationIncluded = value;
|
||||
OnPropertyChanged("IsNavigationIncluded");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the HeaderInfo.
|
||||
/// </summary>
|
||||
public string HeaderInfo { get { return "MainRegion"; } }
|
||||
#endregion Properties
|
||||
|
||||
///<summary>
|
||||
///Occurs when a property value changes.
|
||||
///</summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
public bool SetProperty<T>(ref T storage, T value, string propertyName = null)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
void IBasePropertyChanged.OnPropertyChanged(string propertyName)
|
||||
{
|
||||
OnPropertyChanged(propertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using DTS.Common.Interface;
|
||||
|
||||
namespace QASettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for QASettingsView.xaml
|
||||
/// </summary>
|
||||
public partial class QASettingsView : IQASettingsView
|
||||
{
|
||||
public QASettingsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
<?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>{C13DA984-E46C-44C4-905E-BD7610D04057}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>QASettings</RootNamespace>
|
||||
<AssemblyName>QASettings</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="QASettingsModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ViewModel\QASettingsViewModel.cs" />
|
||||
<Compile Include="View\QASettingsView.xaml.cs">
|
||||
<DependentUpon>QASettingsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\QASettingsView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</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>
|
||||
@@ -0,0 +1,55 @@
|
||||
<base:BaseView x:Class="QASettings.QASettingsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
Background="{StaticResource Brush_ApplicationContentBackground}">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource PageContentTextBoxStyle}" >
|
||||
<Setter Property="Width" Value="100"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="Width" Value="200"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
</base:BaseView.Resources>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Number of Sensors" />
|
||||
<TextBox MinWidth="100" Text="{Binding NumberOfSensorsText}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Number of Templates" />
|
||||
<TextBox Text="{Binding NumberOfGroupTemplatesText}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Number of Groups" />
|
||||
<TextBox Text="{Binding NumberOfGroupsText}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Number of Test Setups" />
|
||||
<TextBox Text="{Binding NumberOfTestSetupsText}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Number of sensor models" />
|
||||
<TextBox Text="{Binding NumberOfSensorModelsText}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="Create" >
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding CreateCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user