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.
109 lines
6.8 KiB
109 lines
6.8 KiB
<Window x:Class="Pores.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:spreads="clr-namespace:Pores.Models.Spreads"
|
|
mc:Ignorable="d"
|
|
Title="Pores" Height="600" Width="1000">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2*"/>
|
|
<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" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="DimGray">
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<TextBlock Text="Просмотр модели"/>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
|
|
<DockPanel Grid.Column="1" Grid.RowSpan="3" VerticalAlignment="Stretch" Margin="5 0">
|
|
<StackPanel DockPanel.Dock="Top" Margin="5 0">
|
|
<TextBlock Text="Настройки моделирования" HorizontalAlignment="Center" FontWeight="SemiBold" Margin="0 5"/>
|
|
<TextBlock Text="Параметры модели материала: "/>
|
|
<TextBlock Text="Ширина: "/>
|
|
<TextBox Text="{Binding CurrentMaterial.Width}"/>
|
|
<TextBlock Text="Глубина: "/>
|
|
<TextBox Text="{Binding CurrentMaterial.Depth}"/>
|
|
<TextBlock Text="Высота: "/>
|
|
<TextBox Text="{Binding CurrentMaterial.Height}"/>
|
|
<TextBlock Text="Разрешение модели (n^3): " TextWrapping="Wrap"/>
|
|
<TextBox Text="{Binding CurrentMaterial.NumberOfPores}"/>
|
|
<TextBlock Text="Параметры модели распределения:"/>
|
|
<ComboBox ItemsSource="{Binding Spreads}" SelectedItem="{Binding SelectedSpread}" HorizontalAlignment="Left" Width="198"></ComboBox>
|
|
<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>
|
|
</ContentControl.Resources>
|
|
</ContentControl>
|
|
<TextBlock Text="Параметры распределения радиуса пор: "/>
|
|
<TextBlock Text="Минимальный: "/>
|
|
<TextBox Text="{Binding CurrentMaterial.MinRadius}"/>
|
|
<TextBlock Text="Максимальный: "/>
|
|
<TextBox Text="{Binding CurrentMaterial.MaxRadius}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel DockPanel.Dock="Bottom" VerticalAlignment="Bottom" Margin="5 10">
|
|
<Button Content="[Рекомендуемые параметры]" Command="{Binding LoadRecommendParamsCommand}"/>
|
|
<TextBlock Text="Результаты работы"/>
|
|
<TextBlock Text="Количество пор: "/>
|
|
<TextBox Text="{Binding Pores.Count, Mode=OneWay}" IsEnabled="False"/>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
|
|
<DockPanel Grid.Column="2" Grid.RowSpan="3" Margin="5 0">
|
|
<StackPanel DockPanel.Dock="Bottom" VerticalAlignment="Bottom">
|
|
<Button Content="Сгенерировать модель" Command="{Binding GeneratePoresCommand}"/>
|
|
<!--<Button Content="Сохранить выборку из модели в файл" Command="{Binding GenAndSaveBatchCommand}"/>-->
|
|
<Button Content="Сохранить модель в файл" Command="{Binding SaveToFileCommand}"/>
|
|
<Button Command="{Binding GenerateAllCommand}" IsEnabled="{Binding DisableGenerateAllFlag, UpdateSourceTrigger=PropertyChanged}" CommandParameter="{Binding ModelAndBatchNumber}">
|
|
<Button.Content>
|
|
<TextBlock>
|
|
<Run Text="Сгенерировать все данные ["/>
|
|
<Run><Binding Path="ModelAndBatchNumber" UpdateSourceTrigger="PropertyChanged"/></Run>
|
|
<Run Text="]"/>
|
|
</TextBlock>
|
|
</Button.Content>
|
|
</Button>
|
|
<Button Content="Открыть папку с моделями" Command="{Binding OpenModelDirectoryCommand}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel DockPanel.Dock="Top">
|
|
<TextBlock Text="Настройки выборки и экспорта" FontWeight="SemiBold" HorizontalAlignment="Center" Margin="0 5"/>
|
|
<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>
|
|
</Window>
|
|
|