Material diagram window was changed

This commit is contained in:
Evgeny Redikultsev
2023-11-20 21:54:19 +05:00
parent 68b03bdf01
commit 4a8cf2d42a
27 changed files with 105 additions and 103 deletions

View File

@@ -17,6 +17,7 @@
<ResourceDictionary Source="Infrastructure/UI/Resources/ITemEditPanels.xaml"/> <ResourceDictionary Source="Infrastructure/UI/Resources/ITemEditPanels.xaml"/>
<ResourceDictionary Source="Infrastructure/UI/Resources/ForceTemplates.xaml"/> <ResourceDictionary Source="Infrastructure/UI/Resources/ForceTemplates.xaml"/>
<ResourceDictionary Source="Infrastructure/UI/Resources/IconDictionary.xaml"/> <ResourceDictionary Source="Infrastructure/UI/Resources/IconDictionary.xaml"/>
<ResourceDictionary Source="Infrastructure/UI/Resources/GraphsTemplates.xaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

View File

@@ -0,0 +1,19 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DataTemplate x:Key="LineVisualProperties">
<GroupBox Header="Line properties">
<StackPanel>
<TextBlock Text="Line smoothness" Margin="0,5,0,5"/>
<StackPanel Orientation="Horizontal">
<Slider x:Name="slider" Width="195" Minimum="0" Maximum="{Binding MaxLineSmoothness}" Value="{Binding LineSmoothness}"/>
<TextBox Width="40" Text="{Binding LineSmoothness,Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
</StackPanel>
<TextBlock Text="Stroke thickness" Margin="0,5,0,5"/>
<StackPanel Orientation="Horizontal">
<Slider x:Name="StrokeSlider" Width="195" Minimum="0" Maximum="{Binding MaxStrokeSize}" Value="{Binding StrokeSize}"/>
<TextBox Width="40" Text="{Binding StrokeSize,Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
</StackPanel>
</StackPanel>
</GroupBox>
</DataTemplate>
</ResourceDictionary>

View File

@@ -82,6 +82,7 @@
<Folder Include="Infrastructure\UI\DataContexts\Logics\" /> <Folder Include="Infrastructure\UI\DataContexts\Logics\" />
<Folder Include="Resources\" /> <Folder Include="Resources\" />
<Folder Include="Windows\UserControls\MultiplyTuples\" /> <Folder Include="Windows\UserControls\MultiplyTuples\" />
<Folder Include="Windows\ViewModels\Graphs\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -33,7 +33,7 @@
<Compile Update="Windows\MainWindow\Materials\HeadMaterialView.xaml.cs"> <Compile Update="Windows\MainWindow\Materials\HeadMaterialView.xaml.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Update="Windows\MainWindow\Materials\MaterialDiagramView.xaml.cs"> <Compile Update="Windows\Graphs\MaterialDiagramView.xaml.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Update="Windows\PrimitiveTemplates\RCs\Beams\CircleView.xaml.cs"> <Compile Update="Windows\PrimitiveTemplates\RCs\Beams\CircleView.xaml.cs">
@@ -47,6 +47,9 @@
<Page Update="Infrastructure\UI\Resources\ForceTemplates.xaml"> <Page Update="Infrastructure\UI\Resources\ForceTemplates.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Update="Infrastructure\UI\Resources\GraphsTemplates.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Infrastructure\UI\Resources\IconDictionary.xaml"> <Page Update="Infrastructure\UI\Resources\IconDictionary.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
@@ -77,7 +80,7 @@
<Page Update="Windows\MainWindow\Materials\HeadMaterialView.xaml"> <Page Update="Windows\MainWindow\Materials\HeadMaterialView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Update="Windows\MainWindow\Materials\MaterialDiagramView.xaml"> <Page Update="Windows\Graphs\MaterialDiagramView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Update="Windows\PrimitiveTemplates\RCs\Beams\CircleView.xaml"> <Page Update="Windows\PrimitiveTemplates\RCs\Beams\CircleView.xaml">

View File

@@ -3,12 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:local="clr-namespace:StructureHelper.Windows.Graphs" xmlns:local="clr-namespace:StructureHelper.Windows.Graphs"
xmlns:vm="clr-namespace:StructureHelper.Windows.ViewModels.Graphs" xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
d:DataContext="{d:DesignInstance vm:GraphViewModel}" d:DataContext="{d:DesignInstance local:GraphViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
Title="Graph" Height="450" Width="800" MinHeight="300" MinWidth="400" WindowStartupLocation="CenterScreen"> Title="Graph" Height="450" Width="800" MinHeight="400" MinWidth="600" WindowStartupLocation="CenterScreen">
<DockPanel> <DockPanel>
<!--<ToolBarTray DockPanel.Dock="Top"> <!--<ToolBarTray DockPanel.Dock="Top">
<ToolBar> <ToolBar>
@@ -27,8 +26,13 @@
<RowDefinition/> <RowDefinition/>
<RowDefinition Height="40"/> <RowDefinition Height="40"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel> <Grid>
<GroupBox Header="X-axis values"> <Grid.RowDefinitions>
<RowDefinition Height="70"/>
<RowDefinition/>
<RowDefinition Height="120"/>
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Header="X-axis values">
<StackPanel> <StackPanel>
<ComboBox ItemsSource="{Binding XItems.Collection}" SelectedItem="{Binding XItems.SelectedItem}"> <ComboBox ItemsSource="{Binding XItems.Collection}" SelectedItem="{Binding XItems.SelectedItem}">
<ComboBox.ItemTemplate> <ComboBox.ItemTemplate>
@@ -52,28 +56,18 @@
</StackPanel> </StackPanel>
</GroupBox> </GroupBox>
<GroupBox Header="Y-axis values"> <GroupBox Grid.Row="1" Header="Y-axis values">
<StackPanel> <Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<ContentControl ContentTemplate="{StaticResource ResourceKey=SelectItems}" Content="{Binding YItems}"/> <ContentControl ContentTemplate="{StaticResource ResourceKey=SelectItems}" Content="{Binding YItems}"/>
<CheckBox Margin="5" Content="Invert Values" IsChecked="{Binding InvertYValues}"/> <CheckBox Grid.Row="1" Margin="5" Content="Invert Values" IsChecked="{Binding InvertYValues}"/>
</StackPanel> </Grid>
</GroupBox> </GroupBox>
<GroupBox Header="Line properties" DataContext="{Binding VisualProps}"> <ContentControl Grid.Row="2" ContentTemplate="{StaticResource ResourceKey=LineVisualProperties}" Content="{Binding VisualProps}"/>
<StackPanel> </Grid>
<TextBlock Text="Line smoothness" Margin="0,5,0,5"/>
<StackPanel Orientation="Horizontal">
<Slider x:Name="slider" Width="195" Minimum="0" Maximum="{Binding MaxLineSmoothness}" Value="{Binding LineSmoothness}"/>
<TextBox Width="40" Text="{Binding LineSmoothness,Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
</StackPanel>
<TextBlock Text="Stroke thickness" Margin="0,5,0,5"/>
<StackPanel Orientation="Horizontal">
<Slider x:Name="StrokeSlider" Width="195" Minimum="0" Maximum="{Binding MaxStrokeSize}" Value="{Binding StrokeSize}"/>
<TextBox Width="40" Text="{Binding StrokeSize,Converter={StaticResource PlainDouble}, ValidatesOnDataErrors=True}"/>
</StackPanel>
</StackPanel>
</GroupBox>
</StackPanel>
<StackPanel Grid.Row="1"> <StackPanel Grid.Row="1">
<Button Margin="3" Content="Draw Lines" ToolTip="Draw Lines" Command="{Binding RedrawLinesCommand}"/> <Button Margin="3" Content="Draw Lines" ToolTip="Draw Lines" Command="{Binding RedrawLinesCommand}"/>
</StackPanel> </StackPanel>

View File

@@ -1,5 +1,4 @@
using LiveCharts.Wpf; using LiveCharts.Wpf;
using StructureHelper.Windows.ViewModels.Graphs;
using StructureHelperCommon.Models.Parameters; using StructureHelperCommon.Models.Parameters;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

View File

@@ -1,10 +1,9 @@
using LiveCharts; using LiveCharts;
using LiveCharts.Configurations; using LiveCharts.Configurations;
using LiveCharts.Definitions.Charts;
using LiveCharts.Wpf; using LiveCharts.Wpf;
using LiveCharts.Wpf.Charts.Base;
using StructureHelper.Infrastructure; using StructureHelper.Infrastructure;
using StructureHelper.Services.Exports; using StructureHelper.Services.Exports;
using StructureHelper.Windows.ViewModels;
using StructureHelperCommon.Models.Parameters; using StructureHelperCommon.Models.Parameters;
using StructureHelperCommon.Models.Shapes; using StructureHelperCommon.Models.Shapes;
using StructureHelperCommon.Services.ColorServices; using StructureHelperCommon.Services.ColorServices;
@@ -12,15 +11,13 @@ using StructureHelperLogics.NdmCalculations.Analyses;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.IO;
using System.Linq; using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
namespace StructureHelper.Windows.ViewModels.Graphs namespace StructureHelper.Windows.Graphs
{ {
public class GraphViewModel : ViewModelBase public class GraphViewModel : ViewModelBase
{ {
@@ -142,7 +139,7 @@ namespace StructureHelper.Windows.ViewModels.Graphs
} }
return items; return items;
} }
private void DrawLines() private void DrawLines()
{ {
if (XItems.SelectedItem is null || YItems.SelectedCount == 0) return; if (XItems.SelectedItem is null || YItems.SelectedCount == 0) return;
@@ -180,11 +177,11 @@ namespace StructureHelper.Windows.ViewModels.Graphs
var chartValues = new ChartValues<Point2D>(); var chartValues = new ChartValues<Point2D>();
for (int i = 0; i < yValues.Count(); i++) for (int i = 0; i < yValues.Count(); i++)
{ {
double diagramValue = yValues[i] * yFactor; double diagramValue = yValues[i] * yFactor;
var x = xValues[i] * xFactor; var x = xValues[i] * xFactor;
var y = yValues[i] * yFactor; var y = yValues[i] * yFactor;
var point = new Point2D() { X = x, Y = y}; var point = new Point2D() { X = x, Y = y };
chartValues.Add(point); chartValues.Add(point);
labels.Add(x); labels.Add(x);
localLabels.Add(x); localLabels.Add(x);

View File

@@ -1,14 +1,10 @@
using StructureHelper.Infrastructure; using StructureHelper.Infrastructure;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelper.Windows.ViewModels.Graphs namespace StructureHelper.Windows.Graphs
{ {
public class GraphVisualProps : ViewModelBase public class GraphVisualProps : ViewModelBase
{ {
private double lineSmoothness; private double lineSmoothness;
private double strokeSize; private double strokeSize;
@@ -38,7 +34,7 @@ namespace StructureHelper.Windows.ViewModels.Graphs
} }
} }
public double MaxLineSmoothness { get;} public double MaxLineSmoothness { get; }
public double MaxStrokeSize { get; } public double MaxStrokeSize { get; }
public GraphVisualProps() public GraphVisualProps()

View File

@@ -3,10 +3,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:StructureHelper.Windows.MainWindow.Materials" xmlns:local="clr-namespace:StructureHelper.Windows.Graphs"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
xmlns:vm="clr-namespace:StructureHelper.Windows.ViewModels.Materials" d:DataContext="{d:DesignInstance local:MaterialDiagramViewModel}"
d:DataContext="{d:DesignInstance vm:MaterialDiagramViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
Title="Material Diagram" Height="450" Width="800" WindowStartupLocation="CenterScreen"> Title="Material Diagram" Height="450" Width="800" WindowStartupLocation="CenterScreen">
<Grid> <Grid>
@@ -17,6 +16,7 @@
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition/> <RowDefinition/>
<RowDefinition Height="120"/>
<RowDefinition Height="30"/> <RowDefinition Height="30"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer VerticalScrollBarVisibility="Auto">
@@ -52,9 +52,12 @@
</Grid> </Grid>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
<Button Grid.Row="1" Margin="3" Content="Draw Lines" ToolTip="Draw lines" Command="{Binding RedrawLinesCommand}"/> <ContentControl Grid.Row="1" ContentTemplate="{StaticResource ResourceKey=LineVisualProperties}" Content="{Binding VisualProps}"/>
<StackPanel Grid.Row="2" Orientation="Horizontal">
<Button Margin="3" Content="Draw Lines" ToolTip="Draw lines" Command="{Binding RedrawLinesCommand}"/>
</StackPanel>
</Grid> </Grid>
<lvc:CartesianChart Grid.Column="1" Series="{Binding SeriesCollection}" LegendLocation="Bottom" > <lvc:CartesianChart Grid.Column="1" Series="{Binding SeriesCollection}" LegendLocation="Bottom" Zoom="Xy">
<lvc:CartesianChart.AxisY> <lvc:CartesianChart.AxisY>
<lvc:Axis Title="Stress"></lvc:Axis> <lvc:Axis Title="Stress"></lvc:Axis>
</lvc:CartesianChart.AxisY> </lvc:CartesianChart.AxisY>

View File

@@ -14,7 +14,7 @@ using System.Windows.Shapes;
using LiveCharts; using LiveCharts;
using LiveCharts.Wpf; using LiveCharts.Wpf;
using StructureHelper.Models.Materials; using StructureHelper.Models.Materials;
using StructureHelper.Windows.ViewModels.Materials; using StructureHelper.Windows.Graphs;
using StructureHelperLogics.Models.Materials; using StructureHelperLogics.Models.Materials;
namespace StructureHelper.Windows.MainWindow.Materials namespace StructureHelper.Windows.MainWindow.Materials

View File

@@ -3,19 +3,15 @@ using LiveCharts.Wpf;
using StructureHelper.Infrastructure; using StructureHelper.Infrastructure;
using StructureHelper.Infrastructure.UI.Converters.Units; using StructureHelper.Infrastructure.UI.Converters.Units;
using StructureHelper.Models.Materials; using StructureHelper.Models.Materials;
using StructureHelperCommon.Infrastructures.Enums; using StructureHelper.Windows.ViewModels;
using StructureHelperCommon.Infrastructures.Settings; using StructureHelperCommon.Infrastructures.Settings;
using StructureHelperLogics.Models.Materials;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media; using System.Windows.Media;
namespace StructureHelper.Windows.ViewModels.Materials namespace StructureHelper.Windows.Graphs
{ {
public class MaterialDiagramViewModel : ViewModelBase public class MaterialDiagramViewModel : ViewModelBase
{ {
@@ -27,6 +23,7 @@ namespace StructureHelper.Windows.ViewModels.Materials
bool positiveInTension; bool positiveInTension;
public string MaterialName => material.Name; public string MaterialName => material.Name;
public GraphVisualProps VisualProps { get; }
public double MinValue public double MinValue
{ {
get => minValue; get => minValue;
@@ -84,9 +81,9 @@ namespace StructureHelper.Windows.ViewModels.Materials
public MaterialDiagramViewModel(IEnumerable<IHeadMaterial> headMaterials, IHeadMaterial material) public MaterialDiagramViewModel(IEnumerable<IHeadMaterial> headMaterials, IHeadMaterial material)
{ {
MaterialsModel = new SelectItemsViewModel<IHeadMaterial>(headMaterials) { ShowButtons = true}; MaterialsModel = new SelectItemsViewModel<IHeadMaterial>(headMaterials) { ShowButtons = true };
LimitStatesModel = new SelectItemsViewModel<LimitStateEntity>(ProgramSetting.LimitStatesList.LimitStates) { ShowButtons = false}; LimitStatesModel = new SelectItemsViewModel<LimitStateEntity>(ProgramSetting.LimitStatesList.LimitStates) { ShowButtons = false };
CalcTermsModel = new SelectItemsViewModel<CalcTermEntity>(ProgramSetting.CalcTermList.CalcTerms) { ShowButtons = false}; CalcTermsModel = new SelectItemsViewModel<CalcTermEntity>(ProgramSetting.CalcTermList.CalcTerms) { ShowButtons = false };
foreach (var item in MaterialsModel.CollectionItems) foreach (var item in MaterialsModel.CollectionItems)
{ {
if (item.Item == material) if (item.Item == material)
@@ -100,6 +97,7 @@ namespace StructureHelper.Windows.ViewModels.Materials
maxValue = 0.005d; maxValue = 0.005d;
stepCount = 50; stepCount = 50;
positiveInTension = true; positiveInTension = true;
VisualProps = new();
SetLines(); SetLines();
} }
@@ -123,9 +121,13 @@ namespace StructureHelper.Windows.ViewModels.Materials
{ {
var loaderMaterial = material.GetLoaderMaterial(limitState.LimitState, calcTerm.CalcTerm); var loaderMaterial = material.GetLoaderMaterial(limitState.LimitState, calcTerm.CalcTerm);
var lineSeries = new LineSeries() var lineSeries = new LineSeries()
{ Title = $"{material.Name} ({calcTerm.ShortName} {limitState.ShortName})", {
PointGeometry = null, Title = $"{material.Name} ({calcTerm.ShortName} {limitState.ShortName})",
//Stroke = new SolidColorBrush(material.Color),
Fill = Brushes.Transparent, Fill = Brushes.Transparent,
LineSmoothness = VisualProps.LineSmoothness,
PointGeometry = DefaultGeometries.Circle,
PointGeometrySize = VisualProps.StrokeSize
}; };
if (limitStates.Count() == 1 && calcTerms.Count() == 1) if (limitStates.Count() == 1 && calcTerms.Count() == 1)
{ {
@@ -139,7 +141,7 @@ namespace StructureHelper.Windows.ViewModels.Materials
//var point = new PointF() { X = (float)s, Y = (float)diagramValue }; //var point = new PointF() { X = (float)s, Y = (float)diagramValue };
//chartValues.Add(point); //chartValues.Add(point);
chartValues.Add(diagramValue); chartValues.Add(diagramValue);
labels.Add(Convert.ToString(Math.Round(s , 4))); labels.Add(Convert.ToString(Math.Round(s, 4)));
} }
lineSeries.Values = chartValues; lineSeries.Values = chartValues;
SeriesCollection.Add(lineSeries); SeriesCollection.Add(lineSeries);

View File

@@ -1,27 +1,16 @@
using LoaderCalculator; using StructureHelper.Windows.Graphs;
using LoaderCalculator.Data.Materials.MaterialBuilders;
using LoaderCalculator.Data.Ndms;
using StructureHelper.Windows.Errors;
using StructureHelper.Windows.Graphs;
using StructureHelper.Windows.ViewModels.Errors; using StructureHelper.Windows.ViewModels.Errors;
using StructureHelper.Windows.ViewModels.Graphs;
using StructureHelperCommon.Infrastructures.Enums; using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Infrastructures.Interfaces; using StructureHelperCommon.Infrastructures.Interfaces;
using StructureHelperCommon.Infrastructures.Settings; using StructureHelperCommon.Infrastructures.Settings;
using StructureHelperCommon.Models.Parameters; using StructureHelperCommon.Models.Parameters;
using StructureHelperCommon.Services.Units; using StructureHelperCommon.Services.Units;
using StructureHelperLogics.NdmCalculations.Analyses.ByForces; using StructureHelperLogics.NdmCalculations.Analyses.ByForces;
using StructureHelperLogics.NdmCalculations.Cracking;
using StructureHelperLogics.NdmCalculations.Primitives; using StructureHelperLogics.NdmCalculations.Primitives;
using StructureHelperLogics.Services.NdmPrimitives;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace StructureHelper.Windows.ViewModels.Calculations.Calculators namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
{ {

View File

@@ -1,13 +1,8 @@
using LoaderCalculator.Data.Materials; using LoaderCalculator.Data.Materials;
using LoaderCalculator.Data.Materials.MaterialBuilders; using LoaderCalculator.Data.Materials.MaterialBuilders;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Exceptions; using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Models.Materials.Libraries;
using System.Windows.Media.Media3D;
using static System.Windows.Forms.Design.AxImporter;
using LMBuilders = LoaderCalculator.Data.Materials.MaterialBuilders;
namespace StructureHelperLogics.Models.Materials namespace StructureHelperCommon.Models.Materials
{ {
public class ConcreteCurveLogic : IMaterialLogic public class ConcreteCurveLogic : IMaterialLogic
{ {

View File

@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace StructureHelperLogics.Models.Materials namespace StructureHelperCommon.Models.Materials
{ {
public class ConcreteLogicOptions : IMaterialLogicOptions public class ConcreteLogicOptions : IMaterialLogicOptions
{ {

View File

@@ -10,7 +10,7 @@ using static System.Windows.Forms.Design.AxImporter;
using LoaderCalculator.Data.Materials.MaterialBuilders; using LoaderCalculator.Data.Materials.MaterialBuilders;
using StructureHelperCommon.Models.Materials.Libraries; using StructureHelperCommon.Models.Materials.Libraries;
namespace StructureHelperLogics.Models.Materials namespace StructureHelperCommon.Models.Materials
{ {
internal class ConcreteMaterialOptionLogic : IMaterialOptionLogic internal class ConcreteMaterialOptionLogic : IMaterialOptionLogic
{ {

View File

@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace StructureHelperLogics.Models.Materials namespace StructureHelperCommon.Models.Materials
{ {
public interface IMaterialLogic public interface IMaterialLogic
{ {

View File

@@ -6,7 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace StructureHelperLogics.Models.Materials namespace StructureHelperCommon.Models.Materials
{ {
public interface IMaterialLogicOptions public interface IMaterialLogicOptions
{ {

View File

@@ -0,0 +1,12 @@
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Models.Materials.Libraries;
using LCM = LoaderCalculator.Data.Materials;
using LCMB = LoaderCalculator.Data.Materials.MaterialBuilders;
namespace StructureHelperCommon.Models.Materials
{
public interface IMaterialOptionLogic
{
void SetMaterialOptions(LCMB.IMaterialOptions materialOptions);
}
}

View File

@@ -2,7 +2,7 @@
using StructureHelperCommon.Infrastructures.Exceptions; using StructureHelperCommon.Infrastructures.Exceptions;
using LCMB = LoaderCalculator.Data.Materials.MaterialBuilders; using LCMB = LoaderCalculator.Data.Materials.MaterialBuilders;
namespace StructureHelperLogics.Models.Materials namespace StructureHelperCommon.Models.Materials
{ {
public class MaterialCommonOptionLogic : IMaterialOptionLogic public class MaterialCommonOptionLogic : IMaterialOptionLogic
{ {

View File

@@ -1,16 +1,8 @@
using LoaderCalculator.Data.Materials; using LoaderCalculator.Data.Materials;
using LoaderCalculator.Data.Materials.MaterialBuilders; using LoaderCalculator.Data.Materials.MaterialBuilders;
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Exceptions; using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperLogics.Models.Templates.CrossSections.RCs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Windows.Forms.Design.AxImporter;
namespace StructureHelperLogics.Models.Materials namespace StructureHelperCommon.Models.Materials
{ {
public class ReinforcementBiLinearLogic : IMaterialLogic public class ReinforcementBiLinearLogic : IMaterialLogic
{ {

View File

@@ -6,9 +6,9 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace StructureHelperLogics.Models.Materials namespace StructureHelperCommon.Models.Materials
{ {
internal class ReinforcementLogicOptions : IMaterialLogicOptions public class ReinforcementLogicOptions : IMaterialLogicOptions
{ {
public List<IMaterialSafetyFactor> SafetyFactors { get; set; } public List<IMaterialSafetyFactor> SafetyFactors { get; set; }
public ILibMaterialEntity MaterialEntity { get; set; } public ILibMaterialEntity MaterialEntity { get; set; }

View File

@@ -6,6 +6,7 @@ using LMLogic = LoaderCalculator.Data.Materials.MaterialBuilders.MaterialLogics;
using LM = LoaderCalculator.Data.Materials; using LM = LoaderCalculator.Data.Materials;
using LoaderCalculator.Data.Materials; using LoaderCalculator.Data.Materials;
using StructureHelperCommon.Infrastructures.Exceptions; using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Models.Materials;
namespace StructureHelperLogics.Models.Materials namespace StructureHelperLogics.Models.Materials
{ {

View File

@@ -1,4 +1,5 @@
using StructureHelperCommon.Infrastructures.Enums; using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Models.Materials;
using StructureHelperCommon.Models.Materials.Libraries; using StructureHelperCommon.Models.Materials.Libraries;
using StructureHelperLogics.Models.Materials; using StructureHelperLogics.Models.Materials;
using System; using System;

View File

@@ -1,6 +1,7 @@
using LoaderCalculator.Data.Materials; using LoaderCalculator.Data.Materials;
using StructureHelperCommon.Infrastructures.Enums; using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Infrastructures.Exceptions; using StructureHelperCommon.Infrastructures.Exceptions;
using StructureHelperCommon.Models.Materials;
using StructureHelperCommon.Models.Materials.Libraries; using StructureHelperCommon.Models.Materials.Libraries;
using System.Collections.Generic; using System.Collections.Generic;
using LCM = LoaderCalculator.Data.Materials; using LCM = LoaderCalculator.Data.Materials;

View File

@@ -9,6 +9,7 @@ using Loadermaterials = LoaderCalculator.Data.Materials;
using LMBuilders = LoaderCalculator.Data.Materials.MaterialBuilders; using LMBuilders = LoaderCalculator.Data.Materials.MaterialBuilders;
using LoaderMaterialLogics = LoaderCalculator.Data.Materials.MaterialBuilders.MaterialLogics; using LoaderMaterialLogics = LoaderCalculator.Data.Materials.MaterialBuilders.MaterialLogics;
using LoaderCalculator.Data.Materials; using LoaderCalculator.Data.Materials;
using StructureHelperCommon.Models.Materials;
namespace StructureHelperLogics.Models.Materials namespace StructureHelperLogics.Models.Materials
{ {

View File

@@ -1,10 +1,5 @@
using System; using NUnit.Framework;
using System.Collections.Generic; using StructureHelper.Windows.Graphs;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
using StructureHelper.Windows.ViewModels.Graphs;
using StructureHelperCommon.Models.Parameters; using StructureHelperCommon.Models.Parameters;
namespace StructureHelperTests.ViewModelTests namespace StructureHelperTests.ViewModelTests