Files @ d6859ea7177f
Branch filter:

Location: ATITD-Tools/Desert-Paint-Codex/Views/MessageBoxView.axaml - annotation

Jason Maltzen
Add some sanity checks on min/max concentration and min/max reagents in recipe generation. Also, clear out the search queue when generation has finished so the queue isn't loaded next time. This fixes the start/resume button state when entering the recipe generator after a prior run had finished.
<Window xmlns="https://github.com/avaloniaui"
        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:vm="clr-namespace:DesertPaintCodex.ViewModels"
        Width="300" SizeToContent="Height" Topmost="True"
        mc:Ignorable="d" d:DesignWidth="300" d:DesignHeight="200"
        WindowStartupLocation="CenterOwner"
        x:Class="DesertPaintCodex.Views.MessageBoxView">

    <Design.DataContext>
        <vm:MessageBoxViewModel />
    </Design.DataContext>

    <DockPanel Margin="20" HorizontalAlignment="Stretch">
        
        <TextBlock DockPanel.Dock="Top" Classes="BlockHeader" TextWrapping="Wrap" Text="{Binding Title}" Margin="0, 0, 0, 15" />
        
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Center" Spacing="15" Margin="0, 20, 0, 0">
            <Button Command="{Binding PickOption}" CommandParameter="0"
                    IsVisible="{Binding OptionAText, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
                    Padding="20, 5">
                <TextBlock Text="{Binding OptionAText}"/>
            </Button>
            <Button Command="{Binding PickOption}" CommandParameter="1"
                    IsVisible="{Binding OptionBText, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
                    Padding="20, 5">
                <TextBlock Text="{Binding OptionBText}"/>
            </Button>
            <Button Command="{Binding PickOption}" CommandParameter="2"
                    IsVisible="{Binding OptionCText, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
                    Padding="20, 5">
                <TextBlock Text="{Binding OptionCText}"/>
            </Button>
        </StackPanel>
        
        <TextBlock TextWrapping="Wrap" Text="{Binding Message}" />
    </DockPanel>
</Window>