mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-12 05:58:34 +00:00
Renamed Settings to OutputSettings, shifted several classes to IO folder/namespace
This commit is contained in:
parent
a6fd33c3d0
commit
1f1c12e553
@ -1,5 +1,7 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
using OSCADSharp.IO;
|
||||
using OSCADSharp.Utility;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
@ -149,7 +151,7 @@ namespace OSCADSharp.UnitTests
|
||||
|
||||
cube.ToFile("myFile");
|
||||
|
||||
Assert.AreEqual(Settings.OSCADSharpHeader, output[0]);
|
||||
Assert.AreEqual(OutputSettings.OSCADSharpHeader, output[0]);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Moq;
|
||||
using OSCADSharp.IO;
|
||||
using OSCADSharp.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -32,7 +34,7 @@ namespace OSCADSharp.UnitTests
|
||||
[ExpectedException(typeof(InvalidOperationException))]
|
||||
public void Settings_NullOpenSCADPathThrowsError()
|
||||
{
|
||||
Settings.OpenSCADPath = null;
|
||||
OutputSettings.OpenSCADPath = null;
|
||||
|
||||
var cube = new Cube();
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using OSCADSharp.IO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
using System;
|
||||
using OSCADSharp.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OSCADSharp
|
||||
namespace OSCADSharp.IO
|
||||
{
|
||||
internal class DefaultFileInvoker : IFileInvoker
|
||||
{
|
||||
@ -19,7 +20,7 @@ namespace OSCADSharp
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(Settings.OpenSCADPath, String.Format("-o {0} {1}", outputFile, this.filePath));
|
||||
Process.Start(OutputSettings.OpenSCADPath, String.Format("-o {0} {1}", outputFile, this.filePath));
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
@ -31,7 +32,7 @@ namespace OSCADSharp
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(Settings.OpenSCADPath, String.Format("{0}", this.filePath));
|
||||
Process.Start(OutputSettings.OpenSCADPath, String.Format("{0}", this.filePath));
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OSCADSharp
|
||||
namespace OSCADSharp.IO
|
||||
{
|
||||
internal class DefaultFileWriter : IFileWriter
|
||||
{
|
||||
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OSCADSharp
|
||||
namespace OSCADSharp.IO
|
||||
{
|
||||
/// <summary>
|
||||
/// Invokes OpenSCAD actions on output files
|
||||
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OSCADSharp
|
||||
namespace OSCADSharp.IO
|
||||
{
|
||||
/// <summary>
|
||||
/// A class that takes text and writes to file
|
||||
@ -5,7 +5,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OSCADSharp
|
||||
namespace OSCADSharp.IO
|
||||
{
|
||||
/// <summary>
|
||||
/// Known where the default installation locations for OpenSCAD
|
||||
@ -1,16 +1,17 @@
|
||||
using System;
|
||||
using OSCADSharp.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OSCADSharp
|
||||
namespace OSCADSharp.IO
|
||||
{
|
||||
/// <summary>
|
||||
/// Settings for OpenSCAD scripts
|
||||
/// </summary>
|
||||
public static class Settings
|
||||
public static class OutputSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// Code-gen header
|
||||
@ -1,4 +1,5 @@
|
||||
using OSCADSharp.Utility;
|
||||
using OSCADSharp.IO;
|
||||
using OSCADSharp.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@ -839,7 +840,7 @@ namespace OSCADSharp
|
||||
|
||||
Dependencies.FileWriter.WriteAllLines(path, new string[]
|
||||
{
|
||||
Settings.OSCADSharpHeader,
|
||||
OutputSettings.OSCADSharpHeader,
|
||||
Variables.Global.ToString(),
|
||||
this.ToString()
|
||||
});
|
||||
|
||||
@ -52,19 +52,19 @@
|
||||
<Compile Include="VariableCalculator.cs" />
|
||||
<Compile Include="CompoundVariable.cs" />
|
||||
<Compile Include="Dependencies.cs" />
|
||||
<Compile Include="DefaultFileInvoker.cs" />
|
||||
<Compile Include="DefaultFileWriter.cs" />
|
||||
<Compile Include="IFileInvoker.cs" />
|
||||
<Compile Include="IFileWriter.cs" />
|
||||
<Compile Include="IO\DefaultFileInvoker.cs" />
|
||||
<Compile Include="IO\DefaultFileWriter.cs" />
|
||||
<Compile Include="IO\IFileInvoker.cs" />
|
||||
<Compile Include="IO\IFileWriter.cs" />
|
||||
<Compile Include="Utility\Ids.cs" />
|
||||
<Compile Include="OpenSCADPathFinder.cs" />
|
||||
<Compile Include="IO\OpenSCADPathFinder.cs" />
|
||||
<Compile Include="Binding.cs" />
|
||||
<Compile Include="Bindings.cs" />
|
||||
<Compile Include="IBindable.cs" />
|
||||
<Compile Include="SingleStatementObject.cs" />
|
||||
<Compile Include="StatementBuilder.cs" />
|
||||
<Compile Include="Variable.cs" />
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="IO\OutputSettings.cs" />
|
||||
<Compile Include="Utility\Inches.cs" />
|
||||
<Compile Include="BindableVector.cs" />
|
||||
<Compile Include="Bounds.cs" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user