diff --git a/App.config b/App.config index d089989..69b16fd 100644 --- a/App.config +++ b/App.config @@ -1,7 +1,7 @@ - + diff --git a/FieldVisualizer/FieldVisualizer.csproj b/FieldVisualizer/FieldVisualizer.csproj index f8cca6d..018e535 100644 --- a/FieldVisualizer/FieldVisualizer.csproj +++ b/FieldVisualizer/FieldVisualizer.csproj @@ -1,7 +1,7 @@ - net48 + net472 true Library diff --git a/FieldVisualizer/ViewModels/FieldViewerViewModels/FieldViewerViewModel.cs b/FieldVisualizer/ViewModels/FieldViewerViewModels/FieldViewerViewModel.cs index 0e588a1..a4a5efe 100644 --- a/FieldVisualizer/ViewModels/FieldViewerViewModels/FieldViewerViewModel.cs +++ b/FieldVisualizer/ViewModels/FieldViewerViewModels/FieldViewerViewModel.cs @@ -32,6 +32,18 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels public ICommand ZoomOutCommand { get; } public ICommand ChangeColorMapCommand { get; } public ICommand SetUserColorsCommand { get; } + public ICommand SetCrossLineCommand + { + get + { + if (setCrossLineCommand == null) + { + setCrossLineCommand = new RelayCommand(SetCrossLine); + } + + return setCrossLineCommand; + } + } public IPrimitiveSet PrimitiveSet { get @@ -110,17 +122,19 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels } } } - public double SumTotal { get; private set;} public double SumNeg { get; private set; } public double SumPos { get; private set; } - public Viewbox WorkPlaneBox { get; set; } public VerticalLegend Legend { get; set; } public Canvas WorkPlaneCanvas { get; set; } - public double ScrolWidth { get; set; } public double ScrolHeight { get; set; } + public double CrossLineX { get => crossLineX; set => SetProperty(ref crossLineX, value); } + public double CrossLineY { get => crossLineY; set => SetProperty(ref crossLineY, value); } + + public double SumAboveLine { get => sumAboveLine; set => SetProperty(ref sumAboveLine, value); } + public double SumUnderLine { get => sumUnderLine; set => SetProperty(ref sumUnderLine, value); } public string Error { get; } public string this[string columnName] @@ -132,6 +146,7 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels } } + private ICommand setCrossLineCommand; private IPrimitiveSet primitiveSet; private double dX, dY; private ColorMapsTypes _ColorMapType; @@ -141,6 +156,10 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels private IEnumerable _ValueColorRanges; private bool setMinValue; private bool setMaxValue; + private double crossLineX; + private double crossLineY; + private double sumAboveLine; + private double sumUnderLine; const int RangeNumber = 16; public FieldViewerViewModel() @@ -167,6 +186,12 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels Legend.Refresh(); } } + public void Refresh() + { + SetMinValue = false; + SetMaxValue = false; + ColorRefresh(); + } private void ProcessPrimitives() { WorkPlaneCanvas.Children.Clear(); @@ -273,41 +298,11 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels _ValueRanges = ValueRangeOperations.DivideValueRange(valueRange, RangeNumber); _ValueColorRanges = ColorOperations.GetValueColorRanges(valueRange, _ValueRanges, _ColorMap); } - - public void Refresh() - { - SetMinValue = false; - SetMaxValue = false; - ColorRefresh(); - } - - private double crossLineX; - private double crossLineY; - - public double CrossLineX { get => crossLineX; set => SetProperty(ref crossLineX, value); } - public double CrossLineY { get => crossLineY; set => SetProperty(ref crossLineY, value); } - - private ICommand setCrossLineCommand; - - public ICommand SetCrossLineCommand - { - get - { - if (setCrossLineCommand == null) - { - setCrossLineCommand = new RelayCommand(SetCrossLine); - } - - return setCrossLineCommand; - } - } - private void SetCrossLine(object commandParameter) { AddCrossLine(); AddSummaryInfoCrossLine(); } - private void AddCrossLine() { double width = WorkPlaneCanvas.ActualWidth; @@ -341,13 +336,6 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels line.StrokeThickness = (width + heigth) / 100; WorkPlaneCanvas.Children.Add(line); } - - private double sumAboveLine; - private double sumUnderLine; - - public double SumAboveLine { get => sumAboveLine; set => SetProperty(ref sumAboveLine, value); } - public double SumUnderLine { get => sumUnderLine; set => SetProperty(ref sumUnderLine, value); } - private double GetPointOfCrossLine(double x) { double y; @@ -361,7 +349,6 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels } return y; } - private void AddSummaryInfoCrossLine() { SumAboveLine = primitiveSet is null ? 0 : primitiveSet.ValuePrimitives.Where(x=>x.CenterY >= GetPointOfCrossLine(x.CenterX)).Sum(x => x.Value); diff --git a/FiledVisualzerDemo/App.config b/FiledVisualzerDemo/App.config index 193aecc..ecdcf8a 100644 --- a/FiledVisualzerDemo/App.config +++ b/FiledVisualzerDemo/App.config @@ -1,6 +1,6 @@ - + - + - \ No newline at end of file + diff --git a/FiledVisualzerDemo/FiledVisualzerDemo.csproj b/FiledVisualzerDemo/FieldVisualzerDemo.csproj similarity index 96% rename from FiledVisualzerDemo/FiledVisualzerDemo.csproj rename to FiledVisualzerDemo/FieldVisualzerDemo.csproj index 8ca95b2..e7df97a 100644 --- a/FiledVisualzerDemo/FiledVisualzerDemo.csproj +++ b/FiledVisualzerDemo/FieldVisualzerDemo.csproj @@ -8,10 +8,11 @@ WinExe FiledVisualzerDemo FiledVisualzerDemo - v4.8 + v4.7.2 512 true true + AnyCPU @@ -65,6 +66,7 @@ True Resources.resx + True SettingsSingleFileGenerator diff --git a/FiledVisualzerDemo/FiledVisualzerDemo_old.csproj b/FiledVisualzerDemo/FiledVisualzerDemo_old.csproj new file mode 100644 index 0000000..14cbccd --- /dev/null +++ b/FiledVisualzerDemo/FiledVisualzerDemo_old.csproj @@ -0,0 +1,118 @@ + + + + + Debug + AnyCPU + {C92A5F2E-567B-48C9-A524-5740DB03509D} + WinExe + FiledVisualzerDemo + FiledVisualzerDemo + v4.8 + 512 + false + true + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + DemoForm.cs + + + + + DemoForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {87064b50-3b7c-4a91-af4a-941c6f95d997} + FieldVisualizer + + + + + False + Microsoft .NET Framework 4.8 %28x86 и x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + \ No newline at end of file diff --git a/FiledVisualzerDemo/Properties/Resources.Designer.cs b/FiledVisualzerDemo/Properties/Resources.Designer.cs index d14e061..ee39bc7 100644 --- a/FiledVisualzerDemo/Properties/Resources.Designer.cs +++ b/FiledVisualzerDemo/Properties/Resources.Designer.cs @@ -1,69 +1,61 @@ //------------------------------------------------------------------------------ // -// Этот код создан программным средством. -// Версия среды выполнения: 4.0.30319.42000 +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 // -// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если -// код создан повторно. +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. // //------------------------------------------------------------------------------ -namespace FiledVisualzerDemo.Properties -{ - - +namespace FiledVisualzerDemo.Properties { + using System; + + /// - /// Класс ресурсов со строгим типом для поиска локализованных строк и пр. + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. /// - // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder - // класс с помощью таких средств, как ResGen или Visual Studio. - // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen - // с параметром /str или заново постройте свой VS-проект. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [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 - { - + 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() - { + internal Resources() { } - + /// - /// Возврат кэшированного экземпляра ResourceManager, используемого этим классом. + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FiledVisualzerDemo.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// - /// Переопределяет свойство CurrentUICulture текущего потока для всех - /// подстановки ресурсов с помощью этого класса ресурсов со строгим типом. + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/FiledVisualzerDemo/Properties/Settings.Designer.cs b/FiledVisualzerDemo/Properties/Settings.Designer.cs index 28cf90c..8365dff 100644 --- a/FiledVisualzerDemo/Properties/Settings.Designer.cs +++ b/FiledVisualzerDemo/Properties/Settings.Designer.cs @@ -1,28 +1,24 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. // //------------------------------------------------------------------------------ -namespace FiledVisualzerDemo.Properties -{ - - +namespace FiledVisualzerDemo.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.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 - { + + public static Settings Default { + get { return defaultInstance; } } diff --git a/Libraries/LoaderCalculator.dll b/Libraries/LoaderCalculator.dll index c601fac..75e5c75 100644 Binary files a/Libraries/LoaderCalculator.dll and b/Libraries/LoaderCalculator.dll differ diff --git a/Services/ResultViewers/ResultFuncFactory.cs b/Services/ResultViewers/ResultFuncFactory.cs index 317e1bc..5d10202 100644 --- a/Services/ResultViewers/ResultFuncFactory.cs +++ b/Services/ResultViewers/ResultFuncFactory.cs @@ -18,6 +18,8 @@ namespace StructureHelper.Services.ResultViewers resultFuncs.Add(new ResultFunc() { Name = "Elastic Strain", ResultFunction = stressLogic.GetElasticStrain }); resultFuncs.Add(new ResultFunc() { Name = "Plastic Strain", ResultFunction = stressLogic.GetPlasticStrain }); resultFuncs.Add(new ResultFunc() { Name = "Stress", ResultFunction = stressLogic.GetStress }); + resultFuncs.Add(new ResultFunc() { Name = "Secant modulus", ResultFunction = stressLogic.GetSecantModulus }); + resultFuncs.Add(new ResultFunc() { Name = "Modulus degradation", ResultFunction = stressLogic.GetModulusDegradation }); resultFuncs.Add(new ResultFunc() { Name = "Force", ResultFunction = stressLogic.GetForce }); resultFuncs.Add(new ResultFunc() { Name = "Moment X", ResultFunction = stressLogic.GetMomentX }); resultFuncs.Add(new ResultFunc() { Name = "Moment Y", ResultFunction = stressLogic.GetMomentY }); diff --git a/StructureHelper.csproj b/StructureHelper.csproj index 6030dd7..ec43f71 100644 --- a/StructureHelper.csproj +++ b/StructureHelper.csproj @@ -8,7 +8,7 @@ WinExe StructureHelper StructureHelper - v4.8 + v4.7.2 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 @@ -43,35 +43,41 @@ False Libraries\LoaderCalculator.dll - - packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + True packages\System.Windows.Interactivity.WPF.2.0.20525\lib\net40\Microsoft.Expression.Interactions.dll - - packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + + packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + True packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll - - packages\System.Diagnostics.DiagnosticSource.4.7.1\lib\net46\System.Diagnostics.DiagnosticSource.dll + + packages\System.Diagnostics.DiagnosticSource.6.0.0\lib\net461\System.Diagnostics.DiagnosticSource.dll + True - - packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + packages\System.Memory.4.5.5\lib\net461\System.Memory.dll + True packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + True - - packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll + + packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + True diff --git a/StructureHelper.sln b/StructureHelper.sln index c6db78e..9096489 100644 --- a/StructureHelper.sln +++ b/StructureHelper.sln @@ -16,7 +16,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StructureHelperCommon", "St EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FieldVisualizer", "FieldVisualizer\FieldVisualizer.csproj", "{87064B50-3B7C-4A91-AF4A-941C6F95D997}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiledVisualzerDemo", "FiledVisualzerDemo\FiledVisualzerDemo.csproj", "{C92A5F2E-567B-48C9-A524-5740DB03509D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FieldVisualzerDemo", "FiledVisualzerDemo\FieldVisualzerDemo.csproj", "{C92A5F2E-567B-48C9-A524-5740DB03509D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/StructureHelperCommon/StructureHelperCommon.csproj b/StructureHelperCommon/StructureHelperCommon.csproj index 568d6ad..fcc0973 100644 --- a/StructureHelperCommon/StructureHelperCommon.csproj +++ b/StructureHelperCommon/StructureHelperCommon.csproj @@ -9,7 +9,7 @@ Properties StructureHelperCommon StructureHelperCommon - v4.8 + v4.7.2 512 true diff --git a/StructureHelperTests/StructureHelperTests.csproj b/StructureHelperTests/StructureHelperTests.csproj index 641ea4e..9b42d11 100644 --- a/StructureHelperTests/StructureHelperTests.csproj +++ b/StructureHelperTests/StructureHelperTests.csproj @@ -10,7 +10,7 @@ Properties StructureHelperTests StructureHelperTests - v4.8 + v4.7.2 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15.0 @@ -52,18 +52,21 @@ + - ..\packages\Castle.Core.5.0.0\lib\net462\Castle.Core.dll + ..\packages\Castle.Core.5.1.0\lib\net462\Castle.Core.dll + True ..\Libraries\LoaderCalculator.dll True - ..\packages\Moq.4.18.1\lib\net462\Moq.dll + ..\packages\Moq.4.18.2\lib\net462\Moq.dll + True ..\packages\NUnit.3.13.3\lib\net45\nunit.framework.dll @@ -72,8 +75,9 @@ - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + True ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll diff --git a/StructureHelperTests/app.config b/StructureHelperTests/app.config new file mode 100644 index 0000000..0075fb7 --- /dev/null +++ b/StructureHelperTests/app.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/StructureHelperTests/packages.config b/StructureHelperTests/packages.config index e3e465e..7c07542 100644 --- a/StructureHelperTests/packages.config +++ b/StructureHelperTests/packages.config @@ -1,9 +1,9 @@  - - + + - + \ No newline at end of file diff --git a/Windows/MainWindow/MainView.xaml b/Windows/MainWindow/MainView.xaml index f7e3644..197c77c 100644 --- a/Windows/MainWindow/MainView.xaml +++ b/Windows/MainWindow/MainView.xaml @@ -45,64 +45,81 @@