mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-09 01:52:32 +02:00
ac51b7c4e0
- **File Formats:** - (Add) SL1S: Prusa SL1S Speed - (Add) CTB v4 support (318570758) - (Improvement) PHOTON, CBDDLP, CTB v2, PHZ: Disallow per layer settings, beside the format support, printers never use it - (Improvement) Longer Orange format with new found keys - (Improvement) CXDLP: Fix the resolution from CL-60 and trigger an error when a invalid resolution was set and unable to detect the printer model - **Prusa Slicer:** - (Add) UVtools Prusa SL1S SPEED - (Add) Longer Orange 120 - (Fix) Creality HALOT-ONE CL-60: Flip resolution & display and remove mirror - (Fix) Creality HALOT-SKY CL-89: Remove mirror - (Improvement) Longer Orange printers with better default settings - (Add) Button on `Help - Sponsor`: Open github sponsor webpage
2134 lines
80 KiB
XML
2134 lines
80 KiB
XML
<uc: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:uc="clr-namespace:UVtools.WPF.Controls"
|
|
xmlns:uvtava="clr-namespace:UVtools.AvaloniaControls;assembly=UVtools.AvaloniaControls"
|
|
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">
|
|
|
|
<Grid RowDefinitions="*" ColumnDefinitions="*">
|
|
<DockPanel Grid.Row="0" Grid.Column="0" IsEnabled="{Binding IsGUIEnabled}">
|
|
<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
|
|
Header="I _printed this file" HotKey="Ctrl+P" InputGesture="Ctrl+P"
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
Command="{Binding IPrintedThisFile}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\flask-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<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}"
|
|
IsVisible="{Binding MenuFileConvertItems, Converter={x:Static ObjectConverters.IsNotNull}}"
|
|
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="_Calibration"
|
|
IsVisible="{Binding IsFileLoaded}"
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
Items="{Binding MenuCalibration}">
|
|
</MenuItem>
|
|
|
|
|
|
<MenuItem Header="_Help">
|
|
<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="_Website"
|
|
InputGesture="Ctrl + F1" HotKey="Ctrl + F1"
|
|
Command="{Binding OpenHomePage}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\internet-explorer-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="Wi_ki & tutorials"
|
|
Command="{Binding OpenWebsite}"
|
|
CommandParameter="https://github.com/sn4k3/UVtools/wiki">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\wikipedia-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="_Facebook group"
|
|
Command="{Binding OpenWebsite}"
|
|
CommandParameter="https://www.facebook.com/groups/uvtools">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\facebook-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="_Donate"
|
|
Command="{Binding OpenDonateWebsite}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\donate-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="_Sponsor"
|
|
Command="{Binding OpenWebsite}"
|
|
CommandParameter="https://github.com/sponsors/sn4k3">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\heart-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<Separator/>
|
|
|
|
<MenuItem
|
|
Header="_Material manager"
|
|
HotKey="F10"
|
|
InputGesture="F10"
|
|
Command="{Binding MenuHelpMaterialManagerClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\flask-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="_Install profiles into PrusaSlicer"
|
|
Command="{Binding MenuHelpInstallProfilesClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\CNCMachine-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<Separator/>
|
|
|
|
<MenuItem
|
|
Header="_Benchmark"
|
|
Command="{Binding MenuHelpBenchmarkClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\microchip-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<Separator/>
|
|
|
|
<MenuItem
|
|
Header="_Open settings folder"
|
|
Command="{Binding MenuHelpOpenSettingsFolderClicked}">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\open-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<Separator/>
|
|
|
|
<MenuItem
|
|
Header="_Report a issue"
|
|
Command="{Binding OpenWebsite}"
|
|
CommandParameter="https://github.com/sn4k3/UVtools/issues/new?assignees=sn4k3&labels=&template=bug_report.md&title=%5BBUG%5D+">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\bug-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="Ask a _question"
|
|
Command="{Binding OpenWebsite}"
|
|
CommandParameter="https://github.com/sn4k3/UVtools/discussions/categories/q-a">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\question-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
|
|
<MenuItem
|
|
Header="Suggest an improvement or new features"
|
|
Command="{Binding OpenWebsite}"
|
|
CommandParameter="https://github.com/sn4k3/UVtools/discussions/categories/ideas">
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\lightbulb-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}">
|
|
<WrapPanel
|
|
Orientation="Horizontal"
|
|
VerticalAlignment="Center">
|
|
<TextBlock Text="{Binding SlicerFile.LayerHeight, StringFormat=Layer height: \{0\}mm}"/>
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.CanUseBottomLayerCount}" Text=" | "/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.CanUseBottomLayerCount}"
|
|
Text="{Binding SlicerFile.BottomLayerCount, StringFormat=Bottom layers: {0}}"/>
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.CanUseAnyExposureTime}" Text=" | "/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.CanUseAnyExposureTime}"
|
|
Text="{Binding SlicerFile.ExposureRepresentation, StringFormat=Exposure: {0}}"/>
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.CanUseAnyLiftHeight}" Text=" | "/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.CanUseAnyLiftHeight}"
|
|
Text="{Binding SlicerFile.LiftRepresentation, StringFormat=Lift: {0}}"/>
|
|
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.CanUseRetractSpeed}" Text=" | "/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.CanUseRetractSpeed}"
|
|
Text="{Binding SlicerFile.RetractRepresentation, StringFormat=Retract: {0}}"/>
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.CanUseAnyLightOffDelay}" Text=" | "/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.CanUseAnyLightOffDelay}"
|
|
Text="{Binding SlicerFile.LightOffDelayRepresentation, StringFormat=Light-off: {0}}"/>
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.PrintTimeHours}" Text=" | "/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.PrintTimeHours}"
|
|
Text="{Binding SlicerFile.PrintTimeString, StringFormat=Print time: \{0\}}"/>
|
|
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.MaterialMilliliters}" Text=" | "/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.MaterialMilliliters}"
|
|
Text="{Binding SlicerFile.MaterialMilliliters, StringFormat=Used material: \{0\}ml}"/>
|
|
|
|
|
|
<TextBlock IsVisible="{Binding SlicerFile.MaterialCost}" Text=" | "/>
|
|
<TextBlock IsVisible="{Binding SlicerFile.MaterialCost}" Text="{Binding SlicerFile.MaterialCost, StringFormat=Material cost: \{0\}€}"/>
|
|
|
|
|
|
<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\}}"/>
|
|
</WrapPanel>
|
|
</Border>
|
|
|
|
<TabControl
|
|
Background="WhiteSmoke"
|
|
DockPanel.Dock="Left"
|
|
Width="400"
|
|
SelectedItem="{Binding SelectedTabItem}">
|
|
<TabItem
|
|
Name="TabInformation"
|
|
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,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="2"
|
|
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>
|
|
|
|
<!-- Preview image -->
|
|
<Image
|
|
IsVisible="{Binding SlicerFile.CreatedThumbnailsCount}"
|
|
Stretch="Uniform"
|
|
Grid.Row="1" Source="{Binding VisibleThumbnailImage}"/>
|
|
|
|
<GridSplitter Grid.Row="2" ResizeDirection="Rows" ResizeBehavior="PreviousAndNext" Background="Transparent" Height="5"/>
|
|
|
|
<!-- Properties -->
|
|
<StackPanel
|
|
IsVisible="{Binding SlicerProperties.Count}"
|
|
Grid.Row="3"
|
|
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="3"
|
|
Orientation="Horizontal"
|
|
Spacing="2"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center">
|
|
|
|
<Button
|
|
Name="PropertiesSaveButton"
|
|
IsEnabled="{Binding SlicerFile.CreatedThumbnailsCount}"
|
|
ToolTip.Tip="Save properties to a file or clipboard"
|
|
Command="{Binding OpenContextMenu}"
|
|
CommandParameter="PropertiesSave"
|
|
>
|
|
<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="4"
|
|
CanUserReorderColumns="True"
|
|
CanUserResizeColumns="True"
|
|
CanUserSortColumns="True"
|
|
GridLinesVisibility="Horizontal"
|
|
IsReadOnly="True"
|
|
SelectionMode="Extended"
|
|
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>
|
|
|
|
<!-- Layer data -->
|
|
<TextBlock Grid.Row="5"
|
|
Text="Layer data"
|
|
ToolTip.Tip="Shows the properties for the current selected layer"
|
|
FontWeight="Bold"
|
|
TextAlignment="Center"
|
|
Padding="0,10"/>
|
|
<DataGrid
|
|
IsVisible="{Binding IsFileLoaded}"
|
|
Name="CurrentLayerGrid"
|
|
Grid.Row="6"
|
|
CanUserReorderColumns="False"
|
|
CanUserResizeColumns="False"
|
|
CanUserSortColumns="False"
|
|
GridLinesVisibility="Horizontal"
|
|
IsReadOnly="True"
|
|
ClipboardCopyMode="IncludeHeader"
|
|
Items="{Binding CurrentLayerProperties}">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="Name"
|
|
Binding="{Binding Description}"
|
|
Width="Auto" />
|
|
<DataGridTextColumn Header="Value"
|
|
Binding="{Binding Value}"
|
|
Width="Auto" />
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
<TabItem
|
|
Name="TabGCode"
|
|
ToolTip.Tip="GCode"
|
|
IsEnabled="{Binding HaveGCode}">
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/code-32x32.png" Width="32"/>
|
|
<!--<TextBlock
|
|
IsVisible="{Binding $parent[TabItem].IsSelected}"
|
|
VerticalAlignment="Center"
|
|
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="2"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center">
|
|
|
|
<Button
|
|
ToolTip.Tip="Rebuild GCode with current settings"
|
|
Command="{Binding OnClickRebuildGcode}">
|
|
<Image Source="/Assets/Icons/refresh-16x16.png"/>
|
|
</Button>
|
|
|
|
<Button Name="GcodeSaveButton"
|
|
ToolTip.Tip="Save gcode to a file or clipboard"
|
|
Command="{Binding OpenContextMenu}"
|
|
CommandParameter="GcodeSave">
|
|
<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
|
|
Name="TabIssues"
|
|
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="2"
|
|
VerticalAlignment="Center">
|
|
<RepeatButton
|
|
VerticalAlignment="Stretch"
|
|
HotKey="Ctrl + Shift + Down"
|
|
ToolTip.Tip="Go to the previous issue [Ctrl + Shift + Down]"
|
|
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
|
|
VerticalAlignment="Stretch"
|
|
HotKey="Ctrl + Shift + Up"
|
|
ToolTip.Tip="Go to the next issue [Ctrl + Shift + Up]"
|
|
IsEnabled="{Binding IssueCanGoNext}"
|
|
Command="{Binding IssueGoNext}"
|
|
Interval="100"
|
|
>
|
|
<Image Source="/Assets/Icons/next-16x16.png" Width="16"/>
|
|
</RepeatButton>
|
|
|
|
<Button
|
|
VerticalAlignment="Stretch"
|
|
ToolTip.Tip="Hides and ignores the selected issues, they won't be re-detected.
|
|

ALT + Click to re-enable the ignored issues."
|
|
IsEnabled="{Binding #IssuesGrid.SelectedItem, Converter={x:Static ObjectConverters.IsNotNull}}"
|
|
Command="{Binding OnClickIssueIgnore}">
|
|
<Image Source="/Assets/Icons/eye-slash-16x16.png" />
|
|
</Button>
|
|
|
|
<Button
|
|
VerticalAlignment="Stretch"
|
|
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 re-slice."
|
|
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="2"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center">
|
|
|
|
<Button
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
ToolTip.Tip="Attempt to repair issues"
|
|
VerticalAlignment="Stretch"
|
|
Command="{Binding OnClickRepairIssues}">
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/toolbox-16x16.png" />
|
|
<!--<TextBlock VerticalAlignment="Center" Text="Repair"/>!-->
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button
|
|
VerticalAlignment="Stretch"
|
|
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.ComputePrintHeight}"
|
|
Content="Print height"/>
|
|
<CheckBox
|
|
IsChecked="{Binding Settings.Issues.ComputeEmptyLayers}"
|
|
Content="Empty layers"/>
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/refresh-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
|
|
Name="TabPixelEditor"
|
|
ToolTip.Tip="Pixel editor"
|
|
IsVisible="{Binding IsPixelEditorActive}"
|
|
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
|
|
Padding="10,0"
|
|
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">
|
|
<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,10,Auto,10,Auto,10,Auto,10,Auto"
|
|
ColumnDefinitions="Auto,10,130,5,40">
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Line type:" />
|
|
<ComboBox
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Width="180"
|
|
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="3"
|
|
Width="180"
|
|
Items="{Binding DrawingPixelDrawing.BrushShapeTypes}"
|
|
SelectedItem="{Binding DrawingPixelDrawing.BrushShape}"/>
|
|
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Rotation angle:" />
|
|
<NumericUpDown
|
|
Grid.Row="4"
|
|
Grid.Column="2"
|
|
FormatString="F2"
|
|
Minimum="-360"
|
|
Maximum="360"
|
|
Value="{Binding DrawingPixelDrawing.RotationAngle}"/>
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="º" />
|
|
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Brush diameter:" />
|
|
<NumericUpDown
|
|
Grid.Row="6"
|
|
Grid.Column="2"
|
|
Minimum="1"
|
|
Maximum="4000"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
Value="{Binding DrawingPixelDrawing.BrushSize}"/>
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="px" />
|
|
|
|
<TextBlock
|
|
Grid.Row="8"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Thickness:" />
|
|
<NumericUpDown
|
|
Grid.Row="8"
|
|
Grid.Column="2"
|
|
Minimum="-1"
|
|
Maximum="255"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
Value="{Binding DrawingPixelDrawing.Thickness}"/>
|
|
<TextBlock
|
|
Grid.Row="8"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="px" />
|
|
|
|
<TextBlock
|
|
Grid.Row="10"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Remove pixel brightness:" />
|
|
<NumericUpDown
|
|
Grid.Row="10"
|
|
Grid.Column="2"
|
|
Minimum="0"
|
|
Maximum="255"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
Value="{Binding DrawingPixelDrawing.RemovePixelBrightness}"/>
|
|
<TextBlock
|
|
Grid.Row="10"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding DrawingPixelDrawing.RemovePixelBrightnessPercent, StringFormat=\{0:0\}%}" />
|
|
|
|
<TextBlock
|
|
Grid.Row="12"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Add pixel brightness:" />
|
|
<NumericUpDown
|
|
Grid.Row="12"
|
|
Grid.Column="2"
|
|
Minimum="1"
|
|
Maximum="255"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
Value="{Binding DrawingPixelDrawing.PixelBrightness}"/>
|
|
<TextBlock
|
|
Grid.Row="12"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding DrawingPixelDrawing.PixelBrightnessPercent, StringFormat=\{0:0\}%}" />
|
|
|
|
<TextBlock
|
|
Grid.Row="14"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Layers depth below:" />
|
|
<NumericUpDown
|
|
Grid.Row="14"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Minimum="0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
Value="{Binding DrawingPixelDrawing.LayersBelow}"/>
|
|
|
|
|
|
<TextBlock
|
|
Grid.Row="16"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Layers depth above:" />
|
|
<NumericUpDown
|
|
Grid.Row="16"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Minimum="0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
Value="{Binding DrawingPixelDrawing.LayersAbove}"/>
|
|
|
|
</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">
|
|
<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,10,Auto,10,Auto,10,Auto,10,Auto,10,Auto"
|
|
ColumnDefinitions="Auto,10,130,5,40">
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Line type:" />
|
|
<ComboBox
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Width="180"
|
|
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"
|
|
Width="180"
|
|
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"
|
|
AcceptsReturn="True"
|
|
Height="90"
|
|
Text="{Binding DrawingPixelText.Text}"/>
|
|
|
|
<TextBlock
|
|
Grid.Row="10"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Line alignment:" />
|
|
<ComboBox
|
|
Grid.Row="10"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Width="180"
|
|
Items="{Binding DrawingPixelText.LineAlignment, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
|
|
SelectedItem="{Binding DrawingPixelText.LineAlignment, Converter={StaticResource FromValueDescriptionToEnumConverter}}"/>
|
|
|
|
<CheckBox
|
|
Grid.Row="12"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Content="Flip text Vertically"
|
|
IsChecked="{Binding DrawingPixelText.Mirror}"/>
|
|
|
|
<TextBlock
|
|
Grid.Row="14"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Rotation angle:" />
|
|
<NumericUpDown
|
|
Grid.Row="14"
|
|
Grid.Column="2"
|
|
FormatString="F2"
|
|
Minimum="-360"
|
|
Maximum="360"
|
|
Value="{Binding DrawingPixelText.Angle}"/>
|
|
<TextBlock
|
|
Grid.Row="14"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="º" />
|
|
|
|
<TextBlock
|
|
Grid.Row="16"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Remove pixel brightness:" />
|
|
<NumericUpDown
|
|
Grid.Row="16"
|
|
Grid.Column="2"
|
|
Minimum="0"
|
|
Maximum="255"
|
|
|
|
Value="{Binding DrawingPixelText.RemovePixelBrightness}"/>
|
|
<TextBlock
|
|
Grid.Row="16"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding DrawingPixelText.RemovePixelBrightnessPercent, StringFormat=\{0:0\}%}" />
|
|
|
|
<TextBlock
|
|
Grid.Row="18"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Add pixel brightness:" />
|
|
<NumericUpDown
|
|
Grid.Row="18"
|
|
Grid.Column="2"
|
|
Minimum="1"
|
|
Maximum="255"
|
|
|
|
Value="{Binding DrawingPixelText.PixelBrightness}"/>
|
|
<TextBlock
|
|
Grid.Row="18"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding DrawingPixelText.PixelBrightnessPercent, StringFormat=\{0:0\}%}" />
|
|
|
|
|
|
<TextBlock
|
|
Grid.Row="20"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Layers depth below:" />
|
|
<NumericUpDown
|
|
Grid.Row="20"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Minimum="0"
|
|
|
|
Value="{Binding DrawingPixelText.LayersBelow}"/>
|
|
|
|
|
|
<TextBlock
|
|
Grid.Row="22"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Layers depth above:" />
|
|
<NumericUpDown
|
|
Grid.Row="22"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Minimum="0"
|
|
|
|
Value="{Binding DrawingPixelText.LayersAbove}"/>
|
|
|
|
</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">
|
|
<Border Background="LightGray" BorderThickness="1" BorderBrush="Black">
|
|
<TextBlock Padding="10" Text="Shift+click over a white pixel to remove the linked area.
|
|

(Fill linked area with black)"/>
|
|
</Border>
|
|
|
|
<Grid
|
|
RowDefinitions="Auto,10,Auto,10,Auto"
|
|
ColumnDefinitions="Auto,10,*,10,40">
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Pixel brightness:" />
|
|
<NumericUpDown
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
Minimum="0"
|
|
Maximum="255"
|
|
|
|
Value="{Binding DrawingPixelEraser.PixelBrightness}"/>
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding DrawingPixelEraser.PixelBrightnessPercent, StringFormat=\{0:0\}%}" />
|
|
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Layers depth below:" />
|
|
<NumericUpDown
|
|
Grid.Row="2"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Minimum="0"
|
|
|
|
Value="{Binding DrawingPixelEraser.LayersBelow}"/>
|
|
|
|
<TextBlock
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Layers depth above:" />
|
|
<NumericUpDown
|
|
Grid.Row="4"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="3"
|
|
Minimum="0"
|
|
|
|
Value="{Binding DrawingPixelEraser.LayersAbove}"/>
|
|
|
|
|
|
</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" >
|
|
<Border Background="LightGray" BorderThickness="1" BorderBrush="Black">
|
|
<TextBlock Padding="10" Text="Shift+click under a island to add primitive support.
|
|

Note: this operation can't be previewed."/>
|
|
</Border>
|
|
<Grid
|
|
RowDefinitions="Auto,10,Auto,10,Auto,10,Auto"
|
|
ColumnDefinitions="Auto,10,*,5,35">
|
|
<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" />
|
|
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Text="Pixel brightness:" />
|
|
<NumericUpDown
|
|
Grid.Row="6"
|
|
Grid.Column="2"
|
|
Minimum="0"
|
|
Maximum="255"
|
|
|
|
Value="{Binding DrawingPixelSupport.PixelBrightness}"/>
|
|
<TextBlock
|
|
Grid.Row="6"
|
|
Grid.Column="4"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding DrawingPixelSupport.PixelBrightnessPercent, StringFormat=\{0:0\}%}" />
|
|
|
|
</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">
|
|
<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,*,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
|
|
Name="TabClipboard"
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
ToolTip.Tip="Clipboard">
|
|
<TabItem.Header>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/clipboard-32x32.png" Width="32"/>
|
|
<!--<TextBlock Margin="5,0,0,0">Clipboard</TextBlock>!-->
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
|
|
<Grid RowDefinitions="Auto,*">
|
|
<StackPanel Orientation="Horizontal" Spacing="2">
|
|
<!--
|
|
<Button
|
|
IsEnabled="{Binding Clipboard.Items.Count}"
|
|
Command="{Binding Clipboard.SetToOldest}"
|
|
ToolTip.Tip="Go to first clip">
|
|
<Image Source="/Assets/Icons/arrow-end-16x16.png" Width="16"/>
|
|
</Button>
|
|
!-->
|
|
|
|
<Button
|
|
IsEnabled="{Binding Clipboard.CanUndo}"
|
|
Command="{Binding ClipboardUndo}"
|
|
HotKey="Ctrl + Z"
|
|
ToolTip.Tip="Undo [Ctrl + Z]
|
|

Shift + Click to Undo and edit last operation [Ctrl + Shift + Z]">
|
|
<Image Source="/Assets/Icons/undo-16x16.png" Width="16"/>
|
|
</Button>
|
|
|
|
<TextBlock VerticalAlignment="Center">
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="\{0\}/\{1\}">
|
|
<Binding Path="Clipboard.CurrentIndexCountStr"/>
|
|
<Binding Path="Clipboard.Items.Count"/>
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
|
|
<Button
|
|
IsEnabled="{Binding Clipboard.CanRedo}"
|
|
Command="{Binding ClipboardRedo}"
|
|
HotKey="Ctrl + Y"
|
|
ToolTip.Tip="Redo [Ctrl + Y]"
|
|
>
|
|
<Image Source="/Assets/Icons/redo-16x16.png" Width="16"/>
|
|
</Button>
|
|
|
|
<!--
|
|
<Button
|
|
IsEnabled="{Binding Clipboard.Items.Count}"
|
|
Command="{Binding Clipboard.SetToNewest}"
|
|
ToolTip.Tip="Go to first clip">
|
|
<Image Source="/Assets/Icons/arrow-top-16x16.png" Width="16"/>
|
|
</Button>
|
|
!-->
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="2" HorizontalAlignment="Right">
|
|
<Button
|
|
IsEnabled="{Binding Clipboard.Items.Count}"
|
|
Command="{Binding ClipboardClear}"
|
|
ToolTip.Tip="Clear all clips"
|
|
>
|
|
<Image Source="/Assets/Icons/delete-16x16.png" Width="16"/>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<ListBox
|
|
Grid.Row="1"
|
|
Name="ClipboardList"
|
|
SelectionMode="Single"
|
|
AutoScrollToSelectedItem="True"
|
|
SelectedIndex="{Binding Clipboard.CurrentIndex}"
|
|
Items="{Binding Clipboard.Items}" />
|
|
</Grid>
|
|
</TabItem>
|
|
|
|
|
|
<TabItem
|
|
Name="TabLog"
|
|
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"
|
|
SelectionMode="Extended"
|
|
>
|
|
<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="160"
|
|
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"
|
|
HorizontalAlignment="Stretch"
|
|
IsEnabled="{Binding CanGoUp}"
|
|
Command="{Binding GoNextLayer}">
|
|
<Image Width="16" Height="16" Source="/Assets/Icons/arrow-up-16x16.png"/>
|
|
</RepeatButton>
|
|
|
|
<Grid
|
|
Name="LayerNavigationSliderGrid"
|
|
Grid.Row="2" ColumnDefinitions="*,20,40">
|
|
<Panel
|
|
Grid.Column="0"
|
|
Name="LayerNavigationTooltipPanel"
|
|
Margin="{Binding LayerNavigationTooltipMargin}"
|
|
HorizontalAlignment="Stretch">
|
|
<Border
|
|
Name="Layer.Navigation.Tooltip.Border"
|
|
VerticalAlignment="Top"
|
|
BorderBrush="AliceBlue"
|
|
BorderThickness="5"
|
|
CornerRadius="5"
|
|
>
|
|
<TextBlock Padding="2" 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"
|
|
/>
|
|
|
|
<Slider
|
|
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"
|
|
HorizontalAlignment="Stretch"
|
|
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">
|
|
<Grid Grid.Row="0" Grid.Column="0"
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
ColumnDefinitions="*,Auto" RowDefinitions="Auto" Margin="5">
|
|
<WrapPanel HorizontalAlignment="Left" Grid.Row="0" Orientation="Horizontal">
|
|
<ToggleButton
|
|
IsChecked="{Binding ShowLayerImageRotated}"
|
|
HotKey="Ctrl + R"
|
|
VerticalAlignment="Stretch"
|
|
ToolTip.Tip="Auto rotate layer preview image at 90º (This can slow down the layer preview) [CTRL+R]">
|
|
<Button.ContextMenu>
|
|
<ContextMenu PlacementMode="Bottom">
|
|
<RadioButton
|
|
GroupName="ShowLayerImageRotateDirection"
|
|
IsChecked="{Binding ShowLayerImageRotateCWDirection}"
|
|
Content="90º Clockwise (CW)"/>
|
|
<RadioButton
|
|
GroupName="ShowLayerImageRotateDirection"
|
|
IsChecked="{Binding ShowLayerImageRotateCCWDirection}"
|
|
Content="90º Counter-clockwise (CCW)"/>
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/sync-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Rotate ⮟"/>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
|
|
|
|
<ToggleButton
|
|
IsChecked="{Binding ShowLayerImageFlipped}"
|
|
HotKey="Ctrl + F"
|
|
VerticalAlignment="Stretch"
|
|
ToolTip.Tip="Auto flip layer preview image (This can slow down the layer preview) [CTRL+F]">
|
|
<Button.ContextMenu>
|
|
<ContextMenu PlacementMode="Bottom">
|
|
<CheckBox
|
|
IsChecked="{Binding ShowLayerImageFlippedHorizontally}"
|
|
Content="Horizontally"/>
|
|
<CheckBox
|
|
IsChecked="{Binding ShowLayerImageFlippedVertically}"
|
|
Content="Vertically"/>
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/flip-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Flip ⮟"/>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
|
|
|
|
<ToggleButton
|
|
IsChecked="{Binding ShowLayerImageDifference}"
|
|
ToolTip.Tip="Show layer differences where darker pixels were also present on previous layer and the white pixels the difference between previous and current layer."
|
|
VerticalAlignment="Stretch"
|
|
Margin="1,0,0,0">
|
|
<Button.ContextMenu>
|
|
<ContextMenu PlacementMode="Bottom">
|
|
<CheckBox
|
|
Content="Show layer similarity instead of difference"
|
|
ToolTip.Tip="If enabled, it will recolor the current layer pixels in common with the previous and next layer"
|
|
IsChecked="{Binding Settings.LayerPreview.LayerDifferenceHighlightSimilarityInstead}"/>
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
<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."
|
|
VerticalAlignment="Stretch"
|
|
Margin="1,0,0,0"
|
|
>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/warning-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Issues"/>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
|
|
<ToggleButton
|
|
IsChecked="{Binding ShowLayerImageCrosshairs}"
|
|
ToolTip.Tip="Show crosshairs for selected issues on the current layer."
|
|
VerticalAlignment="Stretch"
|
|
Margin="1,0,0,0"
|
|
>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/crosshairs-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Crosshairs"/>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
|
|
<Button Name="LayerPreviewOutlineButton"
|
|
ToolTip.Tip="Click to access the various outlines."
|
|
Command="{Binding OpenContextMenu}"
|
|
CommandParameter="LayerPreviewOutline"
|
|
VerticalAlignment="Stretch"
|
|
Margin="1,0,0,0"
|
|
>
|
|
<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"/>
|
|
<CheckBox
|
|
IsChecked="{Binding ShowLayerOutlineSkeletonize}"
|
|
IsEnabled="{Binding !ShowLayerOutlineEdgeDetection}"
|
|
Content="Skeletonize"/>
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/vector-square-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Outline ⮟"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
|
|
<ToggleButton HorizontalAlignment="Right"
|
|
IsChecked="{Binding IsPixelEditorActive}"
|
|
ToolTip.Tip="Edit layer image: Draw pixels, add supports and/or drain holes."
|
|
VerticalAlignment="Stretch"
|
|
Margin="0,0,0,0">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/pixel-16x16.png"/>
|
|
<TextBlock Margin="5,0,5,0" Text="Pixel editor"/>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
|
|
</WrapPanel>
|
|
|
|
|
|
<StackPanel HorizontalAlignment="Right" Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
|
|
<Button Name="LayerActionsButton"
|
|
Command="{Binding OpenContextMenu}"
|
|
VerticalAlignment="Stretch"
|
|
CommandParameter="LayerActions">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/layers-alt-16x16.png"/>
|
|
<TextBlock VerticalAlignment="Center" 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]"
|
|
VerticalAlignment="Stretch"
|
|
Margin="1,0,0,0">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/refresh-16x16.png"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
<Button
|
|
Command="{Binding SaveCurrentLayerImage}"
|
|
ToolTip.Tip="Save layer image to a file"
|
|
VerticalAlignment="Stretch"
|
|
Margin="1,0,0,0">
|
|
<Button.ContextMenu>
|
|
<ContextMenu PlacementMode="Bottom">
|
|
<MenuItem
|
|
Command="{Binding SaveCurrentROIImage}"
|
|
Header="Save the selected region (ROI)">
|
|
<MenuItem.Icon>
|
|
<Image Source="/Assets/Icons/object-group-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
</ContextMenu>
|
|
</Button.ContextMenu>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="/Assets/Icons/save-16x16.png"/>
|
|
<TextBlock Text=" ⮟"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<Border
|
|
Grid.Row="1"
|
|
BorderBrush="WhiteSmoke"
|
|
BorderThickness="5"
|
|
>
|
|
<uvtava:AdvancedImageBox
|
|
ShowGrid="{Binding Settings.LayerPreview.ShowBackgroudGrid}"
|
|
GridCellSize="15"
|
|
Name="LayerImage"/>
|
|
</Border>
|
|
|
|
|
|
<Canvas Grid.Row="1" Margin="20"
|
|
IsVisible="{Binding IsTooltipOverlayVisible}"
|
|
>
|
|
<Border
|
|
BorderThickness="1"
|
|
BorderBrush="Black"
|
|
Background="{Binding Settings.LayerPreview.TooltipOverlayBackgroundBrush}"
|
|
Padding="10"
|
|
CornerRadius="5"
|
|
>
|
|
<TextBlock Text="{Binding TooltipOverlayText}" />
|
|
</Border>
|
|
</Canvas>
|
|
|
|
|
|
|
|
<Grid
|
|
IsEnabled="{Binding IsFileLoaded}"
|
|
Grid.Row="2"
|
|
ColumnDefinitions="4*,2*" RowDefinitions="Auto" Margin="5">
|
|
<WrapPanel Orientation="Horizontal">
|
|
<StackPanel
|
|
ToolTip.Tip="Number of pixels to cure on this layer image and the percentage of them against total lcd pixels and the total cured millimeters."
|
|
VerticalAlignment="Center" Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/pixel-16x16.png"/>
|
|
<TextBlock Text="{Binding LayerPixelCountStr}"/>
|
|
</StackPanel>
|
|
|
|
<Button
|
|
ToolTip.Tip="Object volume bounds for current layer, position and size in pixels and millimeters.
|
|

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

(NS): Not selected
|
|

Click: go to region
|
|

ESC: Clear ROI & Masks | ESC + Shift: Clear ROI"
|
|
>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" Spacing="5">
|
|
<Image Source="/Assets/Icons/object-group-16x16.png"/>
|
|
<TextBlock Text="{Binding LayerROIStr}"/>
|
|
</StackPanel>
|
|
</Button>
|
|
|
|
</WrapPanel>
|
|
|
|
<WrapPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal">
|
|
<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"
|
|
Margin="2,0,0,0"
|
|
>
|
|
<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 and display size.
|
|

Click: Zoom to fit"
|
|
Command="{Binding ZoomToFitSimple}"
|
|
Margin="2,0,0,0"
|
|
>
|
|
<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."
|
|
Margin="5,0,0,0"
|
|
VerticalAlignment="Center" Text="{Binding ShowLayerRenderMs, StringFormat=\{0\}ms}"/>
|
|
</WrapPanel>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
|
|
</DockPanel>
|
|
<Grid Grid.Row="0" Grid.Column="0"
|
|
RowDefinitions="*,Auto,*" ColumnDefinitions="*,Auto,*"
|
|
IsEnabled="{Binding IsProgressVisible}"
|
|
IsVisible="{Binding IsProgressVisible}">
|
|
<Border Grid.Row="1" Grid.Column="1" MinWidth="450"
|
|
Background="White"
|
|
BorderBrush="WhiteSmoke"
|
|
BorderThickness="5"
|
|
CornerRadius="5">
|
|
<Grid RowDefinitions="Auto,Auto,Auto,Auto"
|
|
ColumnDefinitions="*">
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
Margin="10" Text="{Binding Progress.Title}"/>
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Margin="10,0,10,10" Text="{Binding Progress.ElapsedTimeStr, StringFormat=Elapsed Time: \{0\}}"/>
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
Margin="10,0,10,10" Text="{Binding Progress.Description}" HorizontalAlignment="Center"/>
|
|
|
|
<Grid
|
|
Grid.Row="3"
|
|
RowDefinitions="30" ColumnDefinitions="*,100">
|
|
<ProgressBar
|
|
Grid.Column="0"
|
|
Minimum="0"
|
|
Maximum="100"
|
|
VerticalAlignment="Stretch"
|
|
IsIndeterminate="{Binding Progress.IsIndeterminate}"
|
|
Value="{Binding Progress.ProgressPercent}" ShowProgressText="True"/>
|
|
<Button
|
|
IsEnabled="{Binding Progress.CanCancel}"
|
|
Command="{Binding ProgressOnClickCancel}"
|
|
Grid.Column="1"
|
|
IsCancel="True"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalContentAlignment="Center"
|
|
HorizontalContentAlignment="Center"
|
|
Content="Cancel"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</uc:WindowEx>
|