You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
154 lines
8.3 KiB
154 lines
8.3 KiB
<UserControl
|
|
x:Class="MODELING_DEF_DES_MI_VI.Modules.ModelCreationUnit.ModelCreationView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converters="clr-namespace:MODELING_DEF_DES_MI_VI.Converters"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:MODELING_DEF_DES_MI_VI.Modules.ModelCreationUnit"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:spreads="clr-namespace:MODELING_DEF_DES_MI_VI.Models.Spreads"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="500"
|
|
mc:Ignorable="d">
|
|
|
|
<UserControl.Resources>
|
|
<converters:CubicPowerOfInt x:Key="CubicPowerOfInt" />
|
|
</UserControl.Resources>
|
|
|
|
<Grid Background="WhiteSmoke">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0*" />
|
|
<ColumnDefinition Width="1*" />
|
|
<ColumnDefinition Width="1*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="3*" />
|
|
<RowDefinition Height="2*" />
|
|
<RowDefinition Height="1*" />
|
|
</Grid.RowDefinitions>
|
|
<DockPanel
|
|
Grid.RowSpan="3"
|
|
Grid.Column="1"
|
|
Margin="5,0"
|
|
VerticalAlignment="Stretch">
|
|
<StackPanel Margin="5,0" DockPanel.Dock="Top">
|
|
<TextBlock
|
|
Margin="0,5"
|
|
HorizontalAlignment="Center"
|
|
FontWeight="SemiBold"
|
|
Text="Настройки моделирования" />
|
|
<TextBlock Text="Параметры модели материала: " />
|
|
<TextBlock Text="Ширина: " />
|
|
<TextBox Text="{Binding CurrentMaterial.Width}" />
|
|
<TextBlock Text="Длина: " />
|
|
<TextBox Text="{Binding CurrentMaterial.Depth}" />
|
|
<TextBlock Text="Высота: " />
|
|
<TextBox Text="{Binding CurrentMaterial.Height}" />
|
|
<ContentControl>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="Разрешение модели (n=" />
|
|
<TextBlock Text="{Binding CurrentMaterial.NumberOfPores, Converter={StaticResource CubicPowerOfInt}, Mode=OneWay}" />
|
|
<TextBlock Text="):" />
|
|
</StackPanel>
|
|
</ContentControl>
|
|
<TextBox Text="{Binding CurrentMaterial.NumberOfPores, UpdateSourceTrigger=PropertyChanged}" />
|
|
<TextBlock Text="Параметры модели распределения:" />
|
|
<ComboBox
|
|
Width="198"
|
|
HorizontalAlignment="Left"
|
|
ItemsSource="{Binding Spreads}"
|
|
SelectedItem="{Binding SelectedSpread}" />
|
|
<ContentControl Content="{Binding SelectedSpread}">
|
|
<ContentControl.Resources>
|
|
<DataTemplate DataType="{x:Type spreads:NormalSpread}">
|
|
<StackPanel>
|
|
<TextBlock Text="Сигма: " />
|
|
<TextBox Text="{Binding Sigma}" />
|
|
<TextBlock Text="Мю: " />
|
|
<TextBox Text="{Binding Mu}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type spreads:ImprovedNormalSpread}">
|
|
<StackPanel>
|
|
<TextBlock Text="Сигма: " />
|
|
<TextBox Text="{Binding NormalSpread.Sigma}" />
|
|
<TextBlock Text="Мю: " />
|
|
<TextBox Text="{Binding NormalSpread.Mu}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ContentControl.Resources>
|
|
</ContentControl>
|
|
<TextBlock Text="Параметры распределения радиуса пор: " />
|
|
<TextBlock Text="Минимальный: " />
|
|
<TextBox Text="{Binding CurrentMaterial.MinRadius}" />
|
|
<TextBlock Text="Максимальный: " />
|
|
<TextBox Text="{Binding CurrentMaterial.MaxRadius}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Margin="5,10"
|
|
VerticalAlignment="Bottom"
|
|
DockPanel.Dock="Bottom">
|
|
<Button Command="{Binding LoadRecommendParamsCommand}" Content="[Рекомендуемые параметры]" />
|
|
<TextBlock Text="Результаты работы" />
|
|
<TextBlock Text="Количество пор: " />
|
|
<TextBox IsEnabled="False" Text="{Binding CurrentMaterial.Pores.Count, Mode=OneWay}" />
|
|
</StackPanel>
|
|
</DockPanel>
|
|
|
|
<DockPanel
|
|
Grid.RowSpan="3"
|
|
Grid.Column="2"
|
|
Margin="5,0">
|
|
<StackPanel VerticalAlignment="Bottom" DockPanel.Dock="Bottom">
|
|
<Button Command="{Binding GeneratePoresCommand}" Content="Сгенерировать модель" />
|
|
<!--<Button Content="Сохранить выборку из модели в файл" Command="{Binding GenAndSaveBatchCommand}"/>-->
|
|
<Button Command="{Binding SaveToFileCommand}" Content="Сохранить модель в файл" />
|
|
<Button
|
|
Command="{Binding GenerateAllCommand}"
|
|
CommandParameter="{Binding ModelAndBatchNumber}"
|
|
IsEnabled="{Binding DisableGenerateAllFlag, UpdateSourceTrigger=PropertyChanged}">
|
|
<Button.Content>
|
|
<TextBlock>
|
|
<Run Text="Сгенерировать все данные [" />
|
|
<Run>
|
|
<Binding Path="ModelAndBatchNumber" UpdateSourceTrigger="PropertyChanged" />
|
|
</Run>
|
|
<Run Text="]" />
|
|
</TextBlock>
|
|
</Button.Content>
|
|
</Button>
|
|
<Button Command="{Binding OpenModelDirectoryCommand}" Content="Открыть папку с моделями" />
|
|
</StackPanel>
|
|
|
|
<StackPanel DockPanel.Dock="Top">
|
|
<TextBlock
|
|
Margin="0,5"
|
|
HorizontalAlignment="Center"
|
|
FontWeight="SemiBold"
|
|
Text="Настройки выборки и экспорта" />
|
|
<TextBlock Text="Параметры единичного выборки:" />
|
|
<TextBlock Text="Координаты центра (Х): " />
|
|
<TextBox Text="{Binding BatchPoint.Center.X}" />
|
|
<TextBlock Text="Координаты центра (Y): " />
|
|
<TextBox Text="{Binding BatchPoint.Center.Y}" />
|
|
<TextBlock Text="Координаты центра (Z-высота): " />
|
|
<TextBox Text="{Binding BatchPoint.Center.Z}" />
|
|
<TextBlock Text="Длина и ширина основания: " />
|
|
<TextBox Text="{Binding BatchPoint.Width}" />
|
|
<TextBlock Text="Глубина:" />
|
|
<TextBox Text="{Binding BatchPoint.Depth}" />
|
|
<!--<CheckBox Margin="0 5" IsChecked="{Binding RandomBatchPointFlag}" IsEnabled="False">
|
|
<TextBlock TextWrapping="Wrap" Text="Случайное координаты для выборки"/>
|
|
</CheckBox>-->
|
|
<TextBlock Text="Количество моделей/моделей и выборок генерируемое за один раз:" TextWrapping="Wrap" />
|
|
<TextBox Text="{Binding ModelAndBatchNumber, UpdateSourceTrigger=PropertyChanged}" />
|
|
<!--<CheckBox Margin="0 5" IsChecked="{Binding GenerateConPoresReportFlag}">
|
|
<TextBlock TextWrapping="Wrap" Text="Создавать отчет [выборки : соединенные поры в выборке]"/>
|
|
</CheckBox>-->
|
|
</StackPanel>
|
|
</DockPanel>
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|
|
|