diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
index 7f91721..69c82fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,26 +1,367 @@
-# ---> Windows
-# Windows thumbnail cache files
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+GenericWpfApp/Nuget/cache/
+
Thumbs.db
-Thumbs.db:encryptable
-ehthumbs.db
-ehthumbs_vista.db
-# Dump file
-*.stackdump
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
-# Folder config file
-[Dd]esktop.ini
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
-# Recycle Bin used on file shares
-$RECYCLE.BIN/
+# Mono auto generated files
+mono_crash.*
-# Windows Installer files
-*.cab
-*.msi
-*.msix
-*.msm
-*.msp
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Oo]ut/
+[Ll]og/
+[Ll]ogs/
-# Windows shortcuts
-*.lnk
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+#*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
\ No newline at end of file
diff --git a/GenericWpfApp/App.props b/GenericWpfApp/App.props
new file mode 100644
index 0000000..c6889c2
--- /dev/null
+++ b/GenericWpfApp/App.props
@@ -0,0 +1,18 @@
+
+
+
+
+ $([System.DateTime]::get_now().ToString("yyyy"))
+
+ $(Year)
+ $([System.DateTime]::get_now().ToString("MM"))
+ $([System.DateTime]::get_now().ToString("dd"))
+ $([MSBuild]::Divide($([System.DateTime]::get_Now().get_TimeOfDay().get_TotalMinutes()), 2).ToString('F0'))
+
+ $(Major).$(Minor).$(Build).$(Revision)
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GenericWpfApp/GenericWpfApp.sln b/GenericWpfApp/GenericWpfApp.sln
new file mode 100644
index 0000000..20eafc4
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp.sln
@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.8.34408.163
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GenericWpfApp", "GenericWpfApp\GenericWpfApp.csproj", "{0E2C774F-B33F-4EB4-9430-B8C3A92CC82E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Deploy|Any CPU = Deploy|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0E2C774F-B33F-4EB4-9430-B8C3A92CC82E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0E2C774F-B33F-4EB4-9430-B8C3A92CC82E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0E2C774F-B33F-4EB4-9430-B8C3A92CC82E}.Deploy|Any CPU.ActiveCfg = Deploy|Any CPU
+ {0E2C774F-B33F-4EB4-9430-B8C3A92CC82E}.Deploy|Any CPU.Build.0 = Deploy|Any CPU
+ {0E2C774F-B33F-4EB4-9430-B8C3A92CC82E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0E2C774F-B33F-4EB4-9430-B8C3A92CC82E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {61A9DDD9-0827-4D70-8391-8E6C4CC1F17C}
+ EndGlobalSection
+EndGlobal
diff --git a/GenericWpfApp/GenericWpfApp/App.config b/GenericWpfApp/GenericWpfApp/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GenericWpfApp/GenericWpfApp/App.xaml b/GenericWpfApp/GenericWpfApp/App.xaml
new file mode 100644
index 0000000..617b27c
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/GenericWpfApp/GenericWpfApp/App.xaml.cs b/GenericWpfApp/GenericWpfApp/App.xaml.cs
new file mode 100644
index 0000000..28176d8
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace GenericWpfApp
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/Config/NLog.config b/GenericWpfApp/GenericWpfApp/Config/NLog.config
new file mode 100644
index 0000000..86df6fa
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/Config/NLog.config
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GenericWpfApp/GenericWpfApp/Config/config.ini b/GenericWpfApp/GenericWpfApp/Config/config.ini
new file mode 100644
index 0000000..e69de29
diff --git a/GenericWpfApp/GenericWpfApp/Dependencies/CommonLib.dll b/GenericWpfApp/GenericWpfApp/Dependencies/CommonLib.dll
new file mode 100644
index 0000000..53709c8
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Dependencies/CommonLib.dll differ
diff --git a/GenericWpfApp/GenericWpfApp/Dependencies/NLogWrapper.Part.dll b/GenericWpfApp/GenericWpfApp/Dependencies/NLogWrapper.Part.dll
new file mode 100644
index 0000000..7a303d5
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Dependencies/NLogWrapper.Part.dll differ
diff --git a/GenericWpfApp/GenericWpfApp/GenericWpfApp.csproj b/GenericWpfApp/GenericWpfApp/GenericWpfApp.csproj
new file mode 100644
index 0000000..7e7b3bf
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/GenericWpfApp.csproj
@@ -0,0 +1,85 @@
+
+
+
+ net472
+ Winexe
+ GenericWpfApp
+ true
+ ---
+ Raytheonn Technologies
+ Generic WPF App
+ TEEC
+ Copyright © Raytheon Technologies $([System.DateTime]::get_now().ToString("yyyy"))
+ true
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
+
+
+ false
+
+ $(Version)$(Suffix)
+
+
+
+ Debug;Release;Deploy
+ Resources\Icons\app.ico
+ 8.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Dependencies\CommonLib.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GenericWpfApp/GenericWpfApp/MainWindow.xaml b/GenericWpfApp/GenericWpfApp/MainWindow.xaml
new file mode 100644
index 0000000..97fa470
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/MainWindow.xaml
@@ -0,0 +1,642 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M 0,0 L 3.5,4 L 7,0 Z
+ M 0,4 L 3.5,0 L 7,4 Z
+ M 0,0 L 4,3.5 L 0,7 Z
+ F1 M 10.0,1.2 L 4.7,9.1 L 4.5,9.1 L 0,5.2 L 1.3,3.5 L 4.3,6.1L 8.3,0 L 10.0,1.2 Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [App Title Here]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Placeholder
+
+ Placeholder
+
+
+
+
+
+
+
diff --git a/GenericWpfApp/GenericWpfApp/MainWindow.xaml.cs b/GenericWpfApp/GenericWpfApp/MainWindow.xaml.cs
new file mode 100644
index 0000000..78bd5ea
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/MainWindow.xaml.cs
@@ -0,0 +1,91 @@
+using GenericWpfApp.Model;
+using GenericWpfApp.View;
+using GenericWpfApp.ViewModel;
+using NLog;
+using System;
+using System.Diagnostics;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media.Imaging;
+
+namespace GenericWpfApp
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ private ILogger _logger;
+
+ public MainWindowViewModel _mainWindowViewModel;
+
+ public ImpedanceCheckWindow _impedanceCheckWindow;
+
+ public MainWindow()
+ {
+
+ InitializeComponent();
+
+ _logger = LogManager.GetCurrentClassLogger();
+
+ string version = Assembly.GetEntryAssembly().GetCustomAttribute()?.InformationalVersion; //0.1.0
+
+ this.txtBlockAppTitle.Text += $" [Version: {version}]";
+
+ _mainWindowViewModel = new MainWindowViewModel();
+ DataContext = _mainWindowViewModel;
+
+ PassthroughData._s_datagridColumnCount = datagridPassthroughData.Columns.Count;
+
+ WinProc.Instance(this);
+ }
+
+ private void btnClose_Click(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+
+ private void btnMax_Click(object sender, RoutedEventArgs e)
+ {
+ if (this.WindowState == WindowState.Maximized)
+ {
+ this.WindowState = WindowState.Normal;
+ imgMax.Source = new BitmapImage(new System.Uri("pack://application:,,,/Resources/Images/Title_Bar_Buttons/maximize.png"));
+ }
+ else
+ {
+ this.WindowState = WindowState.Maximized;
+ imgMax.Source = new BitmapImage(new System.Uri("pack://application:,,,/Resources/Images/Title_Bar_Buttons/restore.png"));
+ }
+ }
+
+ private void btnMin_Click(object sender, RoutedEventArgs e)
+ {
+ this.WindowState = WindowState.Minimized;
+ }
+
+ private void Window_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+ {
+ DragMove();
+ }
+
+ private void imgAppIcon_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ // simulate ALT+SPACE press
+ CommonLib.Runtime.InteropServices.Win32Helpers.Simulate_2_Key_Press(CommonLib.Runtime.InteropServices.Win32Helpers.VK.MENU, (char)CommonLib.Runtime.InteropServices.Win32Helpers.VK.SPACE);
+ }
+
+ private void btnPower_Click(object sender, RoutedEventArgs e)
+ {
+ _impedanceCheckWindow = new ImpedanceCheckWindow();
+ _impedanceCheckWindow.ShowDialog();
+
+ WinProc.Instance().StartPowerSupplyReadTask();
+ }
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/Model/ImpedanceDataModel.cs b/GenericWpfApp/GenericWpfApp/Model/ImpedanceDataModel.cs
new file mode 100644
index 0000000..e00788b
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/Model/ImpedanceDataModel.cs
@@ -0,0 +1,13 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace GenericWpfApp.Model
+{
+ public partial class ImpedanceDataModel : ObservableObject
+ {
+ [ObservableProperty]
+ private string passFailImagePath;
+
+ [ObservableProperty]
+ private string description;
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/Model/PassthroughData.Types.cs b/GenericWpfApp/GenericWpfApp/Model/PassthroughData.Types.cs
new file mode 100644
index 0000000..43dda47
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/Model/PassthroughData.Types.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GenericWpfApp.Model
+{
+ public partial class PassthroughData
+ {
+ private struct VariableInfo
+ {
+ // index into where the item is located in the dictionary
+ public int passthroughDataModelDictIndex { get; set; }
+ // index into where the item is located in the data model
+ // the data model contains more than one item
+ public int passthroughDataModelItemIndex { get; set; }
+ }
+ public enum Variables
+ {
+ VAR1,
+ VAR2,
+ VAR3,
+ VAR4,
+ VAR5,
+ VAR6,
+ VAR7,
+ VAR8,
+ VAR9,
+ VAR10,
+ VAR11,
+ VAR12,
+ VAR13,
+ VAR14,
+ VAR15,
+ VAR16,
+ VAR17,
+ VAR18,
+ VAR19,
+ VAR20,
+ VAR21,
+ VAR22,
+ VAR23,
+ VAR24,
+ VAR25,
+ VAR26,
+ VAR27,
+ VAR28,
+ VAR29,
+ VAR30,
+ VAR31,
+ VAR32,
+ VAR33,
+ VAR34,
+ VAR35,
+ VAR36,
+ VAR37,
+ VAR38,
+ VAR39,
+ VAR40,
+ VAR41,
+ VAR42,
+ };
+
+ private Dictionary _variableEnumToDescriptionDict = new Dictionary
+ {
+ { Variables.VAR1, "IDA Temp" },
+ { Variables.VAR2, "FPGA Temp" },
+ { Variables.VAR3, "IDA Bias" },
+ { Variables.VAR4, "TINT" },
+ { Variables.VAR5, "Pitch" },
+ { Variables.VAR6, "Yaw" },
+ { Variables.VAR7, "Roll" },
+ };
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/Model/PassthroughData.cs b/GenericWpfApp/GenericWpfApp/Model/PassthroughData.cs
new file mode 100644
index 0000000..3fa403b
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/Model/PassthroughData.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GenericWpfApp.Model
+{
+ public partial class PassthroughData
+ {
+ public static int _s_datagridColumnCount = 0;
+ // this dictionary stores variable and the info needed to locate it in the passthroughdatamodel dictionary which contains a 2-d array
+ private Dictionary _variableEnumToVariableInfoDict = new Dictionary();
+
+ // this dictionary stores variable and its corresponding data model
+ private Dictionary> _rowNumberToPassthroughDataDict = new Dictionary>();
+
+ public PassthroughData()
+ {
+ VariableInfo variableInfo = new VariableInfo();
+
+ int dictIndex = 0;
+ int colIndex = 0;
+ // contruct a 2-d array of strings based on the list of Variables
+ foreach (Variables enumVar in Enum.GetValues(typeof(Variables)))
+ {
+ if (_rowNumberToPassthroughDataDict.Count == 0 || colIndex == _s_datagridColumnCount)
+ {
+ dictIndex++;
+ _rowNumberToPassthroughDataDict[dictIndex] = new ObservableCollection(new string[_s_datagridColumnCount]);
+ colIndex = 0;
+ }
+
+ // name of the variable
+ _rowNumberToPassthroughDataDict[dictIndex][colIndex] = String.Empty;
+ variableInfo.passthroughDataModelItemIndex = colIndex++;
+
+ // value of the variable
+ _rowNumberToPassthroughDataDict[dictIndex][colIndex++] = String.Empty;
+
+ // save the row index so we can refer to this item
+ variableInfo.passthroughDataModelDictIndex = dictIndex;
+
+ // save the column index of this item so we can refer to this item
+ _variableEnumToVariableInfoDict[enumVar] = variableInfo;
+ }
+ }
+
+ public Dictionary> GetPassthroughDataModelDict()
+ {
+ return _rowNumberToPassthroughDataDict;
+ }
+
+ public void SetValue(Variables variableName, string val)
+ {
+ App.Current.Dispatcher.Invoke((Action)delegate
+ {
+ _rowNumberToPassthroughDataDict[_variableEnumToVariableInfoDict[variableName].passthroughDataModelDictIndex][_variableEnumToVariableInfoDict[variableName].passthroughDataModelItemIndex] = _variableEnumToDescriptionDict[variableName];
+ _rowNumberToPassthroughDataDict[_variableEnumToVariableInfoDict[variableName].passthroughDataModelDictIndex][_variableEnumToVariableInfoDict[variableName].passthroughDataModelItemIndex + 1] = val;
+ });
+ }
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/Model/PowerModuleDataModel.cs b/GenericWpfApp/GenericWpfApp/Model/PowerModuleDataModel.cs
new file mode 100644
index 0000000..716a6d8
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/Model/PowerModuleDataModel.cs
@@ -0,0 +1,17 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+
+namespace GenericWpfApp.Model
+{
+ public partial class PowerModuleDataModel : ObservableObject
+ {
+ [ObservableProperty]
+ private string expectedVoltage;
+ [ObservableProperty]
+ private string actualVoltage;
+ [ObservableProperty]
+ private string expectedCurrent;
+ [ObservableProperty]
+ private string actualCurrent;
+
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/Properties/Resources.Designer.cs b/GenericWpfApp/GenericWpfApp/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..05b2781
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+namespace GenericWpfApp.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // 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 Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [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("DataGrid.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/Properties/Resources.resx b/GenericWpfApp/GenericWpfApp/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/GenericWpfApp/GenericWpfApp/Properties/Settings.Designer.cs b/GenericWpfApp/GenericWpfApp/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..aa4dcda
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+namespace GenericWpfApp.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/Properties/Settings.settings b/GenericWpfApp/GenericWpfApp/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Icons/app.ico b/GenericWpfApp/GenericWpfApp/Resources/Icons/app.ico
new file mode 100644
index 0000000..5060c9d
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Icons/app.ico differ
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/close_black.png b/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/close_black.png
new file mode 100644
index 0000000..d8823ba
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/close_black.png differ
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/close_white.png b/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/close_white.png
new file mode 100644
index 0000000..5446623
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/close_white.png differ
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/maximize.png b/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/maximize.png
new file mode 100644
index 0000000..f5631ac
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/maximize.png differ
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/minimize.png b/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/minimize.png
new file mode 100644
index 0000000..15c87f7
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/minimize.png differ
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/restore.png b/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/restore.png
new file mode 100644
index 0000000..67ea757
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Images/Title_Bar_Buttons/restore.png differ
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Images/black-led.png b/GenericWpfApp/GenericWpfApp/Resources/Images/black-led.png
new file mode 100644
index 0000000..695839f
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Images/black-led.png differ
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Images/green-check-mark.png b/GenericWpfApp/GenericWpfApp/Resources/Images/green-check-mark.png
new file mode 100644
index 0000000..c7fefdc
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Images/green-check-mark.png differ
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Images/green-led.png b/GenericWpfApp/GenericWpfApp/Resources/Images/green-led.png
new file mode 100644
index 0000000..05c8cc3
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Images/green-led.png differ
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Images/missile.png b/GenericWpfApp/GenericWpfApp/Resources/Images/missile.png
new file mode 100644
index 0000000..7328f61
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Images/missile.png differ
diff --git a/GenericWpfApp/GenericWpfApp/Resources/Images/red-cross-mark.png b/GenericWpfApp/GenericWpfApp/Resources/Images/red-cross-mark.png
new file mode 100644
index 0000000..c1407a2
Binary files /dev/null and b/GenericWpfApp/GenericWpfApp/Resources/Images/red-cross-mark.png differ
diff --git a/GenericWpfApp/GenericWpfApp/View/ImpedanceCheckWindow.xaml b/GenericWpfApp/GenericWpfApp/View/ImpedanceCheckWindow.xaml
new file mode 100644
index 0000000..86feb25
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/View/ImpedanceCheckWindow.xaml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Impedance Check
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GenericWpfApp/GenericWpfApp/View/ImpedanceCheckWindow.xaml.cs b/GenericWpfApp/GenericWpfApp/View/ImpedanceCheckWindow.xaml.cs
new file mode 100644
index 0000000..0fe08a0
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/View/ImpedanceCheckWindow.xaml.cs
@@ -0,0 +1,58 @@
+using GenericWpfApp.ViewModel;
+using System;
+using System.Collections.Specialized;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace GenericWpfApp.View
+{
+ ///
+ /// Interaction logic for ImpedanceCheckWindow.xaml
+ ///
+ public partial class ImpedanceCheckWindow : Window
+ {
+ private ImpedanceCheckWindowViewModel _viewModel;
+
+ public ImpedanceCheckWindow()
+ {
+ InitializeComponent();
+
+ WindowStartupLocation = WindowStartupLocation.CenterOwner;
+ Owner = Application.Current.MainWindow;
+
+ btnClose.Visibility = Visibility.Hidden;
+
+ ((INotifyCollectionChanged)lvImpedanceCheck.Items).CollectionChanged += ListView_CollectionChanged;
+
+ _viewModel = new ImpedanceCheckWindowViewModel();
+ DataContext = _viewModel;
+ }
+
+ protected override void OnContentRendered(EventArgs e)
+ {
+ base.OnContentRendered(e);
+
+ WinProc.Instance().PerformStto(_viewModel);
+ }
+
+ private void Window_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+ {
+ DragMove();
+ }
+
+ private void btnClose_Click(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+
+ private void ListView_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+ {
+ if (e.Action == NotifyCollectionChangedAction.Add)
+ {
+ // scroll the new item into view
+ lvImpedanceCheck.ScrollIntoView(e.NewItems[0]);
+ }
+ }
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/ViewModel/ImpedanceCheckWindowViewModel.cs b/GenericWpfApp/GenericWpfApp/ViewModel/ImpedanceCheckWindowViewModel.cs
new file mode 100644
index 0000000..f951217
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/ViewModel/ImpedanceCheckWindowViewModel.cs
@@ -0,0 +1,41 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using GenericWpfApp.Model;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+
+namespace GenericWpfApp.ViewModel
+{
+ public class ImpedanceCheckWindowViewModel : ObservableObject
+ {
+ public enum Images
+ {
+ PASS_CHECK,
+ FAIL_CHECK
+ }
+
+ public Dictionary _imageToResourcePathDict = new Dictionary()
+ {
+ {Images.PASS_CHECK, @"/Resources/Images/green-check-mark.png" },
+ {Images.FAIL_CHECK, @"/Resources/Images/red-cross-mark.png" }
+ };
+
+ #region Data Bindings
+ public ObservableCollection _listviewImpedanceDatatems { get; set; }
+
+ #endregion Data Bindings
+
+ public ImpedanceCheckWindowViewModel()
+ {
+ _listviewImpedanceDatatems = new ObservableCollection();
+ }
+
+ public void AddData(ImpedanceDataModel item)
+ {
+ App.Current.Dispatcher.Invoke((Action)delegate
+ {
+ _listviewImpedanceDatatems.Add(item);
+ });
+ }
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/ViewModel/MainWindowViewModel.cs b/GenericWpfApp/GenericWpfApp/ViewModel/MainWindowViewModel.cs
new file mode 100644
index 0000000..b879f21
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/ViewModel/MainWindowViewModel.cs
@@ -0,0 +1,67 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using GenericWpfApp.Model;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GenericWpfApp.ViewModel
+{
+ public partial class MainWindowViewModel : ObservableObject
+ {
+ public enum Images
+ {
+ LED_ON,
+ LED_OFF
+ }
+
+ public Dictionary _imageToResourcePathDict = new Dictionary()
+ {
+ {Images.LED_ON, @"/Resources/Images/green-led.png" },
+ {Images.LED_OFF, @"/Resources/Images/black-led.png" }
+ };
+
+ #region Data Bindings
+ public ObservableCollection _dataGridPowerDatatems { get; set; }
+
+ // 2-dimensional data array
+ // inner ObservableCollection<> is the columns
+ // outer ObservableCollection is the row
+ public ObservableCollection> _dataGridPassthroughDatatems { get; set; }
+
+ [ObservableProperty]
+ private string uutPowerLedImagePath;
+
+ [ObservableProperty]
+ private string tePowerLedImagePath;
+
+ #endregion Data Bindings
+
+ public MainWindowViewModel()
+ {
+ _dataGridPowerDatatems = new ObservableCollection();
+ _dataGridPassthroughDatatems = new ObservableCollection>();
+
+ UutPowerLedImagePath = _imageToResourcePathDict[Images.LED_OFF];
+ TePowerLedImagePath = _imageToResourcePathDict[Images.LED_ON];
+ }
+
+ public void AddPowerData(Dictionary powerModuleToPowerDataModelDict)
+ {
+ foreach (var item in powerModuleToPowerDataModelDict)
+ {
+ _dataGridPowerDatatems.Add(item.Value);
+ }
+ }
+
+ public void AddPassthroughData(Dictionary> rowNumberToPassthroughDataDict)
+ {
+ foreach (var item in rowNumberToPassthroughDataDict)
+ {
+ _dataGridPassthroughDatatems.Add(item.Value);
+ }
+ }
+ }
+}
diff --git a/GenericWpfApp/GenericWpfApp/WinProc.cs b/GenericWpfApp/GenericWpfApp/WinProc.cs
new file mode 100644
index 0000000..9671d1e
--- /dev/null
+++ b/GenericWpfApp/GenericWpfApp/WinProc.cs
@@ -0,0 +1,175 @@
+using GenericWpfApp.Model;
+using GenericWpfApp.View;
+using GenericWpfApp.ViewModel;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Threading;
+
+namespace GenericWpfApp
+{
+ class WinProc
+ {
+ private static WinProc _proc = null;
+ MainWindow _mainWindow;
+ private ImpedanceCheckWindowViewModel _impedanceCheckWindowViewModel;
+
+ private PassthroughData _passthroughData = new PassthroughData();
+
+
+ private Dictionary _powerModuleToPowerDataModelDict = new Dictionary();
+
+ public static WinProc Instance(MainWindow mainWindow = null)
+ {
+ if (_proc == null)
+ _proc = new WinProc(mainWindow);
+
+ return _proc;
+ }
+ private WinProc(MainWindow mainWindow)
+ {
+ _mainWindow = mainWindow;
+
+ _powerModuleToPowerDataModelDict["UUT_P20V"] = new PowerModuleDataModel();
+ _powerModuleToPowerDataModelDict["UUT_N20V"] = new PowerModuleDataModel();
+
+ _mainWindow._mainWindowViewModel.AddPowerData(_powerModuleToPowerDataModelDict);
+
+ _mainWindow._mainWindowViewModel.AddPassthroughData(_passthroughData.GetPassthroughDataModelDict());
+ }
+
+ public void PerformStto(ImpedanceCheckWindowViewModel impedanceCheckWindowViewModel)
+ {
+ _impedanceCheckWindowViewModel = impedanceCheckWindowViewModel;
+ Task.Factory.StartNew(() => PerformSttoTask());
+ }
+
+ private async void PerformSttoTask()
+ {
+ bool forceFail = false;
+ ImpedanceDataModel impedanceDataModel;
+
+ ImpedanceCheckWindowViewModel.Images passFailImage = ImpedanceCheckWindowViewModel.Images.PASS_CHECK;
+ int MAX_ITERATION = 15;
+ for (int i = 1; i <= MAX_ITERATION; i++)
+ {
+ impedanceDataModel = new ImpedanceDataModel();
+ if (i == MAX_ITERATION && forceFail)
+ passFailImage = ImpedanceCheckWindowViewModel.Images.FAIL_CHECK;
+
+ impedanceDataModel.PassFailImagePath = _impedanceCheckWindowViewModel._imageToResourcePathDict[passFailImage];
+ impedanceDataModel.Description = "J17_P5_J17_P7 Measured 5 Range [0,10]";
+
+ _impedanceCheckWindowViewModel.AddData(impedanceDataModel);
+
+ await Task.Delay(300);
+ }
+
+ if (forceFail)
+ {
+ App.Current.Dispatcher.Invoke((Action)delegate
+ {
+ _mainWindow._impedanceCheckWindow.btnClose.Visibility = Visibility.Visible;
+ });
+ }
+ else
+ {
+ App.Current.Dispatcher.Invoke((Action)delegate
+ {
+ _mainWindow._impedanceCheckWindow.Close();
+ });
+ }
+ }
+
+ public void StartPowerSupplyReadTask()
+ {
+ Task.Factory.StartNew(() => PowerSupplyReadTask());
+ }
+
+ private async void PowerSupplyReadTask()
+ {
+ //Debug.Write($"{System.Environment.CurrentManagedThreadId}");
+ Random rnd = new Random();
+ while (true)
+ {
+ rnd = new Random();
+
+ float num = 20.0f + GenerateRandomFraction();
+ _powerModuleToPowerDataModelDict["UUT_P20V"].ActualVoltage = num.ToString("0.00");
+ _powerModuleToPowerDataModelDict["UUT_P20V"].ExpectedVoltage = "20.0";
+ //Thread.Sleep(100);
+ await Task.Delay(100);
+ //Debug.WriteLine($"{System.Environment.CurrentManagedThreadId}");
+ num = 1.0f + GenerateRandomFraction();
+ _powerModuleToPowerDataModelDict["UUT_P20V"].ActualCurrent = num.ToString("0.00");
+ _powerModuleToPowerDataModelDict["UUT_P20V"].ExpectedCurrent = "1.0";
+ //Thread.Sleep(100);
+ await Task.Delay(100);
+ //Debug.WriteLine($"{System.Environment.CurrentManagedThreadId}");
+ num = 20.0f + GenerateRandomFraction();
+ _powerModuleToPowerDataModelDict["UUT_N20V"].ActualVoltage = num.ToString("0.00");
+ _powerModuleToPowerDataModelDict["UUT_N20V"].ExpectedVoltage = "20.0";
+ //Thread.Sleep(200);
+ await Task.Delay(200);
+ //Debug.WriteLine($"{System.Environment.CurrentManagedThreadId}");
+ _mainWindow._mainWindowViewModel.UutPowerLedImagePath = _mainWindow._mainWindowViewModel._imageToResourcePathDict[MainWindowViewModel.Images.LED_ON];
+
+ num = 5.0f + GenerateRandomFraction();
+ _powerModuleToPowerDataModelDict["UUT_N20V"].ActualCurrent = num.ToString("0.00");
+ _powerModuleToPowerDataModelDict["UUT_N20V"].ExpectedCurrent = "1.0";
+ //Thread.Sleep(100);
+ await Task.Delay(100);
+ //Debug.WriteLine($"{System.Environment.CurrentManagedThreadId}");
+ num = 70.0f + GenerateRandomFraction();
+ _passthroughData.SetValue(PassthroughData.Variables.VAR1, num.ToString("0.00"));
+
+ //Thread.Sleep(100);
+ await Task.Delay(100);
+ //Debug.WriteLine($"{System.Environment.CurrentManagedThreadId}");
+ num = 30.0f + GenerateRandomFraction();
+ _passthroughData.SetValue(PassthroughData.Variables.VAR2, num.ToString("0.00"));
+ //Thread.Sleep(200);
+ await Task.Delay(200);
+ //Debug.WriteLine($"{System.Environment.CurrentManagedThreadId}");
+ _mainWindow._mainWindowViewModel.UutPowerLedImagePath = _mainWindow._mainWindowViewModel._imageToResourcePathDict[MainWindowViewModel.Images.LED_OFF];
+ num = 40.0f + GenerateRandomFraction();
+ _passthroughData.SetValue(PassthroughData.Variables.VAR3, num.ToString("0.00"));
+ //Thread.Sleep(100);
+ await Task.Delay(100);
+ num = 50.0f + GenerateRandomFraction();
+ _passthroughData.SetValue(PassthroughData.Variables.VAR4, num.ToString("0.00"));
+ //Thread.Sleep(100);
+ await Task.Delay(100);
+ num = 60.0f + GenerateRandomFraction();
+ _passthroughData.SetValue(PassthroughData.Variables.VAR5, num.ToString("0.00"));
+ //Thread.Sleep(200);
+ await Task.Delay(200);
+ _mainWindow._mainWindowViewModel.UutPowerLedImagePath = _mainWindow._mainWindowViewModel._imageToResourcePathDict[MainWindowViewModel.Images.LED_ON];
+ num = 10.0f + GenerateRandomFraction();
+ _passthroughData.SetValue(PassthroughData.Variables.VAR6, num.ToString("0.00"));
+ //Thread.Sleep(1000);
+ await Task.Delay(1000);
+ _mainWindow._mainWindowViewModel.UutPowerLedImagePath = _mainWindow._mainWindowViewModel._imageToResourcePathDict[MainWindowViewModel.Images.LED_OFF];
+ }
+ }
+
+ static float GenerateRandomFraction()
+ {
+ Random rnd = new Random();
+ int randNum = 0;
+ const int minimum = 1;
+
+ randNum = rnd.Next(20);
+
+ if (randNum <= minimum)
+ {
+ randNum += minimum;
+ }
+
+ return (float)(1.0 / (float)randNum);
+ }
+ }
+}
diff --git a/GenericWpfApp/Nuget/NugetOrg/communitytoolkit.mvvm.8.3.2.nupkg b/GenericWpfApp/Nuget/NugetOrg/communitytoolkit.mvvm.8.3.2.nupkg
new file mode 100644
index 0000000..5e482ed
Binary files /dev/null and b/GenericWpfApp/Nuget/NugetOrg/communitytoolkit.mvvm.8.3.2.nupkg differ
diff --git a/GenericWpfApp/Nuget/NugetOrg/microsoft.bcl.asyncinterfaces.8.0.0.nupkg b/GenericWpfApp/Nuget/NugetOrg/microsoft.bcl.asyncinterfaces.8.0.0.nupkg
new file mode 100644
index 0000000..f707fc6
Binary files /dev/null and b/GenericWpfApp/Nuget/NugetOrg/microsoft.bcl.asyncinterfaces.8.0.0.nupkg differ
diff --git a/GenericWpfApp/Nuget/NugetOrg/system.buffers.4.5.1.nupkg b/GenericWpfApp/Nuget/NugetOrg/system.buffers.4.5.1.nupkg
new file mode 100644
index 0000000..f7ee6b2
Binary files /dev/null and b/GenericWpfApp/Nuget/NugetOrg/system.buffers.4.5.1.nupkg differ
diff --git a/GenericWpfApp/Nuget/NugetOrg/system.componentmodel.annotations.5.0.0.nupkg b/GenericWpfApp/Nuget/NugetOrg/system.componentmodel.annotations.5.0.0.nupkg
new file mode 100644
index 0000000..d318110
Binary files /dev/null and b/GenericWpfApp/Nuget/NugetOrg/system.componentmodel.annotations.5.0.0.nupkg differ
diff --git a/GenericWpfApp/Nuget/NugetOrg/system.memory.4.5.5.nupkg b/GenericWpfApp/Nuget/NugetOrg/system.memory.4.5.5.nupkg
new file mode 100644
index 0000000..9d654e2
Binary files /dev/null and b/GenericWpfApp/Nuget/NugetOrg/system.memory.4.5.5.nupkg differ
diff --git a/GenericWpfApp/Nuget/NugetOrg/system.numerics.vectors.4.5.0.nupkg b/GenericWpfApp/Nuget/NugetOrg/system.numerics.vectors.4.5.0.nupkg
new file mode 100644
index 0000000..0ef4637
Binary files /dev/null and b/GenericWpfApp/Nuget/NugetOrg/system.numerics.vectors.4.5.0.nupkg differ
diff --git a/GenericWpfApp/Nuget/NugetOrg/system.runtime.compilerservices.unsafe.6.0.0.nupkg b/GenericWpfApp/Nuget/NugetOrg/system.runtime.compilerservices.unsafe.6.0.0.nupkg
new file mode 100644
index 0000000..3052c31
Binary files /dev/null and b/GenericWpfApp/Nuget/NugetOrg/system.runtime.compilerservices.unsafe.6.0.0.nupkg differ
diff --git a/GenericWpfApp/Nuget/NugetOrg/system.threading.tasks.extensions.4.5.4.nupkg b/GenericWpfApp/Nuget/NugetOrg/system.threading.tasks.extensions.4.5.4.nupkg
new file mode 100644
index 0000000..a608bc5
Binary files /dev/null and b/GenericWpfApp/Nuget/NugetOrg/system.threading.tasks.extensions.4.5.4.nupkg differ
diff --git a/GenericWpfApp/Nuget/TSRealPackages/nlog.5.0.0.nupkg b/GenericWpfApp/Nuget/TSRealPackages/nlog.5.0.0.nupkg
new file mode 100644
index 0000000..1eb0d66
Binary files /dev/null and b/GenericWpfApp/Nuget/TSRealPackages/nlog.5.0.0.nupkg differ
diff --git a/GenericWpfApp/nuget.config b/GenericWpfApp/nuget.config
new file mode 100644
index 0000000..2e4fcab
--- /dev/null
+++ b/GenericWpfApp/nuget.config
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file