Files
OpenNest/OpenNest/Forms/CuttingParametersDialog.cs
T
aj aec0523062 style: apply CSharpier formatting to all C# sources
Repo-wide sweep with the pinned CSharpier 1.3.0 tool. Whitespace and
line-wrapping only; OpenNest.Engine.Tests (109) and OpenNest.IO.Tests
pass after reformat, full solution builds 0 errors.

Added .csharpierignore so csproj/config XML keeps its existing layout
(CSharpier's XML wrapping churns attributes with zero benefit).

Formatting is now enforceable: dotnet csharpier check . passes.
2026-09-20 16:41:50 -04:00

62 lines
1.7 KiB
C#

using System.Drawing;
using System.Windows.Forms;
using OpenNest.CNC.CuttingStrategy;
using OpenNest.Controls;
namespace OpenNest.Forms
{
public class CuttingParametersDialog : Form
{
private readonly CuttingPanel cuttingPanel;
public CuttingParametersDialog()
{
Text = "Cutting Parameters";
Size = new Size(400, 560);
FormBorderStyle = FormBorderStyle.FixedDialog;
MaximizeBox = false;
MinimizeBox = false;
StartPosition = FormStartPosition.CenterParent;
cuttingPanel = new CuttingPanel { Dock = DockStyle.Fill };
var buttonPanel = new Panel { Dock = DockStyle.Bottom, Height = 40 };
var btnOk = new Button
{
Text = "OK",
DialogResult = DialogResult.OK,
Size = new Size(80, 28),
Location = new Point(220, 6),
};
var btnCancel = new Button
{
Text = "Cancel",
DialogResult = DialogResult.Cancel,
Size = new Size(80, 28),
Location = new Point(305, 6),
};
buttonPanel.Controls.Add(btnOk);
buttonPanel.Controls.Add(btnCancel);
Controls.Add(cuttingPanel);
Controls.Add(buttonPanel);
AcceptButton = btnOk;
CancelButton = btnCancel;
}
public void LoadParameters(CuttingParameters parameters)
{
cuttingPanel.LoadFromParameters(parameters);
}
public CuttingParameters GetParameters()
{
return cuttingPanel.BuildParameters();
}
}
}