IReport is added
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="60"/>
|
||||
<RowDefinition Height="20"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
@@ -33,11 +33,17 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Menu x:Name="menu">
|
||||
<MenuItem Header="File">
|
||||
|
||||
</MenuItem>
|
||||
<MenuItem Header="Edit">
|
||||
<MenuItem Header="Primitives">
|
||||
<Button Content="Add Rectangle" Command="{Binding AddPrimitive}" CommandParameter="{x:Static enums:PrimitiveType.Rectangle}"/>
|
||||
<Button Content="Add Point" Command="{Binding AddPrimitive}" CommandParameter="{x:Static enums:PrimitiveType.Point}"/>
|
||||
</MenuItem>
|
||||
<Button Content="Calculation properties" Command="{Binding Path=EditCalculationPropertyCommand}"/>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Analisys">
|
||||
<Button Content="Solve problem" Command="{Binding Path=Calculate}"/>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<Border BorderBrush="Black" Background="White" BorderThickness="1" Margin="5" Grid.ColumnSpan="5" Grid.Row="1">
|
||||
<i:Interaction.Triggers>
|
||||
@@ -97,16 +103,15 @@
|
||||
</Canvas>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
||||
<Button VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5" Content="Справочник" Command="{Binding OpenMaterialCatalog}"/>
|
||||
<Button VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5" Content="Система едениц" Command="{Binding OpenUnitsSystemSettings}"/>
|
||||
<Label VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5" Content="{Binding UnitsSystemName}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0.333,0.333,39.667" Grid.RowSpan="2" Width="519">
|
||||
<Button VerticalAlignment="Center" Margin="5" Content="Добавить тестовые примитивы" Command="{Binding AddTestCase}"/>
|
||||
<Button VerticalAlignment="Center" Margin="5" Content="Добавить прямоугольник" Command="{Binding AddPrimitive}" CommandParameter="{x:Static enums:PrimitiveType.Rectangle}"/>
|
||||
<Button VerticalAlignment="Center" Margin="5" Content="Добавить точку" Command="{Binding AddPrimitive}" CommandParameter="{x:Static enums:PrimitiveType.Point}"/>
|
||||
</StackPanel>
|
||||
<Button Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5" Content="Рассчитать" Command="{Binding Calculate}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -20,6 +20,8 @@ using StructureHelper.Windows.ViewModels.Calculations.CalculationProperies;
|
||||
using StructureHelperLogics.Models.Calculations.CalculationProperties;
|
||||
using StructureHelper.Windows.CalculationWindows.CalculationPropertyWindow;
|
||||
using StructureHelperLogics.Services;
|
||||
using StructureHelper.Windows.CalculationWindows.CalculationResultWindow;
|
||||
using StructureHelper.Windows.ViewModels.Calculations.CalculationResult;
|
||||
|
||||
namespace StructureHelper.Windows.MainWindow
|
||||
{
|
||||
@@ -274,11 +276,8 @@ namespace StructureHelper.Windows.MainWindow
|
||||
IEnumerable<INdm> ndms = Model.GetNdms();
|
||||
CalculationService calculationService = new CalculationService();
|
||||
var loaderResults = calculationService.GetCalculationResults(calculationProperty, ndms);
|
||||
if (loaderResults[0].IsValid)
|
||||
{
|
||||
IStrainMatrix strainMatrix = loaderResults[0].LoaderResults.ForceStrainPair.StrainMatrix;
|
||||
ShowIsoFieldResult.ShowResult(strainMatrix, ndms, ResultFuncFactory.GetResultFuncs());
|
||||
}
|
||||
var wnd = new CalculationResultView(new CalculationResultViewModel(loaderResults, ndms));
|
||||
wnd.ShowDialog();
|
||||
}
|
||||
|
||||
private IEnumerable<PrimitiveBase> GetTestCasePrimitives()
|
||||
@@ -308,6 +307,14 @@ namespace StructureHelper.Windows.MainWindow
|
||||
calculationProperty.ForceCombinations[0].ForceMatrix.Mx = 40e3d;
|
||||
calculationProperty.ForceCombinations[0].ForceMatrix.My = 20e3d;
|
||||
calculationProperty.ForceCombinations[0].ForceMatrix.Nz = 0d;
|
||||
calculationProperty.ForceCombinations.Add(new ForceCombination());
|
||||
calculationProperty.ForceCombinations[1].ForceMatrix.Mx = 200e3d;
|
||||
calculationProperty.ForceCombinations[1].ForceMatrix.My = 0d;
|
||||
calculationProperty.ForceCombinations[1].ForceMatrix.Nz = 0d;
|
||||
calculationProperty.ForceCombinations.Add(new ForceCombination());
|
||||
calculationProperty.ForceCombinations[2].ForceMatrix.Mx = 50e3d;
|
||||
calculationProperty.ForceCombinations[2].ForceMatrix.My = 50e3d;
|
||||
calculationProperty.ForceCombinations[2].ForceMatrix.Nz = 0d;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user