From 6ec68c6f499ece9777077b18ed3ac0df923674e7 Mon Sep 17 00:00:00 2001 From: Evgeny Redikultsev Date: Sat, 16 Nov 2024 22:34:34 +0500 Subject: [PATCH] Refactoring: add some button icons --- .../ForceCalculatorInputDataDTO.cs | 4 +- .../ForceCombinationByFactorDTO.cs | 13 +- .../DTOEntities/ForceCombinationListDTO.cs | 7 +- FieldVisualizer/Windows/WndFieldViewer.xaml | 2 +- .../UI/Resources/ButtonStyles.xaml | 106 +++++++ StructureHelper/StructureHelper.csproj.user | 6 + .../Cracks/CrackCalculatorInputDataView.xaml | 2 +- .../Cracks/CrackResultView.xaml | 2 +- .../Cracks/TupleCrackResultView.xaml | 2 +- .../InterpolateValuePointsLogic.cs | 2 +- .../ForcesResultsView.xaml | 114 +++++++- .../ForcesResultsViewModel.cs | 69 +++-- .../MainWindow/AnalysesManagerView.xaml | 21 +- .../Windows/UserControls/ButtonToolTipEh.xaml | 33 +++ .../UserControls/ButtonToolTipEh.xaml.cs | 71 +++++ .../Models/Forces/DesignForcePair.cs | 7 +- .../Models/Forces/ForceColumnProperty.cs | 25 ++ .../Models/Forces/ForceCombinationByFactor.cs | 98 +++++-- .../Models/Forces/ForceCombinationFromFile.cs | 34 +++ .../Models/Forces/ForceCombinationList.cs | 11 +- .../Models/Forces/ForceFileProperty.cs | 32 +++ .../Models/Forces/IForceAction.cs | 4 +- .../Models/Forces/IForceColumnProperty.cs | 28 ++ .../Forces/IForceCombinationByFactor.cs | 5 +- .../Forces/IForceCombinationFromFile.cs | 13 + .../Models/Forces/IForceFileProperty.cs | 27 ++ .../ForceColumnPropertyUpdateStrategy.cs | 23 ++ .../ForceCombinationFromFileUpdateStrategy.cs | 42 +++ .../Logics/ForceFilePropertyUpdateStrategy.cs | 41 +++ .../ByForces/ForceCalculatorInputData.cs | 2 +- .../Analyses/ByForces/ForceCalculatorLogic.cs | 9 +- .../Analyses/ByForces/ForceTupleCalculator.cs | 2 +- .../ByForces/IForceCalculatorInputData.cs | 20 +- .../ByForces/IForceCalculatorLogic.cs | 3 + .../ByForces/IForceTupleCalculator.cs | 6 + .../Analyses/ByForces/IForceTupleInputData.cs | 2 +- .../Analyses/Geometry/GeometryCalculator.cs | 9 +- .../Cracking/GetTupleInputDatasLogic.cs | 93 +++++-- .../Cracking/IGetTupleInputDatasLogic.cs | 9 +- ...etersLogic.cs => ForcesParametersLogic.cs} | 239 +--------------- .../NdmPrimitives/GeometryParametersLogic.cs | 262 ++++++++++++++++++ .../NdmPrimitives/IParametersLogic.cs | 9 + 42 files changed, 1140 insertions(+), 369 deletions(-) create mode 100644 StructureHelper/Windows/UserControls/ButtonToolTipEh.xaml create mode 100644 StructureHelper/Windows/UserControls/ButtonToolTipEh.xaml.cs create mode 100644 StructureHelperCommon/Models/Forces/ForceColumnProperty.cs create mode 100644 StructureHelperCommon/Models/Forces/ForceCombinationFromFile.cs create mode 100644 StructureHelperCommon/Models/Forces/ForceFileProperty.cs create mode 100644 StructureHelperCommon/Models/Forces/IForceColumnProperty.cs create mode 100644 StructureHelperCommon/Models/Forces/IForceCombinationFromFile.cs create mode 100644 StructureHelperCommon/Models/Forces/IForceFileProperty.cs create mode 100644 StructureHelperCommon/Models/Forces/Logics/ForceColumnPropertyUpdateStrategy.cs create mode 100644 StructureHelperCommon/Models/Forces/Logics/ForceCombinationFromFileUpdateStrategy.cs create mode 100644 StructureHelperCommon/Models/Forces/Logics/ForceFilePropertyUpdateStrategy.cs rename StructureHelperLogics/Services/NdmPrimitives/{TextParametersLogic.cs => ForcesParametersLogic.cs} (57%) create mode 100644 StructureHelperLogics/Services/NdmPrimitives/GeometryParametersLogic.cs create mode 100644 StructureHelperLogics/Services/NdmPrimitives/IParametersLogic.cs diff --git a/DataAccess/DTOs/DTOEntities/ForceCalculatorInputDataDTO.cs b/DataAccess/DTOs/DTOEntities/ForceCalculatorInputDataDTO.cs index 5b42c3d..5535a5e 100644 --- a/DataAccess/DTOs/DTOEntities/ForceCalculatorInputDataDTO.cs +++ b/DataAccess/DTOs/DTOEntities/ForceCalculatorInputDataDTO.cs @@ -30,8 +30,8 @@ namespace DataAccess.DTOs public IAccuracy Accuracy { get; set; } = new AccuracyDTO(); [JsonProperty("CompressedMember")] public ICompressedMember CompressedMember { get; set; } = new CompressedMemberDTO(); - [JsonIgnore] - public List ForceCombinationLists { get; set; } = new(); + //[JsonIgnore] + //public List ForceCombinationLists { get; set; } = new(); } } diff --git a/DataAccess/DTOs/DTOEntities/ForceCombinationByFactorDTO.cs b/DataAccess/DTOs/DTOEntities/ForceCombinationByFactorDTO.cs index 6133d75..35e2889 100644 --- a/DataAccess/DTOs/DTOEntities/ForceCombinationByFactorDTO.cs +++ b/DataAccess/DTOs/DTOEntities/ForceCombinationByFactorDTO.cs @@ -1,4 +1,5 @@ using Newtonsoft.Json; +using StructureHelperCommon.Infrastructures.Enums; using StructureHelperCommon.Models.Forces; using StructureHelperCommon.Models.Shapes; using System; @@ -15,6 +16,10 @@ namespace DataAccess.DTOs public Guid Id { get; set; } [JsonProperty("Name")] public string Name { get; set; } + [JsonProperty("LimitState")] + public LimitStates LimitState { get; set; } = LimitStates.SLS; + [JsonProperty("CalcTerm")] + public CalcTerms CalcTerm { get; set; } = CalcTerms.ShortTerm; [JsonProperty("FullSLSForces")] public IForceTuple FullSLSForces { get; set; } = new ForceTupleDTO(); [JsonProperty("ULSFactor")] @@ -26,13 +31,17 @@ namespace DataAccess.DTOs [JsonProperty("ForcePoint")] public IPoint2D ForcePoint { get; set; } = new Point2DDTO(); - public object Clone() { throw new NotImplementedException(); } - public IForceCombinationList GetCombinations() + public IForceCombinationList GetCombination() + { + throw new NotImplementedException(); + } + + public List GetCombinations() { throw new NotImplementedException(); } diff --git a/DataAccess/DTOs/DTOEntities/ForceCombinationListDTO.cs b/DataAccess/DTOs/DTOEntities/ForceCombinationListDTO.cs index 0db8327..b237519 100644 --- a/DataAccess/DTOs/DTOEntities/ForceCombinationListDTO.cs +++ b/DataAccess/DTOs/DTOEntities/ForceCombinationListDTO.cs @@ -27,7 +27,12 @@ namespace DataAccess.DTOs throw new NotImplementedException(); } - public IForceCombinationList GetCombinations() + public IForceCombinationList GetCombination() + { + throw new NotImplementedException(); + } + + public List GetCombinations() { throw new NotImplementedException(); } diff --git a/FieldVisualizer/Windows/WndFieldViewer.xaml b/FieldVisualizer/Windows/WndFieldViewer.xaml index 7a290d6..6582688 100644 --- a/FieldVisualizer/Windows/WndFieldViewer.xaml +++ b/FieldVisualizer/Windows/WndFieldViewer.xaml @@ -6,7 +6,7 @@ xmlns:FieldViewerControl="clr-namespace:FieldVisualizer.Windows.UserControls" xmlns:local="clr-namespace:FieldVisualizer.Windows" mc:Ignorable="d" - Title="FieldViewer" Height="800" Width="1200" MinHeight="400" MinWidth="800" MaxHeight="1000" MaxWidth="1500" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"> + Title="FieldViewer" Height="800" Width="1200" MinHeight="400" MinWidth="800" MaxHeight="1000" MaxWidth="1500" WindowStartupLocation="CenterScreen"> diff --git a/StructureHelper/Infrastructure/UI/Resources/ButtonStyles.xaml b/StructureHelper/Infrastructure/UI/Resources/ButtonStyles.xaml index 4a05ca2..c10ad2b 100644 --- a/StructureHelper/Infrastructure/UI/Resources/ButtonStyles.xaml +++ b/StructureHelper/Infrastructure/UI/Resources/ButtonStyles.xaml @@ -201,6 +201,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StructureHelper/StructureHelper.csproj.user b/StructureHelper/StructureHelper.csproj.user index 3b33780..1a3452d 100644 --- a/StructureHelper/StructureHelper.csproj.user +++ b/StructureHelper/StructureHelper.csproj.user @@ -78,6 +78,9 @@ Code + + Code + Code @@ -176,6 +179,9 @@ Designer + + Designer + Designer diff --git a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/CrackCalculatorInputDataView.xaml b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/CrackCalculatorInputDataView.xaml index d09396a..aaa5429 100644 --- a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/CrackCalculatorInputDataView.xaml +++ b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/CrackCalculatorInputDataView.xaml @@ -8,7 +8,7 @@ mc:Ignorable="d" Title="{Binding WindowTitle}" Height="390" Width="400" MinHeight="300" MinWidth="400" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" - Closing="Window_Closing" ShowInTaskbar="False" Icon="{Binding Mode=OneWay, Source={StaticResource CrackCalculator}}" + Closing="Window_Closing" Icon="{Binding Mode=OneWay, Source={StaticResource CrackCalculator}}" > diff --git a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/CrackResultView.xaml b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/CrackResultView.xaml index 549134c..15b7887 100644 --- a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/CrackResultView.xaml +++ b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/CrackResultView.xaml @@ -6,7 +6,7 @@ xmlns:local="clr-namespace:StructureHelper.Windows.CalculationWindows.CalculatorsViews" d:DataContext="{d:DesignInstance local:CrackResultViewModel}" mc:Ignorable="d" - Title="Result of calculations of crack" Height="450" Width="800" MinHeight="300" MinWidth="600" MaxHeight="800" MaxWidth="1000" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"> + Title="Result of calculations of crack" Height="450" Width="800" MinHeight="300" MinWidth="600" MaxHeight="800" MaxWidth="1000" WindowStartupLocation="CenterScreen"> diff --git a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/TupleCrackResultView.xaml b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/TupleCrackResultView.xaml index 94b8a54..ddd9a16 100644 --- a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/TupleCrackResultView.xaml +++ b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/Cracks/TupleCrackResultView.xaml @@ -6,7 +6,7 @@ xmlns:local="clr-namespace:StructureHelper.Windows.CalculationWindows.CalculatorsViews" d:DataContext="{d:DesignInstance local:TupleCrackResultViewModel}" mc:Ignorable="d" - Title="{Binding WindowTitle}" Height="450" Width="900" MinHeight="300" MinWidth="500" MaxHeight="1000" MaxWidth="1400" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"> + Title="{Binding WindowTitle}" Height="450" Width="900" MinHeight="300" MinWidth="500" MaxHeight="1000" MaxWidth="1400" WindowStartupLocation="CenterScreen"> diff --git a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForceResultLogic/InterpolateValuePointsLogic.cs b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForceResultLogic/InterpolateValuePointsLogic.cs index fc1d066..09ac179 100644 --- a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForceResultLogic/InterpolateValuePointsLogic.cs +++ b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForceResultLogic/InterpolateValuePointsLogic.cs @@ -21,7 +21,7 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalcu private ValuePointsInterpolateViewModel viewModel; private IResult result; private ValuePointsInterpolationInputData inputData; - public ForcesTupleResult SelectedResult { get; set; } + public IForcesTupleResult SelectedResult { get; set; } public IEnumerable NdmPrimitives { get; set; } public ForceCalculator ForceCalculator { get; set; } diff --git a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForcesResultsView.xaml b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForcesResultsView.xaml index c059250..567bd2d 100644 --- a/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForcesResultsView.xaml +++ b/StructureHelper/Windows/CalculationWindows/CalculatorsViews/ForceCalculatorViews/ForcesResultsView.xaml @@ -4,39 +4,109 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:StructureHelper.Windows.CalculationWindows.CalculatorsViews.ForceCalculatorViews" + xmlns:uc="clr-namespace:StructureHelper.Windows.UserControls" d:DataContext="{d:DesignInstance local:ForcesResultsViewModel}" mc:Ignorable="d" - Title="Calculation Results" Height="350" Width="850" MinHeight="300" MinWidth="400" WindowStartupLocation="CenterScreen" ShowInTaskbar="False"> + Title="Calculation Results" Height="450" Width="850" MinHeight="400" MinWidth="650" WindowStartupLocation="CenterScreen"> - + - - - - - + + + + + + + + + + +