init
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" 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>{82FAAE11-3BE9-4223-BEB8-8A53643866F8}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DTS.Viewer.PSDReportSettings</RootNamespace>
|
||||
<AssemblyName>DTS.Viewer.PSDReportSettings</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
</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.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\Common\DTS.Common\lib\System.Windows.Interactivity.dll</HintPath>
|
||||
</Reference>
|
||||
<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.Net.Http" />
|
||||
<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, Version=3.8.19076.18510, Culture=neutral, PublicKeyToken=ba83ff368b7563c6, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\Common\DTS.Common\lib\Xceed.Wpf.Toolkit\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Model\PSDReportSettingsModel.cs" />
|
||||
<Compile Include="PSDReportSettingsModule.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\PSDReportSettingsViewModel.cs" />
|
||||
<Compile Include="View\PSDReportSettingsView.xaml.cs">
|
||||
<DependentUpon>PSDReportSettingsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{f7a0804f-61a4-40ae-83d0-f1137622b592}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StringResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\PSDReportSettingsView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,72 @@
|
||||
using DTS.Common.Enums.Viewer.Reports;
|
||||
using DTS.Common.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Viewer.PSDReportSettings
|
||||
{
|
||||
public class PSDReportSettingsModel : Common.Base.BasePropertyChanged, IPSDReportSettingsModel
|
||||
{
|
||||
private IPSDReportSettingsViewModel _parent;
|
||||
public IPSDReportSettingsViewModel Parent { get => _parent; set { if (_parent != null && _parent.Equals(value)) return; _parent = value; OnPropertyChanged("Parent"); } }
|
||||
|
||||
private bool _canPublishChanges = true;
|
||||
public bool CanPublishChanges { get => _canPublishChanges; set { _canPublishChanges = value; OnPropertyChanged("CanPublishChanges"); } }
|
||||
|
||||
private bool _lowPassFilterEnabled = false;
|
||||
public bool LowPassFilterEnabled { get => _lowPassFilterEnabled; set { ReadData = true; SetProperty(ref _lowPassFilterEnabled, value, "LowPassFilterEnabled"); } }
|
||||
private double _lowPassFilterFrequency = 2000;
|
||||
public double LowPassFilterFrequency { get => _lowPassFilterFrequency; set { ReadData = true; SetProperty(ref _lowPassFilterFrequency, value, "LowPassFilterFrequency"); } }
|
||||
private PassFilterType _lowPassFilterType = PassFilterType.Butterworth;
|
||||
public PassFilterType LowPassFilterType { get => _lowPassFilterType; set { ReadData = true; SetProperty(ref _lowPassFilterType, value, "LowPassFilterType"); } }
|
||||
private int _lowPassFilterOrder = 8;
|
||||
public int LowPassFilterOrder { get => _lowPassFilterOrder; set { ReadData = true; SetProperty(ref _lowPassFilterOrder, value, "LowPassFilterOrder"); } }
|
||||
|
||||
private bool _highPassFilterEnabled = false;
|
||||
public bool HighPassFilterEnabled { get => _highPassFilterEnabled; set { ReadData = true; SetProperty(ref _highPassFilterEnabled, value, "HighPassFilterEnabled"); } }
|
||||
private double _highPassFilterFrequency = 5;
|
||||
public double HighPassFilterFrequency { get => _highPassFilterFrequency; set { ReadData = true; SetProperty(ref _highPassFilterFrequency, value, "HighPassFilterFrequency"); } }
|
||||
private PassFilterType _highPassFilterType = PassFilterType.Butterworth;
|
||||
public PassFilterType HighPassFilterType { get => _highPassFilterType; set { ReadData = true; SetProperty(ref _highPassFilterType, value, "HighPassFilterType"); } }
|
||||
private int _highPassFilterOrder = 8;
|
||||
public int HighPassFilterOrder { get => _highPassFilterOrder; set { ReadData = true; SetProperty(ref _highPassFilterOrder, value, "HighPassFilterOrder"); } }
|
||||
|
||||
private WindowWidth _windowWidth = WindowWidth.FortyNinetySix;
|
||||
public WindowWidth WindowWidth { get => _windowWidth; set { ReadData = true; SetProperty(ref _windowWidth, value, "WindowWidth"); } }
|
||||
private WindowType _windowType = WindowType.Hanning;
|
||||
public WindowType WindowType { get => _windowType; set { ReadData = true; SetProperty(ref _windowType, value, "WindowType"); } }
|
||||
private WindowAveragingType _windowAveragingType = WindowAveragingType.Averaging;
|
||||
public WindowAveragingType WindowAveragingType { get => _windowAveragingType; set { ReadData = true; SetProperty(ref _windowAveragingType, value, "WindowAveragingType"); } }
|
||||
private double _windowOverlappingPercent = 50;
|
||||
public double WindowOverlappingPercent { get => _windowOverlappingPercent; set { ReadData = true; SetProperty(ref _windowOverlappingPercent, value, "WindowOverlappingPercent"); } }
|
||||
private bool _showEnvelope = false;
|
||||
public bool ShowEnvelope { get => _showEnvelope; set { ReadData = true; SetProperty(ref _showEnvelope, value, "ShowEnvelope"); } }
|
||||
|
||||
public bool IsSaved { get; }
|
||||
|
||||
private bool _readData = false;
|
||||
public bool ReadData { get => _readData; set => SetProperty(ref _readData, value, "ReadData"); }
|
||||
private double _dataStart = 0D;
|
||||
public double DataStart { get => _dataStart; set { ReadData = true; SetProperty(ref _dataStart, value, "DataStart"); } }
|
||||
private double _dataEnd = 0D;
|
||||
public double DataEnd { get => _dataEnd; set { ReadData = true; SetProperty(ref _dataEnd, value, "DataEnd"); } }
|
||||
|
||||
public override event PropertyChangedEventHandler PropertyChanged;
|
||||
public override void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
var handler = PropertyChanged;
|
||||
|
||||
handler?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
|
||||
if (propertyName == "CanPublishChanges"
|
||||
|| propertyName == "Parent"
|
||||
|| propertyName == "ReadData") return;
|
||||
|
||||
if (CanPublishChanges) { Parent?.PublishChanges(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
using System;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Viewer.PSDReportSettings;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Unity;
|
||||
|
||||
|
||||
[assembly: PSDReportSettingsModuleName()]
|
||||
[assembly: PSDReportSettingsModuleImageAttribute()]
|
||||
namespace DTS.Viewer.PSDReportSettings
|
||||
{
|
||||
[Module(ModuleName = "PSDReportSettings")]
|
||||
public class PSDReportSettingsModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
public PSDReportSettingsModule(IUnityContainer unityContainer)
|
||||
{
|
||||
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
_unityContainer.RegisterType<IPSDReportSettingsViewModel, PSDReportSettingsViewModel>();
|
||||
_unityContainer.RegisterType<IPSDReportSettingsModel, PSDReportSettingsModel>();
|
||||
_unityContainer.RegisterType<IPSDReportSettingsView, PSDReportSettingsView>();
|
||||
}
|
||||
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly name
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class PSDReportSettingsModuleNameAttribute : TextAttribute
|
||||
{
|
||||
public PSDReportSettingsModuleNameAttribute() : this(null) { }
|
||||
|
||||
public PSDReportSettingsModuleNameAttribute(string s)
|
||||
{
|
||||
AssemblyName = AssemblyNames.PSDReportSettings.ToString();
|
||||
}
|
||||
|
||||
public override string AssemblyName { get; }
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(TextAttribute);
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 PSDReportSettingsModuleImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public PSDReportSettingsModuleImageAttribute() : this(null) { }
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.PSDReportSettings.ToString()); return _img; }
|
||||
}
|
||||
public PSDReportSettingsModuleImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.PSDReportSettings.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.PSDReportSettings.ToString(); return _name; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
private string _group;
|
||||
public override string AssemblyGroup
|
||||
{
|
||||
get { _group = eAssemblyGroups.Viewer.ToString(); return _group; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyGroup()
|
||||
{
|
||||
return AssemblyGroup;
|
||||
}
|
||||
|
||||
private eAssemblyRegion _region;
|
||||
public override eAssemblyRegion AssemblyRegion
|
||||
{
|
||||
get { _region = eAssemblyRegion.PSDReportSettingsRegion; return _region; }
|
||||
}
|
||||
public override eAssemblyRegion GetAssemblyRegion()
|
||||
{
|
||||
return AssemblyRegion;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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("DTS.Viewer.PSDReportSettings")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DTS.Viewer.PSDReportSettings")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[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("82faae11-3be9-4223-beb8-8a53643866f8")]
|
||||
|
||||
// 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")]
|
||||
252
DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/Resources/StringResources.Designer.cs
generated
Normal file
252
DTS Viewer/DTS.Viewer.Reports/DTS.Viewer.PSDReportSettings/Resources/StringResources.Designer.cs
generated
Normal file
@@ -0,0 +1,252 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 DTS.Viewer.PSDReportSettings.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("DTS.Viewer.PSDReportSettings.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 Envelope.
|
||||
/// </summary>
|
||||
internal static string EnvelopeHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("EnvelopeHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Export.
|
||||
/// </summary>
|
||||
internal static string ExportPSDHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportPSDHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Export PSD to CSV.
|
||||
/// </summary>
|
||||
internal static string ExportPSDtoCSV {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportPSDtoCSV", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Export PSD to PDF.
|
||||
/// </summary>
|
||||
internal static string ExportPSDtoPDF {
|
||||
get {
|
||||
return ResourceManager.GetString("ExportPSDtoPDF", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Center frequency.
|
||||
/// </summary>
|
||||
internal static string FilterCenterFrequency {
|
||||
get {
|
||||
return ResourceManager.GetString("FilterCenterFrequency", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Filter order.
|
||||
/// </summary>
|
||||
internal static string FilterOrder {
|
||||
get {
|
||||
return ResourceManager.GetString("FilterOrder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Filters.
|
||||
/// </summary>
|
||||
internal static string FilterSettingsHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("FilterSettingsHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Filter type.
|
||||
/// </summary>
|
||||
internal static string FilterType {
|
||||
get {
|
||||
return ResourceManager.GetString("FilterType", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bessel.
|
||||
/// </summary>
|
||||
internal static string FilterType_Bessel {
|
||||
get {
|
||||
return ResourceManager.GetString("FilterType_Bessel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Butterworth.
|
||||
/// </summary>
|
||||
internal static string FilterType_Butterworth {
|
||||
get {
|
||||
return ResourceManager.GetString("FilterType_Butterworth", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Linkwitz-Riley.
|
||||
/// </summary>
|
||||
internal static string FilterType_LinkwitzRiley {
|
||||
get {
|
||||
return ResourceManager.GetString("FilterType_LinkwitzRiley", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to High pass filter.
|
||||
/// </summary>
|
||||
internal static string HighPassFilter {
|
||||
get {
|
||||
return ResourceManager.GetString("HighPassFilter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Hz.
|
||||
/// </summary>
|
||||
internal static string Hz {
|
||||
get {
|
||||
return ResourceManager.GetString("Hz", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Low pass filter.
|
||||
/// </summary>
|
||||
internal static string LowPassFilter {
|
||||
get {
|
||||
return ResourceManager.GetString("LowPassFilter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to PSD settings.
|
||||
/// </summary>
|
||||
internal static string PSDSettingsHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("PSDSettingsHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show Envelope.
|
||||
/// </summary>
|
||||
internal static string ShowEnvelope {
|
||||
get {
|
||||
return ResourceManager.GetString("ShowEnvelope", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Averaging type.
|
||||
/// </summary>
|
||||
internal static string WindowAveragingType {
|
||||
get {
|
||||
return ResourceManager.GetString("WindowAveragingType", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Overlapping %.
|
||||
/// </summary>
|
||||
internal static string WindowOverlappingPercent {
|
||||
get {
|
||||
return ResourceManager.GetString("WindowOverlappingPercent", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Window.
|
||||
/// </summary>
|
||||
internal static string WindowSettingsHeader {
|
||||
get {
|
||||
return ResourceManager.GetString("WindowSettingsHeader", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Window type.
|
||||
/// </summary>
|
||||
internal static string WindowType {
|
||||
get {
|
||||
return ResourceManager.GetString("WindowType", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Window width.
|
||||
/// </summary>
|
||||
internal static string WindowWidth {
|
||||
get {
|
||||
return ResourceManager.GetString("WindowWidth", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
<?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="EnvelopeHeader" xml:space="preserve">
|
||||
<value>Envelope</value>
|
||||
</data>
|
||||
<data name="ExportPSDHeader" xml:space="preserve">
|
||||
<value>Export</value>
|
||||
</data>
|
||||
<data name="ExportPSDtoCSV" xml:space="preserve">
|
||||
<value>Export PSD to CSV</value>
|
||||
</data>
|
||||
<data name="ExportPSDtoPDF" xml:space="preserve">
|
||||
<value>Export PSD to PDF</value>
|
||||
</data>
|
||||
<data name="FilterCenterFrequency" xml:space="preserve">
|
||||
<value>Center frequency</value>
|
||||
</data>
|
||||
<data name="FilterOrder" xml:space="preserve">
|
||||
<value>Filter order</value>
|
||||
</data>
|
||||
<data name="FilterSettingsHeader" xml:space="preserve">
|
||||
<value>Filters</value>
|
||||
</data>
|
||||
<data name="FilterType" xml:space="preserve">
|
||||
<value>Filter type</value>
|
||||
</data>
|
||||
<data name="FilterType_Bessel" xml:space="preserve">
|
||||
<value>Bessel</value>
|
||||
</data>
|
||||
<data name="FilterType_Butterworth" xml:space="preserve">
|
||||
<value>Butterworth</value>
|
||||
</data>
|
||||
<data name="FilterType_LinkwitzRiley" xml:space="preserve">
|
||||
<value>Linkwitz-Riley</value>
|
||||
</data>
|
||||
<data name="HighPassFilter" xml:space="preserve">
|
||||
<value>High pass filter</value>
|
||||
</data>
|
||||
<data name="Hz" xml:space="preserve">
|
||||
<value>Hz</value>
|
||||
</data>
|
||||
<data name="LowPassFilter" xml:space="preserve">
|
||||
<value>Low pass filter</value>
|
||||
</data>
|
||||
<data name="PSDSettingsHeader" xml:space="preserve">
|
||||
<value>PSD settings</value>
|
||||
</data>
|
||||
<data name="ShowEnvelope" xml:space="preserve">
|
||||
<value>Show Envelope</value>
|
||||
</data>
|
||||
<data name="WindowAveragingType" xml:space="preserve">
|
||||
<value>Averaging type</value>
|
||||
</data>
|
||||
<data name="WindowOverlappingPercent" xml:space="preserve">
|
||||
<value>Overlapping %</value>
|
||||
</data>
|
||||
<data name="WindowSettingsHeader" xml:space="preserve">
|
||||
<value>Window</value>
|
||||
</data>
|
||||
<data name="WindowType" xml:space="preserve">
|
||||
<value>Window type</value>
|
||||
</data>
|
||||
<data name="WindowWidth" xml:space="preserve">
|
||||
<value>Window width</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using DTS.Viewer.PSDReportSettings.Resources;
|
||||
|
||||
namespace DTS.Viewer.PSDReportSettings
|
||||
{
|
||||
[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,128 @@
|
||||
<base:BaseView x:Class="DTS.Viewer.PSDReportSettings.PSDReportSettingsView"
|
||||
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:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:xc="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
mc:Ignorable="d"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:enums="clr-namespace:DTS.Common.Enums;assembly=DTS.Common"
|
||||
xmlns:reports="clr-namespace:DTS.Common.Enums.Viewer.Reports;assembly=DTS.Common"
|
||||
xmlns:strings="clr-namespace:DTS.Viewer.PSDReportSettings">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<!-- ReSharper disable once Xaml.RedundantResource -->
|
||||
<converters:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter" />
|
||||
<!-- ReSharper disable once Xaml.RedundantResource -->
|
||||
<converters:EnumBooleanConverter x:Key="EnumBooleanConverter" />
|
||||
<converters:InverseBooleanToOpacityConverter x:Key="InverseBooleanToOpacityConverter" />
|
||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
<converters:InverseBooleanConverter x:Key="InverseBooleanConverter"/>
|
||||
<converters:BooleanToColorConverter x:Key="InvertedBooleanToAttentionBackgroundColorConverter" Background="True" Inverted="True" AttentionBrush="True" />
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<sys:Double x:Key="PASS_FILTER_FREQ_MIN">0</sys:Double>
|
||||
<sys:Double x:Key="PASS_FILTER_ORDER_MIN">2</sys:Double>
|
||||
<sys:Double x:Key="PASS_FILTER_ORDER_MAX">16</sys:Double>
|
||||
<sys:Double x:Key="WINDOW_OVERLAP_PCT_MIN">0</sys:Double>
|
||||
<sys:Double x:Key="WINDOW_OVERLAP_PCT_MAX">100</sys:Double>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Top">
|
||||
<GroupBox Header="{strings:TranslateExtension PSDSettingsHeader}" Margin="5,0,5,0" AutomationProperties.AutomationId="PSDSettingsGrpBx"
|
||||
HorizontalAlignment="Stretch">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Stretch">
|
||||
<GroupBox Header="{strings:TranslateExtension FilterSettingsHeader}" Margin="5,0,5,0" AutomationProperties.AutomationId="FilterSettingsGrpBx"
|
||||
HorizontalAlignment="Stretch" >
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="5" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<CheckBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{strings:Translate LowPassFilter}" IsChecked="{Binding Model.LowPassFilterEnabled, Mode=TwoWay}" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{strings:Translate FilterCenterFrequency}" />
|
||||
<xc:DoubleUpDown Grid.Row="1" Grid.Column="1" FormatString="N1" Increment="1" Minimum="{StaticResource PASS_FILTER_FREQ_MIN}" Maximum="{x:Static sys:Double.MaxValue}"
|
||||
ClipValueToMinMax="True" Value="{Binding Model.LowPassFilterFrequency}" UpdateValueOnEnterKey="True"
|
||||
AutomationProperties.AutomationId="upd_LPFFreq" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Text="{strings:Translate Hz}" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{strings:Translate FilterType}" />
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
ItemsSource="{Binding Source={enums:EnumBindingSourceExtension {x:Type reports:PassFilterType}}}"
|
||||
SelectedItem="{Binding Model.LowPassFilterType}" AutomationProperties.AutomationId="cmb_LPFType" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="{strings:Translate FilterOrder}" />
|
||||
<xc:DoubleUpDown Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" FormatString="N0" Increment="1" Minimum="{StaticResource PASS_FILTER_ORDER_MIN}" Maximum="{StaticResource PASS_FILTER_ORDER_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding Model.LowPassFilterOrder}" UpdateValueOnEnterKey="True"
|
||||
AutomationProperties.AutomationId="upd_LPFOrder"/>
|
||||
<CheckBox Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" Content="{strings:Translate HighPassFilter}" IsChecked="{Binding Model.HighPassFilterEnabled, Mode=TwoWay}" />
|
||||
<TextBlock Grid.Row="6" Grid.Column="0" Text="{strings:Translate FilterCenterFrequency}" />
|
||||
<xc:DoubleUpDown Grid.Row="6" Grid.Column="1" FormatString="N1" Increment="1" Minimum="{StaticResource PASS_FILTER_FREQ_MIN}" Maximum="{x:Static sys:Double.MaxValue}"
|
||||
ClipValueToMinMax="True" Value="{Binding Model.HighPassFilterFrequency}" UpdateValueOnEnterKey="True"
|
||||
AutomationProperties.AutomationId="upd_HPFFreq" />
|
||||
<TextBlock Grid.Row="6" Grid.Column="2" Text="{strings:Translate Hz}" />
|
||||
<TextBlock Grid.Row="7" Grid.Column="0" Text="{strings:Translate FilterType}" />
|
||||
<ComboBox Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
ItemsSource="{Binding Source={enums:EnumBindingSourceExtension {x:Type reports:PassFilterType}}}"
|
||||
SelectedItem="{Binding Model.HighPassFilterType}" AutomationProperties.AutomationId="cmb_HPFType" />
|
||||
<TextBlock Grid.Row="8" Grid.Column="0" Text="{strings:Translate FilterOrder}" />
|
||||
<xc:DoubleUpDown Grid.Row="8" Grid.Column="1" Grid.ColumnSpan="2" FormatString="N0" Increment="1" Minimum="{StaticResource PASS_FILTER_ORDER_MIN}" Maximum="{StaticResource PASS_FILTER_ORDER_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding Model.HighPassFilterOrder}" UpdateValueOnEnterKey="True"
|
||||
AutomationProperties.AutomationId="upd_HPFOrder" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
<GroupBox Header="{strings:TranslateExtension WindowSettingsHeader}" Margin="5,0,5,0" AutomationProperties.AutomationId="FilterSettingsGrpBx"
|
||||
HorizontalAlignment="Stretch">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{strings:Translate WindowWidth}" />
|
||||
<ComboBox Grid.Row="0" Grid.Column="1"
|
||||
ItemsSource="{Binding Source={enums:EnumBindingSourceExtension {x:Type reports:WindowWidth}}}"
|
||||
SelectedItem="{Binding Model.WindowWidth}" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{strings:Translate WindowType}" />
|
||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||
ItemsSource="{Binding Source={enums:EnumBindingSourceExtension {x:Type reports:WindowType}}}"
|
||||
SelectedItem="{Binding Model.WindowType}" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{strings:Translate WindowOverlappingPercent}" />
|
||||
<xc:DoubleUpDown Grid.Row="2" Grid.Column="1" FormatString="N0" Increment="1" Minimum="{StaticResource WINDOW_OVERLAP_PCT_MIN}" Maximum="{StaticResource WINDOW_OVERLAP_PCT_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding Model.WindowOverlappingPercent}"
|
||||
AutomationProperties.AutomationId="upd_WindowOverlapPercent" UpdateValueOnEnterKey="True" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="{strings:Translate WindowAveragingType}" />
|
||||
<ComboBox Grid.Row="3" Grid.Column="1"
|
||||
ItemsSource="{Binding Source={enums:EnumBindingSourceExtension {x:Type reports:WindowAveragingType}}}"
|
||||
SelectedItem="{Binding Model.WindowAveragingType}" />
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="{strings:TranslateExtension EnvelopeHeader}" Margin="5,0,5,0" AutomationProperties.AutomationId="EnvelopeGrpBx"
|
||||
HorizontalAlignment="Stretch">
|
||||
<CheckBox Content="{strings:Translate ShowEnvelope}" IsChecked="{Binding Model.ShowEnvelope, Mode=TwoWay}" />
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,27 @@
|
||||
using DTS.Common.Interface;
|
||||
using System.Collections.Generic;
|
||||
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
|
||||
|
||||
namespace DTS.Viewer.PSDReportSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for PSDReportSettingsView.xaml
|
||||
/// </summary>
|
||||
public partial class PSDReportSettingsView : IPSDReportSettingsView
|
||||
{
|
||||
public PSDReportSettingsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
//private IItemsSource _availablePassFilterTypes = new DTS.Common.Enums.Viewer.Reports.PassFilterTypeEnumItemSource();
|
||||
//public List<string> AvailablePassFilterTypes => _availablePassFilterTypes;
|
||||
|
||||
//private IItemsSource _availableWindowAveragingTypes = new DTS.Common.Enums.Viewer.Reports.WindowAveragingTypeEnumItemSource();
|
||||
//public IItemsSource AvailableWindowAveragingTypes => _availableWindowAveragingTypes;
|
||||
|
||||
//private IItemsSource _availableWindowTypes = new DTS.Common.Enums.Viewer.Reports.WindowTypeEnumItemSource();
|
||||
//public IItemsSource AvailableWindowTypes => _availableWindowTypes;
|
||||
public List<int> AvailableWindowWidths => new List<int>() { 512, 1024, 2048, 4096, 8192 };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interactivity;
|
||||
using DTS.Common.Interface;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Unity;
|
||||
|
||||
namespace DTS.Viewer.PSDReportSettings
|
||||
{
|
||||
public class PSDReportSettingsViewModel : BaseViewModel<IPSDReportSettingsModel>, IPSDReportSettingsViewModel
|
||||
{
|
||||
public IBaseView View { get; set; }
|
||||
//public bool Standalone { get; set; }
|
||||
|
||||
public IBaseViewModel Parent { get; set; }
|
||||
|
||||
private IPSDReportSettingsModel _model;
|
||||
public new IPSDReportSettingsModel Model { get => _model; set { _model = value; OnPropertyChanged("Model"); } }
|
||||
private IEventAggregator _eventAggregator { get; set; }
|
||||
private IUnityContainer _unityContainer { get; set; }
|
||||
|
||||
public InteractionRequest<Notification> NotificationRequest { get; private set; }
|
||||
public new InteractionRequest<Confirmation> ConfirmationRequest { get; private set; }
|
||||
/// <summary>
|
||||
/// Creates a new instance of the MainViewModel.
|
||||
/// </summary>
|
||||
|
||||
/// <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 Unity container.</param>
|
||||
public PSDReportSettingsViewModel(IPSDReportSettingsView 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;
|
||||
}
|
||||
|
||||
#region Methods
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Initialize(object parameter)
|
||||
{
|
||||
Parent = (IBaseViewModel)parameter;
|
||||
|
||||
Subscribe();
|
||||
Model = _unityContainer.Resolve<IPSDReportSettingsModel>();
|
||||
Model.Parent = this;
|
||||
//View.DataContext = Model;
|
||||
}
|
||||
|
||||
private void Subscribe()
|
||||
{
|
||||
//_eventAggregator.GetEvent<CursorsAlailableChangedEvent>().Subscribe(OnCursorsAlailableChanged);
|
||||
_eventAggregator.GetEvent<GraphSelectedChannelsNotification>().Subscribe(OnGraphSelectedChannelsChanged);
|
||||
_eventAggregator.GetEvent<GraphClearNotification>().Subscribe(OnGraphCleared);
|
||||
_eventAggregator.GetEvent<ChartAxisChangedEvent>().Subscribe(OnChartAxisChanged);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void OnChartAxisChanged(ChartAxisChangedEventArg arg)
|
||||
{
|
||||
if (arg?.ParentVM != Parent) return;
|
||||
|
||||
switch (arg.Axis)
|
||||
{
|
||||
case "Y":
|
||||
//Model.MinFixedY = args.MinValue;
|
||||
//Model.MaxFixedY = args.MaxValue;
|
||||
break;
|
||||
case "X":
|
||||
Model.CanPublishChanges = false;
|
||||
Model.DataStart = arg.MinValue;
|
||||
Model.DataEnd = arg.MaxValue;
|
||||
Model.CanPublishChanges = true;
|
||||
PublishChanges();
|
||||
break;
|
||||
}
|
||||
//throw new NotImplementedException();
|
||||
}
|
||||
private void OnGraphCleared(GraphClearNotificationArg obj)
|
||||
{
|
||||
//Graph's been cleared. Init our settings
|
||||
Model.ReadData = false;
|
||||
PublishChanges();
|
||||
}
|
||||
|
||||
private void OnGraphSelectedChannelsChanged(GraphSelectedChannelsNotificationArg arg)
|
||||
{
|
||||
if (Parent != arg?.ParentVM) return;
|
||||
var channels = arg.SelectedChannels;
|
||||
Model.Parent = this;
|
||||
|
||||
//PublishChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Private Event handler for RaiseNotification event.
|
||||
/// </summary>
|
||||
private void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)
|
||||
{
|
||||
// Notification object expects a NotificationContentEventArgsWithoutTitle object and a Title string.
|
||||
var eventArgsWithoutTitle = new NotificationContentEventArgs(eventArgsWithTitle.Message, eventArgsWithTitle.MessageDetails, eventArgsWithTitle.Image);
|
||||
|
||||
NotificationRequest.Raise(new Notification
|
||||
{
|
||||
Content = eventArgsWithoutTitle,
|
||||
Title = eventArgsWithTitle.Title
|
||||
});
|
||||
}
|
||||
|
||||
public void PublishChanges()
|
||||
{
|
||||
_eventAggregator.GetEvent<PSDReportSettingsChangedEvent>().Publish(new PSDReportSettingsChangedEventArg() { Model = Model, ParentVM = Parent });
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -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.
Reference in New Issue
Block a user