diff --git a/Vts.Gui.Wpf.Test/Model/ComplexDataPointTests.cs b/Vts.Gui.Wpf.Test/Model/ComplexDataPointTests.cs index 72d3003..f7ef989 100644 --- a/Vts.Gui.Wpf.Test/Model/ComplexDataPointTests.cs +++ b/Vts.Gui.Wpf.Test/Model/ComplexDataPointTests.cs @@ -39,9 +39,9 @@ public void Verify_ComplexDataPoint_equals_methods_work_correctly() public void Verify_to_string_value() { var dataPoint = new ComplexDataPoint(0.1, new Complex(0.3, 0.1)); - var localizedString = $"{0.1.ToString(Thread.CurrentThread.CurrentCulture)}, (" + - $"{0.3.ToString(Thread.CurrentThread.CurrentCulture)}, " + - $"{0.1.ToString(Thread.CurrentThread.CurrentCulture)})"; + var localizedString = $"{0.1.ToString(Thread.CurrentThread.CurrentCulture)}, <" + + $"{0.3.ToString(Thread.CurrentThread.CurrentCulture)}; " + + $"{0.1.ToString(Thread.CurrentThread.CurrentCulture)}>"; Assert.AreEqual(localizedString, dataPoint.ToString()); } @@ -50,7 +50,7 @@ public void Verify_hash_code() { var dataPoint = new ComplexDataPoint(0.8, new Complex(0.2, 0.5)); var hashCode = dataPoint.GetHashCode(); - Assert.AreEqual(-1892473190, hashCode); + Assert.IsInstanceOf(hashCode); } [Test] @@ -59,7 +59,7 @@ public void Verify_hash_code_with_parameter() var dataPoint1 = new ComplexDataPoint(0.8, new Complex(0.2, 0.5)); var dataPoint2 = new ComplexDataPoint(0.8, new Complex(0.9, 0.5)); var hashCode = dataPoint1.GetHashCode(dataPoint2); - Assert.AreEqual(-1882801729, hashCode); + Assert.IsInstanceOf(hashCode); } [Test] diff --git a/Vts.Gui.Wpf.Test/Model/ComplexDerivativeDataPointTests.cs b/Vts.Gui.Wpf.Test/Model/ComplexDerivativeDataPointTests.cs index 47d96af..b27f6f1 100644 --- a/Vts.Gui.Wpf.Test/Model/ComplexDerivativeDataPointTests.cs +++ b/Vts.Gui.Wpf.Test/Model/ComplexDerivativeDataPointTests.cs @@ -62,9 +62,9 @@ public void Verify_to_string_value() new Complex(0.3, 0.1), new Complex(0.4, 0.5), ForwardAnalysisType.dRdMua); - var localizedString = $"{0.1.ToString(Thread.CurrentThread.CurrentCulture)}, (" + - $"{0.3.ToString(Thread.CurrentThread.CurrentCulture)}, " + - $"{0.1.ToString(Thread.CurrentThread.CurrentCulture)})"; + var localizedString = $"{0.1.ToString(Thread.CurrentThread.CurrentCulture)}, <" + + $"{0.3.ToString(Thread.CurrentThread.CurrentCulture)}; " + + $"{0.1.ToString(Thread.CurrentThread.CurrentCulture)}>"; Assert.AreEqual(localizedString, dataPoint.ToString()); } @@ -76,7 +76,7 @@ public void Verify_hash_code() new Complex(0.2, 0.5), new Complex(0.3, 0.4), ForwardAnalysisType.dRdMusp); - Assert.AreEqual(-1563642927, dataPoint.GetHashCode()); + Assert.IsInstanceOf(dataPoint.GetHashCode()); } [Test] @@ -94,7 +94,7 @@ public void Verify_hash_code_with_parameter() ForwardAnalysisType.dRdMusp); Assert.IsNotNull(dataPoint1); Assert.IsNotNull(dataPoint2); - Assert.AreEqual(867508351, dataPoint1.GetHashCode(dataPoint2)); + Assert.IsInstanceOf(dataPoint1.GetHashCode(dataPoint2)); } [Test] diff --git a/Vts.Gui.Wpf.Test/Vts.Gui.Wpf.Test.csproj b/Vts.Gui.Wpf.Test/Vts.Gui.Wpf.Test.csproj index f85462b..d21b18a 100644 --- a/Vts.Gui.Wpf.Test/Vts.Gui.Wpf.Test.csproj +++ b/Vts.Gui.Wpf.Test/Vts.Gui.Wpf.Test.csproj @@ -1,21 +1,17 @@ - - - net6.0-windows8.0 - false - Debug;Release;WhiteList - - - - - - - - - - - - - - + + net8.0-windows + false + Debug;Release + + + + + + + + + + + \ No newline at end of file diff --git a/Vts.Gui.Wpf.sln b/Vts.Gui.Wpf.sln index a70e9b6..d0d7ae4 100644 --- a/Vts.Gui.Wpf.sln +++ b/Vts.Gui.Wpf.sln @@ -63,14 +63,11 @@ Global {8EDF4429-251A-416D-BB68-93F227191BCF}.Release|Win32.Build.0 = Release|Any CPU {8EDF4429-251A-416D-BB68-93F227191BCF}.Release|x86.ActiveCfg = Release|Any CPU {8EDF4429-251A-416D-BB68-93F227191BCF}.Release|x86.Build.0 = Release|Any CPU - {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|Any CPU.ActiveCfg = WhiteList|Any CPU - {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|Any CPU.Build.0 = WhiteList|Any CPU - {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|Mixed Platforms.ActiveCfg = WhiteList|Any CPU - {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|Mixed Platforms.Build.0 = WhiteList|Any CPU - {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|Win32.ActiveCfg = WhiteList|Any CPU - {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|Win32.Build.0 = WhiteList|Any CPU - {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|x86.ActiveCfg = WhiteList|Any CPU - {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|x86.Build.0 = WhiteList|Any CPU + {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|Any CPU.ActiveCfg = Release|Any CPU + {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|Mixed Platforms.ActiveCfg = Release|Any CPU + {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|Mixed Platforms.Build.0 = Release|Any CPU + {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|Win32.ActiveCfg = Release|Any CPU + {8EDF4429-251A-416D-BB68-93F227191BCF}.WhiteList|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Vts.Gui.Wpf/ViewModel/Panels/ForwardSolverViewModel.cs b/Vts.Gui.Wpf/ViewModel/Panels/ForwardSolverViewModel.cs index b0bf2e1..a2f1cff 100644 --- a/Vts.Gui.Wpf/ViewModel/Panels/ForwardSolverViewModel.cs +++ b/Vts.Gui.Wpf/ViewModel/Panels/ForwardSolverViewModel.cs @@ -685,10 +685,10 @@ orderby GetParameterOrder(iv) select new KeyValuePair(iv, GetParameterValues(iv)); // OPs are always first in the list - return - new KeyValuePair(IndependentVariableAxis.Wavelength, opticalProperties) - .AsEnumerable() - .Concat(allParameters).ToDictionary(); + var returnValue = new KeyValuePair(IndependentVariableAxis.Wavelength, opticalProperties).AsEnumerable().Concat(allParameters); + + // convert the parameters to a dictionary for return + return EnumerableExtensions.ToDictionary(returnValue); } private object GetOpticalProperties() diff --git a/Vts.Gui.Wpf/ViewModel/Panels/InverseSolverViewModel.cs b/Vts.Gui.Wpf/ViewModel/Panels/InverseSolverViewModel.cs index b9c321a..95abd29 100644 --- a/Vts.Gui.Wpf/ViewModel/Panels/InverseSolverViewModel.cs +++ b/Vts.Gui.Wpf/ViewModel/Panels/InverseSolverViewModel.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; +using System.Runtime.InteropServices; using System.Text; using System.Windows.Input; using CommunityToolkit.Mvvm.Input; @@ -661,10 +662,11 @@ orderby GetParameterOrder(iv) select new KeyValuePair(iv, GetParameterValues(iv)); // OPs are always first in the list - return - new KeyValuePair(IndependentVariableAxis.Wavelength, opticalProperties) + var returnValue = new KeyValuePair(IndependentVariableAxis.Wavelength, opticalProperties) .AsEnumerable() - .Concat(allParameters).ToDictionary(); + .Concat(allParameters); + return + EnumerableExtensions.ToDictionary(returnValue); } /// diff --git a/Vts.Gui.Wpf/Vts.Gui.Wpf.csproj b/Vts.Gui.Wpf/Vts.Gui.Wpf.csproj index 2c26e5f..cd0eaca 100644 --- a/Vts.Gui.Wpf/Vts.Gui.Wpf.csproj +++ b/Vts.Gui.Wpf/Vts.Gui.Wpf.csproj @@ -1,87 +1,78 @@ - - - $(MSBuildToolsPath)\Microsoft.CSharp.targets - winexe - net6.0-windows8.0 - logo.ico - winexe - - The WPF GUI provides a simple interface to access some basic functionality of the Virtual Tissue Simulator. - Copyright © 2024 - logo.ico - readme.md - https://github.com/VirtualPhotonics/Vts.Gui.Wpf - git - 4.4.0.0 - 4.4.0.0 - AnyCPU - Debug;Release;WhiteList - True - True - False - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - True - True - Resources.resx - - - True - True - Settings.settings - - - True - \ - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - True - Strings.resx - - - - - PublicResXFileCodeGenerator - Strings.Designer.cs - Designer - - - - - - - - - - True - \ - - - - - - - - - - - - - - - - - + + $(MSBuildToolsPath)\Microsoft.CSharp.targets + winexe + net8.0-windows + logo.ico + winexe + + The WPF GUI provides a simple interface to access some basic functionality of the Virtual Tissue Simulator. + Copyright © 2024 + logo.ico + readme.md + https://github.com/VirtualPhotonics/Vts.Gui.Wpf + git + 5.0.0.0 + 5.0.0.0 + AnyCPU + Debug;Release;WhiteList + True + True + False + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + True + True + Resources.resx + + + True + True + Settings.settings + + + True + \ + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Strings.resx + + + + PublicResXFileCodeGenerator + Strings.Designer.cs + Designer + + + + + + + True + \ + + + + + + + + + + + + + + \ No newline at end of file