|
| 1 | +<Window xmlns="https://github.com/avaloniaui" |
| 2 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 4 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 5 | + xmlns:local="using:ZXBasicStudio.DocumentEditors.ZXGraphics" |
| 6 | + mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="501" |
| 7 | + Width="950" Height="520" |
| 8 | + Icon="/Assets/zxbs.ico" |
| 9 | + x:Class="ZXBasicStudio.DocumentEditors.ZXGraphics.PaletteBuilderDialog" |
| 10 | + Title="Next Palette builder" CanResize="False" |
| 11 | + WindowStartupLocation="CenterOwner" |
| 12 | + DataContext="{Binding PaletteViewModel}"> |
| 13 | + |
| 14 | + <Grid Name="grdMain" ColumnDefinitions="330,5,256,5,330" RowDefinitions="Auto,260,Auto,Auto,Auto" Margin="10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" > |
| 15 | + |
| 16 | + <TextBlock FontSize="18" FontWeight="Bold">Source image</TextBlock> |
| 17 | + <TextBlock Grid.Column="2" FontSize="18" FontWeight="Bold">Palette</TextBlock> |
| 18 | + <TextBlock Grid.Column="4" FontSize="18" FontWeight="Bold">Converted image</TextBlock> |
| 19 | + |
| 20 | + <Border Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="1" BorderBrush="Red"> |
| 21 | + <Grid Width="320" Height="256" Grid.Row="1" Name="grdSource" HorizontalAlignment="Center" VerticalAlignment="Center"> |
| 22 | + <local:NextImageViewControl Name="imgSource"/> |
| 23 | + </Grid> |
| 24 | + </Border> |
| 25 | + |
| 26 | + <Grid Grid.Row="1" Grid.Column="2" Grid.RowDefinitions="Auto,Auto,Auto"> |
| 27 | + <Canvas Grid.ColumnSpan="2" Name="cnvPalette" /> |
| 28 | + </Grid> |
| 29 | + |
| 30 | + <Border Grid.Row="1" Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="1" BorderBrush="Red"> |
| 31 | + <Grid Width="320" Height="256" Grid.Row="1" Grid.Column="2" Name="grdConverted" HorizontalAlignment="Center" VerticalAlignment="Center"> |
| 32 | + <local:NextImageViewControl Name="imgConverted"/> |
| 33 | + </Grid> |
| 34 | + </Border> |
| 35 | + |
| 36 | + |
| 37 | + <Grid Grid.Row="2" Grid.ColumnDefinitions="Auto,*,Auto" Grid.RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto"> |
| 38 | + <Button Grid.ColumnSpan="2" Name="btnFileSource" Classes="dialog" Width="150" HorizontalAlignment="Left">Load source image</Button> |
| 39 | + |
| 40 | + <TextBlock Grid.Row="3" Classes="dialog" VerticalAlignment="Center">OutFormat</TextBlock> |
| 41 | + <ComboBox Grid.Row="3" Grid.Column="1" Name="cmbMode" Classes="dialog" HorizontalAlignment="Left" MaxWidth="Infinity" Margin="4,0,0,2" SelectedIndex="0" Focusable="False"> |
| 42 | + <ComboBoxItem>256x192 256 colors with palette</ComboBoxItem> |
| 43 | + <ComboBoxItem>256x192 256 colors without palette</ComboBoxItem> |
| 44 | + </ComboBox> |
| 45 | + </Grid> |
| 46 | + |
| 47 | + <Grid Grid.Row="3" Grid.ColumnDefinitions="Auto,*" Grid.RowDefinitions="Auto,Auto,Auto,Auto,Auto"> |
| 48 | + <CheckBox Grid.Row="0" Name="chkUseCurrent" IsChecked="True" HorizontalAlignment="Right"/> |
| 49 | + <TextBlock Grid.Row="0" Grid.Column="1" Classes="dialog" VerticalAlignment="Center">Convert to current palette</TextBlock> |
| 50 | + |
| 51 | + <CheckBox Grid.Row="1" Name="chkAppend" IsChecked="False" HorizontalAlignment="Right"/> |
| 52 | + <TextBlock Grid.Row="1" Grid.Column="1" Classes="dialog" VerticalAlignment="Center">Append new colors to current palette</TextBlock> |
| 53 | + |
| 54 | + <CheckBox Grid.Row="2" Name="chkULA" IsChecked="False" IsEnabled="false" HorizontalAlignment="Right"/> |
| 55 | + <TextBlock Grid.Row="2" Grid.Column="1" Classes="dialog" VerticalAlignment="Center">Add ULA colors at start</TextBlock> |
| 56 | + |
| 57 | + <CheckBox Grid.Row="3" Name="chkGrayscale" IsChecked="False" HorizontalAlignment="Right" IsEnabled="false"/> |
| 58 | + <TextBlock Grid.Row="3" Grid.Column="1" Classes="dialog" VerticalAlignment="Center">Add Grayscale at start</TextBlock> |
| 59 | + </Grid> |
| 60 | + |
| 61 | + <Grid Grid.Row="2" Grid.Column="2" Grid.RowSpan="2" RowDefinitions="Auto,Auto,Auto,Auto,5,Auto" ColumnDefinitions="Auto,100,Auto,*"> |
| 62 | + <TextBlock Grid.ColumnSpan="3" Name="txtSelectedColor"/> |
| 63 | + <TextBlock Grid.Row="1" VerticalAlignment="Center">Red</TextBlock> |
| 64 | + <Slider Grid.Row="1" Grid.Column="1" Name="sldRed" Width="100" SmallChange="36" Minimum="0" Maximum="255" HorizontalAlignment="Left" VerticalAlignment="Center"/> |
| 65 | + <Border Grid.Row="1" Grid.Column="2" Classes="numericborder"> |
| 66 | + <NumericUpDown Classes="dialog" Name="txtRed" Minimum="0" Increment="36" Maximum="255" Width="60" VerticalAlignment="Center" Value="0"/> |
| 67 | + </Border> |
| 68 | + |
| 69 | + <TextBlock Grid.Row="2" VerticalAlignment="Center">Green</TextBlock> |
| 70 | + <Slider Grid.Row="2" Grid.Column="1" Name="sldGreen" Width="100" SmallChange="36" Minimum="0" Maximum="255" HorizontalAlignment="Left" VerticalAlignment="Center"/> |
| 71 | + <Border Grid.Row="2" Grid.Column="2" Classes="numericborder"> |
| 72 | + <NumericUpDown Classes="dialog" Name="txtGreen" Minimum="0" Increment="36" Maximum="255" Width="60" VerticalAlignment="Center" Value="0"/> |
| 73 | + </Border> |
| 74 | + |
| 75 | + <TextBlock Grid.Row="3" VerticalAlignment="Center">Blue</TextBlock> |
| 76 | + <Slider Grid.Row="3" Grid.Column="1" Name="sldBlue" Width="100" SmallChange="36" Minimum="0" Maximum="255" HorizontalAlignment="Left" VerticalAlignment="Center"/> |
| 77 | + <Border Grid.Row="3" Grid.Column="2" Classes="numericborder"> |
| 78 | + <NumericUpDown Classes="dialog" Name="txtBlue" Minimum="0" Increment="36" Maximum="255" Width="60" VerticalAlignment="Center" Value="0"/> |
| 79 | + </Border> |
| 80 | + |
| 81 | + <Border Grid.Row="1" Grid.Column="3" Grid.RowSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="1" BorderBrush="Red"> |
| 82 | + <Grid Name="grdSelectedColor" Width="50" Height="50"></Grid> |
| 83 | + </Border> |
| 84 | + |
| 85 | + <StackPanel Grid.Row="5" Grid.ColumnSpan="4" Orientation="Horizontal"> |
| 86 | + <Button Name="btnResetPalette" Classes="dialog">Reset to default</Button> |
| 87 | + <Button Name="btnLoadPalette" Classes="dialog">Load palette</Button> |
| 88 | + <Button Name="btnSavePalette" Classes="dialog">Save palette</Button> |
| 89 | + </StackPanel> |
| 90 | + </Grid> |
| 91 | + |
| 92 | + <Grid Grid.Row="2" Grid.Column="4" Grid.RowDefinitions="Auto,5,Auto"> |
| 93 | + <Button Name="btnRefresh" Classes="dialog" HorizontalAlignment="Right">Refresh</Button> |
| 94 | + <Button Grid.Row="2" Name="btnSaveImage" Classes="dialog" HorizontalAlignment="Right">Save image</Button> |
| 95 | + </Grid> |
| 96 | + |
| 97 | + <StackPanel Grid.Row="4" Grid.ColumnSpan="5" Orientation="Horizontal" HorizontalAlignment="Right"> |
| 98 | + <Button Name="btnClose" Classes="dialog">Close</Button> |
| 99 | + </StackPanel> |
| 100 | + |
| 101 | + </Grid> |
| 102 | +</Window> |
0 commit comments