mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
1595 lines
57 KiB
XML
1595 lines
57 KiB
XML
<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:manager="clr-namespace:Avalonia.ThemeManager;assembly=Avalonia.ThemeManager"
|
|
xmlns:uc="clr-namespace:UVtools.WPF.Controls"
|
|
xmlns:idc="clr-namespace:Dock.Avalonia.Controls;assembly=Dock.Avalonia"
|
|
mc:Ignorable="d" d:DesignWidth="1024" d:DesignHeight="600"
|
|
x:Class="UVtools.WPF.MainWindow"
|
|
Title="UVtools"
|
|
Icon="/Assets/Icons/UVtools.ico"
|
|
MinWidth="1024"
|
|
MinHeight="600"
|
|
DragDrop.AllowDrop="True"
|
|
>
|
|
|
|
<DockPanel>
|
|
<Menu DockPanel.Dock="Top">
|
|
<MenuItem Name="MainMenu.File" Header="_File">
|
|
<MenuItem
|
|
Name="MainMenu.File.Open"
|
|
Header="_Open"
|
|
HotKey="Ctrl+O" InputGesture="Ctrl+O"
|
|
Command="{Binding MenuFileOpenClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\open-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Name="MainMenu.File.OpenNewWindow" Header="Open in _new window" HotKey="Ctrl+Shift+O" InputGesture="Ctrl+Shift+O" Command="{Binding MenuFileOpenNewWindowClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\open-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem
|
|
Name="MainMenu.File.Reload"
|
|
Header="_Reload"
|
|
HotKey="Ctrl+F5" InputGesture="Ctrl+F5"
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
Command="{Binding ReloadFile}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\file-refresh-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem
|
|
Name="MainMenu.File.Save"
|
|
Header="_Save"
|
|
HotKey="Ctrl+S" InputGesture="Ctrl+S"
|
|
IsEnabled="{Binding CanSave}"
|
|
Command="{Binding MenuFileSaveClicked}"
|
|
>
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\save-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem
|
|
Name="MainMenu.File.SaveAs"
|
|
Header="Save _as"
|
|
HotKey="Ctrl+Shift+S" InputGesture="Ctrl+Shift+S"
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
Command="{Binding MenuFileSaveAsClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\save-as-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem
|
|
Name="MainMenu.File.Close"
|
|
Header="_Close"
|
|
HotKey="Ctrl+W" InputGesture="Ctrl+W"
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
Command="{Binding OnMenuFileCloseFile}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\file-close-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<Separator/>
|
|
|
|
<MenuItem
|
|
Name="MainMenu.File.Extract"
|
|
Header="_Extract" HotKey="Ctrl+E" InputGesture="Ctrl+E"
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
Command="{Binding ExtractFile}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\extract-object-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Name="MainMenu.File.Convert"
|
|
Header="_Convert to"
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
Items="{Binding MenuFileConvertItems}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\convert-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<Separator/>
|
|
|
|
<MenuItem
|
|
Name="MainMenu.File.Fullscreen"
|
|
Header="_Fullscreen"
|
|
InputGesture="F11" HotKey="F11"
|
|
Command="{Binding OnMenuFileFullscreen}"
|
|
>
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\expand-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem Name="MainMenu.File.Settings" Header="_Settings" InputGesture="F12" HotKey="F12" Command="{Binding MenuFileSettingsClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\settings-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<Separator/>
|
|
|
|
<MenuItem
|
|
Name="MainMenu.File.Exit"
|
|
Header="_Exit"
|
|
InputGesture="Alt+F4"
|
|
Command="{Binding Close}"
|
|
>
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\exit-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="_Tools"
|
|
IsVisible="{Binding IsFileLoaded}"
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
Items="{Binding MenuTools}">
|
|
</MenuItem>
|
|
|
|
|
|
<MenuItem Header="_Help">
|
|
<MenuItem
|
|
Header="_Website"
|
|
InputGesture="Ctrl + F1" HotKey="Ctrl + F1"
|
|
Command="{Binding OpenWebsite}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\internet-explorer-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="_Donate"
|
|
InputGesture="Ctrl + Shift + F1" HotKey="Ctrl + Shift + F1"
|
|
Command="{Binding OpenDonateWebsite}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\donate-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="_About"
|
|
InputGesture="F1" HotKey="F1"
|
|
Command="{Binding MenuHelpAboutClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\button-info-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="_Benchmark"
|
|
Command="{Binding MenuHelpBenchmarkClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\microchip-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<Separator/>
|
|
|
|
<MenuItem
|
|
Header="_Install profiles into PrusaSlicer"
|
|
Command="{Binding MenuHelpInstallProfilesClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\CNCMachine-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Background="LimeGreen"
|
|
IsVisible="{Binding VersionChecker.HaveNewVersion}"
|
|
Header="{Binding VersionChecker.VersionAnnouncementText}"
|
|
Command="{Binding MenuNewVersionClicked}"
|
|
>
|
|
</MenuItem>
|
|
|
|
</Menu>
|
|
|
|
<Border Padding="5" DockPanel.Dock="Bottom" Background="WhiteSmoke" IsVisible="{Binding IsFileLoaded}">
|
|
<StackPanel
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal"
|
|
Spacing="5"
|
|
>
|
|
<TextBlock Text="{Binding SlicerFile.LayerHeight, StringFormat=Layer height: \{0\}mm}"/>
|
|
<TextBlock Text="|"/>
|
|
|
|
<TextBlock Text="{Binding SlicerFile.BottomLayerCount, StringFormat=Bottom layers: \{0\}}"/>
|
|
<TextBlock Text="|"/>
|
|
|
|
<TextBlock Text="{Binding SlicerFile.BottomExposureTime, StringFormat=Bottom exposure: \{0\}s}"/>
|
|
<TextBlock Text="|"/>
|
|
|
|
<TextBlock Text="{Binding SlicerFile.ExposureTime, StringFormat=Exposure: \{0\}s}"/>
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.PrintTimeHours}"
|
|
Text="|"/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.PrintTimeHours}"
|
|
Text="{Binding SlicerFile.PrintTimeHours, StringFormat=Print time: \{0\}h}"/>
|
|
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.UsedMaterial}"
|
|
Text="|"/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.UsedMaterial}"
|
|
Text="{Binding SlicerFile.UsedMaterial, StringFormat=Used material: \{0\}ml}"/>
|
|
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.MaterialCost}"
|
|
Text="|"/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.MaterialCost}"
|
|
Text="{Binding SlicerFile.MaterialCost, StringFormat=Material cost: \{0\}ml}"/>
|
|
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.MaterialName, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
|
Text="|"/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.MaterialName, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
|
Text="{Binding SlicerFile.MaterialName, StringFormat=Material: \{0\}}"/>
|
|
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.MachineName, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
|
Text="|"/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.MachineName, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
|
Text="{Binding SlicerFile.MachineName, StringFormat=Machine: \{0\}}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<TabControl
|
|
Background="WhiteSmoke"
|
|
DockPanel.Dock="Left"
|
|
Width="400"
|
|
SelectedIndex="{Binding TabSelectedIndex}">
|
|
<TabItem
|
|
ToolTip.Tip="Information"
|
|
IsEnabled="{Binding IsFileLoaded}" >
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/info-circle-32x32.png" Width="32"/>
|
|
<!--<TextBlock Margin="5,0,0,0">Information</TextBlock>!-->
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<Grid
|
|
IsVisible="{Binding IsFileLoaded}"
|
|
RowDefinitions="Auto,Auto,Auto,*">
|
|
<!-- Thumbnails -->
|
|
<StackPanel
|
|
IsVisible="{Binding SlicerFile.CreatedThumbnailsCount}"
|
|
Grid.Row="0"
|
|
Orientation="Horizontal"
|
|
Spacing="5"
|
|
VerticalAlignment="Center">
|
|
<Button
|
|
IsEnabled="{Binding ThumbnailCanGoPrevious}"
|
|
Command="{Binding ThumbnailGoPrevious}"
|
|
>
|
|
<Image Source="/Assets/Icons/back-16x16.png" Width="16"/>
|
|
</Button>
|
|
|
|
<TextBlock VerticalAlignment="Center">
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="\{0\}/\{1\}">
|
|
<Binding Path="VisibleThumbnailIndex"/>
|
|
<Binding Path="SlicerFile.CreatedThumbnailsCount"/>
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
|
|
<Button
|
|
IsEnabled="{Binding ThumbnailCanGoNext}"
|
|
Command="{Binding ThumbnailGoNext}"
|
|
>
|
|
<Image Source="/Assets/Icons/next-16x16.png" Width="16"/>
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
IsVisible="{Binding SlicerFile.CreatedThumbnailsCount}"
|
|
Grid.Row="0"
|
|
Orientation="Horizontal"
|
|
Spacing="5"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center">
|
|
<TextBlock VerticalAlignment="Center"
|
|
Text="{Binding VisibleThumbnailResolution}"/>
|
|
|
|
<Button
|
|
IsEnabled="{Binding VisibleThumbnailIndex}"
|
|
ToolTip.Tip="Replace the current preview image"
|
|
Command="{Binding OnClickThumbnailImport}">
|
|
<Image Source="/Assets/Icons/photo-16x16.png" />
|
|
</Button>
|
|
|
|
<Button
|
|
IsEnabled="{Binding VisibleThumbnailIndex}"
|
|
ToolTip.Tip="Save thumbnail image to a file"
|
|
Command="{Binding OnClickThumbnailSave}">
|
|
<Image Source="/Assets/Icons/save-16x16.png" />
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
<Image
|
|
IsVisible="{Binding SlicerFile.CreatedThumbnailsCount}"
|
|
Stretch="Uniform"
|
|
Grid.Row="1" Source="{Binding VisibleThumbnailImage}"/>
|
|
|
|
|
|
<!-- Properties -->
|
|
<StackPanel
|
|
IsVisible="{Binding SlicerProperties.Count}"
|
|
Grid.Row="2"
|
|
Orientation="Horizontal"
|
|
Spacing="5"
|
|
VerticalAlignment="Center">
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="{Binding SlicerProperties.Count, StringFormat=Properties: \{0\}}"
|
|
/>
|
|
|
|
<TextBlock Text="|"/>
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="{Binding SlicerFile.Configs.Length, StringFormat=Groups: \{0\}}"
|
|
/>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
IsVisible="{Binding SlicerProperties.Count}"
|
|
Grid.Row="2"
|
|
Orientation="Horizontal"
|
|
Spacing="5"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center">
|
|
|
|
<Button
|
|
IsEnabled="{Binding SlicerFile.CreatedThumbnailsCount}"
|
|
ToolTip.Tip="Save properties to a file or clipboard"
|
|
Command="{Binding #PropertiesSaveContextMenu.Open}">
|
|
<Button.ContextMenu>
|
|
<ContextMenu Name="PropertiesSaveContextMenu" PlacementMode="Bottom">
|
|
<MenuItem
|
|
Command="{Binding OnClickPropertiesSaveFile}"
|
|
Header="To File">
|
|
<MenuItem.Icon>
|
|
<Image Source="/Assets/Icons/file-image-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Command="{Binding OnClickPropertiesSaveClipboard}"
|
|
Header="To Clipboard">
|
|
<MenuItem.Icon>
|
|
<Image Source="/Assets/Icons/clipboard-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/save-16x16.png" />
|
|
<TextBlock Text=" ⮟"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
<DataGrid
|
|
IsVisible="{Binding SlicerProperties.Count}"
|
|
Name="PropertiesGrid"
|
|
Grid.Row="3"
|
|
CanUserReorderColumns="True"
|
|
CanUserResizeColumns="True"
|
|
CanUserSortColumns="True"
|
|
GridLinesVisibility="All"
|
|
IsReadOnly="True"
|
|
ClipboardCopyMode="IncludeHeader"
|
|
Items="{Binding SlicerProperties}">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="Name"
|
|
Binding="{Binding Name}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Value"
|
|
Binding="{Binding Value}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Group"
|
|
Binding="{Binding Group}"
|
|
Width="Auto" />
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
<TabItem
|
|
ToolTip.Tip="GCode"
|
|
IsEnabled="{Binding HaveGCode}">
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/code-32x32.png" Width="32"/>
|
|
<!--<TextBlock Margin="5,0,0,0">Gcode</TextBlock>!-->
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<Grid RowDefinitions="Auto,*">
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="5">
|
|
<TextBlock
|
|
Text="{Binding GCodeLines, StringFormat=Lines: \{0\}}"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<TextBlock
|
|
Text="|"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<TextBlock
|
|
Text="{Binding #GCodeText.Text.Length, StringFormat=Chars: \{0\}}"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Orientation="Horizontal"
|
|
Spacing="5"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center">
|
|
|
|
<Button
|
|
ToolTip.Tip="Rebuild GCode with current settings"
|
|
Command="{Binding OnClickRebuildGcode}">
|
|
<Image Source="/Assets/Icons/refresh-16x16.png"/>
|
|
</Button>
|
|
|
|
<Button
|
|
ToolTip.Tip="Save gcode to a file or clipboard"
|
|
Command="{Binding #GcodeSaveContextMenu.Open}">
|
|
<Button.ContextMenu>
|
|
<ContextMenu Name="GcodeSaveContextMenu" PlacementMode="Bottom">
|
|
<MenuItem
|
|
Command="{Binding OnClickGCodeSaveFile}"
|
|
Header="To File">
|
|
<MenuItem.Icon>
|
|
<Image Source="/Assets/Icons/file-image-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Command="{Binding OnClickGCodeSaveClipboard}"
|
|
Header="To Clipboard">
|
|
<MenuItem.Icon>
|
|
<Image Source="/Assets/Icons/clipboard-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/save-16x16.png" />
|
|
<TextBlock Text=" ⮟"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
<TextBox
|
|
Name="GCodeText"
|
|
Grid.Row="1"
|
|
IsReadOnly="True"
|
|
Text="{Binding GCodeStr}" />
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
<!--
|
|
Issues Tab
|
|
-->
|
|
<TabItem
|
|
ToolTip.Tip="Issues"
|
|
IsEnabled="{Binding IsFileLoaded}" >
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/warning-32x32.png" Width="32"/>
|
|
<!--<TextBlock Margin="5,0,0,0">Issues</TextBlock>!-->
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<Grid
|
|
RowDefinitions="Auto,*">
|
|
<StackPanel
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
Grid.Row="0"
|
|
Orientation="Horizontal"
|
|
Spacing="5"
|
|
VerticalAlignment="Center">
|
|
<RepeatButton
|
|
IsEnabled="{Binding IssueCanGoPrevious}"
|
|
Command="{Binding IssueGoPrevious}"
|
|
Interval="100"
|
|
>
|
|
<Image Source="/Assets/Icons/back-16x16.png" Width="16"/>
|
|
</RepeatButton>
|
|
|
|
<TextBlock VerticalAlignment="Center">
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="\{0\}/\{1\}">
|
|
<Binding Path="IssueSelectedIndexStr"/>
|
|
<Binding Path="Issues.Count"/>
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
|
|
<RepeatButton
|
|
IsEnabled="{Binding IssueCanGoNext}"
|
|
Command="{Binding IssueGoNext}"
|
|
Interval="100"
|
|
>
|
|
<Image Source="/Assets/Icons/next-16x16.png" Width="16"/>
|
|
</RepeatButton>
|
|
|
|
<Button
|
|
ToolTip.Tip="Remove selected issue when possible.
|
|

Islands: All pixels are removed (turn black).
|
|

ResinTrap: All trap areas are filled with white pixels.
|
|

TouchingBounds: No action, need reslice."
|
|
IsEnabled="{Binding #IssuesGrid.SelectedItem, Converter={x:Static ObjectConverters.IsNotNull}}"
|
|
Command="{Binding OnClickIssueRemove}">
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/trash-16x16.png" />
|
|
<TextBlock VerticalAlignment="Center" Text="Remove"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Orientation="Horizontal"
|
|
Spacing="5"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center">
|
|
|
|
<Button
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
ToolTip.Tip="Attempt to repair issues"
|
|
Command="{Binding OnClickRepairIssues}">
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/wrench-16x16.png" />
|
|
<TextBlock VerticalAlignment="Center" Text="Repair"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button
|
|
ToolTip.Tip="Compute Issues.
|
|

Right click to access settings."
|
|
Command="{Binding OnClickDetectIssues}">
|
|
|
|
<Button.ContextMenu>
|
|
<ContextMenu PlacementMode="Bottom">
|
|
<CheckBox
|
|
IsChecked="{Binding Settings.Issues.ComputeIslands}"
|
|
Content="Islands"/>
|
|
<CheckBox
|
|
IsChecked="{Binding Settings.Issues.ComputeOverhangs}"
|
|
Content="Overhangs"/>
|
|
<CheckBox
|
|
IsChecked="{Binding Settings.Issues.ComputeResinTraps}"
|
|
Content="Resin traps"/>
|
|
<CheckBox
|
|
IsChecked="{Binding Settings.Issues.ComputeTouchingBounds}"
|
|
Content="Touching bounds"/>
|
|
<CheckBox
|
|
IsChecked="{Binding Settings.Issues.ComputeEmptyLayers}"
|
|
Content="Empty layers"/>
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/save-16x16.png" />
|
|
<TextBlock Text="Detect ⮟"/>
|
|
</StackPanel>
|
|
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
<DataGrid
|
|
Name="IssuesGrid"
|
|
Grid.Row="1"
|
|
CanUserReorderColumns="True"
|
|
CanUserResizeColumns="True"
|
|
CanUserSortColumns="True"
|
|
GridLinesVisibility="Horizontal"
|
|
SelectionMode="Extended"
|
|
SelectedIndex="{Binding IssueSelectedIndex, Mode=TwoWay}"
|
|
IsReadOnly="True"
|
|
ClipboardCopyMode="IncludeHeader"
|
|
Items="{Binding Issues}">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="Type"
|
|
Binding="{Binding Type}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Layer"
|
|
Binding="{Binding LayerIndex}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Position (X, Y)"
|
|
Binding="{Binding FirstPoint}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Pixels"
|
|
Binding="{Binding PixelsCount}"
|
|
Width="Auto" />
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</TabItem>
|
|
|
|
<!-- Pixel Editor !-->
|
|
<TabItem
|
|
ToolTip.Tip="Pixel editor"
|
|
IsEnabled="{Binding IsPixelEditorActive}">
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/pixel-32x32.png" Width="32"/>
|
|
<!--<TextBlock Margin="5,0,0,0">Pixel editor</TextBlock>!-->
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<Grid RowDefinitions="Auto,20,Auto,*">
|
|
<TabControl SelectedIndex="{Binding SelectedPixelOperationTabIndex}">
|
|
<!-- Drawing !-->
|
|
<TabItem
|
|
ToolTip.Tip="Drawing"
|
|
>
|
|
<TabItem.Header
|
|
>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/pencil-alt-24x24.png" Width="24"/>
|
|
<TextBlock
|
|
IsVisible="{Binding $parent[TabItem].IsSelected}"
|
|
Margin="5,0,0,0"
|
|
Text="Drawing" />
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<StackPanel Spacing="10" Margin="5">
|
|
<Border Background="LightGray" BorderThickness="1" BorderBrush="Black">
|
|
<TextBlock Padding="10" Text="Shift+Left click to add white pixels
|
|

Shift+Right click to remove pixels"/>
|
|
</Border>
|
|
|
|
<Grid
|
|
|
|
RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto,Auto"
|
|
ColumnDefinitions="Auto,10,Auto,10,Auto,10,Auto">
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Line type:" />
|
|
<ComboBox
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="5"
|
|
Items="{Binding DrawingPixelDrawing.LineTypes}"
|
|
SelectedItem="{Binding DrawingPixelDrawing.LineType}"
|
|
/>
|
|
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Brush shape:" />
|
|
<ComboBox
|
|
Grid.Row="2"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="5"
|
|
Items="{Binding DrawingPixelDrawing.BrushShapeTypes}"
|
|
SelectedItem="{Binding DrawingPixelDrawing.BrushShape}"
|
|
/>
|
|
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Brush diameter:" />
|
|
<NumericUpDown
|
|
Grid.Row="4"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Minimum="1"
|
|
Maximum="255"
|
|
Value="{Binding DrawingPixelDrawing.BrushSize}"/>
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="6"
|
|
VerticalAlignment="Center"
|
|
Text="px" />
|
|
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Thickness:" />
|
|
<NumericUpDown
|
|
Grid.Row="6"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Minimum="-1"
|
|
Maximum="255"
|
|
Value="{Binding DrawingPixelDrawing.Thickness}"
|
|
/>
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Grid.Column="6"
|
|
VerticalAlignment="Center"
|
|
Text="px" />
|
|
|
|
<TextBlock
|
|
Grid.Row="8"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Layers depth:" />
|
|
<NumericUpDown
|
|
Grid.Row="8"
|
|
Grid.Column="2"
|
|
Minimum="0"
|
|
Width="80"
|
|
Value="{Binding DrawingPixelDrawing.LayersBelow}"
|
|
/>
|
|
<TextBlock
|
|
Grid.Row="9"
|
|
Grid.Column="2"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Text="Below" />
|
|
|
|
<NumericUpDown
|
|
Grid.Row="8"
|
|
Grid.Column="4"
|
|
Minimum="0"
|
|
Width="80"
|
|
Value="{Binding DrawingPixelDrawing.LayersAbove}"
|
|
/>
|
|
<TextBlock
|
|
Grid.Row="9"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Text="Above" />
|
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
</TabItem>
|
|
|
|
<!-- Text !-->
|
|
<TabItem
|
|
ToolTip.Tip="Text"
|
|
>
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/font-24x24.png" Width="24"/>
|
|
<TextBlock
|
|
IsVisible="{Binding $parent[TabItem].IsSelected}"
|
|
Margin="5,0,0,0"
|
|
Text="Text" />
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<StackPanel Spacing="10" Margin="5">
|
|
<Border Background="LightGray" BorderThickness="1" BorderBrush="Black">
|
|
<TextBlock Padding="10" Text="Shift+Left click to add text
|
|

Shift+Right click to remove text"/>
|
|
</Border>
|
|
|
|
<Grid
|
|
RowDefinitions="Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto,Auto"
|
|
ColumnDefinitions="Auto,10,Auto,10,Auto">
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Line type:" />
|
|
<ComboBox
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Items="{Binding DrawingPixelText.LineTypes}"
|
|
SelectedItem="{Binding DrawingPixelText.LineType}"/>
|
|
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Font face:" />
|
|
<ComboBox
|
|
Grid.Row="2"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Items="{Binding DrawingPixelText.FontFaces}"
|
|
SelectedItem="{Binding DrawingPixelText.Font}"/>
|
|
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Font scale:" />
|
|
<NumericUpDown
|
|
Grid.Row="4"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Minimum="0.1"
|
|
Maximum="255"
|
|
Increment="0.1"
|
|
Value="{Binding DrawingPixelText.FontScale}"/>
|
|
|
|
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Thickness:" />
|
|
<NumericUpDown
|
|
Grid.Row="6"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Minimum="1"
|
|
Maximum="255"
|
|
Value="{Binding DrawingPixelText.Thickness}"/>
|
|
|
|
<TextBlock
|
|
Grid.Row="8"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Text:" />
|
|
<TextBox
|
|
Grid.Row="8"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Text="{Binding DrawingPixelText.Text}"/>
|
|
|
|
<CheckBox
|
|
Grid.Row="10"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Content="Flip text Vertically"
|
|
IsChecked="{Binding DrawingPixelText.Mirror}"/>
|
|
|
|
|
|
<TextBlock
|
|
Grid.Row="12"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Layers depth:" />
|
|
<NumericUpDown
|
|
Grid.Row="12"
|
|
Grid.Column="2"
|
|
Minimum="0"
|
|
Width="80"
|
|
Value="{Binding DrawingPixelText.LayersBelow}"
|
|
/>
|
|
<TextBlock
|
|
Grid.Row="14"
|
|
Grid.Column="2"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Text="Below" />
|
|
|
|
<NumericUpDown
|
|
Grid.Row="12"
|
|
Grid.Column="4"
|
|
Minimum="0"
|
|
Width="80"
|
|
Value="{Binding DrawingPixelText.LayersAbove}"
|
|
/>
|
|
<TextBlock
|
|
Grid.Row="14"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Text="Above" />
|
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
</TabItem>
|
|
|
|
<!-- Eraser !-->
|
|
<TabItem
|
|
ToolTip.Tip="Eraser"
|
|
>
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/eraser-24x24.png" Width="24"/>
|
|
<TextBlock
|
|
IsVisible="{Binding $parent[TabItem].IsSelected}"
|
|
Margin="5,0,0,0"
|
|
Text="Eraser" />
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<StackPanel Spacing="10" Margin="5">
|
|
<Border Background="LightGray" BorderThickness="1" BorderBrush="Black">
|
|
<TextBlock Padding="10" Text="Shift+click over a white pixel to remove whole linked area. (Fill with black)"/>
|
|
</Border>
|
|
|
|
<Grid
|
|
RowDefinitions="Auto,Auto"
|
|
ColumnDefinitions="Auto,10,Auto,10,Auto">
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Layers depth:" />
|
|
<NumericUpDown
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Minimum="0"
|
|
Width="80"
|
|
Value="{Binding DrawingPixelEraser.LayersBelow}"
|
|
/>
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Text="Below" />
|
|
|
|
<NumericUpDown
|
|
Grid.Row="0"
|
|
Grid.Column="4"
|
|
Minimum="0"
|
|
Width="80"
|
|
Value="{Binding DrawingPixelEraser.LayersAbove}"
|
|
/>
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Text="Above" />
|
|
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
|
|
</TabItem>
|
|
|
|
<!-- Supports !-->
|
|
<TabItem
|
|
ToolTip.Tip="Supports"
|
|
>
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/code-branch-24x24.png" Width="24"/>
|
|
<TextBlock
|
|
IsVisible="{Binding $parent[TabItem].IsSelected}"
|
|
Margin="5,0,0,0"
|
|
Text="Supports" />
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<StackPanel Spacing="10" Margin="5">
|
|
<Border Background="LightGray" BorderThickness="1" BorderBrush="Black">
|
|
<TextBlock Padding="10" Text="Shift+click under a island to add a primitive support.
|
|

Note: this operation can't be previewed."/>
|
|
</Border>
|
|
<Grid
|
|
RowDefinitions="Auto,10,Auto,10,Auto"
|
|
ColumnDefinitions="Auto,10,100,5,Auto">
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Tip diameter:" />
|
|
<NumericUpDown
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Minimum="1"
|
|
Maximum="255"
|
|
Value="{Binding DrawingPixelSupport.TipDiameter}"/>
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="px" />
|
|
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Pillar diameter:" />
|
|
<NumericUpDown
|
|
Grid.Row="2"
|
|
Grid.Column="2"
|
|
Minimum="1"
|
|
Maximum="255"
|
|
Value="{Binding DrawingPixelSupport.PillarDiameter}"/>
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="px" />
|
|
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Base diameter:" />
|
|
<NumericUpDown
|
|
Grid.Row="4"
|
|
Grid.Column="2"
|
|
Minimum="1"
|
|
Maximum="255"
|
|
Value="{Binding DrawingPixelSupport.BaseDiameter}"/>
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="px" />
|
|
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
</TabItem>
|
|
|
|
<!-- Drain holes !-->
|
|
<TabItem
|
|
ToolTip.Tip="Drain holes"
|
|
>
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/ring-24x24.png" Width="24"/>
|
|
<TextBlock
|
|
IsVisible="{Binding $parent[TabItem].IsSelected}"
|
|
Margin="5,0,0,0"
|
|
Text="Drain holes" />
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<StackPanel Spacing="10" Margin="5">
|
|
<Border Background="LightGray" BorderThickness="1" BorderBrush="Black">
|
|
<TextBlock Padding="10" Text="Shift+click to add a vertical drain hole.
|
|

Note: this operation can't be previewed."/>
|
|
</Border>
|
|
<Grid
|
|
RowDefinitions="Auto"
|
|
ColumnDefinitions="Auto,10,100,5,Auto">
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Hole diameter:" />
|
|
<NumericUpDown
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Minimum="20"
|
|
Maximum="255"
|
|
Value="{Binding DrawingPixelDrainHole.Diameter}"/>
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="px" />
|
|
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
</TabItem>
|
|
|
|
</TabControl>
|
|
|
|
<!-- Toolbar !-->
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Orientation="Horizontal" Spacing="1">
|
|
<Button IsEnabled="{Binding #DrawingsGrid.SelectedItem, Converter={x:Static ObjectConverters.IsNotNull}}"
|
|
Command="{Binding OnClickDrawingRemove}">
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/trash-16x16.png"/>
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="Remove"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button IsEnabled="{Binding Drawings.Count}"
|
|
Command="{Binding OnClickDrawingClear}">
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/delete-16x16.png"/>
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="Clear"
|
|
/>
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal"
|
|
Spacing="10"
|
|
>
|
|
|
|
<Button IsEnabled="{Binding Drawings.Count}"
|
|
Command="{Binding DrawModifications}"
|
|
CommandParameter="false">
|
|
<StackPanel Orientation="Horizontal" Spacing="1">
|
|
<Image Source="/Assets/Icons/accept-16x16.png"/>
|
|
<TextBlock Text="{Binding Drawings.Count, StringFormat=Apply \{0\} operations}"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
<DataGrid
|
|
Name="DrawingsGrid"
|
|
Grid.Row="3"
|
|
CanUserReorderColumns="True"
|
|
CanUserResizeColumns="True"
|
|
CanUserSortColumns="True"
|
|
GridLinesVisibility="Horizontal"
|
|
SelectionMode="Extended"
|
|
IsReadOnly="True"
|
|
ClipboardCopyMode="IncludeHeader"
|
|
Items="{Binding Drawings}">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="#"
|
|
Binding="{Binding Index}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Operation"
|
|
Binding="{Binding OperationType}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Layer"
|
|
Binding="{Binding LayerIndex}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Position (X, Y)"
|
|
Binding="{Binding Location}"
|
|
Width="Auto" />
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
<TabItem ToolTip.Tip="Log">
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/book-32x32.png" Width="32"/>
|
|
<!--<TextBlock Margin="5,0,0,0">Log</TextBlock>!-->
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
<Grid ColumnDefinitions="Auto,Auto,*">
|
|
<Button
|
|
Grid.Column="0"
|
|
Command="{Binding Logs.Clear}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/trash-16x16.png" Width="16"/>
|
|
<TextBlock Margin="5,0,0,0">Clear</TextBlock>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<CheckBox
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
ToolTip.Tip="Shows extra information usefull to debug problems."
|
|
IsChecked="{Binding IsVerbose}"
|
|
Content="Verbose"
|
|
Margin="5,0,0,0"
|
|
/>
|
|
|
|
<TextBlock
|
|
Grid.Column="2"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding Logs.Count, StringFormat=Operations: \{0\}}"/>
|
|
</Grid>
|
|
|
|
|
|
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" Orientation="Horizontal">
|
|
|
|
|
|
|
|
</StackPanel>
|
|
<DataGrid Items="{Binding Logs}"
|
|
CanUserReorderColumns="True"
|
|
CanUserResizeColumns="True"
|
|
CanUserSortColumns="True"
|
|
GridLinesVisibility="All"
|
|
IsReadOnly="True"
|
|
ClipboardCopyMode="IncludeHeader"
|
|
>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="#"
|
|
Binding="{Binding Index}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Started"
|
|
Binding="{Binding StartTime}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Time(s)"
|
|
Binding="{Binding ElapsedTime}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Description"
|
|
Binding="{Binding Description}"
|
|
Width="Auto" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</StackPanel>
|
|
</TabItem>
|
|
|
|
</TabControl>
|
|
|
|
<Grid
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
DockPanel.Dock="Right"
|
|
ColumnDefinitions="130"
|
|
RowDefinitions="Auto,Auto,*,Auto,Auto,Auto,Auto" Margin="5">
|
|
<TextBlock
|
|
Text="{Binding MaximumLayerString}"
|
|
Name="Layer.Navigation.Up"
|
|
Margin="0,0,0,10"
|
|
HorizontalAlignment="Center"
|
|
TextAlignment="Center"
|
|
Grid.Row="0"/>
|
|
<RepeatButton
|
|
Grid.Row="1"
|
|
ToolTip.Tip="Navigate to up layer [Ctrl + Up]"
|
|
HotKey="Ctrl + Up"
|
|
Interval="100"
|
|
IsEnabled="{Binding CanGoUp}"
|
|
Command="{Binding GoNextLayer}">
|
|
<Image Width="16" Height="16" Source="/Assets/Icons/arrow-up-16x16.png"/>
|
|
</RepeatButton>
|
|
|
|
<Grid Grid.Row="2" ColumnDefinitions="*,20,Auto">
|
|
<Panel
|
|
Grid.Column="0"
|
|
Name="Layer.Navigation.Tooltip.Panel"
|
|
Margin="{Binding LayerNavigationTooltipMargin}"
|
|
HorizontalAlignment="Left"
|
|
>
|
|
<Border
|
|
Name="Layer.Navigation.Tooltip.Border"
|
|
VerticalAlignment="Top"
|
|
BorderBrush="AliceBlue"
|
|
BorderThickness="5"
|
|
CornerRadius="5"
|
|
>
|
|
<TextBlock Padding="5" Text="{Binding ActualLayerTooltip}"/>
|
|
</Border>
|
|
</Panel>
|
|
|
|
<!--<Image
|
|
Grid.Column="1"
|
|
Name="Layer.Navigation.Issues" Width="16"></Image>!-->
|
|
|
|
<Canvas
|
|
Grid.Column="1"
|
|
Margin="0,15"
|
|
Background="WhiteSmoke"
|
|
Name="Layer.Navigation.IssuesCanvas" Width="20"/>
|
|
|
|
<uc:SliderEx
|
|
Grid.Column="2"
|
|
Name="Layer.Navigation.Slider"
|
|
Minimum="0"
|
|
Maximum="{Binding SliderMaximumValue}"
|
|
Value="{Binding ActualLayer}"
|
|
TickFrequency="1"
|
|
TickPlacement="Outside"
|
|
SmallChange="1"
|
|
LargeChange="10"
|
|
IsSnapToTickEnabled="True"
|
|
Margin="0,5"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Vertical"/>
|
|
</Grid>
|
|
|
|
<RepeatButton
|
|
Grid.Row="3"
|
|
ToolTip.Tip="Navigate to down layer [Ctrl + Down]"
|
|
HotKey="Ctrl + Down"
|
|
Interval="100"
|
|
IsEnabled="{Binding CanGoDown}"
|
|
Command="{Binding GoPreviousLayer}"
|
|
>
|
|
<Image Width="16" Height="16" Source="/Assets/Icons/arrow-down-16x16.png"/>
|
|
</RepeatButton>
|
|
|
|
<NumericUpDown
|
|
Grid.Row="4"
|
|
Margin="0,5"
|
|
Minimum="0"
|
|
Maximum="{Binding SliderMaximumValue}"
|
|
Value="{Binding ActualLayer}" />
|
|
|
|
<Grid Grid.Row="5" RowDefinitions="*" ColumnDefinitions="30,*,30">
|
|
<Button
|
|
Grid.Column="0"
|
|
ToolTip.Tip="Navigate to first layer [Ctrl + Left]"
|
|
HotKey="Ctrl + Left"
|
|
IsEnabled="{Binding CanGoDown}"
|
|
Command="{Binding GoFirstLayer}"
|
|
>
|
|
<Image Width="16" Height="16" Source="/Assets/Icons/arrow-end-16x16.png"/>
|
|
</Button>
|
|
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
Text="{Binding MinimumLayerString}"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
TextAlignment="Center"/>
|
|
|
|
<!--
|
|
<Button
|
|
Grid.Column="1"
|
|
Margin="5,0,5,0"
|
|
ToolTip.Tip="Navigate to a selected layer [Ctrl + F]"
|
|
HotKey="Ctrl + F"
|
|
>
|
|
<Image Source="/Assets/Icons/search-16x16.png"/>
|
|
</Button>
|
|
!-->
|
|
<Button
|
|
Grid.Column="2"
|
|
ToolTip.Tip="Navigate to last layer [Ctrl + Right]"
|
|
HotKey="Ctrl + Right"
|
|
IsEnabled="{Binding CanGoUp}"
|
|
Command="{Binding GoLastLayer}"
|
|
>
|
|
<Image Width="16" Height="16" Source="/Assets/Icons/arrow-top-16x16.png"/>
|
|
</Button>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
|
|
<!--<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
|
|
<Button Name="zoomtofit">Zoom to fit</Button>
|
|
<Button Name="center">Center image</Button>
|
|
</StackPanel>-->
|
|
|
|
<Grid
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
ColumnDefinitions="*" RowDefinitions="Auto,*,Auto" Margin="5">
|
|
<StackPanel HorizontalAlignment="Left" Grid.Row="0" Orientation="Horizontal" Spacing="1">
|
|
<ToggleButton
|
|
IsChecked="{Binding ShowLayerImageRotated}"
|
|
HotKey="Ctrl + R"
|
|
ToolTip.Tip="Auto rotate layer preview image at 90º (This can slow down the layer preview) [CTRL+R]"
|
|
>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/undo-alt-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Rotate"/>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
|
|
<ToggleButton
|
|
IsChecked="{Binding ShowLayerImageDifference}"
|
|
ToolTip.Tip="Show layer differences where daker pixels were also present on previous layer and the white pixels the difference between previous and current layer."
|
|
>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/layers-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Difference"/>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
|
|
<ToggleButton
|
|
IsChecked="{Binding ShowLayerImageIssues}"
|
|
ToolTip.Tip="Highlight Issues on current layer. Valid only if Issues are calculated."
|
|
>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/warning-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Issuess"/>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
|
|
<ToggleButton
|
|
IsChecked="{Binding ShowLayerImageCrosshairs}"
|
|
ToolTip.Tip="Show crosshairs for selected issues on the current layer."
|
|
>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/crosshairs-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Crossharis"/>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
|
|
<Button
|
|
ToolTip.Tip="Click to access the various outlines."
|
|
Command="{Binding #LayerPreviewOutlineContextMenu.Open}"
|
|
>
|
|
<Button.ContextMenu>
|
|
<ContextMenu Name="LayerPreviewOutlineContextMenu" PlacementMode="Bottom">
|
|
<CheckBox
|
|
IsChecked="{Binding ShowLayerOutlinePrintVolumeBoundary}"
|
|
Content="Print volume boundary"/>
|
|
<CheckBox
|
|
IsChecked="{Binding ShowLayerOutlineLayerBoundary}"
|
|
Content="Layer boundary"/>
|
|
<CheckBox
|
|
IsChecked="{Binding ShowLayerOutlineHollowAreas}"
|
|
Content="Hollow areas"/>
|
|
<CheckBox
|
|
IsChecked="{Binding ShowLayerOutlineEdgeDetection}"
|
|
Content="Edge detection"/>
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/geometry-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Outline ⮟"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
|
|
<ToggleButton
|
|
IsChecked="{Binding IsPixelEditorActive}"
|
|
ToolTip.Tip="Edit layer image: Draw pixels, add supports and/or drain holes."
|
|
>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/pixel-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Pixel editor"/>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
<StackPanel HorizontalAlignment="Right" Grid.Row="0" Orientation="Horizontal" Spacing="1">
|
|
<Button
|
|
Command="{Binding #LayerActionsContextMenu.Open}"
|
|
>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/layers-alt-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Actions ⮟"/>
|
|
</StackPanel>
|
|
<Button.ContextMenu>
|
|
<ContextMenu Name="LayerActionsContextMenu" PlacementMode="Bottom" Items="{Binding LayerActionsMenu}"/>
|
|
</Button.ContextMenu>
|
|
</Button>
|
|
|
|
<Button
|
|
Command="{Binding ShowLayer}"
|
|
HotKey="F5"
|
|
ToolTip.Tip="Refresh current layer [F5]">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/refresh-16x16.png"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button
|
|
Command="{Binding SaveCurrentLayerImage}"
|
|
ToolTip.Tip="Save layer image to a file">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/save-16x16.png"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
<uc:AdvancedImageBox
|
|
Focusable="True"
|
|
Grid.Row="1"
|
|
GridCellSize="15"
|
|
Name="LayerImage"
|
|
/>
|
|
|
|
<Canvas Grid.Row="1" Margin="20"
|
|
IsVisible="{Binding IsTooltipOverlayVisible}"
|
|
>
|
|
<Border
|
|
Background="{Binding Settings.LayerPreview.TooltipOverlayBackgroundBrush}" Padding="10">
|
|
<TextBlock Text="{Binding TooltipOverlayText}" />
|
|
</Border>
|
|
</Canvas>
|
|
|
|
|
|
<StackPanel Margin="0,5,0,0" Grid.Row="2" Orientation="Horizontal" Spacing="5">
|
|
<StackPanel
|
|
ToolTip.Tip="Number of pixels to cure on this layer image and the percetange of them against total lcd pixels"
|
|
VerticalAlignment="Center" Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/pixel-16x16.png"/>
|
|
<TextBlock Text="{Binding LayerPixelCountStr, StringFormat=Pixels: \{0\}}"/>
|
|
</StackPanel>
|
|
|
|
<Button
|
|
ToolTip.Tip="Object volume bounds for current layer, position and size.
|
|

Click: go to region"
|
|
Command="{Binding ZoomToFitPrintVolume}"
|
|
>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/expand-16x16.png"/>
|
|
<TextBlock Text="{Binding LayerBoundsStr, StringFormat=Bounds: \{0\}}"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button
|
|
IsEnabled="{Binding #LayerImage.HaveSelection}"
|
|
Command="{Binding OnROIClick}"
|
|
ToolTip.Tip="Region of interest selection over layer.
|
|

(NS): Not selected
|
|

Click: go to region | ESC: Clear ROI"
|
|
>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/object-group-16x16.png"/>
|
|
<TextBlock Text="{Binding LayerROIStr, StringFormat=ROI: \{0\}}"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="0,5,0,0" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="2" Orientation="Horizontal" Spacing="5">
|
|
|
|
<Button
|
|
IsEnabled="{Binding LayerPixelPicker.IsSet}"
|
|
Command="{Binding OnLayerPixelPickerClicked}"
|
|
ToolTip.Tip="Pixel picker:
|
|

Use CONTROL and over a pixel to get his position and brightness.
|
|

Click: Center at position"
|
|
>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/map-marker-16x16.png"/>
|
|
<TextBlock Text="{Binding LayerPixelPicker}"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button
|
|
ToolTip.Tip="Layer image zoom level, use mouse scroll to zoom in/out into image.
|
|

Ctrl + 0 OR double right click to scale to fit"
|
|
>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/search-16x16.png"/>
|
|
<TextBlock Text="{Binding LayerZoomStr, StringFormat=Zoom: [ \{0\} ]}"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button
|
|
ToolTip.Tip="Layer Resolution.
|
|

Click: Zoom to fit"
|
|
Command="{Binding ZoomToFitSimple}"
|
|
>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/expand-16x16.png"/>
|
|
<TextBlock Text="{Binding LayerResolutionStr}"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
|
|
<TextBlock
|
|
ToolTip.Tip="Layer preview computation time."
|
|
VerticalAlignment="Center" Text="{Binding ShowLayerRenderMs, StringFormat=\{0\}ms}"/>
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
|
|
</DockPanel>
|
|
</Window>
|