Skip to content

Commit

Permalink
feat: support cura 5.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MaSch0212 committed Apr 27, 2024
1 parent 24dd6c1 commit 321b240
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
7 changes: 7 additions & 0 deletions docs/release-notes/v1.7.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The following changes were made in this version:

| Type | Description |
| ---- | ----------- |
| feature | CuraManager now officially supports Cura version 5.7.1. |

[comment]: # (Use one of the following types: feature, bugfix, tech)
4 changes: 2 additions & 2 deletions src/CuraManager/CuraManager.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- General Project info -->
<TargetFramework>net8.0-windows</TargetFramework>
Expand All @@ -18,7 +18,7 @@
<ApplicationIcon>../../resources/CuraManager.ico</ApplicationIcon>

<!-- Package Info -->
<Version>1.7.0</Version>
<Version>1.7.1</Version>
<Authors>Marc Schmidt</Authors>
<Copyright>Copyright © 2019 - $([System.DateTime]::Now.ToString('yyyy')) $(Authors)</Copyright>
<SupportedOSPlatform>windows</SupportedOSPlatform>
Expand Down
15 changes: 4 additions & 11 deletions src/CuraManager/Services/CuraService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace CuraManager.Services;

public class CuraService : ICuraService
public class CuraService(ISettingsService settingsService) : ICuraService
{
private static readonly string ProgramFilesDir = Environment.GetFolderPath(
Environment.SpecialFolder.ProgramFiles
Expand All @@ -20,18 +20,11 @@ public class CuraService : ICuraService
Environment.SpecialFolder.ApplicationData
);

private readonly ISettingsService _settingsService;

public Version LatestSupportedCuraVersion { get; } = new Version(5, 7, 0, 0);
public Version LatestSupportedCuraVersion { get; } = new Version(5, 7, 1, 0);

internal CuraService()
: this(ServiceContext.GetService<ISettingsService>()) { }

public CuraService(ISettingsService settingsService)
{
_settingsService = settingsService;
}

public async Task<bool> CreateCuraProject(PrintElement element)
{
var dialog = new CreateCuraProjectDialog(element)
Expand All @@ -54,7 +47,7 @@ from m in Enumerable.Range(0, x.Amount)

public void OpenCura(PrintElement element, string printName, IEnumerable<string> modelsToAdd)
{
var settings = _settingsService.LoadSettings();
var settings = settingsService.LoadSettings();

SetCuraSaveDialogPath(element.DirectoryLocation, settings);

Expand Down Expand Up @@ -168,7 +161,7 @@ bool CheckEditNameButton(TreeWalker treeWalker, AutomationElement e)

public void OpenCuraProject(string fileName)
{
var settings = _settingsService.LoadSettings();
var settings = settingsService.LoadSettings();

SetCuraSaveDialogPath(Path.GetDirectoryName(fileName), settings);

Expand Down

0 comments on commit 321b240

Please sign in to comment.