diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2022-10-20 23:42:31 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2022-10-20 23:42:31 +0300 |
commit | 927673520387c2eb88b0d385d11babb7802533c1 (patch) | |
tree | 10542428033bb2026955f17fa86674df78517b0f /UVtools.WPF | |
parent | c312478ea3a8daab6c9e753f61a401418da0e97d (diff) |
v3.7.2v3.7.2
- **File formats:**
- (Add) AnyCubic PM3R (#587)
- (Add) AnyCubic PMX2
- (Fix) LGS: `LightOffDelay` is `WaitTimeBeforeCure` in this format
- **PrusaSlicer printer:**
- (Add) AnyCubic Photon M3 Premium
- (Add) AnyCubic Photon Mono X2
- (Fix) Scripting: Unable to use sub-classes (#583)
- (Fix) Loading an image as file cause application to crash
- (Fix) "File - Send to" doesn't ignore case on file extension names resulting in ignore files in a uppercase even if extension is correct
- (Fix) Do not show layer material milliliters when value is 0 or the percentage is NaN
- (Fix) Auto-upgrade on Linux with AppImage integrated on system causes the file name to grow with hash strings
Diffstat (limited to 'UVtools.WPF')
-rw-r--r-- | UVtools.WPF/MainWindow.Information.cs | 2 | ||||
-rw-r--r-- | UVtools.WPF/MainWindow.axaml.cs | 18 | ||||
-rw-r--r-- | UVtools.WPF/Structures/AppVersionChecker.cs | 8 | ||||
-rw-r--r-- | UVtools.WPF/UVtools.WPF.csproj | 2 |
4 files changed, 17 insertions, 13 deletions
diff --git a/UVtools.WPF/MainWindow.Information.cs b/UVtools.WPF/MainWindow.Information.cs index 92021fd..1a8b413 100644 --- a/UVtools.WPF/MainWindow.Information.cs +++ b/UVtools.WPF/MainWindow.Information.cs @@ -374,7 +374,7 @@ public partial class MainWindow CurrentLayerProperties.Add(new ValueDescription(layer.LightPWM.ToString(), nameof(layer.LightPWM))); } var materialMillilitersPercent = layer.MaterialMillilitersPercent; - if (!float.IsNaN(materialMillilitersPercent)) + if (layer.MaterialMilliliters > 0 && !float.IsNaN(materialMillilitersPercent)) { CurrentLayerProperties.Add(new ValueDescription($"{layer.MaterialMilliliters}ml ({materialMillilitersPercent:F2}%)", nameof(layer.MaterialMilliliters))); } diff --git a/UVtools.WPF/MainWindow.axaml.cs b/UVtools.WPF/MainWindow.axaml.cs index c8b727a..fc393df 100644 --- a/UVtools.WPF/MainWindow.axaml.cs +++ b/UVtools.WPF/MainWindow.axaml.cs @@ -373,7 +373,7 @@ public partial class MainWindow : WindowEx var found = false; foreach (var ext in extensions) { - found = SlicerFile.FileFullPath.EndsWith($".{ext}"); + found = SlicerFile.FileEndsWith($".{ext}"); if (found) break; } if(!found) continue; @@ -404,7 +404,7 @@ public partial class MainWindow : WindowEx var found = false; foreach (var ext in extensions) { - found = SlicerFile.FileFullPath.EndsWith($".{ext}"); + found = SlicerFile.FileEndsWith($".{ext}"); if (found) break; } if (!found) continue; @@ -435,7 +435,7 @@ public partial class MainWindow : WindowEx var found = false; foreach (var ext in extensions) { - found = SlicerFile.FileFullPath.EndsWith($".{ext}"); + found = SlicerFile.FileEndsWith($".{ext}"); if (found) break; } if (!found) continue; @@ -1277,7 +1277,7 @@ public partial class MainWindow : WindowEx { if (!File.Exists(files[i])) continue; - if (files[i].EndsWith(".uvtop")) + if (files[i].EndsWith(".uvtop", StringComparison.OrdinalIgnoreCase)) { if(!IsFileLoaded) continue; try @@ -1295,7 +1295,7 @@ public partial class MainWindow : WindowEx continue; } - if (files[i].EndsWith(".cs") || files[i].EndsWith(".csx")) + if (files[i].EndsWith(".cs", StringComparison.OrdinalIgnoreCase) || files[i].EndsWith(".csx", StringComparison.OrdinalIgnoreCase)) { if (!IsFileLoaded) continue; try @@ -1759,10 +1759,14 @@ public partial class MainWindow : WindowEx if (SlicerFile is CTBEncryptedFile) { + if (Settings.General.LockedFilesOpenCounter == 0) + { + await this.MessageBoxInfo(CTBEncryptedFile.Preamble, "Information"); + } + Settings.General.LockedFilesOpenCounter++; if (Settings.General.LockedFilesOpenCounter >= UserSettings.GeneralUserSettings.LockedFilesMaxOpenCounter) { - await this.MessageBoxInfo(CTBEncryptedFile.Preamble, "Information"); Settings.General.LockedFilesOpenCounter = 0; } UserSettings.Save(); @@ -1867,7 +1871,7 @@ public partial class MainWindow : WindowEx catch (Exception ex) { string extraMessage = string.Empty; - if (SlicerFile.FileFullPath!.EndsWith(".sl1")) + if (SlicerFile.FileEndsWith(".sl1")) { extraMessage = "Note: When converting from SL1 make sure you have the correct printer selected, you MUST use a UVtools base printer.\n" + "Go to \"Help\" -> \"Install profiles into PrusaSlicer\" to install printers.\n"; diff --git a/UVtools.WPF/Structures/AppVersionChecker.cs b/UVtools.WPF/Structures/AppVersionChecker.cs index e4018b8..650c137 100644 --- a/UVtools.WPF/Structures/AppVersionChecker.cs +++ b/UVtools.WPF/Structures/AppVersionChecker.cs @@ -209,10 +209,10 @@ public class AppVersionChecker : BindableBase if (downloadFilename.EndsWith(".AppImage") && SystemAware.IsRunningLinuxAppImage(out var appImagePath)) { var directory = Path.GetDirectoryName(appImagePath); - var oldFileName = Path.GetFileName(appImagePath); + //var oldFileName = Path.GetFileName(appImagePath); // Try to keep same filename logic if user renamed the file, like UVtools.AppImage would keep same same - var newFilename = Regex.Replace(oldFileName, @"v\d.\d.\d", $"v{_version}"); - var newFullPath = Path.Combine(directory, newFilename); + //var newFilename = Regex.Replace(oldFileName, @"v\d+.\d+.\d+", $"v{_version}"); + var newFullPath = Path.Combine(directory, downloadFilename); if (File.Exists(appImagePath)) File.Delete(appImagePath); File.Move(DownloadedFile, newFullPath, true); @@ -247,7 +247,7 @@ public class AppVersionChecker : BindableBase //stream.WriteLine($"[ -f {About.Software} ] && {App.AppExecutableQuoted} & || dotnet {About.Software}.dll &"); if (SystemAware.IsRunningMacOSApp) { - await stream.WriteLineAsync($"find {upgradeFolder} -print0 | xargs -0 xattr -d com.apple.quarantine"); + await stream.WriteLineAsync($"find '{upgradeFolder}' -print0 | xargs -0 xattr -d com.apple.quarantine"); await stream.WriteLineAsync($"cp -fR {upgradeFolder}/* ../../../"); await stream.WriteLineAsync($"open ../../../{About.Software}.app"); } diff --git a/UVtools.WPF/UVtools.WPF.csproj b/UVtools.WPF/UVtools.WPF.csproj index ec73205..2dfc86b 100644 --- a/UVtools.WPF/UVtools.WPF.csproj +++ b/UVtools.WPF/UVtools.WPF.csproj @@ -12,7 +12,7 @@ <PackageLicenseFile>LICENSE</PackageLicenseFile> <RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl> <RepositoryType>Git</RepositoryType> - <Version>3.7.1</Version> + <Version>3.7.2</Version> <Platforms>AnyCPU;x64</Platforms> <PackageIcon>UVtools.png</PackageIcon> <PackageReadmeFile>README.md</PackageReadmeFile> |