Files
UVtools/UVtools.WPF/Windows/PrusaSlicerManagerWindow.axaml
Tiago Conceição e727a097b3 v3.8.1
- **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
2022-11-02 23:39:21 +00:00

331 lines
12 KiB
XML

<controls:WindowEx 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="900" d:DesignHeight="700"
x:Class="UVtools.WPF.Windows.PrusaSlicerManagerWindow"
Title="Install profiles into PrusaSlicer"
Width="900"
MinWidth="900"
MinHeight="600"
WindowStartupLocation="CenterOwner"
Icon="/Assets/Icons/UVtools.ico">
<DockPanel LastChildFill="True">
<Grid DockPanel.Dock="Top"
RowDefinitions="Auto"
ColumnDefinitions="Auto,*">
<Border Classes="GroupBox"
Margin="5,5,0,5">
<StackPanel Orientation="Vertical">
<TextBlock Classes="GroupBoxHeader" Text="Legend"/>
<StackPanel Margin="15" Orientation="Vertical" Spacing="10">
<StackPanel Orientation="Horizontal" Spacing="5">
<Border
Width="18" Height="18"
BorderBrush="Black"
BorderThickness="2"
Background="LightGray"/>
<TextBlock
VerticalAlignment="Center"
Text="Installed Profile - Files match, no need to update"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="5">
<Border
Width="18" Height="18"
BorderBrush="Black"
BorderThickness="2"
Background="Red"/>
<TextBlock
VerticalAlignment="Center"
Text="Installed Profile - Files mismatch, update available"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="5">
<Border
Width="18" Height="18"
BorderBrush="Black"
BorderThickness="2"
Background="Black"/>
<TextBlock
VerticalAlignment="Center"
Text="Uninstalled Profile - Not present on PrusaSlicer"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Border>
<Border
Grid.Column="1"
Classes="GroupBox"
Margin="5"
>
<StackPanel Orientation="Vertical">
<TextBlock Classes="GroupBoxHeader" Text="Information"/>
<TextBlock
TextWrapping="Wrap"
Margin="15"
Text="This will install and overwrite all checked profiles into PrusaSlicer.
&#x0a;On PrusaSlicer access 'Printer' -> 'Notes' to change source parameters.
&#x0a;NOTE: If you modify a base profile and save under PrusaSlicer, this tool will be mark it as 'update available' since it got modified, in those cases we always recommend to never update base profiles, instead clone it and give different name as your own profile." />
</StackPanel>
</Border>
</Grid>
<Border DockPanel.Dock="Bottom"
Classes="FooterActions">
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto">
<controls:ButtonWithIcon
Grid.Row="0"
Grid.Column="0"
Padding="10"
Icon="fa-solid fa-sync-alt"
Text="Refresh profiles"
Command="{Binding RefreshProfiles}"/>
<StackPanel
Margin="0,0,5,5"
Grid.Row="0"
Grid.Column="1"
HorizontalAlignment="Right"
Orientation="Horizontal"
Spacing="5">
<controls:ButtonWithIcon Padding="10"
IsDefault="True"
Icon="fa-solid fa-check"
Text="Install selected profiles"
Command="{Binding InstallProfiles}"/>
<controls:ButtonWithIcon Padding="10"
IsCancel="True"
Icon="fa-solid fa-sign-out-alt"
Text="Close"
Command="{Binding Close}"/>
</StackPanel>
</Grid>
</Border>
<TabControl SelectedIndex="{Binding TabSlicerSelectedIndex}">
<TabItem IsVisible="{Binding HavePrusaSlicer}">
<TabItem.Header>
<StackPanel Orientation="Horizontal" Spacing="5">
<Image Stretch="None" Source="/Assets/Icons/PrusaSlicer-32.png" />
<TextBlock VerticalAlignment="Center"
Text="PrusaSlicer"/>
</StackPanel>
</TabItem.Header>
<Grid
ColumnDefinitions="*,*"
RowDefinitions="*">
<Border
Grid.Column="0"
Classes="GroupBox"
Margin="5">
<Grid RowDefinitions="Auto,Auto,*">
<TextBlock Grid.Row="0" Classes="GroupBoxHeader" Text="Print profiles"/>
<TextBlock Grid.Row="0" HorizontalAlignment="Right"
Padding="10">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} Update(s) | {1} Installed | {2} Profiles">
<Binding Path="PrusaSlicerProfiles[0].Updates"/>
<Binding Path="PrusaSlicerProfiles[0].Installed"/>
<Binding Path="PrusaSlicerProfiles[0].Items.Count"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<StackPanel
Grid.Row="1"
Orientation="Horizontal" Spacing="1">
<controls:ButtonWithIcon Padding="10"
IsEnabled="{Binding PrusaSlicerProfiles[0].Updates}"
Icon="fa-regular fa-square"
Text="Unselect all"
Command="{Binding PrusaSlicerProfiles[0].SelectNone}"/>
<controls:ButtonWithIcon Padding="10"
IsEnabled="{Binding PrusaSlicerProfiles[0].Updates}"
Icon="fa-regular fa-check-square"
Text="Select all"
Command="{Binding PrusaSlicerProfiles[0].SelectAll}"/>
</StackPanel>
<ListBox
Grid.Row="2"
SelectionMode="Toggle"
VirtualizationMode="None"
Items="{Binding PrusaSlicerProfiles[0].Items}"/>
</Grid>
</Border>
<Border Grid.Column="1"
Classes="GroupBox"
Margin="0,5,5,5">
<Grid RowDefinitions="Auto,Auto,*">
<TextBlock Grid.Row="0" Classes="GroupBoxHeader" Text="Printer profiles"/>
<TextBlock Grid.Row="0" HorizontalAlignment="Right"
Padding="10">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} Update(s) | {1} Installed | {2} Profiles">
<Binding Path="PrusaSlicerProfiles[1].Updates"/>
<Binding Path="PrusaSlicerProfiles[1].Installed"/>
<Binding Path="PrusaSlicerProfiles[1].Items.Count"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<StackPanel
Grid.Row="1"
Orientation="Horizontal" Spacing="1">
<controls:ButtonWithIcon Padding="10"
IsEnabled="{Binding PrusaSlicerProfiles[1].Updates}"
Icon="fa-regular fa-square"
Text="Unselect all"
Command="{Binding PrusaSlicerProfiles[1].SelectNone}"/>
<controls:ButtonWithIcon Padding="10"
IsEnabled="{Binding PrusaSlicerProfiles[1].Updates}"
Icon="fa-regular fa-check-square"
Text="Select all"
Command="{Binding PrusaSlicerProfiles[1].SelectAll}"/>
</StackPanel>
<ListBox
Grid.Row="2"
SelectionMode="Toggle"
VirtualizationMode="None"
Items="{Binding PrusaSlicerProfiles[1].Items}"/>
</Grid>
</Border>
</Grid>
</TabItem>
<TabItem
IsVisible="{Binding HaveSuperSlicer}">
<TabItem.Header>
<StackPanel Orientation="Horizontal" Spacing="5">
<Image Stretch="None" Source="/Assets/Icons/SuperSlicer-32.png" />
<TextBlock VerticalAlignment="Center"
Text="SuperSlicer"/>
</StackPanel>
</TabItem.Header>
<Grid
ColumnDefinitions="*,*"
RowDefinitions="*">
<Border
Grid.Column="0"
Classes="GroupBox"
Margin="5">
<Grid RowDefinitions="Auto,Auto,*">
<TextBlock Grid.Row="0" Classes="GroupBoxHeader" Text="Print profiles"/>
<TextBlock Grid.Row="0" HorizontalAlignment="Right"
Padding="10">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} Update(s) | {1} Installed | {2} Profiles">
<Binding Path="SuperSlicerProfiles[0].Updates"/>
<Binding Path="SuperSlicerProfiles[0].Installed"/>
<Binding Path="SuperSlicerProfiles[0].Items.Count"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<StackPanel
Grid.Row="1"
Orientation="Horizontal" Spacing="1">
<controls:ButtonWithIcon Padding="10"
IsEnabled="{Binding SuperSlicerProfiles[0].Updates}"
Icon="fa-regular fa-square"
Text="Unselect all"
Command="{Binding SuperSlicerProfiles[0].SelectNone}"/>
<controls:ButtonWithIcon Padding="10"
IsEnabled="{Binding SuperSlicerProfiles[0].Updates}"
Icon="fa-regular fa-check-square"
Text="Select all"
Command="{Binding SuperSlicerProfiles[0].SelectAll}"/>
</StackPanel>
<ListBox
Grid.Row="2"
SelectionMode="Toggle"
VirtualizationMode="None"
Items="{Binding SuperSlicerProfiles[0].Items}"/>
</Grid>
</Border>
<Border Grid.Column="1"
Classes="GroupBox"
Margin="0,5,5,5">
<Grid RowDefinitions="Auto,Auto,*">
<TextBlock Grid.Row="0" Classes="GroupBoxHeader" Text="Printer profiles"/>
<TextBlock Grid.Row="0" HorizontalAlignment="Right"
Padding="10">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} Update(s) | {1} Installed | {2} Profiles">
<Binding Path="SuperSlicerProfiles[1].Updates"/>
<Binding Path="SuperSlicerProfiles[1].Installed"/>
<Binding Path="SuperSlicerProfiles[1].Items.Count"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<StackPanel
Grid.Row="1"
Orientation="Horizontal" Spacing="1">
<controls:ButtonWithIcon Padding="10"
IsEnabled="{Binding SuperSlicerProfiles[1].Updates}"
Icon="fa-regular fa-square"
Text="Unselect all"
Command="{Binding SuperSlicerProfiles[1].SelectNone}"/>
<controls:ButtonWithIcon Padding="10"
IsEnabled="{Binding SuperSlicerProfiles[1].Updates}"
Icon="fa-regular fa-check-square"
Text="Select all"
Command="{Binding SuperSlicerProfiles[1].SelectAll}"/>
</StackPanel>
<ListBox
Grid.Row="2"
SelectionMode="Toggle"
VirtualizationMode="None"
Items="{Binding SuperSlicerProfiles[1].Items}"/>
</Grid>
</Border>
</Grid>
</TabItem>
</TabControl>
</DockPanel>
</controls:WindowEx>