mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
e727a097b3
- **Tools:**
- **PCB Exposure:**
- (Add) Allow to scale the drawing sizes per gerber file
- (Add) Allow to invert the drawing polarity per gerber file (#592)
- (Add) Allow to drag and drop files into "Add files" button and grid header
- (Improvement) Do not add empty layers when usable to draw or when draw a all black image
- (Improvement) "Merge all gerbers into one layer" will now draw all gerber into one image instead of perform the Max(of all gerbers pixels), allowing to subtract areas as they are on gerbers
- **Import layers:** Fix error when trying to insert layers
- **Export layers images:** Better compression of contours for SVG export, resulting in smooth curves, better visuals and lower file size
- (Add) Outline: Triangulate
- (Remove) Avalonia.Diagnostics dependency in release mode
146 lines
5.9 KiB
XML
146 lines
5.9 KiB
XML
<UserControl 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:controls="clr-namespace:UVtools.WPF.Controls"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="UVtools.WPF.Controls.Tools.ToolLayerImportControl">
|
|
|
|
<StackPanel Spacing="10">
|
|
<Grid RowDefinitions="Auto,10,Auto,10,Auto,10,Auto"
|
|
ColumnDefinitions="Auto,10,180,5,Auto,20,Auto">
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
ToolTip.Tip="Insert: Requires images with bounds equal or less than file resolution
|
|

Replace: Requires images with bounds equal or less than file resolution
|
|

Stack: Requires images with bounds equal or less than file resolution
|
|

Merge: Requires images with same resolution
|
|

MergeMax: Requires images with same resolution
|
|

Subtract: Requires images with same resolution
|
|

AbsDiff: Requires images with same resolution
|
|

BitwiseAnd: Requires images with same resolution
|
|

BitwiseOr: Requires images with same resolution
|
|

BitwiseXOr: Requires images with same resolution"
|
|
Text="Import type:"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="2"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Stretch"
|
|
Items="{Binding Operation.ImportType, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
|
|
SelectedItem="{Binding Operation.ImportType, Converter={StaticResource FromValueDescriptionToEnumConverter}}"/>
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="layers"/>
|
|
|
|
<CheckBox Grid.Row="0" Grid.Column="6"
|
|
IsChecked="{Binding Operation.ExtendBeyondLayerCount}"
|
|
IsVisible="{Binding Operation.IsExtendBeyondLayerCountVisible}"
|
|
ToolTip.Tip="If enabled, imported images that go beyond last layer are appended. The file will grow in layer count if necessary to fit all imported layers.
|
|

If disabled, all imported images that go beyond last layer are discarded. The file will maintain same layer count."
|
|
Content="Extend beyond layer count"/>
|
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Start at layer:"/>
|
|
<NumericUpDown Grid.Row="2" Grid.Column="2"
|
|
Classes="ValueLabel ValueLabel_layers"
|
|
Minimum="0"
|
|
Maximum="{Binding MaximumLayer}"
|
|
Value="{Binding Operation.StartLayerIndex}"/>
|
|
<TextBlock Grid.Row="2" Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding InfoLayerHeightStr}"/>
|
|
|
|
<CheckBox Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="5"
|
|
IsChecked="{Binding Operation.DiscardUnmodifiedLayers}"
|
|
ToolTip.Tip="If enabled, all unmodified layers forward the last inserted layer are discarded.
|
|

If disabled, the unmodified layers are kept."
|
|
Content="Discard unmodified layers"/>
|
|
|
|
<TextBlock Grid.Row="6" Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding Operation.IsImportStackType}"
|
|
Text="Stack margin:"/>
|
|
<NumericUpDown Grid.Row="6" Grid.Column="2"
|
|
Classes="ValueLabel ValueLabel_px"
|
|
IsVisible="{Binding Operation.IsImportStackType}"
|
|
Minimum="0"
|
|
Maximum="65535"
|
|
Value="{Binding Operation.StackMargin}"/>
|
|
</Grid>
|
|
|
|
|
|
<CheckBox
|
|
IsChecked="{Binding IsAutoSortLayersByFileNameChecked}"
|
|
Content="Auto sort files by filename"/>
|
|
|
|
|
|
<TextBlock Text="{Binding InfoImportResult}" />
|
|
|
|
|
|
<Border BorderBrush="Gray" BorderThickness="1" Padding="5">
|
|
<Grid>
|
|
<StackPanel Spacing="5" Orientation="Horizontal">
|
|
<controls:ButtonWithIcon Padding="5"
|
|
Command="{Binding AddFiles}"
|
|
Text="Add"
|
|
Spacing="5"
|
|
Icon="fa-solid fa-plus"/>
|
|
|
|
<controls:ButtonWithIcon Padding="5"
|
|
IsEnabled="{Binding #FilesListBox.SelectedItems.Count}"
|
|
Command="{Binding RemoveFiles}"
|
|
Text="Remove"
|
|
Spacing="5"
|
|
Icon="fa-solid fa-minus"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
HorizontalAlignment="Right"
|
|
Spacing="5" Orientation="Horizontal">
|
|
<controls:ButtonWithIcon Padding="5"
|
|
IsEnabled="{Binding Operation.Files.Count}"
|
|
Command="{Binding Operation.Sort}"
|
|
Text="Sort by file name"
|
|
Spacing="5"
|
|
Icon="fa-solid fa-sort-alpha-up"/>
|
|
|
|
<controls:ButtonWithIcon
|
|
IsEnabled="{Binding Operation.Files.Count}"
|
|
Padding="5" Command="{Binding ClearFiles}"
|
|
Text="Clear"
|
|
Spacing="5"
|
|
Icon="fa-solid fa-xmark"/>
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="{Binding Operation.Files.Count, StringFormat=Files: {0}}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Grid
|
|
ColumnDefinitions="400,400"
|
|
RowDefinitions="400"
|
|
>
|
|
<ListBox
|
|
Name="FilesListBox"
|
|
SelectionMode="Multiple"
|
|
SelectedItem="{Binding SelectedFile}"
|
|
Items="{Binding Operation.Files}" />
|
|
|
|
<Image
|
|
Grid.Column="1"
|
|
Stretch="Uniform"
|
|
Source="{Binding PreviewImage}"/>
|
|
</Grid>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
</UserControl>
|