mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-09 01:52:32 +02:00
953 lines
34 KiB
XML
953 lines
34 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 CloseFile}">
|
|
<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.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 Alt+F4"
|
|
InputGesture="Alt+F4"
|
|
Command="{Binding Close}"
|
|
>
|
|
<MenuItem.Icon>
|
|
<Image Source="\Assets\Icons\exit-16x16.png"/>
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
</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>
|
|
</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}"
|
|
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
|
|
Grid.Row="0"
|
|
Orientation="Horizontal"
|
|
Spacing="5"
|
|
VerticalAlignment="Center">
|
|
<Button
|
|
IsEnabled="{Binding IssueCanGoPrevious}"
|
|
Command="{Binding IssueGoPrevious}"
|
|
>
|
|
<Image Source="/Assets/Icons/back-16x16.png" Width="16"/>
|
|
</Button>
|
|
|
|
<TextBlock VerticalAlignment="Center">
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="\{0\}/\{1\}">
|
|
<Binding Path="IssueSelectedIndexStr"/>
|
|
<Binding Path="Issues.Count"/>
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
|
|
<Button
|
|
IsEnabled="{Binding IssueCanGoNext}"
|
|
Command="{Binding IssueGoNext}"
|
|
>
|
|
<Image Source="/Assets/Icons/next-16x16.png" Width="16"/>
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Orientation="Horizontal"
|
|
Spacing="5"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center">
|
|
|
|
<Button
|
|
IsEnabled="{Binding VisibleThumbnailIndex}"
|
|
ToolTip.Tip="Replace the current preview image"
|
|
Command="{Binding OnClickThumbnailImport}">
|
|
<Image Source="/Assets/Icons/photo-16x16.png" />
|
|
</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.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>
|
|
|
|
<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>
|
|
</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="*,16,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>
|
|
|
|
<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,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>
|
|
|
|
<uc:AdvancedImageBox
|
|
Grid.Row="1"
|
|
GridCellSize="15"
|
|
Name="Layer.Image"
|
|
/>
|
|
|
|
<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
|
|
ToolTip.Tip="Region of interest selection over layer. (NS): Not selected
|
|
Click: go to region | SHIFT + click: 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}"
|
|
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>
|