@ -6,21 +6,27 @@
xmlns:localizations="clr-namespace:Pores.Models.Localizations"
xmlns:local="clr-namespace:Pores"
mc:Ignorable="d"
Title="Pores" Height="450" Width="8 00">
<Grid>
Title="Pores" Height="500" Width="10 00">
<Grid IsEnabled="{Binding EnableControlsFlag}" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<StackPanel VerticalAlignment="Center" Grid.Column="2">
<DockPanel Grid.RowSpan="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="DimGray">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Просмотр модели"/>
</StackPanel>
</DockPanel>
<StackPanel VerticalAlignment="Center" Grid.Column="1" Margin="5 0">
<TextBlock Text="Параметры модели"/>
<TextBlock Text="Ширина: "/>
<TextBox Text="{Binding CurrentMaterial.Width}"/>
@ -33,19 +39,19 @@
</StackPanel>
<StackPanel VerticalAlignment="Center" Grid.Column="2" Grid.Row="2" Grid.RowSpan="2" Margin="20 0">
<StackPanel VerticalAlignment="Center" Grid.Column="1" Grid.Row="2" Grid.RowSpan="2" Margin="5 0">
<TextBlock Text="Результаты работы"/>
<TextBlock Text="Количество пор: "/>
<TextBox Text="{Binding PoreGeneratorInstance.PoreCoordinate s.Count, Mode=OneWay}" IsEnabled="False"/>
<TextBox Text="{Binding Pores.Count, Mode=OneWay}" IsEnabled="False"/>
</StackPanel>
<StackPanel Grid.Column="2" Grid.Row="1" VerticalAlignment="Center">
<StackPanel Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Margin="5 0">
<TextBlock Text="Параметры модели распределения:"/>
<ComboBox ItemsSource="{Binding Localizations}" SelectedItem="{Binding SelectedLocalization}" HorizontalAlignment="Left" Width="198"></ComboBox>
<ContentControl Content="{Binding SelectedLocalization}">
<ContentControl.Resources>
<DataTemplate DataType="{x:Type localizations:NormalLocalization}">
<StackPanel>
<TextBlock Text="Параметры модели"/>
<TextBlock Text="Сигма: "/>
<TextBox Text="{Binding sigma}"/>
<TextBlock Text="Мю: "/>
@ -56,26 +62,44 @@
</ContentControl>
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="2" VerticalAlignment="Bottom">
<Button Content="Сгенерировать поры" Command="{Binding GeneratePoresCommand}" Grid.Row="2"/>
<Button Content="Выборка в файл" Command="{Binding GenAndSaveBatchCommand}"
Grid.Row="2" Grid.Column="1"/>
<Button Content="Сохранить в файл" Command="{Binding SaveToFileCommand}" Grid.Row="2" Grid.Column="1"/>
</StackPanel>
<DockPanel Grid.Column="2" Grid.RowSpan="3" Margin="5 0">
<StackPanel VerticalAlignment="Center" Grid.Column="1">
<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}"/>
</StackPanel>
<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}" CommandParameter="{Binding ModelAndBatchNumber}">
<Button.Content>
<TextBlock>
<Run Text="Сгенерировать модели+выборки ["/>
<Run><Binding Path="ModelAndBatchNumber"/></Run>
<Run Text="]"/>
</TextBlock>
</Button.Content>
</Button>
</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}"/>
<TextBlock Text="Количество моделей/моделей и выборок генерируемое за один раз:" TextWrapping="Wrap"/>
<TextBox Text="{Binding ModelAndBatchNumber}"/>
<CheckBox Margin="0 5" IsChecked="{Binding GenerateBatchForEachModelFlag}">
<TextBlock TextWrapping="Wrap" Text="Генерировать для каждой модели по выборке"/>
</CheckBox>
</StackPanel>
</DockPanel>