diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2020-10-11 00:57:59 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2020-10-11 00:57:59 +0300 |
commit | 8ea61da764d931e1368312513acb5cc372eae64d (patch) | |
tree | 97645e9ca83b1aeb999f8f33156b36ec8d33f292 | |
parent | d88b2dd455b3fc860730df03f65cef981e78e405 (diff) |
WPF Progressv0.8.4.2
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | UVtools.Core/UVtools.Core.csproj | 6 | ||||
-rw-r--r-- | UVtools.GUI/Properties/AssemblyInfo.cs | 4 | ||||
-rw-r--r-- | UVtools.WPF/Controls/AdvancedImageBox.cs | 9 | ||||
-rw-r--r-- | UVtools.WPF/MainWindow.LayerPreview.cs | 21 | ||||
-rw-r--r-- | UVtools.WPF/MainWindow.PixelEditor.cs | 3 | ||||
-rw-r--r-- | UVtools.WPF/MainWindow.axaml | 60 | ||||
-rw-r--r-- | UVtools.WPF/MainWindow.axaml.cs | 24 |
8 files changed, 70 insertions, 62 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f9f1ad2..6121d9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,11 @@ * (Improvement) GUI is now scalable * (Fix) Some bug found and fixed during convertion -## /10/2020 - v0.8.4.2 +## 10/10/2020 - v0.8.4.2 * (Fix) pws and pw0: Error when try to save or copy to clipboard the slicer information / properties -* (Fix) phton, ctb, cbbdlp, pws, pw0, phz: Rare cases were decoding image generate noise and malformed image +* (Fix) photon, ctb, cbbdlp, phz, pws, pw0: Rare cases were decoding image generate noise and malformed image +* (Fix) Rare cases where manipulation of images generate areas with noise ## 10/10/2020 - v0.8.4.1 diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj index 4c3e802..786f667 100644 --- a/UVtools.Core/UVtools.Core.csproj +++ b/UVtools.Core/UVtools.Core.csproj @@ -10,12 +10,12 @@ <RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl> <PackageProjectUrl>https://github.com/sn4k3/UVtools</PackageProjectUrl> <Description>MSLA/DLP, file analysis, repair, conversion and manipulation</Description> - <Version>0.8.4.1</Version> + <Version>0.8.4.2</Version> <Copyright>Copyright © 2020 PTRTECH</Copyright> <PackageIcon>UVtools.png</PackageIcon> <Platforms>AnyCPU;x64</Platforms> - <AssemblyVersion>0.8.4.1</AssemblyVersion> - <FileVersion>0.8.4.1</FileVersion> + <AssemblyVersion>0.8.4.2</AssemblyVersion> + <FileVersion>0.8.4.2</FileVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> diff --git a/UVtools.GUI/Properties/AssemblyInfo.cs b/UVtools.GUI/Properties/AssemblyInfo.cs index b1782bb..20c38ad 100644 --- a/UVtools.GUI/Properties/AssemblyInfo.cs +++ b/UVtools.GUI/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.8.4.1")] -[assembly: AssemblyFileVersion("0.8.4.1")] +[assembly: AssemblyVersion("0.8.4.2")] +[assembly: AssemblyFileVersion("0.8.4.2")] diff --git a/UVtools.WPF/Controls/AdvancedImageBox.cs b/UVtools.WPF/Controls/AdvancedImageBox.cs index e33ca7e..7fda650 100644 --- a/UVtools.WPF/Controls/AdvancedImageBox.cs +++ b/UVtools.WPF/Controls/AdvancedImageBox.cs @@ -1120,6 +1120,15 @@ namespace UVtools.WPF.Controls } /// <summary> + /// Zooms to current selection region + /// </summary> + public void ZoomToSelectionRegion() + { + if (!HaveSelection) return; + ZoomToRegion(SelectionRegion); + } + + /// <summary> /// Centers the given point in the image in the center of the control /// </summary> /// <param name="imageLocation">The point of the image to attempt to center.</param> diff --git a/UVtools.WPF/MainWindow.LayerPreview.cs b/UVtools.WPF/MainWindow.LayerPreview.cs index d23a1ee..da94ab2 100644 --- a/UVtools.WPF/MainWindow.LayerPreview.cs +++ b/UVtools.WPF/MainWindow.LayerPreview.cs @@ -57,11 +57,15 @@ namespace UVtools.WPF private bool _showLayerOutlineHollowAreas; private bool _showLayerOutlineEdgeDetection; + private bool _isTooltipOverlayVisible; + private string _tooltipOverlayText; + private long _showLayerRenderMs; public LayerCache LayerCache = new LayerCache(); private Point _lastPixelMouseLocation = Point.Empty; + public void InitLayerPreview() { LayerImageBox = this.FindControl<AdvancedImageBox>("LayerImage"); @@ -265,6 +269,18 @@ namespace UVtools.WPF public bool CanGoUp => _actualLayer < SliderMaximumValue; public bool CanGoDown => _actualLayer > 0; + public bool IsTooltipOverlayVisible + { + get => _isTooltipOverlayVisible; + set => RaiseAndSetIfChanged(ref _isTooltipOverlayVisible, value); + } + + public string TooltipOverlayText + { + get => _tooltipOverlayText; + set => RaiseAndSetIfChanged(ref _tooltipOverlayText, value); + } + public string LayerPixelCountStr { get @@ -362,6 +378,11 @@ namespace UVtools.WPF } set => LayerImageBox.SelectionRegion = value.ToAvalonia(); } + + public void OnROIClick() + { + LayerImageBox.ZoomToSelectionRegion(); + } #endregion public void GoFirstLayer() diff --git a/UVtools.WPF/MainWindow.PixelEditor.cs b/UVtools.WPF/MainWindow.PixelEditor.cs index 991e113..59ec244 100644 --- a/UVtools.WPF/MainWindow.PixelEditor.cs +++ b/UVtools.WPF/MainWindow.PixelEditor.cs @@ -101,6 +101,7 @@ namespace UVtools.WPF private void DrawingsGridOnKeyUp(object? sender, KeyEventArgs e) { + switch (e.Key) { case Key.Escape: @@ -264,7 +265,7 @@ namespace UVtools.WPF //if (PixelHistory.Contains(operation)) continue; //PixelHistory.Add(operation); Drawings.Add(operationText); - + /*var color = isAdd ? Settings.PixelEditor.AddPixelColor : Settings.PixelEditor.RemovePixelColor; diff --git a/UVtools.WPF/MainWindow.axaml b/UVtools.WPF/MainWindow.axaml index 86c2473..3e56e71 100644 --- a/UVtools.WPF/MainWindow.axaml +++ b/UVtools.WPF/MainWindow.axaml @@ -641,7 +641,7 @@ </StackPanel> </TabItem.Header> - <Grid RowDefinitions="Auto,Auto,*"> + <Grid RowDefinitions="Auto,20,Auto,*"> <TabControl SelectedIndex="{Binding SelectedPixelOperationTabIndex}"> <!-- Drawing !--> <TabItem @@ -1065,55 +1065,21 @@ 
Note: this operation can't be previewed."/> </Border> <Grid - RowDefinitions="Auto,10,Auto,10,Auto" + RowDefinitions="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="Hole diameter:" /> <NumericUpDown - Grid.Row="4" + Grid.Row="0" Grid.Column="2" Minimum="20" Maximum="255" Value="{Binding DrawingPixelDrainHole.Diameter}"/> <TextBlock - Grid.Row="4" + Grid.Row="0" Grid.Column="4" VerticalAlignment="Center" Text="px" /> @@ -1127,7 +1093,7 @@ <!-- Toolbar !--> <StackPanel - Grid.Row="1" + Grid.Row="2" Orientation="Horizontal" Spacing="1"> <Button IsEnabled="{Binding #DrawingsGrid.SelectedItem, Converter={x:Static ObjectConverters.IsNotNull}}" Command="{Binding OnClickDrawingRemove}"> @@ -1152,7 +1118,7 @@ </StackPanel> <StackPanel - Grid.Row="1" + Grid.Row="2" HorizontalAlignment="Right" Orientation="Horizontal" Spacing="10" @@ -1171,7 +1137,7 @@ <DataGrid Name="DrawingsGrid" - Grid.Row="2" + Grid.Row="3" CanUserReorderColumns="True" CanUserResizeColumns="True" CanUserSortColumns="True" @@ -1526,6 +1492,16 @@ 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" @@ -1547,7 +1523,7 @@ <Button IsEnabled="{Binding #LayerImage.HaveSelection}" - Command="{Binding }" + Command="{Binding OnROIClick}" ToolTip.Tip="Region of interest selection over layer. 
(NS): Not selected 
Click: go to region | ESC: Clear ROI" diff --git a/UVtools.WPF/MainWindow.axaml.cs b/UVtools.WPF/MainWindow.axaml.cs index 8d7b901..fe78532 100644 --- a/UVtools.WPF/MainWindow.axaml.cs +++ b/UVtools.WPF/MainWindow.axaml.cs @@ -447,24 +447,24 @@ namespace UVtools.WPF { LayerImageBox.AutoPan = false; LayerImageBox.Cursor = StaticControls.CrossCursor; - /*lbLayerImageTooltipOverlay.Text = "Pixel editing is on:\n" + + TooltipOverlayText = "Pixel editing is on:\n" + "» Click over a pixel to draw\n" + "» Hold CTRL to clear pixels"; - UpdatePixelEditorCursor();*/ + //UpdatePixelEditorCursor(); } else { LayerImageBox.Cursor = StaticControls.CrossCursor; LayerImageBox.SelectionMode = AdvancedImageBox.SelectionModes.Rectangle; - /*lbLayerImageTooltipOverlay.Text = "ROI selection mode:\n" + - "» Left-click drag to select a fixed region\n" + - "» Left-click + ALT drag to select specific objects\n" + - "» Right click on a specific object to select it\n" + - "Press Esc to clear the ROI";*/ + TooltipOverlayText = "ROI selection mode:\n" + + "» Left-click drag to select a fixed region\n" + + "» Left-click + ALT drag to select specific objects\n" + + "» Right click on a specific object to select it\n" + + "Press Esc to clear the ROI"; } - //lbLayerImageTooltipOverlay.Visible = Settings.Default.LayerTooltipOverlay; + IsTooltipOverlayVisible = Settings.LayerPreview.TooltipOverlay; e.Handled = true; return; } @@ -473,10 +473,10 @@ namespace UVtools.WPF { LayerImageBox.Cursor = StaticControls.HandCursor; LayerImageBox.AutoPan = false; - /*lbLayerImageTooltipOverlay.Text = "Issue selection mode:\n" + - "» Click over an issue to select it"; + TooltipOverlayText = "Issue selection mode:\n" + + "» Click over an issue to select it"; - lbLayerImageTooltipOverlay.Visible = Settings.Default.LayerTooltipOverlay;*/ + IsTooltipOverlayVisible = Settings.LayerPreview.TooltipOverlay; e.Handled = true; return; } @@ -494,7 +494,7 @@ namespace UVtools.WPF LayerImageBox.Cursor = StaticControls.ArrowCursor; LayerImageBox.AutoPan = true; LayerImageBox.SelectionMode = AdvancedImageBox.SelectionModes.None; - //lbLayerImageTooltipOverlay.Visible = false; + IsTooltipOverlayVisible = false; e.Handled = true; } } |