Restructure project layout to flatten directory structure
Move all projects from Source/ to repository root for simpler navigation. - Remove External/ dependency DLLs (will use NuGet packages) - Remove Installer/ NSIS script - Replace PartCollection/PlateCollection with ObservableList - Add packages.config for NuGet dependencies 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
@@ -0,0 +1,20 @@
|
||||
using OpenNest.Controls;
|
||||
|
||||
namespace OpenNest.Actions
|
||||
{
|
||||
public abstract class Action
|
||||
{
|
||||
protected PlateView plateView;
|
||||
|
||||
protected Action(PlateView plateView)
|
||||
{
|
||||
this.plateView = plateView;
|
||||
}
|
||||
|
||||
public abstract void DisconnectEvents();
|
||||
|
||||
public abstract void CancelAction();
|
||||
|
||||
public abstract bool IsBusy();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Controls;
|
||||
|
||||
namespace OpenNest.Actions
|
||||
{
|
||||
[DisplayName("Add Parts")]
|
||||
public class ActionAddPart : Action
|
||||
{
|
||||
private LayoutPart part;
|
||||
private double lastScale;
|
||||
|
||||
public ActionAddPart(PlateView plateView)
|
||||
: this(plateView, null)
|
||||
{
|
||||
}
|
||||
|
||||
public ActionAddPart(PlateView plateView, Drawing drawing)
|
||||
: base(plateView)
|
||||
{
|
||||
plateView.KeyDown += plateView_KeyDown;
|
||||
plateView.MouseMove += plateView_MouseMove;
|
||||
plateView.MouseDown += plateView_MouseDown;
|
||||
plateView.Paint += plateView_Paint;
|
||||
|
||||
part = LayoutPart.Create(new Part(drawing), plateView);
|
||||
part.IsSelected = true;
|
||||
|
||||
lastScale = double.NaN;
|
||||
|
||||
plateView.SelectedParts.Clear();
|
||||
plateView.SelectedParts.Add(part);
|
||||
}
|
||||
|
||||
private void plateView_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
switch (e.Button)
|
||||
{
|
||||
case MouseButtons.Left:
|
||||
Apply();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void plateView_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.F1:
|
||||
case Keys.Enter:
|
||||
Apply();
|
||||
break;
|
||||
|
||||
case Keys.F:
|
||||
if ((Control.ModifierKeys & Keys.Control) == Keys.Control)
|
||||
Fill();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void plateView_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
if (plateView.ViewScale != lastScale)
|
||||
{
|
||||
part.Update(plateView);
|
||||
part.Draw(e.Graphics);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (part.IsDirty)
|
||||
part.Update(plateView);
|
||||
|
||||
part.Draw(e.Graphics);
|
||||
}
|
||||
|
||||
lastScale = plateView.ViewScale;
|
||||
}
|
||||
|
||||
private void plateView_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
var offset = plateView.CurrentPoint - part.BoundingBox.Location;
|
||||
part.Offset(offset);
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
public override void DisconnectEvents()
|
||||
{
|
||||
plateView.KeyDown -= plateView_KeyDown;
|
||||
plateView.MouseMove -= plateView_MouseMove;
|
||||
plateView.MouseDown -= plateView_MouseDown;
|
||||
plateView.Paint -= plateView_Paint;
|
||||
|
||||
plateView.SelectedParts.Clear();
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
public override void CancelAction()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsBusy()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private void Fill()
|
||||
{
|
||||
var boxes = new List<Box>();
|
||||
|
||||
foreach (var part in plateView.Plate.Parts)
|
||||
boxes.Add(part.BoundingBox.Offset(plateView.Plate.PartSpacing));
|
||||
|
||||
var bounds = plateView.Plate.WorkArea();
|
||||
|
||||
var vbox = Helper.GetLargestBoxVertically(plateView.CurrentPoint, bounds, boxes);
|
||||
var hbox = Helper.GetLargestBoxHorizontally(plateView.CurrentPoint, bounds, boxes);
|
||||
|
||||
var box = vbox.Area() > hbox.Area() ? vbox : hbox;
|
||||
|
||||
var engine = new NestEngine(plateView.Plate);
|
||||
engine.FillArea(box, new NestItem { Drawing = this.part.BasePart.BaseDrawing });
|
||||
}
|
||||
|
||||
private void Apply()
|
||||
{
|
||||
if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift)
|
||||
{
|
||||
switch (plateView.Plate.Quadrant)
|
||||
{
|
||||
case 1:
|
||||
plateView.PushSelected(PushDirection.Left);
|
||||
plateView.PushSelected(PushDirection.Down);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
plateView.PushSelected(PushDirection.Right);
|
||||
plateView.PushSelected(PushDirection.Down);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
plateView.PushSelected(PushDirection.Right);
|
||||
plateView.PushSelected(PushDirection.Up);
|
||||
break;
|
||||
case 4:
|
||||
plateView.PushSelected(PushDirection.Left);
|
||||
plateView.PushSelected(PushDirection.Up);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
plateView.Plate.Parts.Add(part.BasePart.Clone() as Part);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Controls;
|
||||
|
||||
namespace OpenNest.Actions
|
||||
{
|
||||
[DisplayName("Clone Parts")]
|
||||
public class ActionClone : Action
|
||||
{
|
||||
private readonly List<LayoutPart> parts;
|
||||
|
||||
private double lastScale;
|
||||
|
||||
public ActionClone(PlateView plateView, List<Part> partsToClone)
|
||||
: base(plateView)
|
||||
{
|
||||
plateView.KeyDown += plateView_KeyDown;
|
||||
plateView.MouseMove += plateView_MouseMove;
|
||||
plateView.MouseDown += plateView_MouseDown;
|
||||
plateView.Paint += plateView_Paint;
|
||||
|
||||
parts = new List<LayoutPart>();
|
||||
lastScale = double.NaN;
|
||||
|
||||
for (int i = 0; i < partsToClone.Count; i++)
|
||||
{
|
||||
var part = LayoutPart.Create(partsToClone[i].Clone() as Part, plateView);
|
||||
part.IsSelected = true;
|
||||
parts.Add(part);
|
||||
}
|
||||
|
||||
plateView.SelectedParts.Clear();
|
||||
plateView.SelectedParts.AddRange(parts);
|
||||
}
|
||||
|
||||
private void plateView_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
switch (e.Button)
|
||||
{
|
||||
case MouseButtons.Left:
|
||||
Apply();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void plateView_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.F1:
|
||||
case Keys.Enter:
|
||||
Apply();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void plateView_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
if (plateView.ViewScale != lastScale)
|
||||
{
|
||||
parts.ForEach(p =>
|
||||
{
|
||||
p.Update(plateView);
|
||||
p.Draw(e.Graphics);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
parts.ForEach(p =>
|
||||
{
|
||||
if (p.IsDirty)
|
||||
p.Update(plateView);
|
||||
|
||||
p.Draw(e.Graphics);
|
||||
});
|
||||
}
|
||||
|
||||
lastScale = plateView.ViewScale;
|
||||
}
|
||||
|
||||
private void plateView_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
var offset = plateView.CurrentPoint - parts.GetBoundingBox().Location;
|
||||
parts.ForEach(p => p.Offset(offset));
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
public override void DisconnectEvents()
|
||||
{
|
||||
plateView.KeyDown -= plateView_KeyDown;
|
||||
plateView.MouseMove -= plateView_MouseMove;
|
||||
plateView.MouseDown -= plateView_MouseDown;
|
||||
plateView.Paint -= plateView_Paint;
|
||||
|
||||
plateView.SelectedParts.Clear();
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
public override void CancelAction()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsBusy()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Apply()
|
||||
{
|
||||
if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift)
|
||||
{
|
||||
plateView.PushSelected(PushDirection.Left);
|
||||
plateView.PushSelected(PushDirection.Down);
|
||||
}
|
||||
|
||||
parts.ForEach(p => plateView.Plate.Parts.Add(p.BasePart.Clone() as Part));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Controls;
|
||||
|
||||
namespace OpenNest.Actions
|
||||
{
|
||||
[DisplayName("Fill Area")]
|
||||
public class ActionFillArea : ActionSelectArea
|
||||
{
|
||||
private Drawing drawing;
|
||||
|
||||
public ActionFillArea(PlateView plateView, Drawing drawing)
|
||||
: base(plateView)
|
||||
{
|
||||
plateView.PreviewKeyDown += plateView_PreviewKeyDown;
|
||||
this.drawing = drawing;
|
||||
}
|
||||
|
||||
private void plateView_PreviewKeyDown(object sender, System.Windows.Forms.PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
FillArea();
|
||||
}
|
||||
|
||||
private void FillArea()
|
||||
{
|
||||
var engine = new NestEngine(plateView.Plate);
|
||||
engine.FillArea(SelectedArea, new NestItem
|
||||
{
|
||||
Drawing = drawing
|
||||
});
|
||||
|
||||
plateView.Invalidate();
|
||||
Update();
|
||||
}
|
||||
|
||||
public override void DisconnectEvents()
|
||||
{
|
||||
plateView.PreviewKeyDown -= plateView_PreviewKeyDown;
|
||||
base.DisconnectEvents();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Controls;
|
||||
|
||||
namespace OpenNest.Actions
|
||||
{
|
||||
[DisplayName("Select")]
|
||||
public class ActionSelect : Action
|
||||
{
|
||||
private readonly Pen borderPenContain;
|
||||
private readonly Pen borderPenIntersect;
|
||||
private readonly Brush fillBrushContain;
|
||||
private readonly Brush fillBrushIntersect;
|
||||
|
||||
private Pen borderPen;
|
||||
private Brush fillBrush;
|
||||
|
||||
public Vector Point1;
|
||||
public Vector Point2;
|
||||
|
||||
private Status status;
|
||||
|
||||
public ActionSelect(PlateView plateView)
|
||||
: base(plateView)
|
||||
{
|
||||
borderPenIntersect = new Pen(Color.FromArgb(50, 255, 50));
|
||||
fillBrushIntersect = new SolidBrush(Color.FromArgb(50, 50, 255, 50));
|
||||
|
||||
borderPenContain = new Pen(Color.FromArgb(99, 162, 228));
|
||||
fillBrushContain = new SolidBrush(Color.FromArgb(90, 150, 200, 255));
|
||||
|
||||
UpdateBrushAndPen();
|
||||
|
||||
status = Status.SetFirstPoint;
|
||||
|
||||
plateView.MouseDown += plateView_MouseDown;
|
||||
plateView.MouseUp += plateView_MouseUp;
|
||||
plateView.MouseMove += plateView_MouseMove;
|
||||
plateView.Paint += plateView_Paint;
|
||||
}
|
||||
|
||||
public override void DisconnectEvents()
|
||||
{
|
||||
plateView.MouseDown -= plateView_MouseDown;
|
||||
plateView.MouseUp -= plateView_MouseUp;
|
||||
plateView.MouseMove -= plateView_MouseMove;
|
||||
plateView.Paint -= plateView_Paint;
|
||||
}
|
||||
|
||||
public override void CancelAction()
|
||||
{
|
||||
status = Status.SetFirstPoint;
|
||||
|
||||
plateView.DeselectAll();
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
public override bool IsBusy()
|
||||
{
|
||||
return status != Status.SetFirstPoint || plateView.SelectedParts.Count > 0;
|
||||
}
|
||||
|
||||
private void plateView_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button != MouseButtons.Left)
|
||||
return;
|
||||
|
||||
if (status == Status.SetSecondPoint)
|
||||
{
|
||||
Point2 = plateView.PointControlToWorld(e.Location);
|
||||
UpdateBrushAndPen();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (plateView.SelectedParts.Count == 0)
|
||||
return;
|
||||
|
||||
var offset = plateView.CurrentPoint - plateView.LastPoint;
|
||||
|
||||
foreach (var part in plateView.SelectedParts)
|
||||
part.Offset(offset.X, offset.Y);
|
||||
}
|
||||
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
private void plateView_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (!plateView.AllowSelect)
|
||||
return;
|
||||
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
if (plateView.SelectedParts.Count > 0)
|
||||
{
|
||||
var part = plateView.GetPartAtControlPoint(e.Location);
|
||||
|
||||
if (part == null)
|
||||
CancelAction();
|
||||
}
|
||||
|
||||
if (SelectPartAtCurrentPoint())
|
||||
return;
|
||||
|
||||
if (status == Status.SetFirstPoint)
|
||||
{
|
||||
Point1 = plateView.PointControlToWorld(e.Location);
|
||||
Point2 = Point1;
|
||||
status = Status.SetSecondPoint;
|
||||
}
|
||||
}
|
||||
else if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
CancelAction();
|
||||
}
|
||||
}
|
||||
|
||||
private void plateView_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (!plateView.AllowSelect)
|
||||
return;
|
||||
|
||||
if (e.Button != MouseButtons.Left)
|
||||
return;
|
||||
|
||||
if (status == Status.SetSecondPoint)
|
||||
{
|
||||
Point2 = plateView.PointControlToWorld(e.Location);
|
||||
SelectPartsInWindow();
|
||||
|
||||
plateView.Invalidate();
|
||||
status = Status.SetFirstPoint;
|
||||
}
|
||||
}
|
||||
|
||||
private void plateView_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
if (status != Status.SetSecondPoint)
|
||||
return;
|
||||
|
||||
var rect = GetRectangle();
|
||||
|
||||
e.Graphics.FillRectangle(fillBrush, rect);
|
||||
|
||||
e.Graphics.DrawRectangle(borderPen,
|
||||
rect.X,
|
||||
rect.Y,
|
||||
rect.Width,
|
||||
rect.Height);
|
||||
}
|
||||
|
||||
private bool SelectPartAtCurrentPoint()
|
||||
{
|
||||
var part = plateView.GetPartAtPoint(plateView.CurrentPoint);
|
||||
|
||||
if (part == null)
|
||||
{
|
||||
plateView.DeselectAll();
|
||||
status = Status.SetFirstPoint;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Control.ModifierKeys != Keys.Control && plateView.SelectedParts.Contains(part) == false)
|
||||
plateView.DeselectAll();
|
||||
|
||||
if (plateView.SelectedParts.Contains(part) == false)
|
||||
{
|
||||
plateView.SelectedParts.Add(part);
|
||||
part.IsSelected = true;
|
||||
}
|
||||
|
||||
plateView.Invalidate();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void SelectPartsInWindow()
|
||||
{
|
||||
var parts = plateView.GetPartsFromWindow(GetRectangle(), SelectionType);
|
||||
|
||||
foreach (var part in parts)
|
||||
{
|
||||
if (plateView.SelectedParts.Contains(part))
|
||||
continue;
|
||||
|
||||
plateView.SelectedParts.Add(part);
|
||||
part.IsSelected = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateBrushAndPen()
|
||||
{
|
||||
if (SelectionType == SelectionType.Intersect)
|
||||
{
|
||||
borderPen = borderPenIntersect;
|
||||
fillBrush = fillBrushIntersect;
|
||||
}
|
||||
else
|
||||
{
|
||||
borderPen = borderPenContain;
|
||||
fillBrush = fillBrushContain;
|
||||
}
|
||||
}
|
||||
|
||||
private RectangleF GetRectangle()
|
||||
{
|
||||
var rect = new RectangleF();
|
||||
var pt1 = plateView.PointWorldToGraph(Point1);
|
||||
var pt2 = plateView.PointWorldToGraph(Point2);
|
||||
|
||||
if (pt1.X < pt2.X)
|
||||
{
|
||||
rect.X = pt1.X;
|
||||
rect.Width = pt2.X - pt1.X;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.X = pt2.X;
|
||||
rect.Width = pt1.X - pt2.X;
|
||||
}
|
||||
|
||||
if (pt1.Y < pt2.Y)
|
||||
{
|
||||
rect.Y = pt1.Y;
|
||||
rect.Height = pt2.Y - pt1.Y;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.Y = pt2.Y;
|
||||
rect.Height = pt1.Y - pt2.Y;
|
||||
}
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
public SelectionType SelectionType
|
||||
{
|
||||
get
|
||||
{
|
||||
return Point1.X < Point2.X
|
||||
? SelectionType.Contains
|
||||
: SelectionType.Intersect;
|
||||
}
|
||||
}
|
||||
|
||||
public enum Status
|
||||
{
|
||||
SetFirstPoint,
|
||||
SetSecondPoint
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Controls;
|
||||
|
||||
namespace OpenNest.Actions
|
||||
{
|
||||
[DisplayName("Select Area")]
|
||||
public class ActionSelectArea : Action
|
||||
{
|
||||
public Box SelectedArea { get; private set; }
|
||||
private Box Bounds { get; set; }
|
||||
private List<Box> boxes { get; set; }
|
||||
|
||||
private bool dynamicSelect;
|
||||
private bool altSelect;
|
||||
|
||||
private readonly Pen pen;
|
||||
private readonly Brush brush;
|
||||
|
||||
private readonly Font font;
|
||||
private readonly StringFormat stringFormat;
|
||||
|
||||
public ActionSelectArea(PlateView plateView)
|
||||
: base(plateView)
|
||||
{
|
||||
boxes = new List<Box>();
|
||||
pen = new Pen(Color.FromArgb(50, 255, 50));
|
||||
brush = new SolidBrush(Color.FromArgb(50, 50, 255, 50));
|
||||
font = new Font(SystemFonts.DefaultFont.FontFamily, 14);
|
||||
|
||||
stringFormat = new StringFormat
|
||||
{
|
||||
Alignment = StringAlignment.Center,
|
||||
LineAlignment = StringAlignment.Center
|
||||
};
|
||||
|
||||
SelectedArea = Box.Empty;
|
||||
dynamicSelect = true;
|
||||
|
||||
Update();
|
||||
|
||||
if (dynamicSelect)
|
||||
plateView.MouseMove += plateView_MouseMove;
|
||||
else
|
||||
plateView.MouseClick += plateView_MouseClick;
|
||||
|
||||
plateView.KeyUp += plateView_KeyUp;
|
||||
plateView.Paint += plateView_Paint;
|
||||
}
|
||||
|
||||
private void plateView_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.Space:
|
||||
altSelect = !altSelect;
|
||||
UpdateSelectedArea();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public bool DynamicSelect
|
||||
{
|
||||
get { return dynamicSelect; }
|
||||
set
|
||||
{
|
||||
if (value == dynamicSelect)
|
||||
return;
|
||||
|
||||
dynamicSelect = value;
|
||||
|
||||
if (dynamicSelect)
|
||||
{
|
||||
plateView.MouseMove += plateView_MouseMove;
|
||||
plateView.MouseClick -= plateView_MouseClick;
|
||||
}
|
||||
else
|
||||
{
|
||||
plateView.MouseMove -= plateView_MouseMove;
|
||||
plateView.MouseClick += plateView_MouseClick;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void plateView_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
|
||||
{
|
||||
if (SelectedArea == Box.Empty)
|
||||
return;
|
||||
|
||||
var location = plateView.PointWorldToGraph(SelectedArea.Location);
|
||||
var size = new SizeF(
|
||||
plateView.LengthWorldToGui(SelectedArea.Width),
|
||||
plateView.LengthWorldToGui(SelectedArea.Height));
|
||||
|
||||
var rect = new System.Drawing.RectangleF(location.X, location.Y - size.Height, size.Width, size.Height);
|
||||
|
||||
e.Graphics.DrawRectangle(pen,
|
||||
rect.X,
|
||||
rect.Y,
|
||||
rect.Width,
|
||||
rect.Height);
|
||||
|
||||
e.Graphics.FillRectangle(brush, rect);
|
||||
|
||||
e.Graphics.DrawString(
|
||||
SelectedArea.Size.ToString(2),
|
||||
font,
|
||||
Brushes.Green,
|
||||
rect,
|
||||
stringFormat);
|
||||
}
|
||||
|
||||
private void plateView_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
|
||||
{
|
||||
UpdateSelectedArea();
|
||||
}
|
||||
|
||||
private void plateView_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
|
||||
{
|
||||
if (e.Button != System.Windows.Forms.MouseButtons.Left)
|
||||
return;
|
||||
|
||||
UpdateSelectedArea();
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
public override void DisconnectEvents()
|
||||
{
|
||||
plateView.KeyUp -= plateView_KeyUp;
|
||||
plateView.MouseMove -= plateView_MouseMove;
|
||||
plateView.MouseClick -= plateView_MouseClick;
|
||||
plateView.Paint -= plateView_Paint;
|
||||
}
|
||||
|
||||
public override void CancelAction()
|
||||
{
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
public override bool IsBusy()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private void UpdateSelectedArea()
|
||||
{
|
||||
SelectedArea = altSelect
|
||||
? Helper.GetLargestBoxHorizontally(plateView.CurrentPoint, Bounds, boxes)
|
||||
: Helper.GetLargestBoxVertically(plateView.CurrentPoint, Bounds, boxes);
|
||||
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
foreach (var part in plateView.Plate.Parts)
|
||||
boxes.Add(part.BoundingBox.Offset(plateView.Plate.PartSpacing));
|
||||
|
||||
Bounds = plateView.Plate.WorkArea();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Controls;
|
||||
using OpenNest.Forms;
|
||||
using OpenNest.Geometry;
|
||||
|
||||
namespace OpenNest.Actions
|
||||
{
|
||||
[DisplayName("Set Sequence")]
|
||||
public class ActionSetSequence : Action
|
||||
{
|
||||
private readonly SequenceForm SequenceForm;
|
||||
private readonly List<Pair> ShapePartPairs;
|
||||
private readonly Pen pen;
|
||||
|
||||
private Shape ClosestShape;
|
||||
private Part ClosestPart;
|
||||
private int sequenceNumber = 1;
|
||||
|
||||
public int SequenceNumber
|
||||
{
|
||||
get { return sequenceNumber; }
|
||||
set
|
||||
{
|
||||
if (value <= SequenceForm.numericUpDown1.Maximum && value >= SequenceForm.numericUpDown1.Minimum)
|
||||
{
|
||||
sequenceNumber = value;
|
||||
SequenceForm.numericUpDown1.Value = sequenceNumber;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ActionSetSequence(PlateView plateView)
|
||||
: base(plateView)
|
||||
{
|
||||
SequenceForm = new Forms.SequenceForm();
|
||||
SequenceForm.numericUpDown1.DataBindings.Add("Value", this, "SequenceNumber", false, DataSourceUpdateMode.OnPropertyChanged);
|
||||
SequenceForm.numericUpDown1.Maximum = plateView.Plate.Parts.Count;
|
||||
SequenceForm.Owner = Application.OpenForms[0];
|
||||
SequenceForm.Show();
|
||||
plateView.Invalidate();
|
||||
|
||||
pen = new Pen(Color.Blue, 2.0f);
|
||||
|
||||
ShapePartPairs = new List<Pair>();
|
||||
|
||||
foreach (var part in plateView.Plate.Parts)
|
||||
{
|
||||
var entities = ConvertProgram.ToGeometry(part.Program).Where(e => e.Layer == SpecialLayers.Cut).ToList();
|
||||
entities.ForEach(entity => entity.Offset(part.Location));
|
||||
var shapes = Helper.GetShapes(entities);
|
||||
var shape = new Shape();
|
||||
shape.Entities.AddRange(shapes);
|
||||
ShapePartPairs.Add(new Pair() { Part = part, Shape = shape });
|
||||
}
|
||||
|
||||
plateView.MouseMove += plateView_MouseMove;
|
||||
plateView.MouseClick += plateView_MouseClick;
|
||||
plateView.Paint += plateView_Paint;
|
||||
|
||||
SequenceNumber = 1;
|
||||
}
|
||||
|
||||
private void plateView_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Right)
|
||||
CancelAction();
|
||||
|
||||
if (e.Button != MouseButtons.Left)
|
||||
return;
|
||||
|
||||
if (SequenceNumber > plateView.Plate.Parts.Count)
|
||||
SequenceNumber = plateView.Plate.Parts.Count;
|
||||
|
||||
if (ClosestPart == null)
|
||||
return;
|
||||
|
||||
plateView.Plate.Parts.Remove(ClosestPart);
|
||||
plateView.Plate.Parts.Insert(SequenceNumber - 1, ClosestPart);
|
||||
|
||||
SequenceNumber++;
|
||||
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
private void plateView_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
var pair = GetClosestShape();
|
||||
ClosestShape = pair.HasValue ? pair.Value.Shape : null;
|
||||
ClosestPart = pair.HasValue ? pair.Value.Part : null;
|
||||
plateView.Invalidate();
|
||||
}
|
||||
|
||||
private void plateView_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
if (ClosestShape == null) return;
|
||||
|
||||
var path = ClosestShape.GetGraphicsPath();
|
||||
path.Transform(plateView.Matrix);
|
||||
e.Graphics.DrawPath(pen, path);
|
||||
path.Dispose();
|
||||
}
|
||||
|
||||
private Pair? GetClosestShape()
|
||||
{
|
||||
Pair? closestShape = null;
|
||||
double distance = double.MaxValue;
|
||||
|
||||
for (int i = 0; i < ShapePartPairs.Count; i++)
|
||||
{
|
||||
var shape = ShapePartPairs[i];
|
||||
var closestPt = shape.Shape.ClosestPointTo(plateView.CurrentPoint);
|
||||
var distance2 = closestPt.DistanceTo(plateView.CurrentPoint);
|
||||
|
||||
if (distance2 < distance)
|
||||
{
|
||||
closestShape = shape;
|
||||
distance = distance2;
|
||||
}
|
||||
}
|
||||
|
||||
return closestShape;
|
||||
}
|
||||
|
||||
public override void DisconnectEvents()
|
||||
{
|
||||
plateView.Paint -= plateView_Paint;
|
||||
plateView.MouseMove -= plateView_MouseMove;
|
||||
plateView.MouseClick -= plateView_MouseClick;
|
||||
plateView.Invalidate();
|
||||
|
||||
SequenceForm.Close();
|
||||
}
|
||||
|
||||
public override void CancelAction()
|
||||
{
|
||||
SequenceNumber = 1;
|
||||
SequenceForm.numericUpDown1.Value = SequenceNumber + 1;
|
||||
}
|
||||
|
||||
public override bool IsBusy()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private struct Pair
|
||||
{
|
||||
public Part Part;
|
||||
public Shape Shape;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Controls;
|
||||
|
||||
namespace OpenNest.Actions
|
||||
{
|
||||
[DisplayName("Zoom Window")]
|
||||
public class ActionZoomWindow : Action
|
||||
{
|
||||
public Vector Point1;
|
||||
public Vector Point2;
|
||||
|
||||
private readonly Pen borderPen;
|
||||
private readonly Brush fillBrush;
|
||||
|
||||
private Status status;
|
||||
|
||||
public ActionZoomWindow(PlateView plateView)
|
||||
: base(plateView)
|
||||
{
|
||||
borderPen = new Pen(Color.FromArgb(99, 162, 228));
|
||||
fillBrush = new SolidBrush(Color.FromArgb(90, 150, 200, 255));
|
||||
|
||||
status = Status.SetFirstPoint;
|
||||
|
||||
plateView.Cursor = Cursors.Arrow;
|
||||
plateView.MouseDown += plateView_MouseDown;
|
||||
plateView.MouseUp += plateView_MouseUp;
|
||||
plateView.MouseMove += plateView_MouseMove;
|
||||
plateView.Paint += plateView_Paint;
|
||||
}
|
||||
|
||||
public override void DisconnectEvents()
|
||||
{
|
||||
plateView.Cursor = Cursors.Cross;
|
||||
plateView.MouseDown -= plateView_MouseDown;
|
||||
plateView.MouseUp -= plateView_MouseUp;
|
||||
plateView.MouseMove -= plateView_MouseMove;
|
||||
plateView.Paint -= plateView_Paint;
|
||||
}
|
||||
|
||||
public override void CancelAction()
|
||||
{
|
||||
Point1 = Vector.Invalid;
|
||||
Point2 = Vector.Invalid;
|
||||
|
||||
plateView.Invalidate();
|
||||
status = Status.SetFirstPoint;
|
||||
}
|
||||
|
||||
public override bool IsBusy()
|
||||
{
|
||||
return status != Status.SetFirstPoint;
|
||||
}
|
||||
|
||||
private void plateView_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (status == Status.SetSecondPoint || e.Button == MouseButtons.Left)
|
||||
{
|
||||
Point2 = plateView.PointControlToWorld(e.Location);
|
||||
plateView.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void plateView_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
CancelAction();
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Button != MouseButtons.Left)
|
||||
return;
|
||||
|
||||
if (e.Button == MouseButtons.Left && status == Status.SetFirstPoint)
|
||||
{
|
||||
Point1 = plateView.PointControlToWorld(e.Location);
|
||||
Point2 = Point1;
|
||||
plateView.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void plateView_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button != MouseButtons.Left)
|
||||
return;
|
||||
|
||||
Point2 = plateView.PointControlToWorld(e.Location);
|
||||
|
||||
if (status == Status.SetFirstPoint)
|
||||
{
|
||||
var distance1 = Point1.DistanceTo(Point2);
|
||||
var distance2 = plateView.LengthWorldToGui(distance1);
|
||||
|
||||
if (distance2 > 40)
|
||||
{
|
||||
ZoomWindow();
|
||||
CancelAction();
|
||||
}
|
||||
else
|
||||
{
|
||||
status = Status.SetSecondPoint;
|
||||
}
|
||||
}
|
||||
else if (status == Status.SetSecondPoint)
|
||||
{
|
||||
ZoomWindow();
|
||||
CancelAction();
|
||||
}
|
||||
}
|
||||
|
||||
private void plateView_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
if (!Point1.IsValid() || !Point2.IsValid())
|
||||
return;
|
||||
|
||||
var rect = GetRectangle();
|
||||
|
||||
e.Graphics.FillRectangle(fillBrush, rect);
|
||||
|
||||
e.Graphics.DrawRectangle(borderPen,
|
||||
rect.X,
|
||||
rect.Y,
|
||||
rect.Width,
|
||||
rect.Height);
|
||||
|
||||
var centerX = rect.X + rect.Width * 0.5f;
|
||||
var centerY = rect.Y + rect.Height * 0.5f;
|
||||
|
||||
const float halfWidth = 10;
|
||||
|
||||
e.Graphics.DrawLine(borderPen, centerX, centerY - halfWidth, centerX, centerY + halfWidth);
|
||||
e.Graphics.DrawLine(borderPen, centerX - halfWidth, centerY, centerX + halfWidth, centerY);
|
||||
}
|
||||
|
||||
private void ZoomWindow()
|
||||
{
|
||||
double x, y, w, h;
|
||||
|
||||
if (Point1.X < Point2.X)
|
||||
{
|
||||
x = Point1.X;
|
||||
w = Point2.X - Point1.X;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = Point2.X;
|
||||
w = Point1.X - Point2.X;
|
||||
}
|
||||
|
||||
if (Point1.Y < Point2.Y)
|
||||
{
|
||||
y = Point1.Y;
|
||||
h = Point2.Y - Point1.Y;
|
||||
}
|
||||
else
|
||||
{
|
||||
y = Point2.Y;
|
||||
h = Point1.Y - Point2.Y;
|
||||
}
|
||||
|
||||
plateView.ZoomToArea(x, y, w, h);
|
||||
plateView.Refresh();
|
||||
}
|
||||
|
||||
private RectangleF GetRectangle()
|
||||
{
|
||||
var rect = new RectangleF();
|
||||
var pt1 = plateView.PointWorldToGraph(Point1);
|
||||
var pt2 = plateView.PointWorldToGraph(Point2);
|
||||
|
||||
if (pt1.X < pt2.X)
|
||||
{
|
||||
rect.X = pt1.X;
|
||||
rect.Width = pt2.X - pt1.X;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.X = pt2.X;
|
||||
rect.Width = pt1.X - pt2.X;
|
||||
}
|
||||
|
||||
if (pt1.Y < pt2.Y)
|
||||
{
|
||||
rect.Y = pt1.Y;
|
||||
rect.Height = pt2.Y - pt1.Y;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.Y = pt2.Y;
|
||||
rect.Height = pt1.Y - pt2.Y;
|
||||
}
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
public enum Status
|
||||
{
|
||||
SetFirstPoint,
|
||||
SetSecondPoint
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
namespace OpenNest
|
||||
{
|
||||
public sealed class ColorScheme
|
||||
{
|
||||
private Color layoutOutlineColor;
|
||||
private Color layoutFillColor;
|
||||
private Color boundingBoxColor;
|
||||
private Color rapidColor;
|
||||
private Color originColor;
|
||||
private Color edgeSpacingColor;
|
||||
|
||||
public static readonly ColorScheme Default = new ColorScheme
|
||||
{
|
||||
BackgroundColor = Color.DarkGray,
|
||||
LayoutOutlineColor = Color.Gray,
|
||||
LayoutFillColor = Color.WhiteSmoke,
|
||||
BoundingBoxColor = Color.FromArgb(128, 128, 255),
|
||||
RapidColor = Color.DodgerBlue,
|
||||
OriginColor = Color.Gray,
|
||||
EdgeSpacingColor = Color.FromArgb(180, 180, 180),
|
||||
};
|
||||
|
||||
#region Pens/Brushes
|
||||
|
||||
public Pen LayoutOutlinePen { get; private set; }
|
||||
|
||||
public Brush LayoutFillBrush { get; private set; }
|
||||
|
||||
public Pen BoundingBoxPen { get; private set; }
|
||||
|
||||
public Pen RapidPen { get; private set; }
|
||||
|
||||
public Pen OriginPen { get; private set; }
|
||||
|
||||
public Pen EdgeSpacingPen { get; private set; }
|
||||
|
||||
#endregion Pens/Brushes
|
||||
|
||||
#region Colors
|
||||
|
||||
public Color BackgroundColor { get; set; }
|
||||
|
||||
public Color LayoutOutlineColor
|
||||
{
|
||||
get { return layoutOutlineColor; }
|
||||
set
|
||||
{
|
||||
layoutOutlineColor = value;
|
||||
|
||||
if (LayoutOutlinePen != null)
|
||||
LayoutOutlinePen.Dispose();
|
||||
|
||||
LayoutOutlinePen = new Pen(value);
|
||||
}
|
||||
}
|
||||
|
||||
public Color LayoutFillColor
|
||||
{
|
||||
get { return layoutFillColor; }
|
||||
set
|
||||
{
|
||||
layoutFillColor = value;
|
||||
|
||||
if (LayoutFillBrush != null)
|
||||
LayoutFillBrush.Dispose();
|
||||
|
||||
LayoutFillBrush = new SolidBrush(value);
|
||||
}
|
||||
}
|
||||
|
||||
public Color BoundingBoxColor
|
||||
{
|
||||
get { return boundingBoxColor; }
|
||||
set
|
||||
{
|
||||
boundingBoxColor = value;
|
||||
|
||||
if (BoundingBoxPen != null)
|
||||
BoundingBoxPen.Dispose();
|
||||
|
||||
BoundingBoxPen = new Pen(value);
|
||||
}
|
||||
}
|
||||
|
||||
public Color RapidColor
|
||||
{
|
||||
get { return rapidColor; }
|
||||
set
|
||||
{
|
||||
rapidColor = value;
|
||||
|
||||
if (RapidPen != null)
|
||||
RapidPen.Dispose();
|
||||
|
||||
RapidPen = new Pen(value)
|
||||
{
|
||||
DashPattern = new float[] { 10, 10 },
|
||||
DashCap = DashCap.Flat
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public Color OriginColor
|
||||
{
|
||||
get { return originColor; }
|
||||
set
|
||||
{
|
||||
originColor = value;
|
||||
|
||||
if (OriginPen != null)
|
||||
OriginPen.Dispose();
|
||||
|
||||
OriginPen = new Pen(value);
|
||||
}
|
||||
}
|
||||
|
||||
public Color EdgeSpacingColor
|
||||
{
|
||||
get { return edgeSpacingColor; }
|
||||
set
|
||||
{
|
||||
edgeSpacingColor = value;
|
||||
|
||||
if (EdgeSpacingPen != null)
|
||||
EdgeSpacingPen.Dispose();
|
||||
|
||||
EdgeSpacingPen = new Pen(value)
|
||||
{
|
||||
DashPattern = new float[] { 3, 3 },
|
||||
DashCap = DashCap.Flat
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Colors
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Controls
|
||||
{
|
||||
public class BottomPanel : Panel
|
||||
{
|
||||
private readonly Pen lightPen;
|
||||
private readonly Pen darkPen;
|
||||
|
||||
public BottomPanel()
|
||||
{
|
||||
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
this.Height = 50;
|
||||
this.Dock = DockStyle.Bottom;
|
||||
|
||||
lightPen = new Pen(ProfessionalColors.SeparatorLight);
|
||||
darkPen = new Pen(ProfessionalColors.SeparatorDark);
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
e.Graphics.DrawLine(darkPen, 0, 0, Width, 0);
|
||||
e.Graphics.DrawLine(lightPen, 0, 1, Width, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,247 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Controls
|
||||
{
|
||||
public abstract class DrawControl : Control
|
||||
{
|
||||
protected PointF origin;
|
||||
protected Point lastPoint;
|
||||
protected System.Drawing.Size lastSize;
|
||||
|
||||
public Vector LastPoint { get; protected set; }
|
||||
public Vector CurrentPoint { get; protected set; }
|
||||
|
||||
public float ViewScale { get; protected set; }
|
||||
public float ViewScaleMin { get; protected set; }
|
||||
public float ViewScaleMax { get; protected set; }
|
||||
|
||||
internal Matrix Matrix { get; set; }
|
||||
|
||||
protected const int BorderWidth = 50;
|
||||
protected const float ZoomInFactor = 1.15f;
|
||||
protected const float ZoomOutFactor = 1.0f / ZoomInFactor;
|
||||
|
||||
protected DrawControl()
|
||||
{
|
||||
ViewScale = 1.0f;
|
||||
ViewScaleMin = 0.3f;
|
||||
ViewScaleMax = 3000;
|
||||
origin = new PointF(100, 100);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the control from the graph.
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <returns></returns>
|
||||
public Point PointGraphToControl(float x, float y)
|
||||
{
|
||||
return new Point((int)(x + origin.X), (int)(y + origin.Y));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the control from the graph.
|
||||
/// </summary>
|
||||
/// <param name="pt"></param>
|
||||
/// <returns></returns>
|
||||
public Point PointGraphToControl(PointF pt)
|
||||
{
|
||||
return PointGraphToControl(pt.X, pt.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the control from the world.
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <returns></returns>
|
||||
public Point PointWorldToControl(double x, double y)
|
||||
{
|
||||
return PointGraphToControl(PointWorldToGraph(x, y));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the control from the world.
|
||||
/// </summary>
|
||||
/// <param name="pt"></param>
|
||||
/// <returns></returns>
|
||||
public Point PointWorldToControl(Vector pt)
|
||||
{
|
||||
return PointGraphToControl(PointWorldToGraph(pt.X, pt.Y));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the graph from the control.
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <returns></returns>
|
||||
public PointF PointControlToGraph(int x, int y)
|
||||
{
|
||||
return new PointF(x - origin.X, y - origin.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the graph from the control.
|
||||
/// </summary>
|
||||
/// <param name="pt"></param>
|
||||
/// <returns></returns>
|
||||
public PointF PointControlToGraph(Point pt)
|
||||
{
|
||||
return PointControlToGraph(pt.X, pt.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the graph from the world.
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <returns></returns>
|
||||
public PointF PointWorldToGraph(double x, double y)
|
||||
{
|
||||
return new PointF(ViewScale * (float)x, -ViewScale * (float)y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the graph from the world.
|
||||
/// </summary>
|
||||
/// <param name="pt"></param>
|
||||
/// <returns></returns>
|
||||
public PointF PointWorldToGraph(Vector pt)
|
||||
{
|
||||
return PointWorldToGraph(pt.X, pt.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the world from the control.
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <returns></returns>
|
||||
public Vector PointControlToWorld(int x, int y)
|
||||
{
|
||||
return PointGraphToWorld(PointControlToGraph(x, y));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the world from the control.
|
||||
/// </summary>
|
||||
/// <param name="pt"></param>
|
||||
/// <returns></returns>
|
||||
public Vector PointControlToWorld(Point pt)
|
||||
{
|
||||
return PointGraphToWorld(PointControlToGraph(pt.X, pt.Y));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the world from the graph.
|
||||
/// </summary>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <returns></returns>
|
||||
public Vector PointGraphToWorld(float x, float y)
|
||||
{
|
||||
return new Vector(x / ViewScale, y / -ViewScale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a point with coordinates relative to the world from the graph.
|
||||
/// </summary>
|
||||
/// <param name="pt"></param>
|
||||
/// <returns></returns>
|
||||
public Vector PointGraphToWorld(PointF pt)
|
||||
{
|
||||
return PointGraphToWorld(pt.X, pt.Y);
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
|
||||
origin.X += (Size.Width - lastSize.Width) * 0.5f;
|
||||
origin.Y += (Size.Height - lastSize.Height) * 0.5f;
|
||||
|
||||
lastSize = Size;
|
||||
}
|
||||
|
||||
public float LengthWorldToGui(double length)
|
||||
{
|
||||
return ViewScale * (float)length;
|
||||
}
|
||||
|
||||
public double LengthGuiToWorld(float length)
|
||||
{
|
||||
return length / ViewScale;
|
||||
}
|
||||
|
||||
public virtual void ZoomToControlPoint(Point pt, float zoomFactor, bool redraw = true)
|
||||
{
|
||||
var pt2 = PointControlToWorld(pt);
|
||||
ZoomToPoint(pt2, zoomFactor, redraw);
|
||||
}
|
||||
|
||||
public virtual void ZoomToPoint(Vector pt, float zoomFactor, bool redraw = true)
|
||||
{
|
||||
var newScale = ViewScale * zoomFactor;
|
||||
|
||||
if (newScale < ViewScaleMin)
|
||||
zoomFactor = ViewScaleMin / ViewScale;
|
||||
else if (newScale > ViewScaleMax)
|
||||
zoomFactor = ViewScaleMax / ViewScale;
|
||||
|
||||
origin.X -= (float)(pt.X * zoomFactor - pt.X) * ViewScale;
|
||||
origin.Y += (float)(pt.Y * zoomFactor - pt.Y) * ViewScale;
|
||||
|
||||
ViewScale *= zoomFactor;
|
||||
UpdateMatrix();
|
||||
|
||||
if (redraw) Invalidate();
|
||||
}
|
||||
|
||||
public virtual void ZoomToArea(Box box, bool redraw = true)
|
||||
{
|
||||
ZoomToArea(box.X, box.Y, box.Width, box.Height, redraw);
|
||||
}
|
||||
|
||||
public virtual void ZoomToArea(double x, double y, double width, double height, bool redraw = true)
|
||||
{
|
||||
if (width <= 0 || height <= 0)
|
||||
return;
|
||||
|
||||
var a = (Height - BorderWidth) / height;
|
||||
var b = (Width - BorderWidth) / width;
|
||||
|
||||
ViewScale = (float)(a < b ? a : b);
|
||||
|
||||
if (ViewScale > ViewScaleMax)
|
||||
ViewScale = ViewScaleMax;
|
||||
else if (ViewScale < ViewScaleMin)
|
||||
ViewScale = ViewScaleMin;
|
||||
|
||||
var px = LengthWorldToGui(x);
|
||||
var py = LengthWorldToGui(y);
|
||||
var pw = LengthWorldToGui(width);
|
||||
var ph = LengthWorldToGui(height);
|
||||
|
||||
origin.X = (Width - pw) * 0.5f - px;
|
||||
origin.Y = (Height + ph) * 0.5f + py;
|
||||
|
||||
UpdateMatrix();
|
||||
|
||||
if (redraw) Invalidate();
|
||||
}
|
||||
|
||||
protected virtual void UpdateMatrix()
|
||||
{
|
||||
if (Matrix != null)
|
||||
Matrix.Dispose();
|
||||
|
||||
Matrix = new Matrix();
|
||||
Matrix.Scale(ViewScale, -ViewScale);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Controls
|
||||
{
|
||||
using Size = System.Drawing.Size;
|
||||
|
||||
public class DrawingListBox : ListBox
|
||||
{
|
||||
private readonly Size imageSize;
|
||||
private readonly Font nameFont;
|
||||
private Point lastClickLocation;
|
||||
|
||||
public DrawingListBox()
|
||||
{
|
||||
SetStyle(
|
||||
ControlStyles.AllPaintingInWmPaint |
|
||||
ControlStyles.OptimizedDoubleBuffer, true);
|
||||
|
||||
DrawMode = DrawMode.OwnerDrawFixed;
|
||||
ItemHeight = 85;
|
||||
|
||||
imageSize = new Size(ItemHeight, ItemHeight - 10);
|
||||
nameFont = new Font(Font.FontFamily, 10, FontStyle.Bold);
|
||||
}
|
||||
|
||||
public Units Units { get; set; }
|
||||
|
||||
public bool HideDepletedParts { get; set; }
|
||||
|
||||
protected override void OnDrawItem(DrawItemEventArgs e)
|
||||
{
|
||||
if (e.Index >= Items.Count || e.Index <= -1)
|
||||
return;
|
||||
|
||||
var dwg = Items[e.Index] as Drawing;
|
||||
|
||||
if (dwg == null)
|
||||
return;
|
||||
|
||||
var isComplete = dwg.Quantity.Nested > 0 && dwg.Quantity.Remaining == 0;
|
||||
var bgBrush = isComplete ? SystemBrushes.Info : Brushes.White;
|
||||
|
||||
e.Graphics.FillRectangle(bgBrush, e.Bounds);
|
||||
|
||||
var pt = new PointF(5, e.Bounds.Y + 5);
|
||||
|
||||
var brush = new SolidBrush(dwg.Color);
|
||||
var pen = new Pen(ControlPaint.Dark(dwg.Color));
|
||||
|
||||
var img = dwg.Program.GetImage(imageSize, pen, brush);
|
||||
|
||||
pen.Dispose();
|
||||
brush.Dispose();
|
||||
|
||||
e.Graphics.DrawImage(img, pt);
|
||||
|
||||
pt.X += imageSize.Width + 10;
|
||||
|
||||
e.Graphics.DrawString(dwg.Name, nameFont, Brushes.Black, pt);
|
||||
|
||||
var bounds = dwg.Program.BoundingBox();
|
||||
var text1 = string.Format("{0} of {1} nested", dwg.Quantity.Nested, dwg.Quantity.Required);
|
||||
var text2 = bounds.Size.ToString(4);
|
||||
var text3 = string.Format("{0} sq/{1}", Math.Round(dwg.Area, 4), UnitsHelper.GetShortString(Units));
|
||||
|
||||
pt.Y += 22;
|
||||
e.Graphics.DrawString(text1, Font, Brushes.Gray, pt);
|
||||
pt.Y += 18;
|
||||
e.Graphics.DrawString(text2, Font, Brushes.Gray, pt);
|
||||
pt.Y += 18;
|
||||
e.Graphics.DrawString(text3, Font, Brushes.Gray, pt);
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseMove(e);
|
||||
|
||||
var item = SelectedItem as Drawing;
|
||||
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
if (e.Button == MouseButtons.Left && e.Location.DistanceTo(lastClickLocation) > 3)
|
||||
DoDragDrop(item, DragDropEffects.Copy);
|
||||
}
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDown(e);
|
||||
lastClickLocation = e.Location;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PointExtensions
|
||||
{
|
||||
public static double DistanceTo(this Point pt1, Point pt2)
|
||||
{
|
||||
var x = pt2.X - pt1.X;
|
||||
var y = pt2.Y - pt1.Y;
|
||||
|
||||
return Math.Sqrt(x * x + y * y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Geometry;
|
||||
|
||||
namespace OpenNest.Controls
|
||||
{
|
||||
public class EntityView : DrawControl
|
||||
{
|
||||
public List<Entity> Entities;
|
||||
|
||||
private Pen pen = new Pen(Color.FromArgb(70, 70, 70));
|
||||
|
||||
public EntityView()
|
||||
{
|
||||
Entities = new List<Entity>();
|
||||
|
||||
this.BackColor = Color.FromArgb(33, 40, 48);
|
||||
this.Cursor = Cursors.Cross;
|
||||
|
||||
SetStyle(
|
||||
ControlStyles.AllPaintingInWmPaint |
|
||||
ControlStyles.OptimizedDoubleBuffer |
|
||||
ControlStyles.UserPaint, true);
|
||||
}
|
||||
|
||||
protected override void OnMouseClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseClick(e);
|
||||
if (!Focused) Focus();
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
e.Graphics.SmoothingMode = SmoothingMode.HighSpeed;
|
||||
e.Graphics.DrawLine(pen, origin.X, 0, origin.X, Height);
|
||||
e.Graphics.DrawLine(pen, 0, origin.Y, Width, origin.Y);
|
||||
|
||||
e.Graphics.TranslateTransform(origin.X, origin.Y);
|
||||
|
||||
foreach (var entity in Entities)
|
||||
DrawEntity(e.Graphics, entity, Pens.White);
|
||||
|
||||
#if DRAW_OFFSET
|
||||
|
||||
var offsetShape = new Shape();
|
||||
offsetShape.Entities.AddRange(Entities);
|
||||
|
||||
foreach (var entity in ((Shape)offsetShape.OffsetEntity(0.25, OffsetSide.Left)).Entities)
|
||||
DrawEntity(e.Graphics, entity, Pens.RoyalBlue);
|
||||
#endif
|
||||
}
|
||||
|
||||
protected override void OnMouseWheel(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseWheel(e);
|
||||
|
||||
float multiplier = Math.Abs(e.Delta / 120.0f);
|
||||
|
||||
if (e.Delta > 0)
|
||||
ZoomToControlPoint(e.Location, (float)Math.Pow(ZoomInFactor, multiplier));
|
||||
else
|
||||
ZoomToControlPoint(e.Location, (float)Math.Pow(ZoomOutFactor, multiplier));
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Middle)
|
||||
{
|
||||
var diffx = e.X - lastPoint.X;
|
||||
var diffy = e.Y - lastPoint.Y;
|
||||
|
||||
origin.X += diffx;
|
||||
origin.Y += diffy;
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
else
|
||||
{
|
||||
LastPoint = CurrentPoint;
|
||||
CurrentPoint = PointControlToWorld(e.Location);
|
||||
}
|
||||
|
||||
lastPoint = e.Location;
|
||||
|
||||
base.OnMouseMove(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseDoubleClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDoubleClick(e);
|
||||
|
||||
if (e.Button == MouseButtons.Middle)
|
||||
ZoomToFit();
|
||||
}
|
||||
|
||||
private void DrawEntity(Graphics g, Entity e, Pen pen)
|
||||
{
|
||||
if (!e.Layer.IsVisible)
|
||||
return;
|
||||
|
||||
switch (e.Type)
|
||||
{
|
||||
case EntityType.Arc:
|
||||
DrawArc(g, (Arc)e, pen);
|
||||
break;
|
||||
|
||||
case EntityType.Circle:
|
||||
DrawCircle(g, (Circle)e, pen);
|
||||
break;
|
||||
|
||||
case EntityType.Line:
|
||||
DrawLine(g, (Line)e, pen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawLine(Graphics g, Line line, Pen pen)
|
||||
{
|
||||
var pt1 = PointWorldToGraph(line.StartPoint);
|
||||
var pt2 = PointWorldToGraph(line.EndPoint);
|
||||
|
||||
g.DrawLine(pen, pt1, pt2);
|
||||
}
|
||||
|
||||
private void DrawArc(Graphics g, Arc arc, Pen pen)
|
||||
{
|
||||
var center = PointWorldToGraph(arc.Center);
|
||||
var radius = LengthWorldToGui(arc.Radius);
|
||||
var diameter = radius * 2.0f;
|
||||
|
||||
var startAngle = arc.IsReversed
|
||||
? -(float)Angle.ToDegrees(arc.EndAngle)
|
||||
: -(float)Angle.ToDegrees(arc.StartAngle);
|
||||
|
||||
g.DrawArc(
|
||||
pen,
|
||||
center.X - radius,
|
||||
center.Y - radius,
|
||||
diameter,
|
||||
diameter,
|
||||
startAngle,
|
||||
-(float)Angle.ToDegrees(arc.SweepAngle()));
|
||||
}
|
||||
|
||||
private void DrawCircle(Graphics g, Circle circle, Pen pen)
|
||||
{
|
||||
var center = PointWorldToGraph(circle.Center);
|
||||
var radius = LengthWorldToGui(circle.Radius);
|
||||
var diameter = radius * 2.0f;
|
||||
|
||||
g.DrawEllipse(pen,
|
||||
center.X - radius,
|
||||
center.Y - radius,
|
||||
diameter,
|
||||
diameter);
|
||||
}
|
||||
|
||||
private void DrawPoint(Graphics g, Vector pt, Pen pen)
|
||||
{
|
||||
var pt1 = PointWorldToGraph(pt);
|
||||
|
||||
g.DrawLine(pen, pt1.X - 3, pt1.Y, pt1.X + 3, pt1.Y);
|
||||
g.DrawLine(pen, pt1.X, pt1.Y - 3, pt1.X, pt1.Y + 3);
|
||||
}
|
||||
|
||||
private void DrawPoint(Graphics g, Vector pt, Pen pen, Brush fillBrush)
|
||||
{
|
||||
var pt1 = PointWorldToGraph(pt);
|
||||
var rect = new RectangleF(pt1.X - 3, pt1.Y - 3, 6, 6);
|
||||
|
||||
g.FillEllipse(fillBrush, rect);
|
||||
g.DrawEllipse(pen, rect);
|
||||
}
|
||||
|
||||
private void DrawIntersections(Graphics g)
|
||||
{
|
||||
for (int i = 0; i < Entities.Count; ++i)
|
||||
{
|
||||
var entity1 = Entities[i];
|
||||
|
||||
if (entity1.Type != EntityType.Line)
|
||||
continue;
|
||||
|
||||
for (int j = i + 1; j < Entities.Count; ++j)
|
||||
{
|
||||
var entity2 = Entities[j];
|
||||
|
||||
if (entity2.Type != EntityType.Line)
|
||||
continue;
|
||||
|
||||
var line1 = (Line)entity1;
|
||||
var line2 = (Line)entity2;
|
||||
|
||||
Vector pt;
|
||||
|
||||
if (line1.Intersects(line2, out pt))
|
||||
DrawPoint(g, pt, Pens.Yellow, Brushes.Red);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ZoomToFit(bool redraw = true)
|
||||
{
|
||||
ZoomToArea(Entities.GetBoundingBox(), redraw);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Controls
|
||||
{
|
||||
public class HorizontalLine : Control
|
||||
{
|
||||
private readonly Pen lightPen;
|
||||
private readonly Pen darkPen;
|
||||
|
||||
public HorizontalLine()
|
||||
{
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
SetStyle(ControlStyles.Selectable, false);
|
||||
|
||||
lightPen = new Pen(ProfessionalColors.SeparatorLight);
|
||||
darkPen = new Pen(ProfessionalColors.SeparatorDark);
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
float midpoint = Height * 0.5f;
|
||||
|
||||
e.Graphics.DrawLine(darkPen, 0, midpoint, Width, midpoint);
|
||||
midpoint++;
|
||||
e.Graphics.DrawLine(lightPen, 0, midpoint, Width, midpoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,451 @@
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using libPep;
|
||||
using libPep.Codes;
|
||||
using OpenTK.Graphics.OpenGL;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Controls
|
||||
{
|
||||
public class LayoutViewGL : OpenTK.GLControl
|
||||
{
|
||||
private float scale;
|
||||
private bool loaded = false;
|
||||
|
||||
private const double TwoPI = Math.PI * 2.0;
|
||||
private const int Resolution = 100;
|
||||
private const int BorderWidth = 50;
|
||||
private const float ZoomInFactor = 1.1f;
|
||||
private const float ZoomOutFactor = 0.9f;
|
||||
|
||||
private PointF origin;
|
||||
private PointF lastPoint;
|
||||
|
||||
private Vector curpos;
|
||||
private ProgrammingMode mode;
|
||||
|
||||
public Color RapidColor { get; set; }
|
||||
public Color PlateFillColor { get; set; }
|
||||
public Color PlateBorderColor { get; set; }
|
||||
public Color GeometryColor { get; set; }
|
||||
|
||||
public Plate Plate;
|
||||
|
||||
public LayoutViewGL()
|
||||
{
|
||||
scale = 25;
|
||||
origin = new PointF(0, 0);
|
||||
lastPoint = new PointF();
|
||||
|
||||
BackColor = Color.White;
|
||||
RapidColor = Color.Blue;
|
||||
GeometryColor = Color.LimeGreen;
|
||||
PlateFillColor = Color.WhiteSmoke;
|
||||
PlateBorderColor = Color.DarkGray;
|
||||
|
||||
Cursor = Cursors.Cross;
|
||||
|
||||
Plate = new Plate();
|
||||
|
||||
Context.SwapInterval = 0;
|
||||
}
|
||||
|
||||
public bool DrawRapid { get; set; }
|
||||
|
||||
private void SetupViewport()
|
||||
{
|
||||
int w = Width;
|
||||
int h = Height;
|
||||
GL.MatrixMode(MatrixMode.Projection);
|
||||
GL.LoadIdentity();
|
||||
GL.Ortho(0, w, 0, h, -1, 1);
|
||||
GL.Viewport(0, 0, w, h);
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
SetupViewport();
|
||||
GL.ClearColor(this.BackColor);
|
||||
loaded = true;
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
if (!loaded)
|
||||
return;
|
||||
|
||||
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
|
||||
GL.MatrixMode(MatrixMode.Modelview);
|
||||
GL.LoadIdentity();
|
||||
|
||||
//DrawAxis();
|
||||
|
||||
GL.Translate(origin.X, origin.Y, 0);
|
||||
GL.Scale(scale, scale, 1);
|
||||
|
||||
curpos = new Vector();
|
||||
|
||||
if (Plate != null)
|
||||
{
|
||||
GL.Color3(PlateFillColor);
|
||||
GL.Begin(PrimitiveType.Quads);
|
||||
DrawPlate(Plate);
|
||||
GL.End();
|
||||
|
||||
GL.Color3(PlateBorderColor);
|
||||
GL.Begin(PrimitiveType.LineLoop);
|
||||
DrawPlate(Plate);
|
||||
GL.End();
|
||||
|
||||
GL.Color3(GeometryColor);
|
||||
DrawProgram(Plate);
|
||||
}
|
||||
|
||||
SwapBuffers();
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
if (!loaded)
|
||||
return;
|
||||
|
||||
SetupViewport();
|
||||
}
|
||||
|
||||
protected override void OnMouseWheel(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseWheel(e);
|
||||
|
||||
float multiplier = Math.Abs(e.Delta / 120.0f);
|
||||
|
||||
if (e.Delta > 0)
|
||||
ZoomToPoint(e.X, e.Y, (float)Math.Pow(ZoomInFactor, multiplier));
|
||||
else
|
||||
ZoomToPoint(e.X, e.Y, (float)Math.Pow(ZoomOutFactor, multiplier));
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseMove(e);
|
||||
|
||||
if (e.Button == MouseButtons.Middle)
|
||||
{
|
||||
var diffx = e.X - lastPoint.X;
|
||||
var diffy = e.Y - lastPoint.Y;
|
||||
|
||||
origin.X += diffx;
|
||||
origin.Y -= diffy;
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
lastPoint = e.Location;
|
||||
}
|
||||
|
||||
protected override void OnMouseDoubleClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDoubleClick(e);
|
||||
|
||||
if (e.Button == MouseButtons.Middle)
|
||||
{
|
||||
ZoomToFit();
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawAxis()
|
||||
{
|
||||
GL.Begin(PrimitiveType.Lines);
|
||||
GL.Vertex2(origin.X, 0);
|
||||
GL.Vertex2(origin.X, Height);
|
||||
|
||||
GL.Vertex2(0, origin.Y);
|
||||
GL.Vertex2(Width, origin.Y);
|
||||
GL.End();
|
||||
}
|
||||
|
||||
public void ZoomToPoint(double x, double y, float zoomFactor)
|
||||
{
|
||||
double x1 = ToRealX(x);
|
||||
double y1 = ToRealY(y);
|
||||
|
||||
origin.X -= (float)(x1 * zoomFactor - x1) * scale;
|
||||
origin.Y -= (float)(y1 * zoomFactor - y1) * scale;
|
||||
|
||||
scale *= zoomFactor;
|
||||
}
|
||||
|
||||
private void DrawPlate(Plate plate)
|
||||
{
|
||||
switch (plate.Quadrant)
|
||||
{
|
||||
case 1:
|
||||
GL.Vertex2(0, 0);
|
||||
GL.Vertex2(0, plate.Size.Width);
|
||||
GL.Vertex2(plate.Size.Length, plate.Size.Width);
|
||||
GL.Vertex2(plate.Size.Length, 0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
GL.Vertex2(0, 0);
|
||||
GL.Vertex2(0, plate.Size.Width);
|
||||
GL.Vertex2(-plate.Size.Length, plate.Size.Width);
|
||||
GL.Vertex2(-plate.Size.Length, 0);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
GL.Vertex2(0, 0);
|
||||
GL.Vertex2(0, -plate.Size.Width);
|
||||
GL.Vertex2(-plate.Size.Length, -plate.Size.Width);
|
||||
GL.Vertex2(-plate.Size.Length, 0);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
GL.Vertex2(0, 0);
|
||||
GL.Vertex2(0, -plate.Size.Width);
|
||||
GL.Vertex2(plate.Size.Length, -plate.Size.Width);
|
||||
GL.Vertex2(plate.Size.Length, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawProgram(libPep.Program pgm)
|
||||
{
|
||||
mode = pgm.Mode;
|
||||
|
||||
foreach (var code in pgm)
|
||||
{
|
||||
switch (code.Type())
|
||||
{
|
||||
case CodeType.Arc:
|
||||
var arc = (Arc)code;
|
||||
DrawArc(arc);
|
||||
break;
|
||||
|
||||
case CodeType.Line:
|
||||
var line = (Line)code;
|
||||
DrawLine(line);
|
||||
break;
|
||||
|
||||
case CodeType.SubProgramCall:
|
||||
var tmpmode = mode;
|
||||
var subpgm = (SubProgramCall)code;
|
||||
|
||||
if (subpgm.Loop != null)
|
||||
DrawProgram(subpgm.Loop);
|
||||
|
||||
mode = tmpmode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawLine(Line line)
|
||||
{
|
||||
var pt = line.EndPoint;
|
||||
|
||||
if (mode == ProgrammingMode.Incremental)
|
||||
pt += curpos;
|
||||
|
||||
if (line.IsRapid)
|
||||
{
|
||||
if (DrawRapid)
|
||||
{
|
||||
GL.PushAttrib(AttribMask.EnableBit);
|
||||
GL.Enable(EnableCap.LineStipple);
|
||||
GL.LineStipple(2, 0xCCCC);
|
||||
GL.Color3(RapidColor);
|
||||
DrawLine(curpos, pt);
|
||||
GL.Color3(GeometryColor);
|
||||
GL.PopAttrib();
|
||||
}
|
||||
}
|
||||
else
|
||||
DrawLine(curpos, pt);
|
||||
|
||||
curpos = pt;
|
||||
}
|
||||
|
||||
private void DrawLine(Vector pt1, Vector pt2)
|
||||
{
|
||||
GL.Begin(PrimitiveType.Lines);
|
||||
GL.Vertex2(pt1.X, pt1.Y);
|
||||
GL.Vertex2(pt2.X, pt2.Y);
|
||||
GL.End();
|
||||
}
|
||||
|
||||
private void DrawArc(Arc arc)
|
||||
{
|
||||
var endpt = arc.EndPoint;
|
||||
var center = arc.CenterPoint;
|
||||
|
||||
if (mode == ProgrammingMode.Incremental)
|
||||
{
|
||||
endpt += curpos;
|
||||
center += curpos;
|
||||
}
|
||||
|
||||
// start angle in radians
|
||||
var startAngle = Math.Atan2(
|
||||
curpos.Y - center.Y,
|
||||
curpos.X - center.X);
|
||||
|
||||
// end angle in radians
|
||||
var endAngle = Math.Atan2(
|
||||
endpt.Y - center.Y,
|
||||
endpt.X - center.X);
|
||||
|
||||
endAngle = NormalizeAngle(endAngle);
|
||||
startAngle = NormalizeAngle(startAngle);
|
||||
|
||||
if (arc.Rotation == RotationType.CCW && endAngle < startAngle)
|
||||
endAngle += TwoPI;
|
||||
else if (arc.Rotation == RotationType.CW && startAngle < endAngle)
|
||||
startAngle += TwoPI;
|
||||
|
||||
var dx = endpt.X - center.X;
|
||||
var dy = endpt.Y - center.Y;
|
||||
|
||||
var radius = Math.Sqrt(dx * dx + dy * dy);
|
||||
|
||||
if (startAngle.IsEqualTo(endAngle))
|
||||
{
|
||||
GL.End();
|
||||
GL.Begin(PrimitiveType.LineLoop);
|
||||
DrawCircle(center, radius);
|
||||
GL.End();
|
||||
GL.Begin(PrimitiveType.Polygon);
|
||||
}
|
||||
else
|
||||
DrawArc(center, radius, endAngle, startAngle);
|
||||
|
||||
curpos = endpt;
|
||||
}
|
||||
|
||||
private void DrawArc(Vector center, double radius, double startAngle, double endAngle)
|
||||
{
|
||||
GL.Begin(PrimitiveType.LineStrip);
|
||||
|
||||
var angle = (endAngle - startAngle) / Resolution;
|
||||
|
||||
for (int i = 0; i <= Resolution; i++)
|
||||
{
|
||||
GL.Vertex2(
|
||||
Math.Cos(startAngle + angle * i) * radius + center.X,
|
||||
Math.Sin(startAngle + angle * i) * radius + center.Y);
|
||||
}
|
||||
|
||||
GL.End();
|
||||
}
|
||||
|
||||
private void DrawCircle(Vector center, double radius)
|
||||
{
|
||||
const float angle = (float)Math.PI * 2.0f;
|
||||
const float increment = angle / Resolution;
|
||||
|
||||
for (float i = 0; i <= angle; i += increment)
|
||||
{
|
||||
GL.Vertex2(
|
||||
Math.Cos(i) * radius + center.X,
|
||||
Math.Sin(i) * radius + center.Y);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static double NormalizeAngle(double angle)
|
||||
{
|
||||
double r = angle % TwoPI;
|
||||
return r < 0 ? TwoPI + r : r;
|
||||
}
|
||||
|
||||
private static void Swap<T>(ref T a, ref T b)
|
||||
{
|
||||
T c = a;
|
||||
a = b;
|
||||
b = c;
|
||||
}
|
||||
|
||||
public void ZoomToFit()
|
||||
{
|
||||
if (Plate.Size.Width <= 0 || Plate.Size.Length <= 0)
|
||||
return;
|
||||
|
||||
float a = (this.Height - BorderWidth) / (float)Plate.Size.Width;
|
||||
float b = (this.Width - BorderWidth) / (float)Plate.Size.Length;
|
||||
|
||||
scale = a < b ? a : b;
|
||||
|
||||
double px;
|
||||
double py;
|
||||
|
||||
switch (Plate.Quadrant)
|
||||
{
|
||||
case 1:
|
||||
px = py = ToGui(0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
px = ToGui(-Plate.Size.Length);
|
||||
py = ToGui(0);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
px = ToGui(-Plate.Size.Length);
|
||||
py = ToGui(-Plate.Size.Width);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
px = ToGui(0);
|
||||
py = ToGui(-Plate.Size.Width);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
var pw = ToGui(Plate.Size.Length);
|
||||
var ph = ToGui(Plate.Size.Width);
|
||||
|
||||
origin.X = (float)((this.Width - pw) * 0.5f - px);
|
||||
origin.Y = (float)((this.Height - ph) * 0.5f - py);
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
public float ToGui(double v)
|
||||
{
|
||||
return (float)v * scale;
|
||||
}
|
||||
|
||||
public double ToReal(double v)
|
||||
{
|
||||
return v / scale;
|
||||
}
|
||||
|
||||
public double ToRealX(double x)
|
||||
{
|
||||
return (x - origin.X) / scale;
|
||||
}
|
||||
|
||||
public double ToRealY(double y)
|
||||
{
|
||||
return (Height - y - origin.Y) / scale;
|
||||
}
|
||||
|
||||
public float ToGuiX(double x)
|
||||
{
|
||||
return scale * (float)x + origin.X;
|
||||
}
|
||||
|
||||
public float ToGuiY(double y)
|
||||
{
|
||||
return scale * (float)y + origin.Y;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
namespace OpenNest.Controls
|
||||
{
|
||||
public class NumericUpDown : System.Windows.Forms.NumericUpDown
|
||||
{
|
||||
private string suffix;
|
||||
|
||||
|
||||
|
||||
public NumericUpDown()
|
||||
{
|
||||
suffix = string.Empty;
|
||||
}
|
||||
|
||||
public string Suffix
|
||||
{
|
||||
get { return suffix; }
|
||||
set
|
||||
{
|
||||
suffix = value;
|
||||
UpdateEditText();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnEnter(EventArgs e)
|
||||
{
|
||||
base.OnEnter(e);
|
||||
this.Select(0, Text.Length);
|
||||
}
|
||||
|
||||
protected override void UpdateEditText()
|
||||
{
|
||||
if (Suffix != null)
|
||||
Text = Value.ToString("N" + DecimalPlaces) + Suffix;
|
||||
else
|
||||
base.UpdateEditText();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,880 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Actions;
|
||||
using OpenNest.CNC;
|
||||
using OpenNest.Collections;
|
||||
using Action = OpenNest.Actions.Action;
|
||||
using Timer = System.Timers.Timer;
|
||||
|
||||
namespace OpenNest.Controls
|
||||
{
|
||||
public class PlateView : DrawControl
|
||||
{
|
||||
private readonly Font programIdFont;
|
||||
private readonly Timer redrawTimer;
|
||||
|
||||
private string status;
|
||||
private Plate plate;
|
||||
private Action currentAction;
|
||||
private List<LayoutPart> parts;
|
||||
|
||||
public List<LayoutPart> SelectedParts;
|
||||
public ReadOnlyCollection<LayoutPart> Parts;
|
||||
|
||||
public event EventHandler<ItemAddedEventArgs<Part>> PartAdded;
|
||||
public event EventHandler<ItemRemovedEventArgs<Part>> PartRemoved;
|
||||
public event EventHandler StatusChanged;
|
||||
|
||||
public PlateView()
|
||||
: this(ColorScheme.Default)
|
||||
{
|
||||
}
|
||||
|
||||
public PlateView(ColorScheme colorScheme)
|
||||
{
|
||||
Plate = new Plate(60, 120);
|
||||
programIdFont = new Font(DefaultFont, FontStyle.Bold | FontStyle.Underline);
|
||||
origin = new PointF();
|
||||
parts = new List<LayoutPart>();
|
||||
Parts = new ReadOnlyCollection<LayoutPart>(parts);
|
||||
SelectedParts = new List<LayoutPart>();
|
||||
|
||||
redrawTimer = new Timer()
|
||||
{
|
||||
AutoReset = false,
|
||||
Enabled = true,
|
||||
Interval = 50
|
||||
};
|
||||
redrawTimer.Elapsed += redrawTimer_Elapsed;
|
||||
|
||||
SetStyle(
|
||||
ControlStyles.AllPaintingInWmPaint |
|
||||
ControlStyles.OptimizedDoubleBuffer |
|
||||
ControlStyles.UserPaint, true);
|
||||
|
||||
ViewScale = 1.0f;
|
||||
RotateIncrementAngle = 10;
|
||||
OffsetIncrementDistance = 10;
|
||||
ColorScheme = colorScheme;
|
||||
BackColor = colorScheme.BackgroundColor;
|
||||
Cursor = Cursors.Cross;
|
||||
AllowPan = true;
|
||||
AllowSelect = true;
|
||||
AllowZoom = true;
|
||||
AllowDrop = true;
|
||||
DrawOrigin = true;
|
||||
DrawRapid = false;
|
||||
DrawBounds = true;
|
||||
FillParts = true;
|
||||
SetAction(typeof(ActionSelect));
|
||||
|
||||
UpdateMatrix();
|
||||
}
|
||||
|
||||
public ColorScheme ColorScheme { get; set; }
|
||||
|
||||
public bool AllowZoom { get; set; }
|
||||
|
||||
public bool AllowSelect { get; set; }
|
||||
|
||||
public bool AllowPan { get; set; }
|
||||
|
||||
public bool DrawOrigin { get; set; }
|
||||
|
||||
public bool DrawRapid { get; set; }
|
||||
|
||||
public bool DrawBounds { get; set; }
|
||||
|
||||
public bool FillParts { get; set; }
|
||||
|
||||
public double RotateIncrementAngle { get; set; }
|
||||
|
||||
public double OffsetIncrementDistance { get; set; }
|
||||
|
||||
public Plate Plate
|
||||
{
|
||||
get { return plate; }
|
||||
set { SetPlate(value); }
|
||||
}
|
||||
|
||||
private void SetPlate(Plate p)
|
||||
{
|
||||
if (plate != null)
|
||||
{
|
||||
plate.PartAdded -= plate_PartAdded;
|
||||
plate.PartRemoved -= plate_PartRemoved;
|
||||
parts.Clear();
|
||||
SelectedParts.Clear();
|
||||
}
|
||||
|
||||
plate = p;
|
||||
plate.PartAdded += plate_PartAdded;
|
||||
plate.PartRemoved += plate_PartRemoved;
|
||||
|
||||
foreach (var part in plate.Parts)
|
||||
parts.Add(LayoutPart.Create(part, this));
|
||||
|
||||
SetAction(typeof(ActionSelect));
|
||||
}
|
||||
|
||||
public string Status
|
||||
{
|
||||
get { return status; }
|
||||
protected set
|
||||
{
|
||||
status = value;
|
||||
|
||||
if (StatusChanged != null)
|
||||
StatusChanged.Invoke(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseEnter(EventArgs e)
|
||||
{
|
||||
base.OnMouseEnter(e);
|
||||
if (!Focused) Focus();
|
||||
}
|
||||
|
||||
protected override void OnDragEnter(DragEventArgs drgevent)
|
||||
{
|
||||
if (drgevent.Data.GetData(typeof(Drawing)) != null)
|
||||
drgevent.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
|
||||
protected override void OnDragDrop(DragEventArgs drgevent)
|
||||
{
|
||||
var dwg = drgevent.Data.GetData(typeof(Drawing)) as Drawing;
|
||||
|
||||
if (dwg == null)
|
||||
return;
|
||||
|
||||
var pt1 = PointToClient(new Point(drgevent.X, drgevent.Y));
|
||||
var pt2 = PointControlToWorld(pt1);
|
||||
|
||||
AddPartFromDrawing(dwg, pt2);
|
||||
}
|
||||
|
||||
protected override void OnMouseWheel(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseWheel(e);
|
||||
|
||||
var multiplier = Math.Abs(e.Delta / 120);
|
||||
|
||||
if (SelectedParts.Count > 0 && ((ModifierKeys & Keys.Shift) == Keys.Shift))
|
||||
{
|
||||
var increment = (ModifierKeys & Keys.Control) == Keys.Control
|
||||
? RotateIncrementAngle * 0.1
|
||||
: RotateIncrementAngle;
|
||||
|
||||
var angle = Angle.ToRadians((e.Delta > 0 ? -increment : increment) * multiplier);
|
||||
|
||||
RotateSelectedParts(angle);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AllowZoom)
|
||||
{
|
||||
if (e.Delta > 0)
|
||||
ZoomToControlPoint(e.Location, (float)Math.Pow(ZoomInFactor, multiplier));
|
||||
else
|
||||
ZoomToControlPoint(e.Location, (float)Math.Pow(ZoomOutFactor, multiplier));
|
||||
}
|
||||
}
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnMouseMove(MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Middle)
|
||||
{
|
||||
if (AllowPan)
|
||||
{
|
||||
var diffx = e.X - lastPoint.X;
|
||||
var diffy = e.Y - lastPoint.Y;
|
||||
|
||||
origin.X += diffx;
|
||||
origin.Y += diffy;
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LastPoint = CurrentPoint;
|
||||
CurrentPoint = PointControlToWorld(e.Location);
|
||||
}
|
||||
|
||||
lastPoint = e.Location;
|
||||
|
||||
base.OnMouseMove(e);
|
||||
}
|
||||
|
||||
protected override void OnMouseDoubleClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseDoubleClick(e);
|
||||
|
||||
if (e.Button == MouseButtons.Middle)
|
||||
ZoomToFit();
|
||||
}
|
||||
|
||||
protected override void OnKeyDown(KeyEventArgs e)
|
||||
{
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.Delete:
|
||||
RemoveSelectedParts();
|
||||
break;
|
||||
|
||||
default:
|
||||
base.OnKeyDown(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool ProcessDialogKey(Keys keyData)
|
||||
{
|
||||
// Only handle TAB, RETURN, ESC, and ARROW KEYS here.
|
||||
// All other keys can be handled in OnKeyDown method.
|
||||
|
||||
switch (keyData)
|
||||
{
|
||||
case Keys.Escape:
|
||||
if (currentAction.IsBusy())
|
||||
currentAction.CancelAction();
|
||||
else
|
||||
SetAction(typeof(ActionSelect));
|
||||
break;
|
||||
|
||||
case Keys.Left:
|
||||
SelectedParts.ForEach(part => part.Offset(-OffsetIncrementDistance, 0));
|
||||
Invalidate();
|
||||
break;
|
||||
|
||||
case Keys.X:
|
||||
case Keys.Shift | Keys.Left:
|
||||
PushSelected(PushDirection.Left);
|
||||
break;
|
||||
|
||||
case Keys.Shift | Keys.X:
|
||||
case Keys.Shift | Keys.Right:
|
||||
PushSelected(PushDirection.Right);
|
||||
break;
|
||||
|
||||
case Keys.Shift | Keys.Y:
|
||||
case Keys.Shift | Keys.Up:
|
||||
PushSelected(PushDirection.Up);
|
||||
break;
|
||||
|
||||
case Keys.Y:
|
||||
case Keys.Shift | Keys.Down:
|
||||
PushSelected(PushDirection.Down);
|
||||
break;
|
||||
|
||||
case Keys.Right:
|
||||
SelectedParts.ForEach(part => part.Offset(OffsetIncrementDistance, 0));
|
||||
Invalidate();
|
||||
break;
|
||||
|
||||
case Keys.Up:
|
||||
SelectedParts.ForEach(part => part.Offset(0, OffsetIncrementDistance));
|
||||
Invalidate();
|
||||
break;
|
||||
|
||||
case Keys.Down:
|
||||
SelectedParts.ForEach(part => part.Offset(0, -OffsetIncrementDistance));
|
||||
Invalidate();
|
||||
break;
|
||||
}
|
||||
|
||||
return base.ProcessDialogKey(keyData);
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
e.Graphics.SmoothingMode = SmoothingMode.HighSpeed;
|
||||
|
||||
if (DrawOrigin)
|
||||
{
|
||||
e.Graphics.DrawLine(ColorScheme.OriginPen, origin.X, 0, origin.X, Height);
|
||||
e.Graphics.DrawLine(ColorScheme.OriginPen, 0, origin.Y, Width, origin.Y);
|
||||
}
|
||||
|
||||
e.Graphics.TranslateTransform(origin.X, origin.Y);
|
||||
|
||||
DrawPlate(e.Graphics);
|
||||
DrawParts(e.Graphics);
|
||||
|
||||
base.OnPaint(e);
|
||||
}
|
||||
|
||||
protected override void OnHandleDestroyed(EventArgs e)
|
||||
{
|
||||
base.OnHandleDestroyed(e);
|
||||
|
||||
if (currentAction != null)
|
||||
{
|
||||
currentAction.CancelAction();
|
||||
currentAction.DisconnectEvents();
|
||||
currentAction = null;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
parts.ForEach(p => p.Update(this));
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
private void DrawPlate(Graphics g)
|
||||
{
|
||||
var plateRect = new RectangleF
|
||||
{
|
||||
Width = LengthWorldToGui(Plate.Size.Width),
|
||||
Height = LengthWorldToGui(Plate.Size.Height)
|
||||
};
|
||||
|
||||
var edgeSpacingRect = new RectangleF
|
||||
{
|
||||
Width = LengthWorldToGui(Plate.Size.Width - Plate.EdgeSpacing.Left - Plate.EdgeSpacing.Right),
|
||||
Height = LengthWorldToGui(Plate.Size.Height - Plate.EdgeSpacing.Top - Plate.EdgeSpacing.Bottom)
|
||||
};
|
||||
|
||||
switch (Plate.Quadrant)
|
||||
{
|
||||
case 1:
|
||||
plateRect.Location = PointWorldToGraph(0, 0);
|
||||
edgeSpacingRect.Location = PointWorldToGraph(
|
||||
Plate.EdgeSpacing.Left,
|
||||
Plate.EdgeSpacing.Bottom);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
plateRect.Location = PointWorldToGraph(-Plate.Size.Width, 0);
|
||||
edgeSpacingRect.Location = PointWorldToGraph(
|
||||
Plate.EdgeSpacing.Left - Plate.Size.Width,
|
||||
Plate.EdgeSpacing.Bottom);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
plateRect.Location = PointWorldToGraph(-Plate.Size.Width, -Plate.Size.Height);
|
||||
edgeSpacingRect.Location = PointWorldToGraph(
|
||||
Plate.EdgeSpacing.Left - Plate.Size.Width,
|
||||
Plate.EdgeSpacing.Bottom - Plate.Size.Height);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
plateRect.Location = PointWorldToGraph(0, -Plate.Size.Height);
|
||||
edgeSpacingRect.Location = PointWorldToGraph(
|
||||
Plate.EdgeSpacing.Left,
|
||||
Plate.EdgeSpacing.Bottom - Plate.Size.Height);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
plateRect.Y -= plateRect.Height;
|
||||
edgeSpacingRect.Y -= edgeSpacingRect.Height;
|
||||
|
||||
g.FillRectangle(ColorScheme.LayoutFillBrush, plateRect);
|
||||
|
||||
var viewBounds = new RectangleF(-origin.X, -origin.Y, Width, Height);
|
||||
|
||||
if (!edgeSpacingRect.Contains(viewBounds))
|
||||
{
|
||||
g.DrawRectangle(ColorScheme.EdgeSpacingPen,
|
||||
edgeSpacingRect.X,
|
||||
edgeSpacingRect.Y,
|
||||
edgeSpacingRect.Width,
|
||||
edgeSpacingRect.Height);
|
||||
}
|
||||
|
||||
g.DrawRectangle(ColorScheme.LayoutOutlinePen,
|
||||
plateRect.X,
|
||||
plateRect.Y,
|
||||
plateRect.Width,
|
||||
plateRect.Height);
|
||||
}
|
||||
|
||||
private void DrawParts(Graphics g)
|
||||
{
|
||||
var viewBounds = new RectangleF(-origin.X, -origin.Y, Width, Height);
|
||||
|
||||
for (int i = 0; i < parts.Count; ++i)
|
||||
{
|
||||
var part = parts[i];
|
||||
|
||||
if (part.IsDirty)
|
||||
part.Update(this);
|
||||
|
||||
var path = part.Path;
|
||||
var pathBounds = path.GetBounds();
|
||||
|
||||
if (!pathBounds.IntersectsWith(viewBounds))
|
||||
continue;
|
||||
|
||||
part.Draw(g, (i + 1).ToString());
|
||||
}
|
||||
|
||||
if (DrawBounds)
|
||||
{
|
||||
var bounds = SelectedParts.Select(p => p.BasePart).ToList().GetBoundingBox();
|
||||
DrawBox(g, bounds);
|
||||
}
|
||||
|
||||
if (DrawRapid)
|
||||
DrawRapids(g);
|
||||
}
|
||||
|
||||
private void DrawRapids(Graphics g)
|
||||
{
|
||||
var pos = new Vector(0, 0);
|
||||
|
||||
for (int i = 0; i < Plate.Parts.Count; ++i)
|
||||
{
|
||||
var part = Plate.Parts[i];
|
||||
var pgm = part.Program;
|
||||
|
||||
DrawLine(g, pos, part.Location, ColorScheme.RapidPen);
|
||||
pos = part.Location;
|
||||
DrawRapids(g, pgm, ref pos);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawRapids(Graphics g, Program pgm, ref Vector pos)
|
||||
{
|
||||
for (int i = 0; i < pgm.Length; ++i)
|
||||
{
|
||||
var code = pgm[i];
|
||||
|
||||
if (code.Type == CodeType.SubProgramCall)
|
||||
{
|
||||
var subpgm = (SubProgramCall)code;
|
||||
var program = subpgm.Program;
|
||||
|
||||
if (program != null)
|
||||
DrawRapids(g, program, ref pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
var motion = code as Motion;
|
||||
|
||||
if (motion != null)
|
||||
{
|
||||
if (pgm.Mode == Mode.Incremental)
|
||||
{
|
||||
var endpt = motion.EndPoint + pos;
|
||||
|
||||
if (code.Type == CodeType.RapidMove)
|
||||
DrawLine(g, pos, endpt, ColorScheme.RapidPen);
|
||||
pos = endpt;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (code.Type == CodeType.RapidMove)
|
||||
DrawLine(g, pos, motion.EndPoint, ColorScheme.RapidPen);
|
||||
pos = motion.EndPoint;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawLine(Graphics g, Vector pt1, Vector pt2, Pen pen)
|
||||
{
|
||||
var point1 = PointWorldToGraph(pt1);
|
||||
var point2 = PointWorldToGraph(pt2);
|
||||
|
||||
g.DrawLine(pen, point1, point2);
|
||||
}
|
||||
|
||||
private void DrawBox(Graphics g, Box box)
|
||||
{
|
||||
var rect = new RectangleF
|
||||
{
|
||||
Location = PointWorldToGraph(box.Location),
|
||||
Width = LengthWorldToGui(box.Width),
|
||||
Height = LengthWorldToGui(box.Height)
|
||||
};
|
||||
|
||||
g.DrawRectangle(ColorScheme.BoundingBoxPen, rect.X, rect.Y - rect.Height, rect.Width, rect.Height);
|
||||
}
|
||||
|
||||
public LayoutPart GetPartAtControlPoint(Point pt)
|
||||
{
|
||||
var pt2 = PointControlToGraph(pt);
|
||||
return GetPartAtGraphPoint(pt2);
|
||||
}
|
||||
|
||||
public LayoutPart GetPartAtGraphPoint(PointF pt)
|
||||
{
|
||||
for (int i = parts.Count - 1; i >= 0; --i)
|
||||
{
|
||||
if (parts[i].Path.IsVisible(pt))
|
||||
return parts[i];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public LayoutPart GetPartAtPoint(Vector pt)
|
||||
{
|
||||
var pt2 = PointWorldToGraph(pt);
|
||||
return GetPartAtGraphPoint(pt2);
|
||||
}
|
||||
|
||||
public IList<LayoutPart> GetPartsFromWindow(RectangleF rect, SelectionType selectionType)
|
||||
{
|
||||
var list = new List<LayoutPart>();
|
||||
|
||||
if (selectionType == SelectionType.Intersect)
|
||||
{
|
||||
for (int i = 0; i < parts.Count; ++i)
|
||||
{
|
||||
var part = parts[i];
|
||||
var path = part.Path;
|
||||
var region = new Region(path);
|
||||
|
||||
if (region.IsVisible(rect))
|
||||
list.Add(part);
|
||||
|
||||
region.Dispose();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < parts.Count; ++i)
|
||||
{
|
||||
var part = parts[i];
|
||||
var path = part.Path;
|
||||
var bounds = path.GetBounds();
|
||||
|
||||
if (rect.Contains(bounds))
|
||||
list.Add(part);
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public void SetAction(Type type)
|
||||
{
|
||||
var action = Activator.CreateInstance(type, this) as Action;
|
||||
|
||||
if (action == null)
|
||||
return;
|
||||
|
||||
if (currentAction != null)
|
||||
{
|
||||
currentAction.CancelAction();
|
||||
currentAction.DisconnectEvents();
|
||||
currentAction = null;
|
||||
}
|
||||
|
||||
currentAction = action;
|
||||
|
||||
Status = GetDisplayName(type);
|
||||
}
|
||||
|
||||
public void SetAction(Type type, params object[] args)
|
||||
{
|
||||
if (currentAction != null)
|
||||
{
|
||||
currentAction.CancelAction();
|
||||
currentAction.DisconnectEvents();
|
||||
currentAction = null;
|
||||
}
|
||||
|
||||
Array.Resize(ref args, args.Length + 1);
|
||||
|
||||
// shift all elements to the right
|
||||
for (int i = args.Length - 2; i >= 0; i--)
|
||||
args[i + 1] = args[i];
|
||||
|
||||
// set the first argument to this.
|
||||
args[0] = this;
|
||||
|
||||
var action = Activator.CreateInstance(type, args) as Action;
|
||||
|
||||
if (action == null)
|
||||
return;
|
||||
|
||||
currentAction = action;
|
||||
|
||||
Status = GetDisplayName(type);
|
||||
}
|
||||
|
||||
public void AlignSelected(AlignType alignType)
|
||||
{
|
||||
if (SelectedParts.Count == 0)
|
||||
return;
|
||||
|
||||
AlignSelected(alignType, SelectedParts[0]);
|
||||
}
|
||||
|
||||
public void AlignSelected(AlignType alignType, LayoutPart fixedPart)
|
||||
{
|
||||
switch (alignType)
|
||||
{
|
||||
case AlignType.Bottom:
|
||||
Align.Bottom(fixedPart.BasePart, SelectedParts.Select(p => p.BasePart).ToList());
|
||||
break;
|
||||
|
||||
case AlignType.Horizontally:
|
||||
Align.Horizontally(fixedPart.BasePart, SelectedParts.Select(p => p.BasePart).ToList());
|
||||
break;
|
||||
|
||||
case AlignType.Left:
|
||||
Align.Left(fixedPart.BasePart, SelectedParts.Select(p => p.BasePart).ToList());
|
||||
break;
|
||||
|
||||
case AlignType.Right:
|
||||
Align.Right(fixedPart.BasePart, SelectedParts.Select(p => p.BasePart).ToList());
|
||||
break;
|
||||
|
||||
case AlignType.Top:
|
||||
Align.Top(fixedPart.BasePart, SelectedParts.Select(p => p.BasePart).ToList());
|
||||
break;
|
||||
|
||||
case AlignType.Vertically:
|
||||
Align.Vertically(fixedPart.BasePart, SelectedParts.Select(p => p.BasePart).ToList());
|
||||
break;
|
||||
|
||||
case AlignType.EvenlySpaceHorizontally:
|
||||
Align.EvenlyDistributeHorizontally(SelectedParts.Select(p => p.BasePart).ToList());
|
||||
break;
|
||||
|
||||
case AlignType.EvenlySpaceVertically:
|
||||
Align.EvenlyDistributeVertically(SelectedParts.Select(p => p.BasePart).ToList());
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
SelectedParts.ForEach(p => p.IsDirty = true);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
public void AddPartFromDrawing(Drawing dwg, Vector location)
|
||||
{
|
||||
var part = new Part(dwg, location);
|
||||
|
||||
part.Offset(
|
||||
part.Location.X - part.BoundingBox.Center.X,
|
||||
part.Location.Y - part.BoundingBox.Center.Y);
|
||||
|
||||
Plate.Parts.Add(part);
|
||||
}
|
||||
|
||||
public void RemoveSelectedParts()
|
||||
{
|
||||
foreach (var part in SelectedParts)
|
||||
Plate.Parts.Remove(part.BasePart);
|
||||
|
||||
DeselectAll();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
private void redrawTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
private void plate_PartAdded(object sender, ItemAddedEventArgs<Part> e)
|
||||
{
|
||||
if (PartAdded != null)
|
||||
PartAdded.Invoke(this, e);
|
||||
|
||||
parts.Insert(e.Index, LayoutPart.Create(e.Item, this));
|
||||
redrawTimer.Start();
|
||||
}
|
||||
|
||||
private void plate_PartRemoved(object sender, ItemRemovedEventArgs<Part> e)
|
||||
{
|
||||
if (PartRemoved != null)
|
||||
PartRemoved.Invoke(this, e);
|
||||
|
||||
parts.RemoveAll(p => p.BasePart == e.Item);
|
||||
}
|
||||
|
||||
public void DeselectAll()
|
||||
{
|
||||
SelectedParts.ForEach(p => p.IsSelected = false);
|
||||
SelectedParts.Clear();
|
||||
}
|
||||
|
||||
public void SelectAll()
|
||||
{
|
||||
parts.ForEach(p => p.IsSelected = true);
|
||||
SelectedParts.AddRange(parts);
|
||||
}
|
||||
|
||||
public override void ZoomToPoint(Vector pt, float zoomFactor, bool redraw = true)
|
||||
{
|
||||
base.ZoomToPoint(pt, zoomFactor, false);
|
||||
|
||||
if (redraw)
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
public override void ZoomToArea(double x, double y, double width, double height, bool redraw = true)
|
||||
{
|
||||
base.ZoomToArea(x, y, width, height, false);
|
||||
|
||||
if (redraw)
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
public virtual void ZoomToFit(bool redraw = true)
|
||||
{
|
||||
ZoomToArea(plate.BoundingBox(true), redraw);
|
||||
}
|
||||
|
||||
public virtual void ZoomToSelected(bool redraw = true)
|
||||
{
|
||||
ZoomToArea(SelectedParts.Select(p => p.BasePart).ToList().GetBoundingBox(), redraw);
|
||||
}
|
||||
|
||||
public virtual void ZoomToPlate(bool redraw = true)
|
||||
{
|
||||
ZoomToArea(plate.BoundingBox(false), redraw);
|
||||
}
|
||||
|
||||
public void PushSelected(PushDirection direction)
|
||||
{
|
||||
var boxes = new List<Box>();
|
||||
|
||||
foreach (var part in parts.Where(p => !p.IsSelected).ToList())
|
||||
{
|
||||
if (!SelectedParts.Contains(part))
|
||||
boxes.Add(part.BoundingBox);
|
||||
}
|
||||
|
||||
var workArea = Plate.WorkArea();
|
||||
var distance = double.MaxValue;
|
||||
var offset = new Vector();
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case PushDirection.Down:
|
||||
SelectedParts.ForEach(part =>
|
||||
{
|
||||
var d1 = Helper.ClosestDistanceDown(part.BoundingBox.Offset(Plate.PartSpacing), boxes);
|
||||
|
||||
if (d1 < distance)
|
||||
distance = d1;
|
||||
|
||||
var d2 = part.Bottom - workArea.Bottom;
|
||||
|
||||
if (d2 > 0 && d2 < distance)
|
||||
distance = d2;
|
||||
});
|
||||
offset.Y = -distance;
|
||||
break;
|
||||
|
||||
case PushDirection.Left:
|
||||
SelectedParts.ForEach(part =>
|
||||
{
|
||||
var d1 = Helper.ClosestDistanceLeft(part.BoundingBox.Offset(Plate.PartSpacing), boxes);
|
||||
|
||||
if (d1 < distance)
|
||||
distance = d1;
|
||||
|
||||
var d2 = part.Left - workArea.Left;
|
||||
|
||||
if (d2 > 0 && d2 < distance)
|
||||
distance = d2;
|
||||
});
|
||||
offset.X = -distance;
|
||||
break;
|
||||
|
||||
case PushDirection.Right:
|
||||
SelectedParts.ForEach(part =>
|
||||
{
|
||||
var d1 = Helper.ClosestDistanceRight(part.BoundingBox.Offset(Plate.PartSpacing), boxes);
|
||||
|
||||
if (d1 < distance)
|
||||
distance = d1;
|
||||
|
||||
var d2 = workArea.Right - part.Right;
|
||||
|
||||
if (d2 > 0 && d2 < distance)
|
||||
distance = d2;
|
||||
});
|
||||
offset.X = distance;
|
||||
break;
|
||||
|
||||
case PushDirection.Up:
|
||||
SelectedParts.ForEach(part =>
|
||||
{
|
||||
var d1 = Helper.ClosestDistanceUp(part.BoundingBox.Offset(Plate.PartSpacing), boxes);
|
||||
|
||||
if (d1 < distance)
|
||||
distance = d1;
|
||||
|
||||
var d2 = workArea.Top - part.Top;
|
||||
|
||||
if (d2 > 0 && d2 < distance)
|
||||
distance = d2;
|
||||
});
|
||||
offset.Y = distance;
|
||||
break;
|
||||
}
|
||||
|
||||
if (distance < double.MaxValue)
|
||||
{
|
||||
SelectedParts.ForEach(p => p.Offset(offset));
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private string GetDisplayName(Type type)
|
||||
{
|
||||
var attributes = type.GetCustomAttributes(true);
|
||||
|
||||
foreach (var attr in attributes)
|
||||
{
|
||||
var displayNameAttr = attr as DisplayNameAttribute;
|
||||
|
||||
if (displayNameAttr != null)
|
||||
return displayNameAttr.DisplayName;
|
||||
}
|
||||
|
||||
return type.Name;
|
||||
}
|
||||
|
||||
public void RotateSelectedParts(double angle)
|
||||
{
|
||||
var pt1 = SelectedParts.Select(p => p.BasePart).ToList().GetBoundingBox().Location;
|
||||
|
||||
for (int i = 0; i < SelectedParts.Count; ++i)
|
||||
{
|
||||
var part = SelectedParts[i];
|
||||
part.Rotate(angle);
|
||||
}
|
||||
|
||||
var pt2 = SelectedParts.Select(p => p.BasePart).ToList().GetBoundingBox().Location;
|
||||
var diff = pt1 - pt2;
|
||||
|
||||
for (int i = 0; i < SelectedParts.Count; ++i)
|
||||
{
|
||||
var part = SelectedParts[i];
|
||||
part.Offset(diff);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void UpdateMatrix()
|
||||
{
|
||||
base.UpdateMatrix();
|
||||
parts.ForEach(p => p.Update(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Controls
|
||||
{
|
||||
public class QuadrantSelect : Control
|
||||
{
|
||||
private int quadrant;
|
||||
|
||||
public QuadrantSelect()
|
||||
{
|
||||
}
|
||||
|
||||
public int Quadrant
|
||||
{
|
||||
get { return quadrant; }
|
||||
set { quadrant = value <= 4 && value > 0 ? value : 1; }
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
var midx = Width * 0.5f;
|
||||
var midy = Height * 0.5f;
|
||||
|
||||
RectangleF rect;
|
||||
|
||||
switch (Quadrant)
|
||||
{
|
||||
case 1:
|
||||
rect = new RectangleF(midx, 0, midx - 1, midy);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
rect = new RectangleF(0, 0, midx, midy);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
rect = new RectangleF(0, midy, midx, midy - 1);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
rect = new RectangleF(midx, midy, midx - 1, midy - 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
e.Graphics.DrawLine(Pens.Gray, midx, 0, midx, Height);
|
||||
e.Graphics.DrawLine(Pens.Gray, 0, midy, Width, midy);
|
||||
|
||||
e.Graphics.FillRectangle(Brushes.LightSkyBlue, rect);
|
||||
e.Graphics.DrawRectangle(Pens.Blue, rect.X, rect.Y, rect.Width, rect.Height);
|
||||
|
||||
e.Graphics.DrawString(
|
||||
Quadrant.ToString(),
|
||||
new Font(this.Font.FontFamily, 35, GraphicsUnit.Pixel),
|
||||
Brushes.White,
|
||||
rect,
|
||||
new StringFormat()
|
||||
{
|
||||
Alignment = StringAlignment.Center,
|
||||
LineAlignment = StringAlignment.Center
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnMouseClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseClick(e);
|
||||
|
||||
var midx = Width / 2;
|
||||
var midy = Height / 2;
|
||||
|
||||
if (e.X < midx)
|
||||
Quadrant = e.Y < midy ? 2 : 3;
|
||||
else
|
||||
Quadrant = e.Y < midy ? 1 : 4;
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Controls
|
||||
{
|
||||
public class VerticalLine : Control
|
||||
{
|
||||
private readonly Pen lightPen;
|
||||
private readonly Pen darkPen;
|
||||
|
||||
public VerticalLine()
|
||||
{
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
SetStyle(ControlStyles.Selectable, false);
|
||||
|
||||
lightPen = new Pen(ProfessionalColors.SeparatorLight);
|
||||
darkPen = new Pen(ProfessionalColors.SeparatorDark);
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
float midpoint = Width * 0.5f;
|
||||
|
||||
e.Graphics.DrawLine(darkPen, midpoint, 0, midpoint, Height);
|
||||
midpoint++;
|
||||
e.Graphics.DrawLine(lightPen, midpoint, 0, midpoint, Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OpenNest.IO;
|
||||
|
||||
namespace OpenNest
|
||||
{
|
||||
public class Document
|
||||
{
|
||||
public Nest Nest { get; set; }
|
||||
|
||||
public DateTime LastSaveDate { get; private set; }
|
||||
|
||||
public string LastSavePath { get; private set; }
|
||||
|
||||
public Units Units { get; set; }
|
||||
|
||||
public void SaveAs(string path)
|
||||
{
|
||||
var name = Path.GetFileNameWithoutExtension(path);
|
||||
Nest.Name = name;
|
||||
LastSaveDate = DateTime.Now;
|
||||
LastSavePath = path;
|
||||
|
||||
var writer = new NestWriter(Nest);
|
||||
writer.Write(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class AutoNestForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
this.bottomPanel1 = new OpenNest.Controls.BottomPanel();
|
||||
this.acceptButton = new System.Windows.Forms.Button();
|
||||
this.createNewPlatesAsNeededBox = new System.Windows.Forms.CheckBox();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.bottomPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.AllowUserToDeleteRows = false;
|
||||
this.dataGridView1.AllowUserToOrderColumns = true;
|
||||
this.dataGridView1.AllowUserToResizeRows = false;
|
||||
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.RowHeadersVisible = false;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(545, 385);
|
||||
this.dataGridView1.TabIndex = 0;
|
||||
//
|
||||
// bottomPanel1
|
||||
//
|
||||
this.bottomPanel1.Controls.Add(this.acceptButton);
|
||||
this.bottomPanel1.Controls.Add(this.createNewPlatesAsNeededBox);
|
||||
this.bottomPanel1.Controls.Add(this.cancelButton);
|
||||
this.bottomPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.bottomPanel1.Location = new System.Drawing.Point(0, 335);
|
||||
this.bottomPanel1.Name = "bottomPanel1";
|
||||
this.bottomPanel1.Size = new System.Drawing.Size(545, 50);
|
||||
this.bottomPanel1.TabIndex = 9;
|
||||
//
|
||||
// acceptButton
|
||||
//
|
||||
this.acceptButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.acceptButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.acceptButton.Location = new System.Drawing.Point(344, 9);
|
||||
this.acceptButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.acceptButton.Name = "acceptButton";
|
||||
this.acceptButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.acceptButton.TabIndex = 6;
|
||||
this.acceptButton.Text = "Accept";
|
||||
this.acceptButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// createNewPlatesAsNeededBox
|
||||
//
|
||||
this.createNewPlatesAsNeededBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.createNewPlatesAsNeededBox.AutoSize = true;
|
||||
this.createNewPlatesAsNeededBox.Location = new System.Drawing.Point(12, 15);
|
||||
this.createNewPlatesAsNeededBox.Name = "createNewPlatesAsNeededBox";
|
||||
this.createNewPlatesAsNeededBox.Size = new System.Drawing.Size(202, 20);
|
||||
this.createNewPlatesAsNeededBox.TabIndex = 8;
|
||||
this.createNewPlatesAsNeededBox.Text = "Create new plates as needed";
|
||||
this.createNewPlatesAsNeededBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(442, 9);
|
||||
this.cancelButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.cancelButton.TabIndex = 7;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// AutoNestForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(545, 385);
|
||||
this.Controls.Add(this.bottomPanel1);
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Name = "AutoNestForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "AutoNest";
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.bottomPanel1.ResumeLayout(false);
|
||||
this.bottomPanel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
private System.Windows.Forms.Button acceptButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.CheckBox createNewPlatesAsNeededBox;
|
||||
private Controls.BottomPanel bottomPanel1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class AutoNestForm : Form
|
||||
{
|
||||
public AutoNestForm(Nest nest)
|
||||
{
|
||||
InitializeComponent();
|
||||
LoadDrawings(nest);
|
||||
|
||||
dataGridView1.DataError += dataGridView1_DataError;
|
||||
}
|
||||
|
||||
public bool AllowPlateCreation
|
||||
{
|
||||
get { return createNewPlatesAsNeededBox.Checked; }
|
||||
set { createNewPlatesAsNeededBox.Checked = value; }
|
||||
}
|
||||
|
||||
private void LoadDrawings(Nest nest)
|
||||
{
|
||||
var items = new List<DataGridViewItem>();
|
||||
dataGridView1.Rows.Clear();
|
||||
|
||||
foreach (var drawing in nest.Drawings)
|
||||
items.Add(GetDataGridViewItem(drawing));
|
||||
|
||||
dataGridView1.DataSource = items;
|
||||
}
|
||||
|
||||
public List<NestItem> GetNestItems()
|
||||
{
|
||||
var nestItems = new List<NestItem>();
|
||||
var gridItems = dataGridView1.DataSource as List<DataGridViewItem>;
|
||||
|
||||
if (gridItems == null)
|
||||
return nestItems;
|
||||
|
||||
foreach (var gridItem in gridItems)
|
||||
{
|
||||
if (gridItem.Quantity < 1)
|
||||
continue;
|
||||
|
||||
var nestItem = new NestItem();
|
||||
nestItem.Drawing = gridItem.RefDrawing;
|
||||
nestItem.Priority = gridItem.Priority;
|
||||
nestItem.Quantity = gridItem.Quantity;
|
||||
nestItem.RotationEnd = gridItem.RotationEnd;
|
||||
nestItem.RotationStart = gridItem.RotationStart;
|
||||
nestItem.StepAngle = gridItem.StepAngle;
|
||||
|
||||
nestItems.Add(nestItem);
|
||||
}
|
||||
|
||||
return nestItems;
|
||||
}
|
||||
|
||||
private DataGridViewItem GetDataGridViewItem(Drawing dwg)
|
||||
{
|
||||
var item = new DataGridViewItem();
|
||||
item.RefDrawing = dwg;
|
||||
item.Quantity = dwg.Quantity.Remaining > 0 ? dwg.Quantity.Remaining : 0;
|
||||
item.Priority = dwg.Priority;
|
||||
item.RotationStart = dwg.Constraints.StartAngle;
|
||||
item.RotationEnd = dwg.Constraints.EndAngle;
|
||||
item.StepAngle = dwg.Constraints.StepAngle;
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e)
|
||||
{
|
||||
MessageBox.Show("Invalid input. Expected input type is " + dataGridView1[e.ColumnIndex, e.RowIndex].ValueType.Name);
|
||||
}
|
||||
|
||||
private class DataGridViewItem
|
||||
{
|
||||
internal Drawing RefDrawing { get; set; }
|
||||
|
||||
[ReadOnly(true)]
|
||||
[DisplayName("Drawing Name")]
|
||||
public string DrawingName
|
||||
{
|
||||
get { return RefDrawing.Name; }
|
||||
set { RefDrawing.Name = value; }
|
||||
}
|
||||
|
||||
public int Quantity { get; set; }
|
||||
|
||||
public int Priority { get; set; }
|
||||
|
||||
[Browsable(false)] // hide until implemented
|
||||
[DisplayName("Rotation Start")]
|
||||
public double RotationStart { get; set; }
|
||||
|
||||
[Browsable(false)] // hide until implemented
|
||||
[DisplayName("Rotation End")]
|
||||
public double RotationEnd { get; set; }
|
||||
|
||||
[Browsable(false)] // hide until implemented
|
||||
[DisplayName("Step Angle")]
|
||||
public double StepAngle { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,293 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class CadConverterForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.checkedListBox2 = new System.Windows.Forms.CheckedListBox();
|
||||
this.tabPage3 = new System.Windows.Forms.TabPage();
|
||||
this.checkedListBox3 = new System.Windows.Forms.CheckedListBox();
|
||||
this.entityView1 = new OpenNest.Controls.EntityView();
|
||||
this.bottomPanel1 = new OpenNest.Controls.BottomPanel();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.acceptButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
|
||||
this.splitContainer2.Panel1.SuspendLayout();
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.tabPage3.SuspendLayout();
|
||||
this.bottomPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.dataGridView1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(928, 479);
|
||||
this.splitContainer1.SplitterDistance = 225;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.AllowUserToResizeRows = false;
|
||||
this.dataGridView1.BackgroundColor = System.Drawing.Color.White;
|
||||
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dataGridView1.GridColor = System.Drawing.Color.Gainsboro;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
|
||||
this.dataGridView1.MultiSelect = false;
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.RowHeadersVisible = false;
|
||||
this.dataGridView1.RowTemplate.Height = 26;
|
||||
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(928, 225);
|
||||
this.dataGridView1.TabIndex = 0;
|
||||
this.dataGridView1.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(this.dataGridView1_DataBindingComplete);
|
||||
this.dataGridView1.SelectionChanged += new System.EventHandler(this.dataGridView1_SelectionChanged);
|
||||
//
|
||||
// splitContainer2
|
||||
//
|
||||
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer2.Name = "splitContainer2";
|
||||
//
|
||||
// splitContainer2.Panel1
|
||||
//
|
||||
this.splitContainer2.Panel1.Controls.Add(this.tabControl1);
|
||||
//
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.entityView1);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(928, 250);
|
||||
this.splitContainer2.SplitterDistance = 309;
|
||||
this.splitContainer2.TabIndex = 0;
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Controls.Add(this.tabPage3);
|
||||
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(309, 250);
|
||||
this.tabControl1.TabIndex = 0;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.checkedListBox1);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 25);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(301, 221);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Layers";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkedListBox1
|
||||
//
|
||||
this.checkedListBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.checkedListBox1.CheckOnClick = true;
|
||||
this.checkedListBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.checkedListBox1.FormattingEnabled = true;
|
||||
this.checkedListBox1.Location = new System.Drawing.Point(3, 3);
|
||||
this.checkedListBox1.Name = "checkedListBox1";
|
||||
this.checkedListBox1.Size = new System.Drawing.Size(295, 215);
|
||||
this.checkedListBox1.TabIndex = 0;
|
||||
this.checkedListBox1.SelectedIndexChanged += new System.EventHandler(this.checkedListBox1_SelectedIndexChanged);
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.checkedListBox2);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(301, 294);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Colors";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkedListBox2
|
||||
//
|
||||
this.checkedListBox2.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.checkedListBox2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.checkedListBox2.FormattingEnabled = true;
|
||||
this.checkedListBox2.Location = new System.Drawing.Point(3, 3);
|
||||
this.checkedListBox2.Name = "checkedListBox2";
|
||||
this.checkedListBox2.Size = new System.Drawing.Size(295, 288);
|
||||
this.checkedListBox2.TabIndex = 1;
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.Controls.Add(this.checkedListBox3);
|
||||
this.tabPage3.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage3.Size = new System.Drawing.Size(301, 294);
|
||||
this.tabPage3.TabIndex = 2;
|
||||
this.tabPage3.Text = "Line Types";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkedListBox3
|
||||
//
|
||||
this.checkedListBox3.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.checkedListBox3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.checkedListBox3.FormattingEnabled = true;
|
||||
this.checkedListBox3.Location = new System.Drawing.Point(3, 3);
|
||||
this.checkedListBox3.Name = "checkedListBox3";
|
||||
this.checkedListBox3.Size = new System.Drawing.Size(295, 288);
|
||||
this.checkedListBox3.TabIndex = 2;
|
||||
//
|
||||
// entityView1
|
||||
//
|
||||
this.entityView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(40)))), ((int)(((byte)(48)))));
|
||||
this.entityView1.Cursor = System.Windows.Forms.Cursors.Cross;
|
||||
this.entityView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.entityView1.Location = new System.Drawing.Point(0, 0);
|
||||
this.entityView1.Name = "entityView1";
|
||||
this.entityView1.Size = new System.Drawing.Size(615, 250);
|
||||
this.entityView1.TabIndex = 0;
|
||||
this.entityView1.Text = "entityView1";
|
||||
//
|
||||
// bottomPanel1
|
||||
//
|
||||
this.bottomPanel1.Controls.Add(this.cancelButton);
|
||||
this.bottomPanel1.Controls.Add(this.acceptButton);
|
||||
this.bottomPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.bottomPanel1.Location = new System.Drawing.Point(0, 479);
|
||||
this.bottomPanel1.Name = "bottomPanel1";
|
||||
this.bottomPanel1.Size = new System.Drawing.Size(928, 50);
|
||||
this.bottomPanel1.TabIndex = 1;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(826, 10);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.cancelButton.TabIndex = 1;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// acceptButton
|
||||
//
|
||||
this.acceptButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.acceptButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.acceptButton.Location = new System.Drawing.Point(730, 10);
|
||||
this.acceptButton.Name = "acceptButton";
|
||||
this.acceptButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.acceptButton.TabIndex = 0;
|
||||
this.acceptButton.Text = "Accept";
|
||||
this.acceptButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// CadConverterForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(928, 529);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Controls.Add(this.bottomPanel1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "CadConverterForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "CAD Converter";
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.splitContainer2.Panel1.ResumeLayout(false);
|
||||
this.splitContainer2.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.tabPage3.ResumeLayout(false);
|
||||
this.bottomPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button acceptButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private Controls.BottomPanel bottomPanel1;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
private System.Windows.Forms.SplitContainer splitContainer2;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private Controls.EntityView entityView1;
|
||||
private System.Windows.Forms.CheckedListBox checkedListBox1;
|
||||
private System.Windows.Forms.TabPage tabPage3;
|
||||
private System.Windows.Forms.CheckedListBox checkedListBox2;
|
||||
private System.Windows.Forms.CheckedListBox checkedListBox3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,388 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.CNC;
|
||||
using OpenNest.Geometry;
|
||||
using OpenNest.IO;
|
||||
using OpenNest.Properties;
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class CadConverterForm : Form
|
||||
{
|
||||
public CadConverterForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Items = new BindingList<CadConverterItem>();
|
||||
dataGridView1.DataSource = Items;
|
||||
dataGridView1.DataError += dataGridView1_DataError;
|
||||
}
|
||||
|
||||
private BindingList<CadConverterItem> Items { get; set; }
|
||||
|
||||
private void SetRotation(Shape shape, RotationType rotation)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dir = shape.ToPolygon(3).RotationDirection();
|
||||
|
||||
if (dir != RotationType.CW)
|
||||
shape.Reverse();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void LoadItem(CadConverterItem item)
|
||||
{
|
||||
entityView1.Entities.Clear();
|
||||
entityView1.Entities.AddRange(item.Entities);
|
||||
entityView1.ZoomToFit();
|
||||
|
||||
checkedListBox1.Items.Clear();
|
||||
|
||||
var layers = item.Entities
|
||||
.Where(e => e.Layer != null)
|
||||
.Select(e => e.Layer.Name)
|
||||
.ToList()
|
||||
.Distinct();
|
||||
|
||||
foreach (var layer in layers)
|
||||
checkedListBox1.Items.Add(layer, true);
|
||||
}
|
||||
|
||||
private static Color GetNextColor()
|
||||
{
|
||||
//if (colorIndex >= Colors.Length)
|
||||
// colorIndex = 0;
|
||||
|
||||
//var color = Colors[colorIndex];
|
||||
|
||||
//colorIndex++;
|
||||
|
||||
return new HSLColor(new Random().NextDouble() * 240, 240, 160);
|
||||
|
||||
}
|
||||
|
||||
public List<Drawing> GetDrawings()
|
||||
{
|
||||
var drawings = new List<Drawing>();
|
||||
|
||||
foreach (var item in Items)
|
||||
{
|
||||
var entities = item.Entities.Where(e => e.Layer.IsVisible).ToList();
|
||||
|
||||
if (entities.Count == 0)
|
||||
continue;
|
||||
|
||||
var drawing = new Drawing(item.Name);
|
||||
drawing.Color = GetNextColor();
|
||||
drawing.Customer = item.Customer;
|
||||
drawing.Source.Path = item.Path;
|
||||
drawing.Quantity.Required = item.Quantity;
|
||||
|
||||
var shape = new DefinedShape(entities);
|
||||
|
||||
SetRotation(shape.Perimeter, RotationType.CW);
|
||||
|
||||
foreach (var cutout in shape.Cutouts)
|
||||
SetRotation(cutout, RotationType.CCW);
|
||||
|
||||
entities = new List<Entity>();
|
||||
entities.AddRange(shape.Perimeter.Entities);
|
||||
|
||||
shape.Cutouts.ForEach(cutout => entities.AddRange(cutout.Entities));
|
||||
|
||||
var pgm = ConvertGeometry.ToProgram(entities);
|
||||
var firstCode = pgm[0];
|
||||
|
||||
if (firstCode.Type == CodeType.RapidMove)
|
||||
{
|
||||
var rapid = (RapidMove)firstCode;
|
||||
|
||||
drawing.Source.Offset = rapid.EndPoint;
|
||||
|
||||
pgm.Offset(-rapid.EndPoint);
|
||||
pgm.Codes.RemoveAt(0);
|
||||
}
|
||||
|
||||
drawing.Program = pgm;
|
||||
drawings.Add(drawing);
|
||||
|
||||
Thread.Sleep(20);
|
||||
}
|
||||
|
||||
return drawings;
|
||||
}
|
||||
|
||||
private CadConverterItem CurrentItem
|
||||
{
|
||||
get
|
||||
{
|
||||
return dataGridView1.SelectedRows.Count != 0
|
||||
? Items[dataGridView1.SelectedRows[0].Index]
|
||||
: null;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddFile(string file)
|
||||
{
|
||||
var importer = new DxfImporter();
|
||||
importer.SplinePrecision = Settings.Default.ImportSplinePrecision;
|
||||
|
||||
var entities = new List<Entity>();
|
||||
|
||||
if (!importer.GetGeometry(file, out entities))
|
||||
{
|
||||
MessageBox.Show("Failed to import file \"" + file + "\"");
|
||||
return;
|
||||
}
|
||||
|
||||
lock (Items)
|
||||
{
|
||||
Items.Add(new CadConverterItem
|
||||
{
|
||||
Name = Path.GetFileNameWithoutExtension(file),
|
||||
Entities = entities,
|
||||
Path = file,
|
||||
Quantity = 1,
|
||||
Customer = string.Empty
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void AddFiles(IEnumerable<string> files)
|
||||
{
|
||||
Parallel.ForEach(files, AddFile);
|
||||
}
|
||||
|
||||
private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e)
|
||||
{
|
||||
MessageBox.Show(e.Exception.Message);
|
||||
}
|
||||
|
||||
private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
|
||||
{
|
||||
dataGridView1.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
|
||||
}
|
||||
|
||||
private void dataGridView1_SelectionChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
var currentItem = CurrentItem;
|
||||
|
||||
if (currentItem != null)
|
||||
LoadItem(currentItem);
|
||||
}
|
||||
|
||||
#region Colors
|
||||
|
||||
private static Color[] Colors = new Color[]
|
||||
{
|
||||
Color.FromArgb(160, 255, 255),
|
||||
Color.FromArgb(160, 255, 160),
|
||||
Color.FromArgb(160, 160, 255),
|
||||
Color.FromArgb(255, 255, 160),
|
||||
Color.FromArgb(255, 160, 255),
|
||||
Color.FromArgb(255, 160, 160),
|
||||
|
||||
Color.FromArgb(200, 255, 255),
|
||||
Color.FromArgb(200, 255, 200),
|
||||
Color.FromArgb(200, 200, 255),
|
||||
Color.FromArgb(255, 255, 200),
|
||||
Color.FromArgb(255, 200, 255),
|
||||
Color.FromArgb(255, 200, 200),
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
private void checkedListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
var index = checkedListBox1.SelectedIndex;
|
||||
var layerName = checkedListBox1.Items[index].ToString();
|
||||
var isVisible = checkedListBox1.CheckedItems.Contains(layerName);
|
||||
|
||||
CurrentItem.Entities.ForEach(entity =>
|
||||
{
|
||||
if (entity.Layer.Name == layerName)
|
||||
entity.Layer.IsVisible = isVisible;
|
||||
});
|
||||
|
||||
entityView1.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
class CadConverterItem
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Customer { get; set; }
|
||||
|
||||
public int Quantity { get; set; }
|
||||
|
||||
[ReadOnly(true)]
|
||||
public string Path { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
public List<Entity> Entities { get; set; }
|
||||
}
|
||||
|
||||
public class RandomColorGenerator
|
||||
{
|
||||
private readonly Random random;
|
||||
|
||||
public RandomColorGenerator()
|
||||
{
|
||||
random = new Random();
|
||||
}
|
||||
|
||||
public Color GetNext()
|
||||
{
|
||||
var r = random.Next(255);
|
||||
Thread.Sleep(20);
|
||||
var g = random.Next(255);
|
||||
Thread.Sleep(20);
|
||||
var b = random.Next(255);
|
||||
|
||||
return Color.FromArgb(r, g, b);
|
||||
}
|
||||
}
|
||||
|
||||
public class HSLColor
|
||||
{
|
||||
// Private data members below are on scale 0-1
|
||||
// They are scaled for use externally based on scale
|
||||
private double hue = 1.0;
|
||||
private double saturation = 1.0;
|
||||
private double luminosity = 1.0;
|
||||
|
||||
private const double scale = 240.0;
|
||||
|
||||
public double Hue
|
||||
{
|
||||
get { return hue * scale; }
|
||||
set { hue = CheckRange(value / scale); }
|
||||
}
|
||||
public double Saturation
|
||||
{
|
||||
get { return saturation * scale; }
|
||||
set { saturation = CheckRange(value / scale); }
|
||||
}
|
||||
public double Luminosity
|
||||
{
|
||||
get { return luminosity * scale; }
|
||||
set { luminosity = CheckRange(value / scale); }
|
||||
}
|
||||
|
||||
private double CheckRange(double value)
|
||||
{
|
||||
if (value < 0.0)
|
||||
value = 0.0;
|
||||
else if (value > 1.0)
|
||||
value = 1.0;
|
||||
return value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("H: {0:#0.##} S: {1:#0.##} L: {2:#0.##}", Hue, Saturation, Luminosity);
|
||||
}
|
||||
|
||||
public string ToRGBString()
|
||||
{
|
||||
Color color = (Color)this;
|
||||
return String.Format("R: {0:#0.##} G: {1:#0.##} B: {2:#0.##}", color.R, color.G, color.B);
|
||||
}
|
||||
|
||||
#region Casts to/from System.Drawing.Color
|
||||
public static implicit operator Color(HSLColor hslColor)
|
||||
{
|
||||
double r = 0, g = 0, b = 0;
|
||||
if (hslColor.luminosity != 0)
|
||||
{
|
||||
if (hslColor.saturation == 0)
|
||||
r = g = b = hslColor.luminosity;
|
||||
else
|
||||
{
|
||||
double temp2 = GetTemp2(hslColor);
|
||||
double temp1 = 2.0 * hslColor.luminosity - temp2;
|
||||
|
||||
r = GetColorComponent(temp1, temp2, hslColor.hue + 1.0 / 3.0);
|
||||
g = GetColorComponent(temp1, temp2, hslColor.hue);
|
||||
b = GetColorComponent(temp1, temp2, hslColor.hue - 1.0 / 3.0);
|
||||
}
|
||||
}
|
||||
return Color.FromArgb((int)(255 * r), (int)(255 * g), (int)(255 * b));
|
||||
}
|
||||
|
||||
private static double GetColorComponent(double temp1, double temp2, double temp3)
|
||||
{
|
||||
temp3 = MoveIntoRange(temp3);
|
||||
if (temp3 < 1.0 / 6.0)
|
||||
return temp1 + (temp2 - temp1) * 6.0 * temp3;
|
||||
else if (temp3 < 0.5)
|
||||
return temp2;
|
||||
else if (temp3 < 2.0 / 3.0)
|
||||
return temp1 + ((temp2 - temp1) * ((2.0 / 3.0) - temp3) * 6.0);
|
||||
else
|
||||
return temp1;
|
||||
}
|
||||
private static double MoveIntoRange(double temp3)
|
||||
{
|
||||
if (temp3 < 0.0)
|
||||
temp3 += 1.0;
|
||||
else if (temp3 > 1.0)
|
||||
temp3 -= 1.0;
|
||||
return temp3;
|
||||
}
|
||||
private static double GetTemp2(HSLColor hslColor)
|
||||
{
|
||||
double temp2;
|
||||
if (hslColor.luminosity < 0.5) //<=??
|
||||
temp2 = hslColor.luminosity * (1.0 + hslColor.saturation);
|
||||
else
|
||||
temp2 = hslColor.luminosity + hslColor.saturation - (hslColor.luminosity * hslColor.saturation);
|
||||
return temp2;
|
||||
}
|
||||
|
||||
public static implicit operator HSLColor(Color color)
|
||||
{
|
||||
HSLColor hslColor = new HSLColor();
|
||||
hslColor.hue = color.GetHue() / 360.0; // we store hue as 0-1 as opposed to 0-360
|
||||
hslColor.luminosity = color.GetBrightness();
|
||||
hslColor.saturation = color.GetSaturation();
|
||||
return hslColor;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public void SetRGB(int red, int green, int blue)
|
||||
{
|
||||
HSLColor hslColor = (HSLColor)Color.FromArgb(red, green, blue);
|
||||
this.hue = hslColor.hue;
|
||||
this.saturation = hslColor.saturation;
|
||||
this.luminosity = hslColor.luminosity;
|
||||
}
|
||||
|
||||
public HSLColor() { }
|
||||
public HSLColor(Color color)
|
||||
{
|
||||
SetRGB(color.R, color.G, color.B);
|
||||
}
|
||||
public HSLColor(int red, int green, int blue)
|
||||
{
|
||||
SetRGB(red, green, blue);
|
||||
}
|
||||
public HSLColor(double hue, double saturation, double luminosity)
|
||||
{
|
||||
this.Hue = hue;
|
||||
this.Saturation = saturation;
|
||||
this.Luminosity = luminosity;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,241 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class CutParametersForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.numericUpDown1 = new OpenNest.Controls.NumericUpDown();
|
||||
this.numericUpDown2 = new OpenNest.Controls.NumericUpDown();
|
||||
this.numericUpDown3 = new OpenNest.Controls.NumericUpDown();
|
||||
this.acceptButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.bottomPanel1 = new OpenNest.Controls.BottomPanel();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();
|
||||
this.bottomPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label6, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.numericUpDown1, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.numericUpDown2, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.numericUpDown3, 1, 2);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.tableLayoutPanel1.RowCount = 3;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(333, 120);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(9, 15);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(109, 16);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Feedrate :";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(9, 51);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(109, 16);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "Rapid Feedrate :";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(9, 88);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(109, 16);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "Pierce Time :\r\n";
|
||||
//
|
||||
// numericUpDown1
|
||||
//
|
||||
this.numericUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDown1.Location = new System.Drawing.Point(126, 12);
|
||||
this.numericUpDown1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.numericUpDown1.Maximum = new decimal(new int[] {
|
||||
9999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown1.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown1.Name = "numericUpDown1";
|
||||
this.numericUpDown1.Size = new System.Drawing.Size(198, 22);
|
||||
this.numericUpDown1.Suffix = "";
|
||||
this.numericUpDown1.TabIndex = 0;
|
||||
this.numericUpDown1.Value = new decimal(new int[] {
|
||||
60,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// numericUpDown2
|
||||
//
|
||||
this.numericUpDown2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDown2.Location = new System.Drawing.Point(126, 48);
|
||||
this.numericUpDown2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.numericUpDown2.Maximum = new decimal(new int[] {
|
||||
9999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown2.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown2.Name = "numericUpDown2";
|
||||
this.numericUpDown2.Size = new System.Drawing.Size(198, 22);
|
||||
this.numericUpDown2.Suffix = "";
|
||||
this.numericUpDown2.TabIndex = 1;
|
||||
this.numericUpDown2.Value = new decimal(new int[] {
|
||||
1200,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// numericUpDown3
|
||||
//
|
||||
this.numericUpDown3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDown3.DecimalPlaces = 1;
|
||||
this.numericUpDown3.Location = new System.Drawing.Point(126, 85);
|
||||
this.numericUpDown3.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.numericUpDown3.Name = "numericUpDown3";
|
||||
this.numericUpDown3.Size = new System.Drawing.Size(198, 22);
|
||||
this.numericUpDown3.Suffix = " seconds";
|
||||
this.numericUpDown3.TabIndex = 2;
|
||||
//
|
||||
// acceptButton
|
||||
//
|
||||
this.acceptButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.acceptButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.acceptButton.Location = new System.Drawing.Point(132, 11);
|
||||
this.acceptButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.acceptButton.Name = "acceptButton";
|
||||
this.acceptButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.acceptButton.TabIndex = 8;
|
||||
this.acceptButton.Text = "Accept";
|
||||
this.acceptButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(230, 11);
|
||||
this.cancelButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.cancelButton.TabIndex = 9;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bottomPanel1
|
||||
//
|
||||
this.bottomPanel1.Controls.Add(this.acceptButton);
|
||||
this.bottomPanel1.Controls.Add(this.cancelButton);
|
||||
this.bottomPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.bottomPanel1.Location = new System.Drawing.Point(0, 120);
|
||||
this.bottomPanel1.Name = "bottomPanel1";
|
||||
this.bottomPanel1.Size = new System.Drawing.Size(333, 50);
|
||||
this.bottomPanel1.TabIndex = 3;
|
||||
//
|
||||
// CutParametersForm
|
||||
//
|
||||
this.AcceptButton = this.acceptButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(333, 170);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.bottomPanel1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "CutParametersForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Cut Parameters";
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();
|
||||
this.bottomPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private Controls.NumericUpDown numericUpDown1;
|
||||
private Controls.NumericUpDown numericUpDown2;
|
||||
private Controls.NumericUpDown numericUpDown3;
|
||||
private Controls.BottomPanel bottomPanel1;
|
||||
private System.Windows.Forms.Button acceptButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class CutParametersForm : Form
|
||||
{
|
||||
private Units units;
|
||||
|
||||
public CutParametersForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
Units = OpenNest.Units.Inches;
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
numericUpDown1.Value = Properties.Settings.Default.LastFeedrate;
|
||||
numericUpDown2.Value = Properties.Settings.Default.LastRapidFeedrate;
|
||||
numericUpDown3.Value = Properties.Settings.Default.LastPierceTime;
|
||||
}
|
||||
|
||||
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
base.OnClosing(e);
|
||||
|
||||
Properties.Settings.Default.LastFeedrate = numericUpDown1.Value;
|
||||
Properties.Settings.Default.LastRapidFeedrate = numericUpDown2.Value;
|
||||
Properties.Settings.Default.LastPierceTime = numericUpDown3.Value;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
public Units Units
|
||||
{
|
||||
get { return units; }
|
||||
set
|
||||
{
|
||||
units = value;
|
||||
SetUnits(value);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetUnits(Units units)
|
||||
{
|
||||
var suffix = UnitsHelper.GetShortTimeUnitPair(units);
|
||||
|
||||
numericUpDown1.Suffix = " " + suffix;
|
||||
numericUpDown2.Suffix = " " + suffix;
|
||||
}
|
||||
|
||||
public CutParameters GetCutParameters()
|
||||
{
|
||||
return new CutParameters()
|
||||
{
|
||||
Feedrate = (double)numericUpDown1.Value,
|
||||
RapidTravelRate = (double)numericUpDown2.Value,
|
||||
PierceTime = TimeSpan.FromSeconds((double)numericUpDown3.Value),
|
||||
Units = units
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,268 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class EditDrawingForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.nameBox = new System.Windows.Forms.TextBox();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.qtyBox = new OpenNest.Controls.NumericUpDown();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.customerBox = new System.Windows.Forms.TextBox();
|
||||
this.priorityBox = new OpenNest.Controls.NumericUpDown();
|
||||
this.applyButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.bottomPanel1 = new OpenNest.Controls.BottomPanel();
|
||||
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.qtyBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.priorityBox)).BeginInit();
|
||||
this.bottomPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pictureBox1.BackColor = System.Drawing.Color.White;
|
||||
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(412, 12);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(289, 257);
|
||||
this.pictureBox1.TabIndex = 1;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(71, 16);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Name :";
|
||||
//
|
||||
// nameBox
|
||||
//
|
||||
this.nameBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.nameBox.Location = new System.Drawing.Point(80, 9);
|
||||
this.nameBox.Name = "nameBox";
|
||||
this.nameBox.Size = new System.Drawing.Size(311, 22);
|
||||
this.nameBox.TabIndex = 3;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.nameBox, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.qtyBox, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label3, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label4, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.customerBox, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.priorityBox, 1, 3);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 12);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 4;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(394, 160);
|
||||
this.tableLayoutPanel1.TabIndex = 4;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(3, 52);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(71, 16);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Quantity :";
|
||||
//
|
||||
// qtyBox
|
||||
//
|
||||
this.qtyBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.qtyBox.Location = new System.Drawing.Point(80, 49);
|
||||
this.qtyBox.Maximum = new decimal(new int[] {
|
||||
999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.qtyBox.Name = "qtyBox";
|
||||
this.qtyBox.Size = new System.Drawing.Size(311, 22);
|
||||
this.qtyBox.Suffix = "";
|
||||
this.qtyBox.TabIndex = 4;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(3, 92);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(71, 16);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Customer :";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(3, 132);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(71, 16);
|
||||
this.label4.TabIndex = 2;
|
||||
this.label4.Text = "Priority :";
|
||||
//
|
||||
// customerBox
|
||||
//
|
||||
this.customerBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.customerBox.Location = new System.Drawing.Point(80, 89);
|
||||
this.customerBox.Name = "customerBox";
|
||||
this.customerBox.Size = new System.Drawing.Size(311, 22);
|
||||
this.customerBox.TabIndex = 3;
|
||||
//
|
||||
// priorityBox
|
||||
//
|
||||
this.priorityBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.priorityBox.Location = new System.Drawing.Point(80, 129);
|
||||
this.priorityBox.Maximum = new decimal(new int[] {
|
||||
999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.priorityBox.Name = "priorityBox";
|
||||
this.priorityBox.Size = new System.Drawing.Size(311, 22);
|
||||
this.priorityBox.Suffix = "";
|
||||
this.priorityBox.TabIndex = 4;
|
||||
//
|
||||
// applyButton
|
||||
//
|
||||
this.applyButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.applyButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.applyButton.Location = new System.Drawing.Point(515, 10);
|
||||
this.applyButton.Name = "applyButton";
|
||||
this.applyButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.applyButton.TabIndex = 5;
|
||||
this.applyButton.Text = "Done";
|
||||
this.applyButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(611, 10);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.cancelButton.TabIndex = 6;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bottomPanel1
|
||||
//
|
||||
this.bottomPanel1.Controls.Add(this.applyButton);
|
||||
this.bottomPanel1.Controls.Add(this.cancelButton);
|
||||
this.bottomPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.bottomPanel1.Location = new System.Drawing.Point(0, 298);
|
||||
this.bottomPanel1.Name = "bottomPanel1";
|
||||
this.bottomPanel1.Size = new System.Drawing.Size(713, 50);
|
||||
this.bottomPanel1.TabIndex = 0;
|
||||
//
|
||||
// colorDialog1
|
||||
//
|
||||
this.colorDialog1.AnyColor = true;
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.AutoSize = true;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(409, 272);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(90, 16);
|
||||
this.linkLabel1.TabIndex = 5;
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.Text = "Change Color";
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// EditDrawingForm
|
||||
//
|
||||
this.AcceptButton = this.applyButton;
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(713, 348);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.bottomPanel1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "EditDrawingForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Edit Drawing";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.qtyBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.priorityBox)).EndInit();
|
||||
this.bottomPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Controls.BottomPanel bottomPanel1;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox nameBox;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private Controls.NumericUpDown qtyBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox customerBox;
|
||||
private Controls.NumericUpDown priorityBox;
|
||||
private System.Windows.Forms.Button applyButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.ColorDialog colorDialog1;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class EditDrawingForm : Form
|
||||
{
|
||||
private Drawing drawing;
|
||||
|
||||
public EditDrawingForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private string DrawingName
|
||||
{
|
||||
get { return nameBox.Text; }
|
||||
set { nameBox.Text = value; }
|
||||
}
|
||||
|
||||
private string Customer
|
||||
{
|
||||
get { return customerBox.Text; }
|
||||
set { customerBox.Text = value; }
|
||||
}
|
||||
|
||||
private int Quantity
|
||||
{
|
||||
get { return (int)qtyBox.Value; }
|
||||
set { qtyBox.Value = value; }
|
||||
}
|
||||
|
||||
private int Priority
|
||||
{
|
||||
get { return (int)priorityBox.Value; }
|
||||
set { priorityBox.Value = value; }
|
||||
}
|
||||
|
||||
private Image DrawingImage
|
||||
{
|
||||
get { return pictureBox1.Image; }
|
||||
set { pictureBox1.Image = value; }
|
||||
}
|
||||
|
||||
private void UpdateImage()
|
||||
{
|
||||
var brush = new SolidBrush(colorDialog1.Color);
|
||||
var pen = new Pen(ControlPaint.Dark(colorDialog1.Color));
|
||||
DrawingImage = drawing.Program.GetImage(pictureBox1.Size, pen, brush);
|
||||
|
||||
pen.Dispose();
|
||||
brush.Dispose();
|
||||
}
|
||||
|
||||
public void LoadDrawing(Drawing drawing)
|
||||
{
|
||||
this.drawing = drawing;
|
||||
|
||||
colorDialog1.Color = drawing.Color;
|
||||
DrawingName = drawing.Name;
|
||||
Customer = drawing.Customer;
|
||||
Quantity = drawing.Quantity.Required;
|
||||
Priority = drawing.Priority;
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
public void SaveDrawing(Drawing drawing)
|
||||
{
|
||||
drawing.Name = DrawingName;
|
||||
drawing.Customer = Customer;
|
||||
drawing.Quantity.Required = Quantity;
|
||||
drawing.Priority = Priority;
|
||||
drawing.Color = colorDialog1.Color;
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
var result = colorDialog1.ShowDialog();
|
||||
|
||||
if (result == System.Windows.Forms.DialogResult.OK)
|
||||
UpdateImage();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,308 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class EditNestForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditNestForm));
|
||||
this.splitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.platesListView = new System.Windows.Forms.ListView();
|
||||
this.plateNumColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.sizeColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.qtyColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStripButtonAddPlate = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButtonRemovePlate = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.drawingListBox1 = new OpenNest.Controls.DrawingListBox();
|
||||
this.toolStrip2 = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
|
||||
this.splitContainer.Panel1.SuspendLayout();
|
||||
this.splitContainer.SuspendLayout();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.toolStrip2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer
|
||||
//
|
||||
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer.Name = "splitContainer";
|
||||
//
|
||||
// splitContainer.Panel1
|
||||
//
|
||||
this.splitContainer.Panel1.Controls.Add(this.tabControl1);
|
||||
this.splitContainer.Size = new System.Drawing.Size(735, 396);
|
||||
this.splitContainer.SplitterDistance = 241;
|
||||
this.splitContainer.TabIndex = 8;
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControl1.ItemSize = new System.Drawing.Size(100, 22);
|
||||
this.tabControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(241, 396);
|
||||
this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
|
||||
this.tabControl1.TabIndex = 1;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.platesListView);
|
||||
this.tabPage1.Controls.Add(this.toolStrip1);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(233, 370);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Plates";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// platesListView
|
||||
//
|
||||
this.platesListView.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.platesListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.plateNumColumn,
|
||||
this.sizeColumn,
|
||||
this.qtyColumn});
|
||||
this.platesListView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.platesListView.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.platesListView.FullRowSelect = true;
|
||||
this.platesListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
||||
this.platesListView.HideSelection = false;
|
||||
this.platesListView.Location = new System.Drawing.Point(3, 34);
|
||||
this.platesListView.MultiSelect = false;
|
||||
this.platesListView.Name = "platesListView";
|
||||
this.platesListView.Size = new System.Drawing.Size(227, 333);
|
||||
this.platesListView.TabIndex = 1;
|
||||
this.platesListView.UseCompatibleStateImageBehavior = false;
|
||||
this.platesListView.View = System.Windows.Forms.View.Details;
|
||||
this.platesListView.DoubleClick += new System.EventHandler(this.EditSelectedPlate_Click);
|
||||
//
|
||||
// plateNumColumn
|
||||
//
|
||||
this.plateNumColumn.Text = "";
|
||||
this.plateNumColumn.Width = 30;
|
||||
//
|
||||
// sizeColumn
|
||||
//
|
||||
this.sizeColumn.Text = "Size";
|
||||
this.sizeColumn.Width = 80;
|
||||
//
|
||||
// qtyColumn
|
||||
//
|
||||
this.qtyColumn.Text = "Qty";
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
|
||||
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripButtonAddPlate,
|
||||
this.toolStripButtonRemovePlate,
|
||||
this.toolStripSeparator2,
|
||||
this.toolStripButton1});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(3, 3);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(227, 31);
|
||||
this.toolStrip1.TabIndex = 2;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
// toolStripButtonAddPlate
|
||||
//
|
||||
this.toolStripButtonAddPlate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonAddPlate.Image = global::OpenNest.Properties.Resources.add;
|
||||
this.toolStripButtonAddPlate.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
|
||||
this.toolStripButtonAddPlate.Name = "toolStripButtonAddPlate";
|
||||
this.toolStripButtonAddPlate.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.toolStripButtonAddPlate.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.toolStripButtonAddPlate.Size = new System.Drawing.Size(38, 28);
|
||||
this.toolStripButtonAddPlate.Text = "Add Plate";
|
||||
this.toolStripButtonAddPlate.Click += new System.EventHandler(this.AddPlate_Click);
|
||||
//
|
||||
// toolStripButtonRemovePlate
|
||||
//
|
||||
this.toolStripButtonRemovePlate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButtonRemovePlate.Image = global::OpenNest.Properties.Resources.remove;
|
||||
this.toolStripButtonRemovePlate.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
|
||||
this.toolStripButtonRemovePlate.Name = "toolStripButtonRemovePlate";
|
||||
this.toolStripButtonRemovePlate.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.toolStripButtonRemovePlate.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.toolStripButtonRemovePlate.Size = new System.Drawing.Size(38, 28);
|
||||
this.toolStripButtonRemovePlate.Text = "Remove Selected Plate";
|
||||
this.toolStripButtonRemovePlate.Click += new System.EventHandler(this.RemoveSelectedPlate_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 31);
|
||||
//
|
||||
// toolStripButton1
|
||||
//
|
||||
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButton1.Image = global::OpenNest.Properties.Resources.clock;
|
||||
this.toolStripButton1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
|
||||
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButton1.Name = "toolStripButton1";
|
||||
this.toolStripButton1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.toolStripButton1.Size = new System.Drawing.Size(38, 28);
|
||||
this.toolStripButton1.Text = "Calculate Cut Time";
|
||||
this.toolStripButton1.Click += new System.EventHandler(this.CalculateSelectedPlateCutTime_Click);
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.drawingListBox1);
|
||||
this.tabPage2.Controls.Add(this.toolStrip2);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 26);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(233, 366);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Drawings";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// drawingListBox1
|
||||
//
|
||||
this.drawingListBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.drawingListBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.drawingListBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
|
||||
this.drawingListBox1.FormattingEnabled = true;
|
||||
this.drawingListBox1.ItemHeight = 85;
|
||||
this.drawingListBox1.Location = new System.Drawing.Point(3, 34);
|
||||
this.drawingListBox1.Name = "drawingListBox1";
|
||||
this.drawingListBox1.Size = new System.Drawing.Size(227, 329);
|
||||
this.drawingListBox1.TabIndex = 1;
|
||||
this.drawingListBox1.Units = OpenNest.Units.Inches;
|
||||
this.drawingListBox1.Click += new System.EventHandler(this.drawingListBox1_Click);
|
||||
this.drawingListBox1.DoubleClick += new System.EventHandler(this.drawingListBox1_DoubleClick);
|
||||
//
|
||||
// toolStrip2
|
||||
//
|
||||
this.toolStrip2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
|
||||
this.toolStrip2.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripButton2,
|
||||
this.toolStripSeparator1,
|
||||
this.toolStripButton3});
|
||||
this.toolStrip2.Location = new System.Drawing.Point(3, 3);
|
||||
this.toolStrip2.Name = "toolStrip2";
|
||||
this.toolStrip2.Size = new System.Drawing.Size(227, 31);
|
||||
this.toolStrip2.TabIndex = 3;
|
||||
this.toolStrip2.Text = "toolStrip2";
|
||||
//
|
||||
// toolStripButton2
|
||||
//
|
||||
this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButton2.Image = global::OpenNest.Properties.Resources.import;
|
||||
this.toolStripButton2.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
|
||||
this.toolStripButton2.Name = "toolStripButton2";
|
||||
this.toolStripButton2.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.toolStripButton2.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.toolStripButton2.Size = new System.Drawing.Size(38, 28);
|
||||
this.toolStripButton2.Text = "Import Drawings";
|
||||
this.toolStripButton2.Click += new System.EventHandler(this.ImportDrawings_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 31);
|
||||
//
|
||||
// toolStripButton3
|
||||
//
|
||||
this.toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButton3.Image = global::OpenNest.Properties.Resources.clear;
|
||||
this.toolStripButton3.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
|
||||
this.toolStripButton3.Name = "toolStripButton3";
|
||||
this.toolStripButton3.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
|
||||
this.toolStripButton3.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.toolStripButton3.Size = new System.Drawing.Size(38, 28);
|
||||
this.toolStripButton3.Text = "Cleanup unused Drawings";
|
||||
this.toolStripButton3.Click += new System.EventHandler(this.CleanUnusedDrawings_Click);
|
||||
//
|
||||
// EditNestForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(735, 396);
|
||||
this.Controls.Add(this.splitContainer);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MinimumSize = new System.Drawing.Size(200, 198);
|
||||
this.Name = "EditNestForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "EditForm";
|
||||
this.splitContainer.Panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
|
||||
this.splitContainer.ResumeLayout(false);
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage1.PerformLayout();
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.tabPage2.PerformLayout();
|
||||
this.toolStrip2.ResumeLayout(false);
|
||||
this.toolStrip2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.ListView platesListView;
|
||||
private System.Windows.Forms.ColumnHeader sizeColumn;
|
||||
private System.Windows.Forms.ColumnHeader qtyColumn;
|
||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonAddPlate;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButtonRemovePlate;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private Controls.DrawingListBox drawingListBox1;
|
||||
private System.Windows.Forms.ColumnHeader plateNumColumn;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStrip toolStrip2;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton2;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,688 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Actions;
|
||||
using OpenNest.Collections;
|
||||
using OpenNest.Controls;
|
||||
using OpenNest.IO;
|
||||
using OpenNest.Properties;
|
||||
using Timer = System.Timers.Timer;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class EditNestForm : Form
|
||||
{
|
||||
public event EventHandler PlateChanged;
|
||||
|
||||
public readonly Nest Nest;
|
||||
public readonly PlateView PlateView;
|
||||
|
||||
private readonly Timer updateDrawingListTimer;
|
||||
|
||||
/// <summary>
|
||||
/// Used to distinguish between single/double click on drawing within drawinglistbox.
|
||||
/// If double click, this is set to false so the single click action won't be triggered.
|
||||
/// </summary>
|
||||
private bool addPart;
|
||||
|
||||
private EditNestForm()
|
||||
{
|
||||
PlateView = new PlateView();
|
||||
PlateView.Enter += PlateView_Enter;
|
||||
PlateView.PartAdded += PlateView_PartAdded;
|
||||
PlateView.PartRemoved += PlateView_PartRemoved;
|
||||
PlateView.Dock = DockStyle.Fill;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
splitContainer.Panel2.Controls.Add(PlateView);
|
||||
|
||||
var renderer = new ToolStripRenderer(ToolbarTheme.Toolbar);
|
||||
toolStrip1.Renderer = renderer;
|
||||
toolStrip2.Renderer = renderer;
|
||||
|
||||
platesListView.SelectedIndexChanged += (sender, e) =>
|
||||
{
|
||||
if (platesListView.SelectedIndices.Count == 0)
|
||||
return;
|
||||
|
||||
CurrentPlateIndex = platesListView.SelectedIndices[0];
|
||||
PlateView.Plate = Nest.Plates[CurrentPlateIndex];
|
||||
PlateView.ZoomToFit();
|
||||
FirePlateChanged(false);
|
||||
};
|
||||
}
|
||||
|
||||
public EditNestForm(Nest nest)
|
||||
: this()
|
||||
{
|
||||
updateDrawingListTimer = new Timer()
|
||||
{
|
||||
AutoReset = false,
|
||||
Enabled = true,
|
||||
Interval = 50
|
||||
};
|
||||
updateDrawingListTimer.Elapsed += drawingListUpdateTimer_Elapsed;
|
||||
|
||||
Nest = nest;
|
||||
Nest.Plates.ItemAdded += Plates_PlateAdded;
|
||||
Nest.Plates.ItemRemoved += Plates_PlateRemoved;
|
||||
|
||||
if (Nest.Plates.Count == 0)
|
||||
Nest.CreatePlate();
|
||||
|
||||
UpdatePlateList();
|
||||
UpdateDrawingList();
|
||||
|
||||
LoadFirstPlate();
|
||||
|
||||
Text = Nest.Name;
|
||||
drawingListBox1.Units = Nest.Units;
|
||||
}
|
||||
|
||||
public string LastSavePath { get; private set; }
|
||||
|
||||
public DateTime LastSaveDate { get; private set; }
|
||||
|
||||
public int CurrentPlateIndex { get; private set; }
|
||||
|
||||
public int PlateCount
|
||||
{
|
||||
get { return Nest.Plates.Count; }
|
||||
}
|
||||
|
||||
public void LoadFirstPlate()
|
||||
{
|
||||
if (Nest.Plates.Count > 0)
|
||||
{
|
||||
CurrentPlateIndex = 0;
|
||||
PlateView.Plate = Nest.Plates[CurrentPlateIndex];
|
||||
PlateView.ZoomToFit();
|
||||
FirePlateChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadLastPlate()
|
||||
{
|
||||
if (Nest.Plates.Count > 0)
|
||||
{
|
||||
CurrentPlateIndex = Nest.Plates.Count - 1;
|
||||
PlateView.Plate = Nest.Plates[CurrentPlateIndex];
|
||||
PlateView.ZoomToFit();
|
||||
FirePlateChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public bool LoadNextPlate()
|
||||
{
|
||||
if (CurrentPlateIndex + 1 >= Nest.Plates.Count)
|
||||
return false;
|
||||
|
||||
CurrentPlateIndex++;
|
||||
PlateView.Plate = Nest.Plates[CurrentPlateIndex];
|
||||
PlateView.ZoomToFit();
|
||||
FirePlateChanged();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool LoadPreviousPlate()
|
||||
{
|
||||
if (Nest.Plates.Count == 0 || CurrentPlateIndex - 1 < 0)
|
||||
return false;
|
||||
|
||||
CurrentPlateIndex--;
|
||||
PlateView.Plate = Nest.Plates[CurrentPlateIndex];
|
||||
PlateView.ZoomToFit();
|
||||
FirePlateChanged();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool IsFirstPlate()
|
||||
{
|
||||
return (Nest.Plates.Count == 0 || (CurrentPlateIndex - 1) < 0);
|
||||
}
|
||||
|
||||
public bool IsLastPlate()
|
||||
{
|
||||
return CurrentPlateIndex + 1 >= Nest.Plates.Count;
|
||||
}
|
||||
|
||||
public void UpdatePlateList()
|
||||
{
|
||||
platesListView.Items.Clear();
|
||||
|
||||
var items = new ListViewItem[Nest.Plates.Count];
|
||||
|
||||
for (int i = 0; i < items.Length; ++i)
|
||||
{
|
||||
var plate = Nest.Plates[i];
|
||||
var item = GetListViewItem(plate, i + 1);
|
||||
items[i] = item;
|
||||
}
|
||||
|
||||
platesListView.Items.AddRange(items);
|
||||
}
|
||||
|
||||
public void UpdateDrawingList()
|
||||
{
|
||||
drawingListBox1.Items.Clear();
|
||||
|
||||
foreach (var dwg in Nest.Drawings.OrderBy(d => d.Name).ToList())
|
||||
drawingListBox1.Items.Add(dwg);
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
if (File.Exists(LastSavePath))
|
||||
SaveAs(LastSavePath);
|
||||
else
|
||||
SaveAs();
|
||||
}
|
||||
|
||||
public void SaveAs()
|
||||
{
|
||||
var dlg = new SaveFileDialog();
|
||||
dlg.Filter = "Nest Files|*.zip|Template File|*.nstdot";
|
||||
dlg.FileName = Nest.Name;
|
||||
|
||||
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
if (dlg.FilterIndex == 2)
|
||||
SaveTemplate(dlg.FileName);
|
||||
else
|
||||
SaveAs(dlg.FileName);
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveAs(string path)
|
||||
{
|
||||
var name = Path.GetFileNameWithoutExtension(path);
|
||||
Nest.Name = name;
|
||||
Text = name;
|
||||
LastSaveDate = DateTime.Now;
|
||||
LastSavePath = path;
|
||||
|
||||
var writer = new NestWriter(Nest);
|
||||
writer.Write(path);
|
||||
}
|
||||
|
||||
public void SaveTemplate(string path)
|
||||
{
|
||||
var nst = new Nest();
|
||||
nst.Name = Path.GetFileNameWithoutExtension(path);
|
||||
nst.PlateDefaults = Nest.PlateDefaults;
|
||||
nst.Units = Nest.Units;
|
||||
|
||||
var writer = new NestWriter(nst);
|
||||
writer.Write(path);
|
||||
}
|
||||
|
||||
public void Import()
|
||||
{
|
||||
var dlg = new OpenFileDialog();
|
||||
dlg.Multiselect = true;
|
||||
dlg.Filter = "DXF Files (*.dxf) | *.dxf";
|
||||
|
||||
if (dlg.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
var converter = new CadConverterForm();
|
||||
converter.AddFiles(dlg.FileNames);
|
||||
|
||||
var result = converter.ShowDialog();
|
||||
|
||||
if (result != DialogResult.OK)
|
||||
return;
|
||||
|
||||
var drawings = converter.GetDrawings();
|
||||
drawings.ForEach(d => Nest.Drawings.Add(d));
|
||||
|
||||
UpdateDrawingList();
|
||||
tabControl1.SelectedIndex = 1;
|
||||
}
|
||||
|
||||
public bool Export()
|
||||
{
|
||||
var dlg = new SaveFileDialog();
|
||||
dlg.Filter = "DXF file (*.dxf)|*.dxf|" +
|
||||
"Image as displayed (*.jpg)|*.jpg|" +
|
||||
"Locations and rotations (*.txt)|*.txt";
|
||||
|
||||
dlg.FileName = string.Format("{0}-P{1}", Nest.Name, CurrentPlateIndex + 1);
|
||||
dlg.AddExtension = true;
|
||||
dlg.DefaultExt = ".";
|
||||
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (dlg.FilterIndex == 1)
|
||||
{
|
||||
var exporter = new DxfExporter();
|
||||
var success = exporter.ExportPlate(PlateView.Plate, dlg.FileName);
|
||||
return success;
|
||||
}
|
||||
else if (dlg.FilterIndex == 2)
|
||||
{
|
||||
try
|
||||
{
|
||||
var img = new Bitmap(PlateView.Width, PlateView.Height);
|
||||
PlateView.DrawToBitmap(img, new Rectangle(0, 0, PlateView.Width, PlateView.Height));
|
||||
img.Save(dlg.FileName);
|
||||
}
|
||||
catch { }
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (dlg.FilterIndex == 3)
|
||||
{
|
||||
StreamWriter writer = null;
|
||||
|
||||
try
|
||||
{
|
||||
writer = new StreamWriter(dlg.FileName);
|
||||
|
||||
foreach (var part in PlateView.Plate.Parts)
|
||||
{
|
||||
var pt = part.BaseDrawing.Source.Offset.Rotate(part.Rotation);
|
||||
|
||||
writer.WriteLine("{0}|{1},{2}|{3}",
|
||||
part.BaseDrawing.Source.Path,
|
||||
Math.Round(part.Location.X - pt.X, 8),
|
||||
Math.Round(part.Location.Y - pt.Y, 8),
|
||||
Angle.ToDegrees(part.Rotation));
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
finally
|
||||
{
|
||||
if (writer != null)
|
||||
writer.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void ExportAll()
|
||||
{
|
||||
LoadFirstPlate();
|
||||
|
||||
do
|
||||
{
|
||||
if (!Export()) return;
|
||||
}
|
||||
while (LoadNextPlate());
|
||||
}
|
||||
|
||||
public void RotateCw()
|
||||
{
|
||||
PlateView.Plate.Rotate90(RotationType.CW);
|
||||
PlateView.ZoomToFit();
|
||||
}
|
||||
|
||||
public void RotateCcw()
|
||||
{
|
||||
PlateView.Plate.Rotate90(RotationType.CCW);
|
||||
PlateView.ZoomToFit();
|
||||
}
|
||||
|
||||
public void Rotate180()
|
||||
{
|
||||
PlateView.Plate.Rotate180();
|
||||
PlateView.ZoomToFit();
|
||||
}
|
||||
|
||||
public void ShowNestInfoEditor()
|
||||
{
|
||||
var form = new EditNestInfoForm();
|
||||
form.LoadNestInfo(Nest);
|
||||
|
||||
if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
form.SaveNestInfo(Nest);
|
||||
drawingListBox1.Units = Nest.Units;
|
||||
drawingListBox1.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
public void ResizePlateToFitParts()
|
||||
{
|
||||
PlateView.Plate.AutoSize(Settings.Default.AutoSizePlateFactor);
|
||||
PlateView.ZoomToPlate();
|
||||
PlateView.Refresh();
|
||||
UpdatePlateList();
|
||||
}
|
||||
|
||||
public void SelectAllParts()
|
||||
{
|
||||
PlateView.SelectAll();
|
||||
PlateView.Invalidate();
|
||||
}
|
||||
|
||||
public void ToggleRapid()
|
||||
{
|
||||
PlateView.DrawRapid = !PlateView.DrawRapid;
|
||||
PlateView.Invalidate();
|
||||
}
|
||||
|
||||
public void ToggleDrawBounds()
|
||||
{
|
||||
PlateView.DrawBounds = !PlateView.DrawBounds;
|
||||
PlateView.Invalidate();
|
||||
}
|
||||
|
||||
public void ToggleFillParts()
|
||||
{
|
||||
PlateView.FillParts = !PlateView.FillParts;
|
||||
PlateView.Invalidate();
|
||||
}
|
||||
|
||||
public void SetCurrentPlateAsNestDefault()
|
||||
{
|
||||
Nest.PlateDefaults.SetFromExisting(PlateView.Plate);
|
||||
}
|
||||
|
||||
public void EditPlate()
|
||||
{
|
||||
var form = new EditPlateForm(PlateView.Plate);
|
||||
form.Units = Nest.Units;
|
||||
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
PlateView.Invalidate();
|
||||
FirePlateChanged(false);
|
||||
UpdatePlateList();
|
||||
}
|
||||
|
||||
Nest.UpdateDrawingQuantities();
|
||||
drawingListBox1.Refresh();
|
||||
|
||||
if (PlateView.Plate.Parts.Count == 0)
|
||||
Nest.PlateDefaults.SetFromExisting(PlateView.Plate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens the current plate as a DXF file by the default program set in Windows.
|
||||
/// </summary>
|
||||
public void OpenCurrentPlate()
|
||||
{
|
||||
var plate = PlateView.Plate;
|
||||
var name = string.Format("{0}-P{1}.dxf", Nest.Name, CurrentPlateIndex + 1);
|
||||
var path = Path.Combine(Path.GetTempPath(), name);
|
||||
var exporter = new DxfExporter();
|
||||
exporter.ExportPlate(plate, path);
|
||||
|
||||
Process.Start(path);
|
||||
}
|
||||
|
||||
public void RemoveCurrentPlate()
|
||||
{
|
||||
if (Nest.Plates.Count < 2)
|
||||
return;
|
||||
|
||||
Nest.Plates.RemoveAt(CurrentPlateIndex);
|
||||
}
|
||||
|
||||
public void AutoSequenceCurrentPlate()
|
||||
{
|
||||
var seq = new SequenceByNearest();
|
||||
var parts = seq.SequenceParts(PlateView.Plate.Parts);
|
||||
|
||||
PlateView.Plate.Parts.Clear();
|
||||
PlateView.Plate.Parts.AddRange(parts);
|
||||
}
|
||||
|
||||
public void AutoSequenceAllPlates()
|
||||
{
|
||||
var seq = new SequenceByNearest();
|
||||
|
||||
foreach (var plate in Nest.Plates)
|
||||
{
|
||||
var parts = seq.SequenceParts(plate.Parts);
|
||||
plate.Parts.Clear();
|
||||
plate.Parts.AddRange(parts);
|
||||
}
|
||||
|
||||
PlateView.Invalidate();
|
||||
}
|
||||
|
||||
public void CalculateCurrentPlateCutTime()
|
||||
{
|
||||
var cutParamsForm = new CutParametersForm();
|
||||
cutParamsForm.Units = Nest.Units;
|
||||
|
||||
if (cutParamsForm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var cutparams = cutParamsForm.GetCutParameters();
|
||||
var info = Timing.GetTimingInfo(PlateView.Plate);
|
||||
var time = Timing.CalculateTime(info, cutparams);
|
||||
|
||||
var timingForm = new TimingForm();
|
||||
timingForm.Units = Nest.Units;
|
||||
timingForm.SetCutDistance(info.CutDistance);
|
||||
timingForm.SetCutTime(time);
|
||||
timingForm.SetIntersectionCount(info.IntersectionCount);
|
||||
timingForm.SetPierceCount(info.PierceCount);
|
||||
timingForm.SetRapidDistance(info.TravelDistance);
|
||||
timingForm.SetCutParameters(cutparams);
|
||||
|
||||
timingForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
public void CalculateNestCutTime()
|
||||
{
|
||||
var cutParamsForm = new CutParametersForm();
|
||||
cutParamsForm.Units = Nest.Units;
|
||||
|
||||
if (cutParamsForm.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var cutparams = cutParamsForm.GetCutParameters();
|
||||
var info = Timing.GetTimingInfo(Nest);
|
||||
var time = Timing.CalculateTime(info, cutparams);
|
||||
|
||||
var timingForm = new TimingForm();
|
||||
timingForm.Units = Nest.Units;
|
||||
timingForm.SetCutDistance(info.CutDistance);
|
||||
timingForm.SetCutTime(time);
|
||||
timingForm.SetIntersectionCount(info.IntersectionCount);
|
||||
timingForm.SetPierceCount(info.PierceCount);
|
||||
timingForm.SetRapidDistance(info.TravelDistance);
|
||||
timingForm.SetCutParameters(cutparams);
|
||||
|
||||
timingForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private void FirePlateChanged(bool updateListView = true)
|
||||
{
|
||||
if (updateListView)
|
||||
platesListView.Items[CurrentPlateIndex].Selected = true;
|
||||
|
||||
if (PlateChanged != null)
|
||||
PlateChanged.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
#region Overrides
|
||||
|
||||
protected override void OnSizeChanged(EventArgs e)
|
||||
{
|
||||
base.OnSizeChanged(e);
|
||||
PlateView.Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
Icon = Icon.Clone() as Icon;
|
||||
PlateView.DrawBounds = Settings.Default.PlateViewDrawBounds;
|
||||
PlateView.DrawRapid = Settings.Default.PlateViewDrawRapid;
|
||||
splitContainer.SplitterDistance = Settings.Default.SplitterDistance;
|
||||
}
|
||||
|
||||
protected override void OnClosing(CancelEventArgs e)
|
||||
{
|
||||
base.OnClosing(e);
|
||||
|
||||
Settings.Default.PlateViewDrawBounds = PlateView.DrawBounds;
|
||||
Settings.Default.PlateViewDrawRapid = PlateView.DrawRapid;
|
||||
Settings.Default.SplitterDistance = splitContainer.SplitterDistance;
|
||||
Settings.Default.Save();
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
PlateView.Invalidate();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Plates/Drawings Panel Events
|
||||
|
||||
private void AddPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
Nest.CreatePlate();
|
||||
}
|
||||
|
||||
private void EditSelectedPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (platesListView.SelectedIndices.Count != 0)
|
||||
EditPlate();
|
||||
}
|
||||
|
||||
private void RemoveSelectedPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
RemoveCurrentPlate();
|
||||
}
|
||||
|
||||
private void CalculateSelectedPlateCutTime_Click(object sender, EventArgs e)
|
||||
{
|
||||
CalculateCurrentPlateCutTime();
|
||||
}
|
||||
|
||||
private void ImportDrawings_Click(object sender, EventArgs e)
|
||||
{
|
||||
Import();
|
||||
}
|
||||
|
||||
private void CleanUnusedDrawings_Click(object sender, EventArgs e)
|
||||
{
|
||||
var result = MessageBox.Show(
|
||||
"Remove unused drawings?",
|
||||
"Clean Drawings",
|
||||
MessageBoxButtons.YesNoCancel,
|
||||
MessageBoxIcon.Question,
|
||||
MessageBoxDefaultButton.Button1);
|
||||
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
Nest.Drawings.RemoveWhere(d => d.Quantity.Nested == 0);
|
||||
UpdateDrawingList();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Plate Collection Events
|
||||
|
||||
private void Plates_PlateRemoved(object sender, ItemRemovedEventArgs<Plate> e)
|
||||
{
|
||||
if (Nest.Plates.Count <= CurrentPlateIndex)
|
||||
LoadLastPlate();
|
||||
else
|
||||
PlateView.Plate = Nest.Plates[CurrentPlateIndex];
|
||||
|
||||
UpdatePlateList();
|
||||
PlateView.ZoomToFit();
|
||||
}
|
||||
|
||||
private void Plates_PlateAdded(object sender, ItemAddedEventArgs<Plate> e)
|
||||
{
|
||||
tabControl1.SelectedIndex = 0;
|
||||
UpdatePlateList();
|
||||
LoadLastPlate();
|
||||
PlateView.ZoomToFit();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private static ListViewItem GetListViewItem(Plate plate, int id)
|
||||
{
|
||||
var item = new ListViewItem();
|
||||
item.Text = id.ToString();
|
||||
item.SubItems.Add(plate.Size.ToString());
|
||||
item.SubItems.Add(plate.Quantity.ToString());
|
||||
return item;
|
||||
}
|
||||
|
||||
private void PlateView_PartRemoved(object sender, ItemRemovedEventArgs<Part> e)
|
||||
{
|
||||
updateDrawingListTimer.Stop();
|
||||
updateDrawingListTimer.Start();
|
||||
}
|
||||
|
||||
private void PlateView_PartAdded(object sender, ItemAddedEventArgs<Part> e)
|
||||
{
|
||||
updateDrawingListTimer.Stop();
|
||||
updateDrawingListTimer.Start();
|
||||
}
|
||||
|
||||
private void drawingListUpdateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
drawingListBox1.Invoke(new MethodInvoker(() =>
|
||||
{
|
||||
drawingListBox1.Refresh();
|
||||
}));
|
||||
}
|
||||
|
||||
private void drawingListBox1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
addPart = false;
|
||||
|
||||
var drawing = drawingListBox1.SelectedItem as Drawing;
|
||||
|
||||
if (drawing == null)
|
||||
return;
|
||||
|
||||
var form = new EditDrawingForm();
|
||||
form.LoadDrawing(drawing);
|
||||
|
||||
if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
form.SaveDrawing(drawing);
|
||||
|
||||
foreach (var part in PlateView.Parts)
|
||||
part.Update();
|
||||
|
||||
PlateView.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void drawingListBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
addPart = true;
|
||||
}
|
||||
|
||||
private void PlateView_Enter(object sender, EventArgs e)
|
||||
{
|
||||
if (!addPart)
|
||||
return;
|
||||
|
||||
var drawing = drawingListBox1.SelectedItem as Drawing;
|
||||
|
||||
if (drawing == null)
|
||||
return;
|
||||
|
||||
PlateView.SetAction(typeof(ActionAddPart), drawing);
|
||||
|
||||
addPart = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,706 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>122, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAUAQEAAAAEAIAAoQgAAVgAAADAwAAABACAAqCUAAH5CAAAgIAAAAQAgAKgQAAAmaAAAGBgAAAEA
|
||||
IACICQAAzngAABAQAAABACAAaAQAAFaCAAAoAAAAQAAAAIAAAAABACAAAAAAAABCAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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GBeeV1hX3hfYWF1TE9PUAgICCEAAAATAAAACAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAA0gICAffoOCw4SJh/+EiYf/hImH/4SJh/+EiYf/hImH/4SJh/+EiYf/hImH/4SJ
|
||||
h/+EiYf/hImH/4SJh/+EiYf/hImH/4SJh/+EiYf/hImH/4SJh/+EiYf/hImH/4SJh/+EiYf/hImH/4SJ
|
||||
h/+EiYf/hImH/4SJh/+EiYf/hImH/4SJh/+EiYf/hImH/4SJh/+EiYf/hImH/4SJh/+EiYf/hImH/4SJ
|
||||
h/+EiYf/hImH/4SJh/+EiYf/hImH/4SJh/+EiYf/hImH/4SJh/+EiYf/hImH/4SJh/+BhoXSOzs7JgAA
|
||||
AAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAANd317kIuPjvrU2Nb/8PPy//b39v/29/b/9vf2//b3
|
||||
9v/29/b/9vf2//b39v/29/b/9vf2//b39v/29/b/9vf2//b39v/29/b/9vf2//b39v/29/b/9vf2//b3
|
||||
9v/29/b/9vf2//b39v/29/b/9vf2//b39v/29/b/9vf2//b39v/29/b/9vf2//b39v/29/b/9vf2//b3
|
||||
9v/29/b/9vf2//b39v/29/b/9vf2//b39v/29/b/9vf2//b39v/29/b/9vf2//b39v/29/b/9vf2//L0
|
||||
8//a3tz/j5SR+oCFg6gAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC4SKiO2+xcH/9ff2/+Xp
|
||||
5//d4+D/3ePg/93j4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j
|
||||
4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j
|
||||
4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j4P/d4+D/3ePg/93j
|
||||
4P/d4+D/3ePg/93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9fd2v/X3dr/193a/9fd2v/X3dr/193a/9fd2v/X3dr/193a/9fd
|
||||
2v/X3dr/193a/9fd2v/X3dr/193a/9fd2v/X3dr/193a/9fd2v/X3dr/193a/9fd2v/X3dr/6u3r/+jq
|
||||
6f+EiYf/h4eHHgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACEiYf/3uHg/+zv7v/X3tv/197b/9fe
|
||||
2//X3tv/197b/9fe2//X3tv/197b/9fe2//X3tv/197b/9fe2//X3tv/197b/9fe2//X3tv/197b/9fe
|
||||
2//X3tv/197b/9fe2//X3tv/197b/9fe2//X3tv/197b/9fe2//X3tv/197b/9fe2//X3tv/197b/9fe
|
||||
2//X3tv/197b/9fe2//X3tv/197b/9fe2//X3tv/197b/9fe2//X3tv/197b/9fe2//X3tv/197b/9fe
|
||||
2//X3tv/197b/+ru7P/o6un/hImH/4eHhx4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhImH/97h
|
||||
4P/s7+7/2N7c/9je3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je
|
||||
3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je
|
||||
3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je
|
||||
3P/Y3tz/2N7c/9je3P/Y3tz/2N7c/9je3P/q7uz/6Orq/4SJh/+Hh4ceAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAISJh//e4eD/7fDv/9nf3f/Z393/2d/d/9nf3f/Z393/2d/d/9nf3f/Z393/2d/d/9nf
|
||||
3f/Z393/2d/d/9nf3f/Z393/2d/d/9nf3f/Z393/2d/d/9nf3f/Z393/2d/d/9nf3f/Z393/2d/d/9nf
|
||||
3f/Z393/2d/d/9n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+rt
|
||||
7P/q7ez/6u3s/+rt7P/q7ez/1NbV/7y9vQcAAAAA0tXU/+zu7v/s7u7/7O7u/+zu7v/s7u7/7O7u/+zu
|
||||
7v/s7u7/7O7u/+zu7v/s7u7/7O7u/9TX1v+6t7MHAAAAAM7HwP/m39f/5t/X/+bf1//m39f/5t/X/+bf
|
||||
1//m39f/5t/X/+bf1//m39f/5t/X/+bf1//QysL/tqicCAAAAAC8jWb/zJpt/8yabf/Mmm3/zJpt/8ya
|
||||
bf/Mmm3/zJpt/8yabf/Mmm3/zJpt/8yabf/Mmm3/vo9p/7CSeg4AAAAAr31X78SVbP/ElWz/xJVs/8SV
|
||||
bP/ElWz/xJVs/8SVbP/ElWz/xJVs/8SVbP/ElWz/xJVs/7B/WfKvhGMEAAAAAKRsQymbYzpVnGQ7VZ1l
|
||||
O1WdZTtVnWU7VZ1lO1WdZTtVnWU7VZ1lO1WdZTtVnWU7VZtjOlWibEQrAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAAAAAAAAAA
|
||||
AACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAIABAAD//wAA
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,709 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class EditNestInfoForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.nameBox = new System.Windows.Forms.TextBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.labelEdgeSpacingLeft = new System.Windows.Forms.Label();
|
||||
this.labelEdgeSpacingTop = new System.Windows.Forms.Label();
|
||||
this.labelEdgeSpacingRight = new System.Windows.Forms.Label();
|
||||
this.labelEdgeSpacingBottom = new System.Windows.Forms.Label();
|
||||
this.leftSpacingBox = new OpenNest.Controls.NumericUpDown();
|
||||
this.topSpacingBox = new OpenNest.Controls.NumericUpDown();
|
||||
this.rightSpacingBox = new OpenNest.Controls.NumericUpDown();
|
||||
this.bottomSpacingBox = new OpenNest.Controls.NumericUpDown();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.labelSize = new System.Windows.Forms.Label();
|
||||
this.sizeBox = new System.Windows.Forms.TextBox();
|
||||
this.labelPartSpacing = new System.Windows.Forms.Label();
|
||||
this.partSpacingBox = new OpenNest.Controls.NumericUpDown();
|
||||
this.labelThk = new System.Windows.Forms.Label();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.quadrantSelect1 = new OpenNest.Controls.QuadrantSelect();
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.thicknessBox = new OpenNest.Controls.NumericUpDown();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.customerBox = new System.Windows.Forms.TextBox();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage3 = new System.Windows.Forms.TabPage();
|
||||
this.notesBox = new System.Windows.Forms.TextBox();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.bottomPanel1 = new OpenNest.Controls.BottomPanel();
|
||||
this.applyButton = new System.Windows.Forms.Button();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.tableLayoutPanel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.leftSpacingBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.topSpacingBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.rightSpacingBox)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bottomSpacingBox)).BeginInit();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.partSpacingBox)).BeginInit();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tableLayoutPanel3.SuspendLayout();
|
||||
this.tableLayoutPanel4.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.thicknessBox)).BeginInit();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.tabPage3.SuspendLayout();
|
||||
this.bottomPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 11);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(126, 16);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Name :";
|
||||
//
|
||||
// nameBox
|
||||
//
|
||||
this.nameBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.nameBox.Location = new System.Drawing.Point(135, 8);
|
||||
this.nameBox.Name = "nameBox";
|
||||
this.nameBox.ReadOnly = true;
|
||||
this.nameBox.Size = new System.Drawing.Size(224, 22);
|
||||
this.nameBox.TabIndex = 1;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.tableLayoutPanel2);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 100);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(279, 176);
|
||||
this.groupBox1.TabIndex = 3;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Edge Spacing";
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tableLayoutPanel2.ColumnCount = 2;
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel2.Controls.Add(this.labelEdgeSpacingLeft, 0, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.labelEdgeSpacingTop, 0, 1);
|
||||
this.tableLayoutPanel2.Controls.Add(this.labelEdgeSpacingRight, 0, 2);
|
||||
this.tableLayoutPanel2.Controls.Add(this.labelEdgeSpacingBottom, 0, 3);
|
||||
this.tableLayoutPanel2.Controls.Add(this.leftSpacingBox, 1, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.topSpacingBox, 1, 1);
|
||||
this.tableLayoutPanel2.Controls.Add(this.rightSpacingBox, 1, 2);
|
||||
this.tableLayoutPanel2.Controls.Add(this.bottomSpacingBox, 1, 3);
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(6, 19);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
this.tableLayoutPanel2.RowCount = 4;
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(267, 151);
|
||||
this.tableLayoutPanel2.TabIndex = 0;
|
||||
//
|
||||
// labelEdgeSpacingLeft
|
||||
//
|
||||
this.labelEdgeSpacingLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelEdgeSpacingLeft.AutoSize = true;
|
||||
this.labelEdgeSpacingLeft.Location = new System.Drawing.Point(3, 10);
|
||||
this.labelEdgeSpacingLeft.Name = "labelEdgeSpacingLeft";
|
||||
this.labelEdgeSpacingLeft.Size = new System.Drawing.Size(56, 16);
|
||||
this.labelEdgeSpacingLeft.TabIndex = 0;
|
||||
this.labelEdgeSpacingLeft.Text = "Left :";
|
||||
this.labelEdgeSpacingLeft.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// labelEdgeSpacingTop
|
||||
//
|
||||
this.labelEdgeSpacingTop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelEdgeSpacingTop.AutoSize = true;
|
||||
this.labelEdgeSpacingTop.Location = new System.Drawing.Point(3, 47);
|
||||
this.labelEdgeSpacingTop.Name = "labelEdgeSpacingTop";
|
||||
this.labelEdgeSpacingTop.Size = new System.Drawing.Size(56, 16);
|
||||
this.labelEdgeSpacingTop.TabIndex = 2;
|
||||
this.labelEdgeSpacingTop.Text = "Top :";
|
||||
this.labelEdgeSpacingTop.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// labelEdgeSpacingRight
|
||||
//
|
||||
this.labelEdgeSpacingRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelEdgeSpacingRight.AutoSize = true;
|
||||
this.labelEdgeSpacingRight.Location = new System.Drawing.Point(3, 84);
|
||||
this.labelEdgeSpacingRight.Name = "labelEdgeSpacingRight";
|
||||
this.labelEdgeSpacingRight.Size = new System.Drawing.Size(56, 16);
|
||||
this.labelEdgeSpacingRight.TabIndex = 4;
|
||||
this.labelEdgeSpacingRight.Text = "Right :";
|
||||
this.labelEdgeSpacingRight.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// labelEdgeSpacingBottom
|
||||
//
|
||||
this.labelEdgeSpacingBottom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelEdgeSpacingBottom.AutoSize = true;
|
||||
this.labelEdgeSpacingBottom.Location = new System.Drawing.Point(3, 123);
|
||||
this.labelEdgeSpacingBottom.Name = "labelEdgeSpacingBottom";
|
||||
this.labelEdgeSpacingBottom.Size = new System.Drawing.Size(56, 16);
|
||||
this.labelEdgeSpacingBottom.TabIndex = 6;
|
||||
this.labelEdgeSpacingBottom.Text = "Bottom :";
|
||||
this.labelEdgeSpacingBottom.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// leftSpacingBox
|
||||
//
|
||||
this.leftSpacingBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.leftSpacingBox.DecimalPlaces = 4;
|
||||
this.leftSpacingBox.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.leftSpacingBox.Location = new System.Drawing.Point(65, 7);
|
||||
this.leftSpacingBox.Maximum = new decimal(new int[] {
|
||||
999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.leftSpacingBox.Name = "leftSpacingBox";
|
||||
this.leftSpacingBox.Size = new System.Drawing.Size(199, 22);
|
||||
this.leftSpacingBox.Suffix = "";
|
||||
this.leftSpacingBox.TabIndex = 1;
|
||||
//
|
||||
// topSpacingBox
|
||||
//
|
||||
this.topSpacingBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.topSpacingBox.DecimalPlaces = 4;
|
||||
this.topSpacingBox.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.topSpacingBox.Location = new System.Drawing.Point(65, 44);
|
||||
this.topSpacingBox.Maximum = new decimal(new int[] {
|
||||
999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.topSpacingBox.Name = "topSpacingBox";
|
||||
this.topSpacingBox.Size = new System.Drawing.Size(199, 22);
|
||||
this.topSpacingBox.Suffix = "";
|
||||
this.topSpacingBox.TabIndex = 3;
|
||||
//
|
||||
// rightSpacingBox
|
||||
//
|
||||
this.rightSpacingBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.rightSpacingBox.DecimalPlaces = 4;
|
||||
this.rightSpacingBox.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.rightSpacingBox.Location = new System.Drawing.Point(65, 81);
|
||||
this.rightSpacingBox.Maximum = new decimal(new int[] {
|
||||
999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.rightSpacingBox.Name = "rightSpacingBox";
|
||||
this.rightSpacingBox.Size = new System.Drawing.Size(199, 22);
|
||||
this.rightSpacingBox.Suffix = "";
|
||||
this.rightSpacingBox.TabIndex = 5;
|
||||
//
|
||||
// bottomSpacingBox
|
||||
//
|
||||
this.bottomSpacingBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.bottomSpacingBox.DecimalPlaces = 4;
|
||||
this.bottomSpacingBox.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.bottomSpacingBox.Location = new System.Drawing.Point(65, 120);
|
||||
this.bottomSpacingBox.Maximum = new decimal(new int[] {
|
||||
999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.bottomSpacingBox.Name = "bottomSpacingBox";
|
||||
this.bottomSpacingBox.Size = new System.Drawing.Size(199, 22);
|
||||
this.bottomSpacingBox.Suffix = "";
|
||||
this.bottomSpacingBox.TabIndex = 7;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelSize, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.sizeBox, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelPartSpacing, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.partSpacingBox, 1, 1);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 6);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(267, 78);
|
||||
this.tableLayoutPanel1.TabIndex = 2;
|
||||
//
|
||||
// labelSize
|
||||
//
|
||||
this.labelSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelSize.AutoSize = true;
|
||||
this.labelSize.Location = new System.Drawing.Point(3, 11);
|
||||
this.labelSize.Name = "labelSize";
|
||||
this.labelSize.Size = new System.Drawing.Size(91, 16);
|
||||
this.labelSize.TabIndex = 0;
|
||||
this.labelSize.Text = "Size :";
|
||||
this.labelSize.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// sizeBox
|
||||
//
|
||||
this.sizeBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.sizeBox.Location = new System.Drawing.Point(100, 8);
|
||||
this.sizeBox.Name = "sizeBox";
|
||||
this.sizeBox.Size = new System.Drawing.Size(164, 22);
|
||||
this.sizeBox.TabIndex = 1;
|
||||
this.sizeBox.TextChanged += new System.EventHandler(this.sizeBox_TextChanged);
|
||||
//
|
||||
// labelPartSpacing
|
||||
//
|
||||
this.labelPartSpacing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelPartSpacing.AutoSize = true;
|
||||
this.labelPartSpacing.Location = new System.Drawing.Point(3, 50);
|
||||
this.labelPartSpacing.Name = "labelPartSpacing";
|
||||
this.labelPartSpacing.Size = new System.Drawing.Size(91, 16);
|
||||
this.labelPartSpacing.TabIndex = 2;
|
||||
this.labelPartSpacing.Text = "Part Spacing :";
|
||||
this.labelPartSpacing.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// partSpacingBox
|
||||
//
|
||||
this.partSpacingBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.partSpacingBox.DecimalPlaces = 4;
|
||||
this.partSpacingBox.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.partSpacingBox.Location = new System.Drawing.Point(100, 47);
|
||||
this.partSpacingBox.Maximum = new decimal(new int[] {
|
||||
999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.partSpacingBox.Name = "partSpacingBox";
|
||||
this.partSpacingBox.Size = new System.Drawing.Size(164, 22);
|
||||
this.partSpacingBox.Suffix = "";
|
||||
this.partSpacingBox.TabIndex = 1;
|
||||
//
|
||||
// labelThk
|
||||
//
|
||||
this.labelThk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelThk.AutoSize = true;
|
||||
this.labelThk.Location = new System.Drawing.Point(3, 128);
|
||||
this.labelThk.Name = "labelThk";
|
||||
this.labelThk.Size = new System.Drawing.Size(126, 16);
|
||||
this.labelThk.TabIndex = 6;
|
||||
this.labelThk.Text = "Thickness :";
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox3.Controls.Add(this.quadrantSelect1);
|
||||
this.groupBox3.Location = new System.Drawing.Point(306, 6);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(315, 270);
|
||||
this.groupBox3.TabIndex = 7;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Quadrant";
|
||||
//
|
||||
// quadrantSelect1
|
||||
//
|
||||
this.quadrantSelect1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.quadrantSelect1.BackColor = System.Drawing.Color.White;
|
||||
this.quadrantSelect1.Location = new System.Drawing.Point(6, 19);
|
||||
this.quadrantSelect1.Name = "quadrantSelect1";
|
||||
this.quadrantSelect1.Quadrant = 1;
|
||||
this.quadrantSelect1.Size = new System.Drawing.Size(303, 245);
|
||||
this.quadrantSelect1.TabIndex = 5;
|
||||
this.quadrantSelect1.Text = "quadrantSelect1";
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Controls.Add(this.tabPage3);
|
||||
this.tabControl1.ItemSize = new System.Drawing.Size(100, 22);
|
||||
this.tabControl1.Location = new System.Drawing.Point(12, 12);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(635, 453);
|
||||
this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
|
||||
this.tabControl1.TabIndex = 0;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.tableLayoutPanel3);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 26);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(627, 423);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Info";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tableLayoutPanel3
|
||||
//
|
||||
this.tableLayoutPanel3.ColumnCount = 2;
|
||||
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel4, 1, 5);
|
||||
this.tableLayoutPanel3.Controls.Add(this.label1, 0, 0);
|
||||
this.tableLayoutPanel3.Controls.Add(this.nameBox, 1, 0);
|
||||
this.tableLayoutPanel3.Controls.Add(this.label2, 0, 4);
|
||||
this.tableLayoutPanel3.Controls.Add(this.labelThk, 0, 3);
|
||||
this.tableLayoutPanel3.Controls.Add(this.thicknessBox, 1, 3);
|
||||
this.tableLayoutPanel3.Controls.Add(this.label3, 0, 1);
|
||||
this.tableLayoutPanel3.Controls.Add(this.label4, 0, 2);
|
||||
this.tableLayoutPanel3.Controls.Add(this.customerBox, 1, 4);
|
||||
this.tableLayoutPanel3.Controls.Add(this.textBox1, 1, 1);
|
||||
this.tableLayoutPanel3.Controls.Add(this.textBox2, 1, 2);
|
||||
this.tableLayoutPanel3.Controls.Add(this.label5, 0, 5);
|
||||
this.tableLayoutPanel3.Location = new System.Drawing.Point(6, 6);
|
||||
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
|
||||
this.tableLayoutPanel3.RowCount = 6;
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||
this.tableLayoutPanel3.Size = new System.Drawing.Size(362, 240);
|
||||
this.tableLayoutPanel3.TabIndex = 0;
|
||||
//
|
||||
// tableLayoutPanel4
|
||||
//
|
||||
this.tableLayoutPanel4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tableLayoutPanel4.ColumnCount = 2;
|
||||
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel4.Controls.Add(this.radioButton1, 0, 0);
|
||||
this.tableLayoutPanel4.Controls.Add(this.radioButton2, 1, 0);
|
||||
this.tableLayoutPanel4.Location = new System.Drawing.Point(135, 198);
|
||||
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
|
||||
this.tableLayoutPanel4.RowCount = 1;
|
||||
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel4.Size = new System.Drawing.Size(224, 39);
|
||||
this.tableLayoutPanel4.TabIndex = 1;
|
||||
//
|
||||
// radioButton1
|
||||
//
|
||||
this.radioButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Location = new System.Drawing.Point(3, 9);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(106, 20);
|
||||
this.radioButton1.TabIndex = 0;
|
||||
this.radioButton1.TabStop = true;
|
||||
this.radioButton1.Text = "Inches";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
this.radioButton1.CheckedChanged += new System.EventHandler(this.Units_Changed);
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
this.radioButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Location = new System.Drawing.Point(115, 9);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(106, 20);
|
||||
this.radioButton2.TabIndex = 0;
|
||||
this.radioButton2.TabStop = true;
|
||||
this.radioButton2.Text = "Millimeters";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
this.radioButton2.CheckedChanged += new System.EventHandler(this.Units_Changed);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(3, 167);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(126, 16);
|
||||
this.label2.TabIndex = 8;
|
||||
this.label2.Text = "Customer :";
|
||||
//
|
||||
// thicknessBox
|
||||
//
|
||||
this.thicknessBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.thicknessBox.DecimalPlaces = 4;
|
||||
this.thicknessBox.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.thicknessBox.Location = new System.Drawing.Point(135, 125);
|
||||
this.thicknessBox.Maximum = new decimal(new int[] {
|
||||
999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.thicknessBox.Name = "thicknessBox";
|
||||
this.thicknessBox.Size = new System.Drawing.Size(224, 22);
|
||||
this.thicknessBox.Suffix = "";
|
||||
this.thicknessBox.TabIndex = 7;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(3, 50);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(126, 16);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Date Created :";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(3, 89);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(126, 16);
|
||||
this.label4.TabIndex = 4;
|
||||
this.label4.Text = "Date Last Modified :";
|
||||
//
|
||||
// customerBox
|
||||
//
|
||||
this.customerBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.customerBox.Location = new System.Drawing.Point(135, 164);
|
||||
this.customerBox.Name = "customerBox";
|
||||
this.customerBox.Size = new System.Drawing.Size(224, 22);
|
||||
this.customerBox.TabIndex = 9;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox1.Location = new System.Drawing.Point(135, 47);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.ReadOnly = true;
|
||||
this.textBox1.Size = new System.Drawing.Size(224, 22);
|
||||
this.textBox1.TabIndex = 3;
|
||||
//
|
||||
// textBox2
|
||||
//
|
||||
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox2.Location = new System.Drawing.Point(135, 86);
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.ReadOnly = true;
|
||||
this.textBox2.Size = new System.Drawing.Size(224, 22);
|
||||
this.textBox2.TabIndex = 5;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(3, 209);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(126, 16);
|
||||
this.label5.TabIndex = 8;
|
||||
this.label5.Text = "Units :";
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.groupBox3);
|
||||
this.tabPage2.Controls.Add(this.groupBox1);
|
||||
this.tabPage2.Controls.Add(this.tableLayoutPanel1);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 26);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(627, 423);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Defaults";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabPage3
|
||||
//
|
||||
this.tabPage3.Controls.Add(this.notesBox);
|
||||
this.tabPage3.Location = new System.Drawing.Point(4, 26);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage3.Size = new System.Drawing.Size(627, 423);
|
||||
this.tabPage3.TabIndex = 2;
|
||||
this.tabPage3.Text = "Notes";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// notesBox
|
||||
//
|
||||
this.notesBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.notesBox.Location = new System.Drawing.Point(6, 6);
|
||||
this.notesBox.Multiline = true;
|
||||
this.notesBox.Name = "notesBox";
|
||||
this.notesBox.Size = new System.Drawing.Size(615, 408);
|
||||
this.notesBox.TabIndex = 2;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(557, 10);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.cancelButton.TabIndex = 1;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bottomPanel1
|
||||
//
|
||||
this.bottomPanel1.Controls.Add(this.applyButton);
|
||||
this.bottomPanel1.Controls.Add(this.cancelButton);
|
||||
this.bottomPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.bottomPanel1.Location = new System.Drawing.Point(0, 471);
|
||||
this.bottomPanel1.Name = "bottomPanel1";
|
||||
this.bottomPanel1.Size = new System.Drawing.Size(659, 50);
|
||||
this.bottomPanel1.TabIndex = 1;
|
||||
//
|
||||
// applyButton
|
||||
//
|
||||
this.applyButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.applyButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.applyButton.Enabled = false;
|
||||
this.applyButton.Location = new System.Drawing.Point(461, 10);
|
||||
this.applyButton.Name = "applyButton";
|
||||
this.applyButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.applyButton.TabIndex = 0;
|
||||
this.applyButton.Text = "Done";
|
||||
this.applyButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EditNestInfoForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(659, 521);
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Controls.Add(this.bottomPanel1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "EditNestInfoForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Edit Nest";
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.tableLayoutPanel2.ResumeLayout(false);
|
||||
this.tableLayoutPanel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.leftSpacingBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.topSpacingBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.rightSpacingBox)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bottomSpacingBox)).EndInit();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.partSpacingBox)).EndInit();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tableLayoutPanel3.ResumeLayout(false);
|
||||
this.tableLayoutPanel3.PerformLayout();
|
||||
this.tableLayoutPanel4.ResumeLayout(false);
|
||||
this.tableLayoutPanel4.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.thicknessBox)).EndInit();
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.tabPage3.ResumeLayout(false);
|
||||
this.tabPage3.PerformLayout();
|
||||
this.bottomPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox nameBox;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
private System.Windows.Forms.Label labelEdgeSpacingLeft;
|
||||
private System.Windows.Forms.Label labelEdgeSpacingTop;
|
||||
private System.Windows.Forms.Label labelEdgeSpacingRight;
|
||||
private System.Windows.Forms.Label labelEdgeSpacingBottom;
|
||||
private Controls.NumericUpDown leftSpacingBox;
|
||||
private Controls.NumericUpDown topSpacingBox;
|
||||
private Controls.NumericUpDown rightSpacingBox;
|
||||
private Controls.NumericUpDown bottomSpacingBox;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label labelSize;
|
||||
private System.Windows.Forms.TextBox sizeBox;
|
||||
private Controls.NumericUpDown thicknessBox;
|
||||
private System.Windows.Forms.Label labelThk;
|
||||
private System.Windows.Forms.Label labelPartSpacing;
|
||||
private Controls.NumericUpDown partSpacingBox;
|
||||
private Controls.BottomPanel bottomPanel1;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private Controls.QuadrantSelect quadrantSelect1;
|
||||
private System.Windows.Forms.Button applyButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.TabPage tabPage3;
|
||||
private System.Windows.Forms.TextBox notesBox;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox customerBox;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.Label label5;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,234 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Timer = System.Timers.Timer;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class EditNestInfoForm : Form
|
||||
{
|
||||
private readonly Timer timer;
|
||||
private DateTime dateCreated;
|
||||
private DateTime dateLastModified;
|
||||
|
||||
public EditNestInfoForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
timer = new Timer
|
||||
{
|
||||
SynchronizingObject = this,
|
||||
Enabled = true,
|
||||
AutoReset = false,
|
||||
Interval = SystemInformation.KeyboardDelay + 1
|
||||
};
|
||||
timer.Elapsed += (sender, e) => EnableCheck();
|
||||
EnableCheck();
|
||||
}
|
||||
|
||||
public string NestName
|
||||
{
|
||||
get { return nameBox.Text; }
|
||||
private set { nameBox.Text = value; }
|
||||
}
|
||||
|
||||
public string Customer
|
||||
{
|
||||
get { return customerBox.Text; }
|
||||
set { customerBox.Text = value; }
|
||||
}
|
||||
|
||||
public string Notes
|
||||
{
|
||||
get { return notesBox.Text; }
|
||||
set { notesBox.Text = value; }
|
||||
}
|
||||
|
||||
public string SizeString
|
||||
{
|
||||
get { return sizeBox.Text; }
|
||||
set { sizeBox.Text = value; }
|
||||
}
|
||||
|
||||
public DateTime DateCreated
|
||||
{
|
||||
get { return dateCreated; }
|
||||
set
|
||||
{
|
||||
dateCreated = value;
|
||||
textBox1.Text = dateCreated.ToShortDateString();
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime DateLastModified
|
||||
{
|
||||
get { return dateLastModified; }
|
||||
set
|
||||
{
|
||||
dateLastModified = value;
|
||||
textBox2.Text = dateLastModified.ToShortDateString();
|
||||
}
|
||||
}
|
||||
|
||||
public double LeftSpacing
|
||||
{
|
||||
get { return (double)leftSpacingBox.Value; }
|
||||
set { leftSpacingBox.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public double TopSpacing
|
||||
{
|
||||
get { return (double)topSpacingBox.Value; }
|
||||
set { topSpacingBox.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public double RightSpacing
|
||||
{
|
||||
get { return (double)rightSpacingBox.Value; }
|
||||
set { rightSpacingBox.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public double BottomSpacing
|
||||
{
|
||||
get { return (double)bottomSpacingBox.Value; }
|
||||
set { bottomSpacingBox.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public double PartSpacing
|
||||
{
|
||||
get { return (double)partSpacingBox.Value; }
|
||||
set { partSpacingBox.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public double Thickness
|
||||
{
|
||||
get { return (double)thicknessBox.Value; }
|
||||
set { thicknessBox.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public void SetUnits(Units units)
|
||||
{
|
||||
switch (units)
|
||||
{
|
||||
case OpenNest.Units.Inches:
|
||||
radioButton1.Checked = true;
|
||||
break;
|
||||
|
||||
case OpenNest.Units.Millimeters:
|
||||
radioButton2.Checked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
UpdateUnitSuffix();
|
||||
}
|
||||
|
||||
public Units GetUnits()
|
||||
{
|
||||
if (radioButton1.Checked)
|
||||
return Units.Inches;
|
||||
|
||||
if (radioButton2.Checked)
|
||||
return Units.Millimeters;
|
||||
|
||||
return OpenNest.Units.Inches;
|
||||
}
|
||||
|
||||
private void UpdateUnitSuffix()
|
||||
{
|
||||
var unitBoxes = new Controls.NumericUpDown[]
|
||||
{
|
||||
thicknessBox,
|
||||
partSpacingBox,
|
||||
leftSpacingBox,
|
||||
topSpacingBox,
|
||||
rightSpacingBox,
|
||||
bottomSpacingBox
|
||||
};
|
||||
|
||||
var unitString = " " + UnitsHelper.GetShortString(GetUnits());
|
||||
|
||||
foreach (var box in unitBoxes)
|
||||
box.Suffix = unitString;
|
||||
}
|
||||
|
||||
public int Quadrant
|
||||
{
|
||||
get { return quadrantSelect1.Quadrant; }
|
||||
set { quadrantSelect1.Quadrant = value; }
|
||||
}
|
||||
|
||||
public void EnableCheck()
|
||||
{
|
||||
Size size;
|
||||
|
||||
if (!OpenNest.Size.TryParse(sizeBox.Text, out size))
|
||||
{
|
||||
applyButton.Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (LeftSpacing + RightSpacing >= size.Width)
|
||||
{
|
||||
applyButton.Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (TopSpacing + BottomSpacing >= size.Height)
|
||||
{
|
||||
applyButton.Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
applyButton.Enabled = true;
|
||||
}
|
||||
|
||||
public void LoadNestInfo(Nest nest)
|
||||
{
|
||||
NestName = nest.Name;
|
||||
Notes = nest.Notes;
|
||||
Customer = nest.Customer;
|
||||
DateCreated = nest.DateCreated;
|
||||
DateLastModified = nest.DateLastModified;
|
||||
Thickness = nest.PlateDefaults.Thickness;
|
||||
SizeString = nest.PlateDefaults.Size.ToString();
|
||||
PartSpacing = nest.PlateDefaults.PartSpacing;
|
||||
LeftSpacing = nest.PlateDefaults.EdgeSpacing.Left;
|
||||
TopSpacing = nest.PlateDefaults.EdgeSpacing.Top;
|
||||
RightSpacing = nest.PlateDefaults.EdgeSpacing.Right;
|
||||
BottomSpacing = nest.PlateDefaults.EdgeSpacing.Bottom;
|
||||
Quadrant = nest.PlateDefaults.Quadrant;
|
||||
|
||||
SetUnits(nest.Units);
|
||||
}
|
||||
|
||||
public void SaveNestInfo(Nest nest)
|
||||
{
|
||||
nest.Name = NestName;
|
||||
nest.Units = GetUnits();
|
||||
nest.Notes = Notes;
|
||||
nest.Customer = Customer;
|
||||
nest.DateCreated = DateCreated;
|
||||
nest.DateLastModified = DateLastModified;
|
||||
nest.PlateDefaults.Thickness = Thickness;
|
||||
nest.PlateDefaults.Size = OpenNest.Size.Parse(SizeString);
|
||||
nest.PlateDefaults.PartSpacing = PartSpacing;
|
||||
nest.PlateDefaults.EdgeSpacing = new Spacing(LeftSpacing, BottomSpacing, RightSpacing, TopSpacing);
|
||||
nest.PlateDefaults.Quadrant = Quadrant;
|
||||
}
|
||||
|
||||
private void sizeBox_TextChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
timer.Stop();
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
private void Units_Changed(object sender, EventArgs e)
|
||||
{
|
||||
var radioButton = sender as RadioButton;
|
||||
|
||||
if (radioButton == null || !radioButton.Checked)
|
||||
return;
|
||||
|
||||
UpdateUnitSuffix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,450 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class EditPlateForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.labelQty = new System.Windows.Forms.Label();
|
||||
this.labelSize = new System.Windows.Forms.Label();
|
||||
this.textBoxSize = new System.Windows.Forms.TextBox();
|
||||
this.labelThk = new System.Windows.Forms.Label();
|
||||
this.labelPartSpacing = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.labelEdgeSpacingLeft = new System.Windows.Forms.Label();
|
||||
this.labelEdgeSpacingTop = new System.Windows.Forms.Label();
|
||||
this.labelEdgeSpacingRight = new System.Windows.Forms.Label();
|
||||
this.labelEdgeSpacingBottom = new System.Windows.Forms.Label();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.applyButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.bottomPanel1 = new OpenNest.Controls.BottomPanel();
|
||||
this.quadrantSelect1 = new OpenNest.Controls.QuadrantSelect();
|
||||
this.numericUpDownEdgeSpacingLeft = new OpenNest.Controls.NumericUpDown();
|
||||
this.numericUpDownEdgeSpacingTop = new OpenNest.Controls.NumericUpDown();
|
||||
this.numericUpDownEdgeSpacingRight = new OpenNest.Controls.NumericUpDown();
|
||||
this.numericUpDownEdgeSpacingBottom = new OpenNest.Controls.NumericUpDown();
|
||||
this.numericUpDownQty = new OpenNest.Controls.NumericUpDown();
|
||||
this.numericUpDownThickness = new OpenNest.Controls.NumericUpDown();
|
||||
this.numericUpDownPartSpacing = new OpenNest.Controls.NumericUpDown();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.tableLayoutPanel2.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.bottomPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownEdgeSpacingLeft)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownEdgeSpacingTop)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownEdgeSpacingRight)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownEdgeSpacingBottom)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownQty)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownThickness)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownPartSpacing)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelQty, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelSize, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.textBoxSize, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.numericUpDownQty, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.numericUpDownThickness, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelThk, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelPartSpacing, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.numericUpDownPartSpacing, 1, 3);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(18, 12);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 4;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(236, 144);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// labelQty
|
||||
//
|
||||
this.labelQty.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelQty.AutoSize = true;
|
||||
this.labelQty.Location = new System.Drawing.Point(3, 46);
|
||||
this.labelQty.Name = "labelQty";
|
||||
this.labelQty.Size = new System.Drawing.Size(91, 16);
|
||||
this.labelQty.TabIndex = 2;
|
||||
this.labelQty.Text = "Quantity :";
|
||||
this.labelQty.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// labelSize
|
||||
//
|
||||
this.labelSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelSize.AutoSize = true;
|
||||
this.labelSize.Location = new System.Drawing.Point(3, 10);
|
||||
this.labelSize.Name = "labelSize";
|
||||
this.labelSize.Size = new System.Drawing.Size(91, 16);
|
||||
this.labelSize.TabIndex = 0;
|
||||
this.labelSize.Text = "Size :";
|
||||
this.labelSize.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// textBoxSize
|
||||
//
|
||||
this.textBoxSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBoxSize.Location = new System.Drawing.Point(100, 7);
|
||||
this.textBoxSize.Name = "textBoxSize";
|
||||
this.textBoxSize.Size = new System.Drawing.Size(133, 22);
|
||||
this.textBoxSize.TabIndex = 1;
|
||||
this.textBoxSize.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
|
||||
//
|
||||
// labelThk
|
||||
//
|
||||
this.labelThk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelThk.AutoSize = true;
|
||||
this.labelThk.Location = new System.Drawing.Point(3, 82);
|
||||
this.labelThk.Name = "labelThk";
|
||||
this.labelThk.Size = new System.Drawing.Size(91, 16);
|
||||
this.labelThk.TabIndex = 4;
|
||||
this.labelThk.Text = "Thickness :";
|
||||
this.labelThk.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// labelPartSpacing
|
||||
//
|
||||
this.labelPartSpacing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelPartSpacing.AutoSize = true;
|
||||
this.labelPartSpacing.Location = new System.Drawing.Point(3, 118);
|
||||
this.labelPartSpacing.Name = "labelPartSpacing";
|
||||
this.labelPartSpacing.Size = new System.Drawing.Size(91, 16);
|
||||
this.labelPartSpacing.TabIndex = 6;
|
||||
this.labelPartSpacing.Text = "Part Spacing :";
|
||||
this.labelPartSpacing.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.tableLayoutPanel2);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 173);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(248, 175);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Edge Spacing";
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tableLayoutPanel2.ColumnCount = 2;
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel2.Controls.Add(this.labelEdgeSpacingLeft, 0, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.labelEdgeSpacingTop, 0, 1);
|
||||
this.tableLayoutPanel2.Controls.Add(this.labelEdgeSpacingRight, 0, 2);
|
||||
this.tableLayoutPanel2.Controls.Add(this.labelEdgeSpacingBottom, 0, 3);
|
||||
this.tableLayoutPanel2.Controls.Add(this.numericUpDownEdgeSpacingLeft, 1, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.numericUpDownEdgeSpacingTop, 1, 1);
|
||||
this.tableLayoutPanel2.Controls.Add(this.numericUpDownEdgeSpacingRight, 1, 2);
|
||||
this.tableLayoutPanel2.Controls.Add(this.numericUpDownEdgeSpacingBottom, 1, 3);
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(6, 21);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
this.tableLayoutPanel2.RowCount = 4;
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(236, 148);
|
||||
this.tableLayoutPanel2.TabIndex = 0;
|
||||
//
|
||||
// labelEdgeSpacingLeft
|
||||
//
|
||||
this.labelEdgeSpacingLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelEdgeSpacingLeft.AutoSize = true;
|
||||
this.labelEdgeSpacingLeft.Location = new System.Drawing.Point(3, 10);
|
||||
this.labelEdgeSpacingLeft.Name = "labelEdgeSpacingLeft";
|
||||
this.labelEdgeSpacingLeft.Size = new System.Drawing.Size(56, 16);
|
||||
this.labelEdgeSpacingLeft.TabIndex = 0;
|
||||
this.labelEdgeSpacingLeft.Text = "Left :";
|
||||
this.labelEdgeSpacingLeft.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// labelEdgeSpacingTop
|
||||
//
|
||||
this.labelEdgeSpacingTop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelEdgeSpacingTop.AutoSize = true;
|
||||
this.labelEdgeSpacingTop.Location = new System.Drawing.Point(3, 47);
|
||||
this.labelEdgeSpacingTop.Name = "labelEdgeSpacingTop";
|
||||
this.labelEdgeSpacingTop.Size = new System.Drawing.Size(56, 16);
|
||||
this.labelEdgeSpacingTop.TabIndex = 2;
|
||||
this.labelEdgeSpacingTop.Text = "Top :";
|
||||
this.labelEdgeSpacingTop.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// labelEdgeSpacingRight
|
||||
//
|
||||
this.labelEdgeSpacingRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelEdgeSpacingRight.AutoSize = true;
|
||||
this.labelEdgeSpacingRight.Location = new System.Drawing.Point(3, 84);
|
||||
this.labelEdgeSpacingRight.Name = "labelEdgeSpacingRight";
|
||||
this.labelEdgeSpacingRight.Size = new System.Drawing.Size(56, 16);
|
||||
this.labelEdgeSpacingRight.TabIndex = 4;
|
||||
this.labelEdgeSpacingRight.Text = "Right :";
|
||||
this.labelEdgeSpacingRight.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// labelEdgeSpacingBottom
|
||||
//
|
||||
this.labelEdgeSpacingBottom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelEdgeSpacingBottom.AutoSize = true;
|
||||
this.labelEdgeSpacingBottom.Location = new System.Drawing.Point(3, 121);
|
||||
this.labelEdgeSpacingBottom.Name = "labelEdgeSpacingBottom";
|
||||
this.labelEdgeSpacingBottom.Size = new System.Drawing.Size(56, 16);
|
||||
this.labelEdgeSpacingBottom.TabIndex = 6;
|
||||
this.labelEdgeSpacingBottom.Text = "Bottom :";
|
||||
this.labelEdgeSpacingBottom.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox2.Controls.Add(this.quadrantSelect1);
|
||||
this.groupBox2.Location = new System.Drawing.Point(277, 12);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(261, 209);
|
||||
this.groupBox2.TabIndex = 6;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Quadrant";
|
||||
//
|
||||
// applyButton
|
||||
//
|
||||
this.applyButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.applyButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.applyButton.Enabled = false;
|
||||
this.applyButton.Location = new System.Drawing.Point(352, 11);
|
||||
this.applyButton.Name = "applyButton";
|
||||
this.applyButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.applyButton.TabIndex = 3;
|
||||
this.applyButton.Text = "Done";
|
||||
this.applyButton.UseVisualStyleBackColor = true;
|
||||
this.applyButton.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(448, 11);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.cancelButton.TabIndex = 4;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bottomPanel1
|
||||
//
|
||||
this.bottomPanel1.Controls.Add(this.applyButton);
|
||||
this.bottomPanel1.Controls.Add(this.cancelButton);
|
||||
this.bottomPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.bottomPanel1.Location = new System.Drawing.Point(0, 359);
|
||||
this.bottomPanel1.Name = "bottomPanel1";
|
||||
this.bottomPanel1.Size = new System.Drawing.Size(550, 50);
|
||||
this.bottomPanel1.TabIndex = 7;
|
||||
//
|
||||
// quadrantSelect1
|
||||
//
|
||||
this.quadrantSelect1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.quadrantSelect1.Location = new System.Drawing.Point(6, 19);
|
||||
this.quadrantSelect1.Name = "quadrantSelect1";
|
||||
this.quadrantSelect1.Quadrant = 1;
|
||||
this.quadrantSelect1.Size = new System.Drawing.Size(249, 184);
|
||||
this.quadrantSelect1.TabIndex = 5;
|
||||
this.quadrantSelect1.Text = "quadrantSelect1";
|
||||
//
|
||||
// numericUpDownEdgeSpacingLeft
|
||||
//
|
||||
this.numericUpDownEdgeSpacingLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDownEdgeSpacingLeft.DecimalPlaces = 4;
|
||||
this.numericUpDownEdgeSpacingLeft.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.numericUpDownEdgeSpacingLeft.Location = new System.Drawing.Point(65, 7);
|
||||
this.numericUpDownEdgeSpacingLeft.Name = "numericUpDownEdgeSpacingLeft";
|
||||
this.numericUpDownEdgeSpacingLeft.Size = new System.Drawing.Size(168, 22);
|
||||
this.numericUpDownEdgeSpacingLeft.Suffix = "";
|
||||
this.numericUpDownEdgeSpacingLeft.TabIndex = 1;
|
||||
this.numericUpDownEdgeSpacingLeft.ValueChanged += new System.EventHandler(this.spacing_ValueChanged);
|
||||
//
|
||||
// numericUpDownEdgeSpacingTop
|
||||
//
|
||||
this.numericUpDownEdgeSpacingTop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDownEdgeSpacingTop.DecimalPlaces = 4;
|
||||
this.numericUpDownEdgeSpacingTop.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.numericUpDownEdgeSpacingTop.Location = new System.Drawing.Point(65, 44);
|
||||
this.numericUpDownEdgeSpacingTop.Name = "numericUpDownEdgeSpacingTop";
|
||||
this.numericUpDownEdgeSpacingTop.Size = new System.Drawing.Size(168, 22);
|
||||
this.numericUpDownEdgeSpacingTop.Suffix = "";
|
||||
this.numericUpDownEdgeSpacingTop.TabIndex = 3;
|
||||
this.numericUpDownEdgeSpacingTop.ValueChanged += new System.EventHandler(this.spacing_ValueChanged);
|
||||
//
|
||||
// numericUpDownEdgeSpacingRight
|
||||
//
|
||||
this.numericUpDownEdgeSpacingRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDownEdgeSpacingRight.DecimalPlaces = 4;
|
||||
this.numericUpDownEdgeSpacingRight.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.numericUpDownEdgeSpacingRight.Location = new System.Drawing.Point(65, 81);
|
||||
this.numericUpDownEdgeSpacingRight.Name = "numericUpDownEdgeSpacingRight";
|
||||
this.numericUpDownEdgeSpacingRight.Size = new System.Drawing.Size(168, 22);
|
||||
this.numericUpDownEdgeSpacingRight.Suffix = "";
|
||||
this.numericUpDownEdgeSpacingRight.TabIndex = 5;
|
||||
this.numericUpDownEdgeSpacingRight.ValueChanged += new System.EventHandler(this.spacing_ValueChanged);
|
||||
//
|
||||
// numericUpDownEdgeSpacingBottom
|
||||
//
|
||||
this.numericUpDownEdgeSpacingBottom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDownEdgeSpacingBottom.DecimalPlaces = 4;
|
||||
this.numericUpDownEdgeSpacingBottom.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.numericUpDownEdgeSpacingBottom.Location = new System.Drawing.Point(65, 118);
|
||||
this.numericUpDownEdgeSpacingBottom.Name = "numericUpDownEdgeSpacingBottom";
|
||||
this.numericUpDownEdgeSpacingBottom.Size = new System.Drawing.Size(168, 22);
|
||||
this.numericUpDownEdgeSpacingBottom.Suffix = "";
|
||||
this.numericUpDownEdgeSpacingBottom.TabIndex = 7;
|
||||
this.numericUpDownEdgeSpacingBottom.ValueChanged += new System.EventHandler(this.spacing_ValueChanged);
|
||||
//
|
||||
// numericUpDownQty
|
||||
//
|
||||
this.numericUpDownQty.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDownQty.Location = new System.Drawing.Point(100, 43);
|
||||
this.numericUpDownQty.Name = "numericUpDownQty";
|
||||
this.numericUpDownQty.Size = new System.Drawing.Size(133, 22);
|
||||
this.numericUpDownQty.Suffix = "";
|
||||
this.numericUpDownQty.TabIndex = 3;
|
||||
//
|
||||
// numericUpDownThickness
|
||||
//
|
||||
this.numericUpDownThickness.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDownThickness.DecimalPlaces = 4;
|
||||
this.numericUpDownThickness.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.numericUpDownThickness.Location = new System.Drawing.Point(100, 79);
|
||||
this.numericUpDownThickness.Name = "numericUpDownThickness";
|
||||
this.numericUpDownThickness.Size = new System.Drawing.Size(133, 22);
|
||||
this.numericUpDownThickness.Suffix = "";
|
||||
this.numericUpDownThickness.TabIndex = 5;
|
||||
//
|
||||
// numericUpDownPartSpacing
|
||||
//
|
||||
this.numericUpDownPartSpacing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDownPartSpacing.DecimalPlaces = 4;
|
||||
this.numericUpDownPartSpacing.Increment = new decimal(new int[] {
|
||||
25,
|
||||
0,
|
||||
0,
|
||||
131072});
|
||||
this.numericUpDownPartSpacing.Location = new System.Drawing.Point(100, 115);
|
||||
this.numericUpDownPartSpacing.Name = "numericUpDownPartSpacing";
|
||||
this.numericUpDownPartSpacing.Size = new System.Drawing.Size(133, 22);
|
||||
this.numericUpDownPartSpacing.Suffix = "";
|
||||
this.numericUpDownPartSpacing.TabIndex = 7;
|
||||
//
|
||||
// EditPlateForm
|
||||
//
|
||||
this.AcceptButton = this.applyButton;
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(550, 409);
|
||||
this.Controls.Add(this.bottomPanel1);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "EditPlateForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Edit Plate";
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.tableLayoutPanel2.ResumeLayout(false);
|
||||
this.tableLayoutPanel2.PerformLayout();
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.bottomPanel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownEdgeSpacingLeft)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownEdgeSpacingTop)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownEdgeSpacingRight)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownEdgeSpacingBottom)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownQty)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownThickness)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownPartSpacing)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label labelSize;
|
||||
private System.Windows.Forms.Button applyButton;
|
||||
private System.Windows.Forms.TextBox textBoxSize;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
private System.Windows.Forms.Label labelEdgeSpacingLeft;
|
||||
private System.Windows.Forms.Label labelEdgeSpacingTop;
|
||||
private System.Windows.Forms.Label labelEdgeSpacingRight;
|
||||
private System.Windows.Forms.Label labelEdgeSpacingBottom;
|
||||
private Controls.NumericUpDown numericUpDownEdgeSpacingLeft;
|
||||
private Controls.NumericUpDown numericUpDownEdgeSpacingTop;
|
||||
private Controls.NumericUpDown numericUpDownEdgeSpacingRight;
|
||||
private Controls.NumericUpDown numericUpDownEdgeSpacingBottom;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Label labelQty;
|
||||
private Controls.NumericUpDown numericUpDownQty;
|
||||
private Controls.QuadrantSelect quadrantSelect1;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private Controls.NumericUpDown numericUpDownThickness;
|
||||
private System.Windows.Forms.Label labelThk;
|
||||
private System.Windows.Forms.Label labelPartSpacing;
|
||||
private Controls.NumericUpDown numericUpDownPartSpacing;
|
||||
private Controls.BottomPanel bottomPanel1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Timer = System.Timers.Timer;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class EditPlateForm : Form
|
||||
{
|
||||
private readonly Plate plate;
|
||||
private readonly Timer timer;
|
||||
|
||||
private Units units;
|
||||
|
||||
public EditPlateForm(Plate plate)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.plate = plate;
|
||||
|
||||
timer = new Timer
|
||||
{
|
||||
SynchronizingObject = this,
|
||||
Enabled = true,
|
||||
AutoReset = false,
|
||||
Interval = SystemInformation.KeyboardDelay + 1
|
||||
};
|
||||
timer.Elapsed += (sender, e) => EnableCheck();
|
||||
|
||||
Load(plate);
|
||||
EnableCheck();
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
SetUnits(units);
|
||||
}
|
||||
|
||||
public Units Units
|
||||
{
|
||||
get { return units; }
|
||||
set
|
||||
{
|
||||
units = value;
|
||||
SetUnits(value);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetUnits(Units units)
|
||||
{
|
||||
string suffix = " " + UnitsHelper.GetShortString(units);
|
||||
decimal increment;
|
||||
|
||||
if (units == Units.Inches)
|
||||
increment = 0.25m;
|
||||
else
|
||||
increment = 1;
|
||||
|
||||
var controls = new []
|
||||
{
|
||||
numericUpDownThickness,
|
||||
numericUpDownPartSpacing,
|
||||
numericUpDownEdgeSpacingBottom,
|
||||
numericUpDownEdgeSpacingLeft,
|
||||
numericUpDownEdgeSpacingRight,
|
||||
numericUpDownEdgeSpacingTop
|
||||
};
|
||||
|
||||
foreach (var control in controls)
|
||||
{
|
||||
control.Suffix = suffix;
|
||||
control.Increment = increment;
|
||||
control.Invalidate(true);
|
||||
}
|
||||
}
|
||||
|
||||
public string SizeString
|
||||
{
|
||||
get { return textBoxSize.Text; }
|
||||
set { textBoxSize.Text = value; }
|
||||
}
|
||||
|
||||
public double LeftSpacing
|
||||
{
|
||||
get { return (double)numericUpDownEdgeSpacingLeft.Value; }
|
||||
set { numericUpDownEdgeSpacingLeft.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public double TopSpacing
|
||||
{
|
||||
get { return (double)numericUpDownEdgeSpacingTop.Value; }
|
||||
set { numericUpDownEdgeSpacingTop.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public double RightSpacing
|
||||
{
|
||||
get { return (double)numericUpDownEdgeSpacingRight.Value; }
|
||||
set { numericUpDownEdgeSpacingRight.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public double BottomSpacing
|
||||
{
|
||||
get { return (double)numericUpDownEdgeSpacingBottom.Value; }
|
||||
set { numericUpDownEdgeSpacingBottom.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public double PartSpacing
|
||||
{
|
||||
get { return (double)numericUpDownPartSpacing.Value; }
|
||||
set { numericUpDownPartSpacing.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public double Thickness
|
||||
{
|
||||
get { return (double)numericUpDownThickness.Value; }
|
||||
set { numericUpDownThickness.Value = (decimal)value; }
|
||||
}
|
||||
|
||||
public int Quantity
|
||||
{
|
||||
get { return (int)numericUpDownQty.Value; }
|
||||
set { numericUpDownQty.Value = value; }
|
||||
}
|
||||
|
||||
public int Quadrant
|
||||
{
|
||||
get { return quadrantSelect1.Quadrant; }
|
||||
set { quadrantSelect1.Quadrant = value; }
|
||||
}
|
||||
|
||||
public void EnableCheck()
|
||||
{
|
||||
OpenNest.Size size;
|
||||
|
||||
if (!OpenNest.Size.TryParse(SizeString, out size))
|
||||
{
|
||||
applyButton.Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (LeftSpacing + RightSpacing >= size.Width)
|
||||
{
|
||||
applyButton.Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (TopSpacing + BottomSpacing >= size.Height)
|
||||
{
|
||||
applyButton.Enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
applyButton.Enabled = true;
|
||||
}
|
||||
|
||||
private new void Load(Plate plate)
|
||||
{
|
||||
textBoxSize.Text = plate.Size.ToString();
|
||||
LeftSpacing = plate.EdgeSpacing.Left;
|
||||
TopSpacing = plate.EdgeSpacing.Top;
|
||||
RightSpacing = plate.EdgeSpacing.Right;
|
||||
BottomSpacing = plate.EdgeSpacing.Bottom;
|
||||
PartSpacing = plate.PartSpacing;
|
||||
Quantity = plate.Quantity;
|
||||
Quadrant = plate.Quadrant;
|
||||
Thickness = plate.Thickness;
|
||||
}
|
||||
|
||||
private void Save()
|
||||
{
|
||||
plate.Size = OpenNest.Size.Parse(SizeString);
|
||||
plate.EdgeSpacing.Left = LeftSpacing;
|
||||
plate.EdgeSpacing.Top = TopSpacing;
|
||||
plate.EdgeSpacing.Right = RightSpacing;
|
||||
plate.EdgeSpacing.Bottom = BottomSpacing;
|
||||
plate.PartSpacing = PartSpacing;
|
||||
plate.Quantity = Quantity;
|
||||
plate.Quadrant = Quadrant;
|
||||
plate.Thickness = Thickness;
|
||||
}
|
||||
|
||||
private void textBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
timer.Stop();
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save();
|
||||
}
|
||||
|
||||
private void spacing_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
EnableCheck();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,64 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class FillPlateForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.AutoScroll = true;
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 1;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(377, 525);
|
||||
this.tableLayoutPanel1.TabIndex = 2;
|
||||
//
|
||||
// FillPlateForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(377, 525);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Name = "FillPlateForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "FillPlateForm";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Collections;
|
||||
using OpenNest.Controls;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class FillPlateForm : Form
|
||||
{
|
||||
private DrawingCollection Drawings;
|
||||
|
||||
public FillPlateForm(DrawingCollection drawings)
|
||||
{
|
||||
InitializeComponent();
|
||||
Drawings = drawings;
|
||||
UpdateDrawingList();
|
||||
}
|
||||
|
||||
public Drawing SelectedDrawing { get; protected set; }
|
||||
|
||||
public void UpdateDrawingList()
|
||||
{
|
||||
tableLayoutPanel1.Controls.Clear();
|
||||
tableLayoutPanel1.RowStyles.Clear();
|
||||
tableLayoutPanel1.RowCount = Drawings.Count + 1;
|
||||
|
||||
var controls = new PlateView[Drawings.Count];
|
||||
|
||||
int index = 0;
|
||||
|
||||
foreach (var dwg in Drawings)
|
||||
{
|
||||
var control = new PlateView();
|
||||
control.DrawOrigin = false;
|
||||
control.AllowPan = false;
|
||||
control.AllowSelect = false;
|
||||
control.AllowZoom = false;
|
||||
control.BackColor = Color.White;
|
||||
control.Plate.Size = new OpenNest.Size(0, 0);
|
||||
control.AddPartFromDrawing(dwg, Vector.Zero);
|
||||
control.MouseDoubleClick += (sender, e) =>
|
||||
{
|
||||
SelectedDrawing = control.Plate.Parts.Count > 0 ? control.Plate.Parts[0].BaseDrawing : null;
|
||||
Close();
|
||||
};
|
||||
control.Dock = DockStyle.Fill;
|
||||
controls[index] = control;
|
||||
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 200));
|
||||
index++;
|
||||
}
|
||||
|
||||
tableLayoutPanel1.Controls.AddRange(controls);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,892 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Actions;
|
||||
using OpenNest.Collections;
|
||||
using OpenNest.IO;
|
||||
using OpenNest.Properties;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
private EditNestForm activeForm;
|
||||
private bool clickUpdateLocation;
|
||||
|
||||
private const float ZoomInFactor = 1.5f;
|
||||
private const float ZoomOutFactor = 1.0f / ZoomInFactor;
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
LoadSettings();
|
||||
|
||||
var renderer = new ToolStripRenderer(ToolbarTheme.Toolbar);
|
||||
menuStrip1.Renderer = renderer;
|
||||
toolStrip1.Renderer = renderer;
|
||||
|
||||
mnuViewZoomIn.ShortcutKeyDisplayString = "Ctrl+Plus";
|
||||
mnuViewZoomOut.ShortcutKeyDisplayString = "Ctrl+Minus";
|
||||
|
||||
clickUpdateLocation = true;
|
||||
|
||||
this.SetBevel(false);
|
||||
|
||||
LoadPosts();
|
||||
EnableCheck();
|
||||
UpdateStatus();
|
||||
}
|
||||
|
||||
private string GetNestName(DateTime date, int id)
|
||||
{
|
||||
var month = date.Month.ToString().PadLeft(2, '0');
|
||||
var day = date.Day.ToString().PadLeft(2, '0');
|
||||
|
||||
return string.Format("N{0}{1}-{2}", month, day, id.ToString().PadLeft(3, '0'));
|
||||
}
|
||||
|
||||
private void LoadNest(Nest nest, FormWindowState windowState = FormWindowState.Maximized)
|
||||
{
|
||||
var editForm = new EditNestForm(nest);
|
||||
editForm.MdiParent = this;
|
||||
editForm.PlateChanged += (sender, e) =>
|
||||
{
|
||||
NavigationEnableCheck();
|
||||
UpdatePlateStatus();
|
||||
};
|
||||
editForm.WindowState = windowState;
|
||||
editForm.Show();
|
||||
editForm.PlateView.ZoomToFit();
|
||||
}
|
||||
|
||||
private void LoadSettings()
|
||||
{
|
||||
var screen = Screen.PrimaryScreen.Bounds;
|
||||
|
||||
if (screen.Contains(Settings.Default.MainWindowLocation))
|
||||
Location = Settings.Default.MainWindowLocation;
|
||||
|
||||
if (Settings.Default.MainWindowSize.Width <= screen.Width &&
|
||||
Settings.Default.MainWindowSize.Height <= screen.Height)
|
||||
{
|
||||
Size = Settings.Default.MainWindowSize;
|
||||
}
|
||||
|
||||
WindowState = Settings.Default.MainWindowState;
|
||||
}
|
||||
|
||||
private void SaveSettings()
|
||||
{
|
||||
Settings.Default.MainWindowLocation = Location;
|
||||
Settings.Default.MainWindowSize = Size;
|
||||
Settings.Default.MainWindowState = WindowState;
|
||||
Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void EnableCheck()
|
||||
{
|
||||
NavigationEnableCheck();
|
||||
|
||||
var hasValue = activeForm != null;
|
||||
|
||||
btnZoomToFit.Enabled = hasValue;
|
||||
mnuFileSave.Enabled = hasValue;
|
||||
btnSave.Enabled = hasValue;
|
||||
btnSaveAs.Enabled = hasValue;
|
||||
mnuFileSaveAs.Enabled = hasValue;
|
||||
mnuFileExport.Enabled = hasValue;
|
||||
mnuFileExportAll.Enabled = hasValue;
|
||||
btnZoomOut.Enabled = hasValue;
|
||||
btnZoomIn.Enabled = hasValue;
|
||||
mnuEdit.Visible = hasValue;
|
||||
mnuView.Visible = hasValue;
|
||||
mnuNest.Visible = hasValue;
|
||||
mnuPlate.Visible = hasValue;
|
||||
mnuWindow.Visible = hasValue;
|
||||
mnuToolsAlign.Visible = hasValue;
|
||||
mnuToolsMeasureArea.Visible = hasValue;
|
||||
|
||||
toolStripMenuItem14.Visible = hasValue;
|
||||
mnuSetOffsetIncrement.Visible = hasValue;
|
||||
mnuSetRotationIncrement.Visible = hasValue;
|
||||
toolStripMenuItem15.Visible = hasValue;
|
||||
}
|
||||
|
||||
private void NavigationEnableCheck()
|
||||
{
|
||||
if (activeForm == null)
|
||||
{
|
||||
mnuNestPreviousPlate.Enabled = false;
|
||||
btnPreviousPlate.Enabled = false;
|
||||
|
||||
mnuNestNextPlate.Enabled = false;
|
||||
btnNextPlate.Enabled = false;
|
||||
|
||||
mnuNestFirstPlate.Enabled = false;
|
||||
btnFirstPlate.Enabled = false;
|
||||
|
||||
mnuNestLastPlate.Enabled = false;
|
||||
btnLastPlate.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
mnuNestPreviousPlate.Enabled = !activeForm.IsFirstPlate();
|
||||
btnPreviousPlate.Enabled = !activeForm.IsFirstPlate();
|
||||
|
||||
mnuNestNextPlate.Enabled = !activeForm.IsLastPlate();
|
||||
btnNextPlate.Enabled = !activeForm.IsLastPlate();
|
||||
|
||||
mnuNestFirstPlate.Enabled = activeForm.PlateCount > 0 && !activeForm.IsFirstPlate();
|
||||
btnFirstPlate.Enabled = activeForm.PlateCount > 0 && !activeForm.IsFirstPlate();
|
||||
|
||||
mnuNestLastPlate.Enabled = activeForm.PlateCount > 0 && !activeForm.IsLastPlate();
|
||||
btnLastPlate.Enabled = activeForm.PlateCount > 0 && !activeForm.IsLastPlate();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateLocationStatus()
|
||||
{
|
||||
if (activeForm == null)
|
||||
{
|
||||
locationStatusLabel.Text = string.Empty;
|
||||
return;
|
||||
}
|
||||
|
||||
locationStatusLabel.Text = string.Format("Location: [{0}, {1}]",
|
||||
activeForm.PlateView.CurrentPoint.X.ToString("n4"),
|
||||
activeForm.PlateView.CurrentPoint.Y.ToString("n4"));
|
||||
}
|
||||
|
||||
private void UpdatePlateStatus()
|
||||
{
|
||||
if (activeForm == null)
|
||||
{
|
||||
plateIndexStatusLabel.Text = string.Empty;
|
||||
plateSizeStatusLabel.Text = string.Empty;
|
||||
plateQtyStatusLabel.Text = string.Empty;
|
||||
return;
|
||||
}
|
||||
|
||||
plateIndexStatusLabel.Text = string.Format(
|
||||
"Plate: {0} of {1}",
|
||||
activeForm.CurrentPlateIndex + 1,
|
||||
activeForm.PlateCount);
|
||||
|
||||
plateSizeStatusLabel.Text = string.Format(
|
||||
"Size: {0}",
|
||||
activeForm.PlateView.Plate.Size);
|
||||
|
||||
plateQtyStatusLabel.Text = string.Format(
|
||||
"Qty: {0}",
|
||||
activeForm.PlateView.Plate.Quantity);
|
||||
}
|
||||
|
||||
private void UpdateStatus()
|
||||
{
|
||||
UpdateLocationStatus();
|
||||
UpdatePlateStatus();
|
||||
}
|
||||
|
||||
private void UpdateLocationMode()
|
||||
{
|
||||
if (activeForm == null)
|
||||
return;
|
||||
|
||||
if (clickUpdateLocation)
|
||||
{
|
||||
clickUpdateLocation = true;
|
||||
locationStatusLabel.ForeColor = Color.Gray;
|
||||
activeForm.PlateView.MouseMove -= PlateView_MouseMove;
|
||||
activeForm.PlateView.MouseClick += PlateView_MouseClick;
|
||||
}
|
||||
else
|
||||
{
|
||||
clickUpdateLocation = false;
|
||||
locationStatusLabel.ForeColor = Color.Black;
|
||||
activeForm.PlateView.MouseMove += PlateView_MouseMove;
|
||||
activeForm.PlateView.MouseClick -= PlateView_MouseClick;
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadPosts()
|
||||
{
|
||||
var exepath = Assembly.GetEntryAssembly().Location;
|
||||
var postprocessordir = Path.Combine(Path.GetDirectoryName(exepath), "Posts");
|
||||
|
||||
if (Directory.Exists(postprocessordir))
|
||||
{
|
||||
foreach (var file in Directory.GetFiles(postprocessordir, "*.dll"))
|
||||
{
|
||||
var types = Assembly.LoadFile(file).GetTypes();
|
||||
|
||||
foreach (var type in types)
|
||||
{
|
||||
if (type.GetInterfaces().Contains(typeof(IPostProcessor)) == false)
|
||||
continue;
|
||||
|
||||
var postProcessor = Activator.CreateInstance(type) as IPostProcessor;
|
||||
var postProcessorMenuItem = new ToolStripMenuItem(postProcessor.Name);
|
||||
postProcessorMenuItem.Tag = postProcessor;
|
||||
postProcessorMenuItem.Click += PostProcessor_Click;
|
||||
mnuNestPost.DropDownItems.Add(postProcessorMenuItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mnuNestPost.Visible = mnuNestPost.DropDownItems.Count > 0;
|
||||
}
|
||||
|
||||
#region Overrides
|
||||
|
||||
protected override void OnSizeChanged(EventArgs e)
|
||||
{
|
||||
base.OnSizeChanged(e);
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
protected override void OnMdiChildActivate(EventArgs e)
|
||||
{
|
||||
base.OnMdiChildActivate(e);
|
||||
|
||||
if (activeForm != null)
|
||||
{
|
||||
activeForm.PlateView.MouseMove -= PlateView_MouseMove;
|
||||
activeForm.PlateView.MouseClick -= PlateView_MouseClick;
|
||||
activeForm.PlateView.StatusChanged -= PlateView_StatusChanged;
|
||||
}
|
||||
|
||||
activeForm = ActiveMdiChild as EditNestForm;
|
||||
|
||||
EnableCheck();
|
||||
UpdatePlateStatus();
|
||||
UpdateLocationStatus();
|
||||
|
||||
if (activeForm == null)
|
||||
{
|
||||
statusLabel1.Text = "";
|
||||
return;
|
||||
}
|
||||
|
||||
UpdateLocationMode();
|
||||
activeForm.PlateView.StatusChanged += PlateView_StatusChanged;
|
||||
mnuViewDrawRapids.Checked = activeForm.PlateView.DrawRapid;
|
||||
mnuViewDrawBounds.Checked = activeForm.PlateView.DrawBounds;
|
||||
statusLabel1.Text = activeForm.PlateView.Status;
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
if (Settings.Default.CreateNewNestOnOpen)
|
||||
New_Click(this, new EventArgs());
|
||||
}
|
||||
|
||||
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
base.OnClosing(e);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region File Menu Events
|
||||
|
||||
private void New_Click(object sender, EventArgs e)
|
||||
{
|
||||
var windowState = ActiveMdiChild != null
|
||||
? ActiveMdiChild.WindowState
|
||||
: FormWindowState.Maximized;
|
||||
|
||||
Nest nest;
|
||||
|
||||
if (File.Exists(Properties.Settings.Default.NestTemplatePath))
|
||||
{
|
||||
var reader = new NestReader(Properties.Settings.Default.NestTemplatePath);
|
||||
nest = reader.Read();
|
||||
}
|
||||
else
|
||||
{
|
||||
nest = new Nest();
|
||||
nest.Units = Properties.Settings.Default.DefaultUnit;
|
||||
nest.PlateDefaults.EdgeSpacing = new Spacing(0, 0, 0, 0);
|
||||
nest.PlateDefaults.PartSpacing = 0;
|
||||
nest.PlateDefaults.Size = new OpenNest.Size(100, 100);
|
||||
nest.PlateDefaults.Quadrant = 1;
|
||||
}
|
||||
|
||||
nest.DateCreated = DateTime.Now;
|
||||
nest.DateLastModified = DateTime.Now;
|
||||
|
||||
if (DateTime.Now.Date != Settings.Default.LastNestCreatedDate.Date)
|
||||
{
|
||||
Settings.Default.NestNumber = 1;
|
||||
Settings.Default.LastNestCreatedDate = DateTime.Now.Date;
|
||||
}
|
||||
|
||||
nest.Name = GetNestName(DateTime.Now, Settings.Default.NestNumber++);
|
||||
LoadNest(nest, windowState);
|
||||
}
|
||||
|
||||
private void Open_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dlg = new OpenFileDialog();
|
||||
dlg.Filter = "Nest Files (*.zip) | *.zip";
|
||||
dlg.Multiselect = true;
|
||||
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var reader = new NestReader(dlg.FileName);
|
||||
var nest = reader.Read();
|
||||
LoadNest(nest);
|
||||
}
|
||||
}
|
||||
|
||||
private void Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm != null)
|
||||
activeForm.Save();
|
||||
}
|
||||
|
||||
private void SaveAs_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm != null)
|
||||
activeForm.SaveAs();
|
||||
}
|
||||
|
||||
private void Export_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.Export();
|
||||
}
|
||||
|
||||
private void ExportAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.ExportAll();
|
||||
}
|
||||
|
||||
private void Exit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
#endregion File Menu Events
|
||||
|
||||
#region Edit Menu Events
|
||||
|
||||
private void EditCut_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
|
||||
var selectedParts = activeForm.PlateView.SelectedParts;
|
||||
|
||||
if (selectedParts.Count > 0)
|
||||
{
|
||||
var partsToClone = selectedParts.Select(p => p.BasePart).ToList();
|
||||
activeForm.PlateView.SetAction(typeof(ActionClone), partsToClone);
|
||||
|
||||
foreach (var part in partsToClone)
|
||||
activeForm.PlateView.Plate.Parts.Remove(part);
|
||||
}
|
||||
}
|
||||
|
||||
private void EditPaste_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void EditCopy_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
|
||||
var selectedParts = activeForm.PlateView.SelectedParts;
|
||||
|
||||
if (selectedParts.Count > 0)
|
||||
{
|
||||
var partsToClone = selectedParts.Select(p => p.BasePart).ToList();
|
||||
activeForm.PlateView.SetAction(typeof(ActionClone), partsToClone);
|
||||
}
|
||||
}
|
||||
|
||||
private void EditSelectAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.SelectAllParts();
|
||||
}
|
||||
|
||||
#endregion Edit Menu Events
|
||||
|
||||
#region View Menu Events
|
||||
|
||||
private void ToggleDrawRapids_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.ToggleRapid();
|
||||
mnuViewDrawRapids.Checked = activeForm.PlateView.DrawRapid;
|
||||
}
|
||||
|
||||
private void ToggleDrawBounds_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.ToggleDrawBounds();
|
||||
mnuViewDrawBounds.Checked = activeForm.PlateView.DrawBounds;
|
||||
}
|
||||
|
||||
private void ZoomToArea_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.SetAction(typeof(ActionZoomWindow));
|
||||
}
|
||||
|
||||
private void ZoomToFit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.ZoomToFit();
|
||||
}
|
||||
|
||||
private void ZoomToPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.ZoomToPlate();
|
||||
}
|
||||
|
||||
private void ZoomToSelected_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.ZoomToSelected();
|
||||
}
|
||||
|
||||
private void ZoomIn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
|
||||
var pt = new Point(
|
||||
activeForm.PlateView.Width / 2,
|
||||
activeForm.PlateView.Height / 2);
|
||||
|
||||
activeForm.PlateView.ZoomToControlPoint(pt, ZoomInFactor);
|
||||
}
|
||||
|
||||
private void ZoomOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
|
||||
var pt = new Point(
|
||||
activeForm.PlateView.Width / 2,
|
||||
activeForm.PlateView.Height / 2);
|
||||
|
||||
activeForm.PlateView.ZoomToControlPoint(pt, ZoomOutFactor);
|
||||
}
|
||||
|
||||
#endregion View Menu Events
|
||||
|
||||
#region Tools Menu Events
|
||||
|
||||
private void MeasureArea_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null)
|
||||
return;
|
||||
|
||||
activeForm.PlateView.SetAction(typeof(ActionSelectArea));
|
||||
}
|
||||
|
||||
private void SetOffsetIncrement_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
var form = new SetValueForm();
|
||||
form.Text = "Set Offset Increment";
|
||||
form.Value = activeForm.PlateView.OffsetIncrementDistance;
|
||||
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
activeForm.PlateView.OffsetIncrementDistance = form.Value;
|
||||
}
|
||||
|
||||
private void SetRotationIncrement_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
var form = new SetValueForm();
|
||||
form.Text = "Set Rotation Increment";
|
||||
form.Value = activeForm.PlateView.RotateIncrementAngle;
|
||||
form.Maximum = 360;
|
||||
|
||||
if (form.ShowDialog() == DialogResult.OK)
|
||||
activeForm.PlateView.RotateIncrementAngle = form.Value;
|
||||
}
|
||||
|
||||
private void Options_Click(object sender, EventArgs e)
|
||||
{
|
||||
var form = new OptionsForm();
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
private void AlignLeft_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.AlignSelected(AlignType.Left);
|
||||
}
|
||||
|
||||
private void AlignRight_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.AlignSelected(AlignType.Right);
|
||||
}
|
||||
|
||||
private void AlignTop_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.AlignSelected(AlignType.Top);
|
||||
}
|
||||
|
||||
private void AlignBottom_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.AlignSelected(AlignType.Bottom);
|
||||
}
|
||||
|
||||
private void AlignVertical_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.AlignSelected(AlignType.Vertically);
|
||||
}
|
||||
|
||||
private void AlignHorizontal_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.AlignSelected(AlignType.Horizontally);
|
||||
}
|
||||
|
||||
private void EvenlySpaceHorizontally_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.AlignSelected(AlignType.EvenlySpaceHorizontally);
|
||||
}
|
||||
|
||||
private void EvenlySpaceVertically_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.PlateView.AlignSelected(AlignType.EvenlySpaceVertically);
|
||||
}
|
||||
|
||||
#endregion Tools Menu Events
|
||||
|
||||
#region Nest Menu Events
|
||||
|
||||
private void Import_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.Import();
|
||||
}
|
||||
|
||||
private void EditNest_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.ShowNestInfoEditor();
|
||||
}
|
||||
|
||||
private void RemoveEmptyPlates_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.Nest.Plates.RemoveEmptyPlates();
|
||||
}
|
||||
|
||||
private void LoadFirstPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.LoadFirstPlate();
|
||||
}
|
||||
|
||||
private void LoadLastPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.LoadLastPlate();
|
||||
}
|
||||
|
||||
private void LoadPreviousPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.LoadPreviousPlate();
|
||||
}
|
||||
|
||||
private void LoadNextPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.LoadNextPlate();
|
||||
}
|
||||
|
||||
private void RunAutoNest_Click(object sender, EventArgs e)
|
||||
{
|
||||
var form = new AutoNestForm(activeForm.Nest);
|
||||
form.AllowPlateCreation = true;
|
||||
|
||||
if (form.ShowDialog() != System.Windows.Forms.DialogResult.OK)
|
||||
return;
|
||||
|
||||
var items = form.GetNestItems();
|
||||
var qty = new int[items.Count];
|
||||
|
||||
while (true)
|
||||
{
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
qty[i] = items[i].Drawing.Quantity.Remaining;
|
||||
|
||||
var plate = activeForm.PlateView.Plate.Parts.Count > 0
|
||||
? activeForm.Nest.CreatePlate()
|
||||
: activeForm.PlateView.Plate;
|
||||
|
||||
var engine = new NestEngine(plate);
|
||||
|
||||
if (!engine.Pack(items))
|
||||
break;
|
||||
|
||||
activeForm.Nest.UpdateDrawingQuantities();
|
||||
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
items[i].Quantity -= qty[i] - items[i].Drawing.Quantity.Remaining;
|
||||
}
|
||||
}
|
||||
|
||||
private void SequenceAllPlates_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null)
|
||||
return;
|
||||
|
||||
activeForm.AutoSequenceAllPlates();
|
||||
}
|
||||
|
||||
private void PostProcessor_Click(object sender, EventArgs e)
|
||||
{
|
||||
var menuItem = (ToolStripMenuItem)sender;
|
||||
var postProcessor = menuItem.Tag as IPostProcessor;
|
||||
|
||||
if (postProcessor == null)
|
||||
return;
|
||||
|
||||
var dialog = new SaveFileDialog();
|
||||
dialog.Filter = "CNC File (*.cnc) | *.cnc";
|
||||
dialog.FileName = activeForm.Nest.Name;
|
||||
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var path = dialog.FileName;
|
||||
postProcessor.Post(activeForm.Nest, path);
|
||||
}
|
||||
}
|
||||
|
||||
private void CalculateNestCutTime_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null)
|
||||
return;
|
||||
|
||||
activeForm.CalculateNestCutTime();
|
||||
}
|
||||
|
||||
#endregion Nest Menu Events
|
||||
|
||||
#region Plate Menu Events
|
||||
|
||||
private void SetAsNestDefault_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.SetCurrentPlateAsNestDefault();
|
||||
}
|
||||
|
||||
private void FillPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null)
|
||||
return;
|
||||
|
||||
if (activeForm.Nest.Drawings.Count == 0)
|
||||
return;
|
||||
|
||||
var form = new FillPlateForm(activeForm.Nest.Drawings);
|
||||
form.ShowDialog();
|
||||
|
||||
var drawing = form.SelectedDrawing;
|
||||
|
||||
if (drawing == null)
|
||||
return;
|
||||
|
||||
var engine = new NestEngine(activeForm.PlateView.Plate);
|
||||
engine.Fill(new NestItem
|
||||
{
|
||||
Drawing = drawing
|
||||
});
|
||||
|
||||
activeForm.PlateView.Invalidate();
|
||||
}
|
||||
|
||||
private void FillArea_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null)
|
||||
return;
|
||||
|
||||
if (activeForm.Nest.Drawings.Count == 0)
|
||||
return;
|
||||
|
||||
var form = new FillPlateForm(activeForm.Nest.Drawings);
|
||||
form.ShowDialog();
|
||||
|
||||
var drawing = form.SelectedDrawing;
|
||||
|
||||
if (drawing == null)
|
||||
return;
|
||||
|
||||
activeForm.PlateView.SetAction(typeof(ActionFillArea), drawing);
|
||||
}
|
||||
|
||||
private void AddPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.Nest.CreatePlate();
|
||||
NavigationEnableCheck();
|
||||
}
|
||||
|
||||
private void EditPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.EditPlate();
|
||||
}
|
||||
|
||||
private void RemovePlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.RemoveCurrentPlate();
|
||||
}
|
||||
|
||||
private void ResizeToFitParts_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.ResizePlateToFitParts();
|
||||
UpdatePlateStatus();
|
||||
}
|
||||
|
||||
private void RotateCw_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.RotateCw();
|
||||
}
|
||||
|
||||
private void RotateCcw_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.RotateCcw();
|
||||
}
|
||||
|
||||
private void Rotate180_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.Rotate180();
|
||||
}
|
||||
|
||||
private void OpenInExternalCad_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null) return;
|
||||
activeForm.OpenCurrentPlate();
|
||||
}
|
||||
|
||||
private void CalculatePlateCutTime_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null)
|
||||
return;
|
||||
|
||||
activeForm.CalculateCurrentPlateCutTime();
|
||||
}
|
||||
|
||||
private void AutoSequenceCurrentPlate_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null)
|
||||
return;
|
||||
|
||||
activeForm.AutoSequenceCurrentPlate();
|
||||
}
|
||||
|
||||
private void ManualSequenceParts_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (activeForm == null || activeForm.PlateView.Plate.Parts.Count < 2)
|
||||
return;
|
||||
|
||||
activeForm.PlateView.SetAction(typeof(ActionSetSequence));
|
||||
}
|
||||
|
||||
#endregion Plate Menu Events
|
||||
|
||||
#region Window Menu Events
|
||||
|
||||
private void TileVertical_Click(object sender, EventArgs e)
|
||||
{
|
||||
LayoutMdi(MdiLayout.TileVertical);
|
||||
}
|
||||
|
||||
private void TileHorizontal_Click(object sender, EventArgs e)
|
||||
{
|
||||
LayoutMdi(MdiLayout.TileHorizontal);
|
||||
}
|
||||
|
||||
private void CascadeWindows_Click(object sender, EventArgs e)
|
||||
{
|
||||
LayoutMdi(MdiLayout.Cascade);
|
||||
}
|
||||
|
||||
private void Close_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ActiveMdiChild != null)
|
||||
ActiveMdiChild.Close();
|
||||
}
|
||||
|
||||
private void CloseAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (var mdiChild in MdiChildren)
|
||||
mdiChild.Close();
|
||||
}
|
||||
|
||||
#endregion Window Menu Events
|
||||
|
||||
#region Statusbar Events
|
||||
|
||||
private void LocationStatusLabel_Click(object sender, EventArgs e)
|
||||
{
|
||||
clickUpdateLocation = !clickUpdateLocation;
|
||||
UpdateLocationMode();
|
||||
}
|
||||
|
||||
#endregion Statusbar Events
|
||||
|
||||
#region PlateView Events
|
||||
|
||||
private void PlateView_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
UpdateLocationStatus();
|
||||
}
|
||||
|
||||
private void PlateView_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
UpdateLocationStatus();
|
||||
}
|
||||
|
||||
private void PlateView_StatusChanged(object sender, EventArgs e)
|
||||
{
|
||||
statusLabel1.Text = activeForm.PlateView.Status;
|
||||
}
|
||||
|
||||
#endregion PlateView Events
|
||||
|
||||
private void centerPartsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var plateCenter = this.activeForm.PlateView.Plate.BoundingBox(false).Center;
|
||||
var partsCenter = this.activeForm.PlateView.Parts.GetBoundingBox().Center;
|
||||
|
||||
var offset = plateCenter - partsCenter;
|
||||
|
||||
foreach (var part in this.activeForm.PlateView.Parts)
|
||||
{
|
||||
part.Offset(offset);
|
||||
}
|
||||
|
||||
activeForm.PlateView.Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>126, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>236, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>59</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,256 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class OptionsForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.numericUpDown1 = new OpenNest.Controls.NumericUpDown();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.numericUpDown2 = new OpenNest.Controls.NumericUpDown();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.saveButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.bottomPanel1 = new OpenNest.Controls.BottomPanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
|
||||
this.bottomPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.checkBox1, 2);
|
||||
this.checkBox1.Location = new System.Drawing.Point(3, 130);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(281, 20);
|
||||
this.checkBox1.TabIndex = 7;
|
||||
this.checkBox1.Text = "Create a new nest on startup";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 52);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(145, 16);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "Auto-size plate factor:";
|
||||
//
|
||||
// numericUpDown1
|
||||
//
|
||||
this.numericUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDown1.DecimalPlaces = 4;
|
||||
this.numericUpDown1.Increment = new decimal(new int[] {
|
||||
125,
|
||||
0,
|
||||
0,
|
||||
196608});
|
||||
this.numericUpDown1.Location = new System.Drawing.Point(154, 49);
|
||||
this.numericUpDown1.Name = "numericUpDown1";
|
||||
this.numericUpDown1.Size = new System.Drawing.Size(130, 22);
|
||||
this.numericUpDown1.Suffix = "";
|
||||
this.numericUpDown1.TabIndex = 4;
|
||||
this.toolTip1.SetToolTip(this.numericUpDown1, "The amount to round the plate size up.");
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(3, 92);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(145, 16);
|
||||
this.label2.TabIndex = 5;
|
||||
this.label2.Text = "Import spline precision:\r\n";
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 4;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 297F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.textBox1, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label3, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.checkBox1, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.numericUpDown2, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.numericUpDown1, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.button1, 3, 0);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 12);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 4;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(684, 160);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.textBox1, 2);
|
||||
this.textBox1.Location = new System.Drawing.Point(154, 9);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(427, 22);
|
||||
this.textBox1.TabIndex = 1;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(3, 12);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(145, 16);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "Nest Template Path:";
|
||||
//
|
||||
// numericUpDown2
|
||||
//
|
||||
this.numericUpDown2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDown2.Location = new System.Drawing.Point(154, 89);
|
||||
this.numericUpDown2.Maximum = new decimal(new int[] {
|
||||
360,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown2.Minimum = new decimal(new int[] {
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown2.Name = "numericUpDown2";
|
||||
this.numericUpDown2.Size = new System.Drawing.Size(130, 22);
|
||||
this.numericUpDown2.Suffix = "";
|
||||
this.numericUpDown2.TabIndex = 6;
|
||||
this.numericUpDown2.Value = new decimal(new int[] {
|
||||
200,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.Location = new System.Drawing.Point(588, 6);
|
||||
this.button1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(92, 28);
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "Browse...";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.BrowseNestTemplatePath_Click);
|
||||
//
|
||||
// saveButton
|
||||
//
|
||||
this.saveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.saveButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.saveButton.Location = new System.Drawing.Point(507, 11);
|
||||
this.saveButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.saveButton.Name = "saveButton";
|
||||
this.saveButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.saveButton.TabIndex = 0;
|
||||
this.saveButton.Text = "Save";
|
||||
this.saveButton.UseVisualStyleBackColor = true;
|
||||
this.saveButton.Click += new System.EventHandler(this.SaveSettings_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(605, 11);
|
||||
this.cancelButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(90, 28);
|
||||
this.cancelButton.TabIndex = 1;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bottomPanel1
|
||||
//
|
||||
this.bottomPanel1.Controls.Add(this.cancelButton);
|
||||
this.bottomPanel1.Controls.Add(this.saveButton);
|
||||
this.bottomPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.bottomPanel1.Location = new System.Drawing.Point(0, 368);
|
||||
this.bottomPanel1.Name = "bottomPanel1";
|
||||
this.bottomPanel1.Size = new System.Drawing.Size(708, 50);
|
||||
this.bottomPanel1.TabIndex = 1;
|
||||
//
|
||||
// OptionsForm
|
||||
//
|
||||
this.AcceptButton = this.saveButton;
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(708, 418);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.bottomPanel1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "OptionsForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Options";
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
|
||||
this.bottomPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button saveButton;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private Controls.NumericUpDown numericUpDown1;
|
||||
private System.Windows.Forms.ToolTip toolTip1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private Controls.NumericUpDown numericUpDown2;
|
||||
private Controls.BottomPanel bottomPanel1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Properties;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class OptionsForm : Form
|
||||
{
|
||||
public OptionsForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnLoad(System.EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
LoadSettings();
|
||||
}
|
||||
|
||||
private void LoadSettings()
|
||||
{
|
||||
textBox1.Text = Settings.Default.NestTemplatePath;
|
||||
checkBox1.Checked = Settings.Default.CreateNewNestOnOpen;
|
||||
numericUpDown1.Value = (decimal)Settings.Default.AutoSizePlateFactor;
|
||||
numericUpDown2.Value = (decimal)Settings.Default.ImportSplinePrecision;
|
||||
}
|
||||
|
||||
private void SaveSettings()
|
||||
{
|
||||
Settings.Default.NestTemplatePath = textBox1.Text;
|
||||
Settings.Default.CreateNewNestOnOpen = checkBox1.Checked;
|
||||
Settings.Default.AutoSizePlateFactor = (double)numericUpDown1.Value;
|
||||
Settings.Default.ImportSplinePrecision = (int)numericUpDown2.Value;
|
||||
Settings.Default.Save();
|
||||
}
|
||||
|
||||
private void SaveSettings_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
private void BrowseNestTemplatePath_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
var dlg = new OpenFileDialog();
|
||||
dlg.Filter = "Template File|*.nstdot";
|
||||
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
textBox1.Text = dlg.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,111 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class SequenceForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.numericUpDown1 = new OpenNest.Controls.NumericUpDown();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.numericUpDown1, 1, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 1;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(220, 36);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 11);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(62, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Sequence :";
|
||||
//
|
||||
// numericUpDown1
|
||||
//
|
||||
this.numericUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDown1.Location = new System.Drawing.Point(71, 8);
|
||||
this.numericUpDown1.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown1.Name = "numericUpDown1";
|
||||
this.numericUpDown1.Size = new System.Drawing.Size(146, 20);
|
||||
this.numericUpDown1.TabIndex = 1;
|
||||
this.numericUpDown1.Value = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDown1.Leave += new System.EventHandler(this.numericUpDown1_Leave);
|
||||
//
|
||||
// SequenceForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(220, 36);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Location = new System.Drawing.Point(100, 100);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SequenceForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||
this.Text = "Set Sequence";
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
public Controls.NumericUpDown numericUpDown1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class SequenceForm : Form
|
||||
{
|
||||
public SequenceForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void numericUpDown1_Leave(object sender, EventArgs e)
|
||||
{
|
||||
numericUpDown1.Validate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,122 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class SetValueForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.buttonSet = new System.Windows.Forms.Button();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.labelIncrement = new System.Windows.Forms.Label();
|
||||
this.numericUpDownValue = new OpenNest.Controls.NumericUpDown();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownValue)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonSet
|
||||
//
|
||||
this.buttonSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonSet.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonSet.Location = new System.Drawing.Point(256, 6);
|
||||
this.buttonSet.Name = "buttonSet";
|
||||
this.buttonSet.Size = new System.Drawing.Size(85, 28);
|
||||
this.buttonSet.TabIndex = 2;
|
||||
this.buttonSet.Text = "Set";
|
||||
this.buttonSet.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 3;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.Controls.Add(this.buttonSet, 2, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.labelIncrement, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.numericUpDownValue, 1, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 5);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 1;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(344, 41);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// labelIncrement
|
||||
//
|
||||
this.labelIncrement.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelIncrement.AutoSize = true;
|
||||
this.labelIncrement.Location = new System.Drawing.Point(3, 12);
|
||||
this.labelIncrement.Name = "labelIncrement";
|
||||
this.labelIncrement.Size = new System.Drawing.Size(72, 16);
|
||||
this.labelIncrement.TabIndex = 0;
|
||||
this.labelIncrement.Text = "Increment :";
|
||||
this.labelIncrement.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// numericUpDownValue
|
||||
//
|
||||
this.numericUpDownValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.numericUpDownValue.DecimalPlaces = 4;
|
||||
this.numericUpDownValue.Location = new System.Drawing.Point(80, 9);
|
||||
this.numericUpDownValue.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.numericUpDownValue.Maximum = new decimal(new int[] {
|
||||
999999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDownValue.Name = "numericUpDownValue";
|
||||
this.numericUpDownValue.Size = new System.Drawing.Size(171, 22);
|
||||
this.numericUpDownValue.TabIndex = 1;
|
||||
//
|
||||
// SetValueForm
|
||||
//
|
||||
this.AcceptButton = this.buttonSet;
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(356, 51);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SetValueForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(6, 5, 6, 5);
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownValue)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button buttonSet;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label labelIncrement;
|
||||
private Controls.NumericUpDown numericUpDownValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class SetValueForm : Form
|
||||
{
|
||||
public SetValueForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override bool ProcessDialogKey(Keys keyData)
|
||||
{
|
||||
switch (keyData)
|
||||
{
|
||||
case Keys.Escape:
|
||||
Close();
|
||||
break;
|
||||
}
|
||||
|
||||
return base.ProcessDialogKey(keyData);
|
||||
}
|
||||
|
||||
public double Minimum
|
||||
{
|
||||
get { return (double)numericUpDownValue.Minimum; }
|
||||
set { numericUpDownValue.Minimum = (decimal)value; }
|
||||
}
|
||||
|
||||
public double Maximum
|
||||
{
|
||||
get { return (double)numericUpDownValue.Maximum; }
|
||||
set { numericUpDownValue.Maximum = (decimal)value; }
|
||||
}
|
||||
|
||||
public double Increment
|
||||
{
|
||||
get { return (double)numericUpDownValue.Increment; }
|
||||
set { numericUpDownValue.Increment = (decimal)value; }
|
||||
}
|
||||
|
||||
public double Value
|
||||
{
|
||||
get { return (double)numericUpDownValue.Value; }
|
||||
set { numericUpDownValue.Value = (decimal)value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,360 @@
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
partial class TimingForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.horizontalLine2 = new OpenNest.Controls.HorizontalLine();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.cutTimeLabel = new System.Windows.Forms.Label();
|
||||
this.cutDistanceLabel = new System.Windows.Forms.Label();
|
||||
this.rapidDistanceLabel = new System.Windows.Forms.Label();
|
||||
this.interectionsLabel = new System.Windows.Forms.Label();
|
||||
this.piercesLabel = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.feedrateLabel = new System.Windows.Forms.Label();
|
||||
this.rapidLabel = new System.Windows.Forms.Label();
|
||||
this.pierceTimeLabel = new System.Windows.Forms.Label();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.bottomPanel1 = new OpenNest.Controls.BottomPanel();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.bottomPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 2;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.horizontalLine2, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label4, 0, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label3, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.cutTimeLabel, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.cutDistanceLabel, 1, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.rapidDistanceLabel, 1, 2);
|
||||
this.tableLayoutPanel1.Controls.Add(this.interectionsLabel, 1, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.piercesLabel, 1, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label6, 0, 6);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label7, 0, 7);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label8, 0, 8);
|
||||
this.tableLayoutPanel1.Controls.Add(this.feedrateLabel, 1, 6);
|
||||
this.tableLayoutPanel1.Controls.Add(this.rapidLabel, 1, 7);
|
||||
this.tableLayoutPanel1.Controls.Add(this.pierceTimeLabel, 1, 8);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.tableLayoutPanel1.RowCount = 10;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 11.11111F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(340, 319);
|
||||
this.tableLayoutPanel1.TabIndex = 1;
|
||||
//
|
||||
// horizontalLine2
|
||||
//
|
||||
this.horizontalLine2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.horizontalLine2, 2);
|
||||
this.horizontalLine2.Location = new System.Drawing.Point(9, 176);
|
||||
this.horizontalLine2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.horizontalLine2.Name = "horizontalLine2";
|
||||
this.horizontalLine2.Size = new System.Drawing.Size(322, 10);
|
||||
this.horizontalLine2.TabIndex = 3;
|
||||
this.horizontalLine2.Text = "horizontalLine1";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(9, 13);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(113, 16);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Cut Time :";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(9, 45);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(113, 16);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "Cut Distance :\r\n";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(9, 77);
|
||||
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(113, 16);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "Rapid Distance :";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(9, 141);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(113, 16);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "# of Pierces :";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(9, 109);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(113, 16);
|
||||
this.label5.TabIndex = 0;
|
||||
this.label5.Text = "# of Intersections :";
|
||||
//
|
||||
// cutTimeLabel
|
||||
//
|
||||
this.cutTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cutTimeLabel.AutoSize = true;
|
||||
this.cutTimeLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cutTimeLabel.Location = new System.Drawing.Point(130, 13);
|
||||
this.cutTimeLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.cutTimeLabel.Name = "cutTimeLabel";
|
||||
this.cutTimeLabel.Size = new System.Drawing.Size(201, 16);
|
||||
this.cutTimeLabel.TabIndex = 0;
|
||||
this.cutTimeLabel.Text = "-----";
|
||||
//
|
||||
// cutDistanceLabel
|
||||
//
|
||||
this.cutDistanceLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cutDistanceLabel.AutoSize = true;
|
||||
this.cutDistanceLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cutDistanceLabel.Location = new System.Drawing.Point(130, 45);
|
||||
this.cutDistanceLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.cutDistanceLabel.Name = "cutDistanceLabel";
|
||||
this.cutDistanceLabel.Size = new System.Drawing.Size(201, 16);
|
||||
this.cutDistanceLabel.TabIndex = 0;
|
||||
this.cutDistanceLabel.Text = "-----";
|
||||
//
|
||||
// rapidDistanceLabel
|
||||
//
|
||||
this.rapidDistanceLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.rapidDistanceLabel.AutoSize = true;
|
||||
this.rapidDistanceLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.rapidDistanceLabel.Location = new System.Drawing.Point(130, 77);
|
||||
this.rapidDistanceLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.rapidDistanceLabel.Name = "rapidDistanceLabel";
|
||||
this.rapidDistanceLabel.Size = new System.Drawing.Size(201, 16);
|
||||
this.rapidDistanceLabel.TabIndex = 0;
|
||||
this.rapidDistanceLabel.Text = "-----";
|
||||
//
|
||||
// interectionsLabel
|
||||
//
|
||||
this.interectionsLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.interectionsLabel.AutoSize = true;
|
||||
this.interectionsLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.interectionsLabel.Location = new System.Drawing.Point(130, 109);
|
||||
this.interectionsLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.interectionsLabel.Name = "interectionsLabel";
|
||||
this.interectionsLabel.Size = new System.Drawing.Size(201, 16);
|
||||
this.interectionsLabel.TabIndex = 0;
|
||||
this.interectionsLabel.Text = "-----";
|
||||
//
|
||||
// piercesLabel
|
||||
//
|
||||
this.piercesLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.piercesLabel.AutoSize = true;
|
||||
this.piercesLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.piercesLabel.Location = new System.Drawing.Point(130, 141);
|
||||
this.piercesLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.piercesLabel.Name = "piercesLabel";
|
||||
this.piercesLabel.Size = new System.Drawing.Size(201, 16);
|
||||
this.piercesLabel.TabIndex = 0;
|
||||
this.piercesLabel.Text = "-----";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(9, 205);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(113, 16);
|
||||
this.label6.TabIndex = 0;
|
||||
this.label6.Text = "Feedrate :";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(9, 237);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(113, 16);
|
||||
this.label7.TabIndex = 0;
|
||||
this.label7.Text = "Rapid Feedrate :";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(9, 269);
|
||||
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(113, 16);
|
||||
this.label8.TabIndex = 0;
|
||||
this.label8.Text = "Pierce Time :";
|
||||
//
|
||||
// feedrateLabel
|
||||
//
|
||||
this.feedrateLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.feedrateLabel.AutoSize = true;
|
||||
this.feedrateLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.feedrateLabel.Location = new System.Drawing.Point(130, 205);
|
||||
this.feedrateLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.feedrateLabel.Name = "feedrateLabel";
|
||||
this.feedrateLabel.Size = new System.Drawing.Size(201, 16);
|
||||
this.feedrateLabel.TabIndex = 0;
|
||||
this.feedrateLabel.Text = "-----";
|
||||
//
|
||||
// rapidLabel
|
||||
//
|
||||
this.rapidLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.rapidLabel.AutoSize = true;
|
||||
this.rapidLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.rapidLabel.Location = new System.Drawing.Point(130, 237);
|
||||
this.rapidLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.rapidLabel.Name = "rapidLabel";
|
||||
this.rapidLabel.Size = new System.Drawing.Size(201, 16);
|
||||
this.rapidLabel.TabIndex = 0;
|
||||
this.rapidLabel.Text = "-----";
|
||||
//
|
||||
// pierceTimeLabel
|
||||
//
|
||||
this.pierceTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pierceTimeLabel.AutoSize = true;
|
||||
this.pierceTimeLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.pierceTimeLabel.Location = new System.Drawing.Point(130, 269);
|
||||
this.pierceTimeLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.pierceTimeLabel.Name = "pierceTimeLabel";
|
||||
this.pierceTimeLabel.Size = new System.Drawing.Size(201, 16);
|
||||
this.pierceTimeLabel.TabIndex = 0;
|
||||
this.pierceTimeLabel.Text = "-----";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.button1.Location = new System.Drawing.Point(237, 11);
|
||||
this.button1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(90, 28);
|
||||
this.button1.TabIndex = 4;
|
||||
this.button1.Text = "Close";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// bottomPanel1
|
||||
//
|
||||
this.bottomPanel1.Controls.Add(this.button1);
|
||||
this.bottomPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.bottomPanel1.Location = new System.Drawing.Point(0, 319);
|
||||
this.bottomPanel1.Name = "bottomPanel1";
|
||||
this.bottomPanel1.Size = new System.Drawing.Size(340, 50);
|
||||
this.bottomPanel1.TabIndex = 5;
|
||||
//
|
||||
// TimingForm
|
||||
//
|
||||
this.AcceptButton = this.button1;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.button1;
|
||||
this.ClientSize = new System.Drawing.Size(340, 369);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Controls.Add(this.bottomPanel1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "TimingForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Timing Information";
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
this.bottomPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label cutTimeLabel;
|
||||
private System.Windows.Forms.Label cutDistanceLabel;
|
||||
private System.Windows.Forms.Label rapidDistanceLabel;
|
||||
private System.Windows.Forms.Label interectionsLabel;
|
||||
private System.Windows.Forms.Label piercesLabel;
|
||||
private Controls.HorizontalLine horizontalLine2;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.Label feedrateLabel;
|
||||
private System.Windows.Forms.Label rapidLabel;
|
||||
private System.Windows.Forms.Label pierceTimeLabel;
|
||||
private Controls.BottomPanel bottomPanel1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest.Forms
|
||||
{
|
||||
public partial class TimingForm : Form
|
||||
{
|
||||
public TimingForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public Units Units { get; set; }
|
||||
|
||||
public void SetCutTime(TimeSpan timeSpan)
|
||||
{
|
||||
cutTimeLabel.Text = GetTimeMsg(timeSpan);
|
||||
}
|
||||
|
||||
public void SetCutDistance(double dist)
|
||||
{
|
||||
cutDistanceLabel.Text = string.Format("{0} {1}", Math.Round(dist, 4), UnitsHelper.GetShortString(Units));
|
||||
}
|
||||
|
||||
public void SetRapidDistance(double dist)
|
||||
{
|
||||
rapidDistanceLabel.Text = string.Format("{0} {1}", Math.Round(dist, 4), UnitsHelper.GetShortString(Units));
|
||||
}
|
||||
|
||||
public void SetIntersectionCount(int count)
|
||||
{
|
||||
interectionsLabel.Text = count.ToString();
|
||||
}
|
||||
|
||||
public void SetPierceCount(int count)
|
||||
{
|
||||
piercesLabel.Text = count.ToString();
|
||||
}
|
||||
|
||||
public void SetCutParameters(CutParameters cutparams)
|
||||
{
|
||||
feedrateLabel.Text = string.Format("{0} {1}/{2}", cutparams.Feedrate, UnitsHelper.GetShortString(Units), UnitsHelper.GetShortTimeUnit(Units));
|
||||
rapidLabel.Text = string.Format("{0} {1}/{2}", cutparams.RapidTravelRate, UnitsHelper.GetShortString(Units), UnitsHelper.GetShortTimeUnit(Units));
|
||||
pierceTimeLabel.Text = GetTimeMsg(cutparams.PierceTime);
|
||||
}
|
||||
|
||||
public static string GetTimeMsg(TimeSpan time)
|
||||
{
|
||||
int hrs = time.Days * 24 + time.Hours;
|
||||
int min = time.Minutes;
|
||||
int sec = time.Seconds;
|
||||
|
||||
string msg = string.Empty;
|
||||
|
||||
if (hrs > 0)
|
||||
{
|
||||
msg += hrs.ToString() + "h ";
|
||||
msg += min.ToString().PadLeft(2, '0') + "m ";
|
||||
msg += sec.ToString().PadLeft(2, '0') + "s";
|
||||
}
|
||||
else if (min > 0)
|
||||
{
|
||||
msg += min.ToString().PadLeft(2, '0') + "m ";
|
||||
msg += sec.ToString().PadLeft(2, '0') + "s";
|
||||
}
|
||||
else
|
||||
msg += time.TotalSeconds.ToString("n0").PadLeft(2, '0') + "s";
|
||||
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,307 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using OpenNest.CNC;
|
||||
using OpenNest.Geometry;
|
||||
|
||||
namespace OpenNest
|
||||
{
|
||||
internal static class GraphicsHelper
|
||||
{
|
||||
public static GraphicsPath GetGraphicsPath(this Program pgm)
|
||||
{
|
||||
var path = new GraphicsPath();
|
||||
var curpos = Vector.Zero;
|
||||
|
||||
AddProgram(path, pgm, pgm.Mode, ref curpos);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath GetGraphicsPath(this Program pgm, Vector origin)
|
||||
{
|
||||
var path = new GraphicsPath();
|
||||
var curpos = origin;
|
||||
|
||||
AddProgram(path, pgm, pgm.Mode, ref curpos);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public static GraphicsPath GetGraphicsPath(this Shape shape)
|
||||
{
|
||||
var path = new GraphicsPath();
|
||||
|
||||
AddShape(path, shape);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public static Image GetImage(this Program pgm, System.Drawing.Size size)
|
||||
{
|
||||
return pgm.GetImage(size, Pens.Black, null);
|
||||
}
|
||||
|
||||
public static Image GetImage(this Program pgm, System.Drawing.Size size, Pen pen)
|
||||
{
|
||||
return pgm.GetImage(size, pen, null);
|
||||
}
|
||||
|
||||
public static Image GetImage(this Program pgm, System.Drawing.Size size, Pen pen, Brush brush)
|
||||
{
|
||||
var img = new Bitmap(size.Width, size.Height);
|
||||
var path = pgm.GetGraphicsPath();
|
||||
var bounds = path.GetBounds();
|
||||
|
||||
var scalex = (size.Height - 10) / bounds.Height;
|
||||
var scaley = (size.Width - 10) / bounds.Width;
|
||||
var scale = scalex < scaley ? scalex : scaley;
|
||||
|
||||
var matrix = new Matrix();
|
||||
matrix.Scale(scale, -scale);
|
||||
|
||||
path.Transform(matrix);
|
||||
|
||||
bounds = path.GetBounds();
|
||||
|
||||
var offset = new PointF(
|
||||
(size.Width - bounds.Width) * 0.5f - bounds.X,
|
||||
(size.Height - bounds.Height) * 0.5f - bounds.Y);
|
||||
|
||||
var graphics = Graphics.FromImage(img);
|
||||
graphics.TranslateTransform(offset.X, offset.Y);
|
||||
|
||||
if (brush != null)
|
||||
graphics.FillPath(brush, path);
|
||||
|
||||
if (pen == null)
|
||||
pen = Pens.Black;
|
||||
|
||||
graphics.DrawPath(pen, path);
|
||||
|
||||
matrix.Dispose();
|
||||
graphics.Dispose();
|
||||
|
||||
return img;
|
||||
}
|
||||
|
||||
private static void AddArc(GraphicsPath path, CircularMove arc, Mode mode, ref Vector curpos)
|
||||
{
|
||||
var endpt = arc.EndPoint;
|
||||
var center = arc.CenterPoint;
|
||||
|
||||
if (mode == Mode.Incremental)
|
||||
{
|
||||
endpt += curpos;
|
||||
center += curpos;
|
||||
}
|
||||
|
||||
// start angle in degrees
|
||||
var startAngle = Angle.ToDegrees(Math.Atan2(
|
||||
curpos.Y - center.Y,
|
||||
curpos.X - center.X));
|
||||
|
||||
// end angle in degrees
|
||||
var endAngle = Angle.ToDegrees(Math.Atan2(
|
||||
endpt.Y - center.Y,
|
||||
endpt.X - center.X));
|
||||
|
||||
endAngle = Angle.NormalizeDeg(endAngle);
|
||||
startAngle = Angle.NormalizeDeg(startAngle);
|
||||
|
||||
if (arc.Rotation == RotationType.CCW && endAngle < startAngle)
|
||||
endAngle += 360.0;
|
||||
else if (arc.Rotation == RotationType.CW && startAngle < endAngle)
|
||||
startAngle += 360.0;
|
||||
|
||||
var dx = endpt.X - center.X;
|
||||
var dy = endpt.Y - center.Y;
|
||||
|
||||
var radius = Math.Sqrt(dx * dx + dy * dy);
|
||||
|
||||
var pt = new PointF((float)(center.X - radius), (float)(center.Y - radius));
|
||||
var size = (float)(radius * 2.0);
|
||||
|
||||
if (startAngle.IsEqualTo(endAngle))
|
||||
{
|
||||
path.AddEllipse(pt.X, pt.Y, size, size);
|
||||
}
|
||||
else
|
||||
{
|
||||
var sweepAngle = (endAngle - startAngle);
|
||||
|
||||
path.AddArc(
|
||||
pt.X, pt.Y,
|
||||
size, size,
|
||||
(float)startAngle,
|
||||
(float)sweepAngle);
|
||||
|
||||
if (arc.Layer == LayerType.Leadin || arc.Layer == LayerType.Leadout)
|
||||
{
|
||||
path.AddArc(pt.X, pt.Y, size, size, (float)(-startAngle + sweepAngle), (float)-sweepAngle);
|
||||
path.CloseFigure();
|
||||
}
|
||||
}
|
||||
|
||||
curpos = endpt;
|
||||
}
|
||||
|
||||
private static void AddLine(GraphicsPath path, LinearMove line, Mode mode, ref Vector curpos)
|
||||
{
|
||||
var pt = line.EndPoint;
|
||||
|
||||
if (mode == Mode.Incremental)
|
||||
pt += curpos;
|
||||
|
||||
var pt1 = new PointF((float)curpos.X, (float)curpos.Y);
|
||||
var pt2 = new PointF((float)pt.X, (float)pt.Y);
|
||||
|
||||
path.AddLine(pt1, pt2);
|
||||
|
||||
if (line.Layer == LayerType.Leadin || line.Layer == LayerType.Leadout)
|
||||
path.CloseFigure();
|
||||
|
||||
curpos = pt;
|
||||
}
|
||||
|
||||
private static void AddLine(GraphicsPath path, RapidMove line, Mode mode, ref Vector curpos)
|
||||
{
|
||||
var pt = line.EndPoint;
|
||||
|
||||
if (mode == Mode.Incremental)
|
||||
pt += curpos;
|
||||
|
||||
path.CloseFigure();
|
||||
|
||||
curpos = pt;
|
||||
}
|
||||
|
||||
private static void AddProgram(GraphicsPath path, Program pgm, Mode mode, ref Vector curpos)
|
||||
{
|
||||
mode = pgm.Mode;
|
||||
|
||||
for (int i = 0; i < pgm.Length; ++i)
|
||||
{
|
||||
var code = pgm[i];
|
||||
|
||||
switch (code.Type)
|
||||
{
|
||||
case CodeType.CircularMove:
|
||||
AddArc(path, (CircularMove)code, mode, ref curpos);
|
||||
break;
|
||||
|
||||
case CodeType.LinearMove:
|
||||
AddLine(path, (LinearMove)code, mode, ref curpos);
|
||||
break;
|
||||
|
||||
case CodeType.RapidMove:
|
||||
AddLine(path, (RapidMove)code, mode, ref curpos);
|
||||
break;
|
||||
|
||||
case CodeType.SubProgramCall:
|
||||
{
|
||||
var tmpmode = mode;
|
||||
var subpgm = (SubProgramCall)code;
|
||||
|
||||
if (subpgm.Program != null)
|
||||
{
|
||||
path.StartFigure();
|
||||
AddProgram(path, subpgm.Program, mode, ref curpos);
|
||||
}
|
||||
|
||||
mode = tmpmode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddArc(GraphicsPath path, Arc arc)
|
||||
{
|
||||
var diameter = arc.Diameter;
|
||||
|
||||
var endAngle = Angle.NormalizeDeg(Angle.ToDegrees(arc.EndAngle));
|
||||
var startAngle = Angle.NormalizeDeg(Angle.ToDegrees(arc.StartAngle));
|
||||
|
||||
if (arc.Rotation == RotationType.CCW && endAngle < startAngle)
|
||||
endAngle += 360.0;
|
||||
else if (arc.Rotation == RotationType.CW && startAngle < endAngle)
|
||||
startAngle += 360.0;
|
||||
|
||||
var sweepAngle = (endAngle - startAngle);
|
||||
|
||||
path.AddArc(
|
||||
(float)(arc.Center.X - arc.Radius),
|
||||
(float)(arc.Center.Y - arc.Radius),
|
||||
(float)diameter,
|
||||
(float)diameter,
|
||||
(float)(startAngle),
|
||||
(float)sweepAngle);
|
||||
}
|
||||
|
||||
private static void AddCircle(GraphicsPath path, Circle circle)
|
||||
{
|
||||
var diameter = circle.Diameter;
|
||||
|
||||
path.AddEllipse(
|
||||
(float)(circle.Center.X - circle.Radius),
|
||||
(float)(circle.Center.Y - circle.Radius),
|
||||
(float)diameter,
|
||||
(float)diameter);
|
||||
}
|
||||
|
||||
private static void AddLine(GraphicsPath path, Line line)
|
||||
{
|
||||
path.AddLine(
|
||||
(float)line.StartPoint.X,
|
||||
(float)line.StartPoint.Y,
|
||||
(float)line.EndPoint.X,
|
||||
(float)line.EndPoint.Y);
|
||||
}
|
||||
|
||||
private static void AddShape(GraphicsPath path, Shape shape)
|
||||
{
|
||||
foreach (var entity in shape.Entities)
|
||||
{
|
||||
switch (entity.Type)
|
||||
{
|
||||
case EntityType.Arc:
|
||||
AddArc(path, (Arc)entity);
|
||||
break;
|
||||
|
||||
case EntityType.Circle:
|
||||
AddCircle(path, (Circle)entity);
|
||||
break;
|
||||
|
||||
case EntityType.Line:
|
||||
AddLine(path, (Line)entity);
|
||||
break;
|
||||
|
||||
case EntityType.Polygon:
|
||||
AddPolygon(path, (Polygon)entity);
|
||||
break;
|
||||
|
||||
case EntityType.Shape:
|
||||
var subpath = new GraphicsPath();
|
||||
AddShape(subpath, (Shape)entity);
|
||||
path.AddPath(subpath, false);
|
||||
subpath.Dispose();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddPolygon(GraphicsPath path, Polygon polygon)
|
||||
{
|
||||
var pts = new PointF[polygon.Vertices.Count];
|
||||
|
||||
for (int i = 0; i < pts.Length; i++)
|
||||
{
|
||||
var pt = polygon.Vertices[i];
|
||||
pts[i] = new PointF((float)pt.X, (float)pt.Y);
|
||||
}
|
||||
|
||||
path.AddPolygon(pts);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using netDxf;
|
||||
using netDxf.Entities;
|
||||
using netDxf.Tables;
|
||||
using OpenNest.CNC;
|
||||
|
||||
namespace OpenNest.IO
|
||||
{
|
||||
using Layer = netDxf.Tables.Layer;
|
||||
using Line = netDxf.Entities.Line;
|
||||
|
||||
public class DxfExporter
|
||||
{
|
||||
private const double RadToDeg = 180.0 / Math.PI;
|
||||
|
||||
private DxfDocument doc;
|
||||
private Vector2 curpos;
|
||||
private Mode mode;
|
||||
private readonly Layer cutLayer;
|
||||
private readonly Layer rapidLayer;
|
||||
private readonly Layer plateLayer;
|
||||
|
||||
public DxfExporter()
|
||||
{
|
||||
doc = new DxfDocument();
|
||||
|
||||
cutLayer = new Layer("Cut");
|
||||
cutLayer.Color = AciColor.Red;
|
||||
|
||||
rapidLayer = new Layer("Rapid");
|
||||
rapidLayer.Color = AciColor.Blue;
|
||||
rapidLayer.Linetype = Linetype.Dashed;
|
||||
|
||||
plateLayer = new Layer("Plate");
|
||||
plateLayer.Color = AciColor.Cyan;
|
||||
}
|
||||
|
||||
public void ExportProgram(Program program, Stream stream)
|
||||
{
|
||||
doc = new DxfDocument();
|
||||
AddProgram(program);
|
||||
doc.Save(stream);
|
||||
}
|
||||
|
||||
public bool ExportProgram(Program program, string path)
|
||||
{
|
||||
Stream stream = null;
|
||||
bool success = false;
|
||||
|
||||
try
|
||||
{
|
||||
stream = File.Create(path);
|
||||
ExportProgram(program, stream);
|
||||
success = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.Fail("DxfExporter.ExportProgram failed to write program to file: " + path);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (stream != null)
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
public void ExportPlate(Plate plate, Stream stream)
|
||||
{
|
||||
doc = new DxfDocument();
|
||||
AddPlateOutline(plate);
|
||||
|
||||
foreach (var part in plate.Parts)
|
||||
{
|
||||
var endpt = part.Location.ToNetDxf();
|
||||
var line = new netDxf.Entities.Line(curpos, endpt);
|
||||
line.Layer = rapidLayer;
|
||||
doc.Entities.Add(line);
|
||||
curpos = part.Location.ToNetDxf();
|
||||
AddProgram(part.Program);
|
||||
}
|
||||
|
||||
doc.Save(stream);
|
||||
}
|
||||
|
||||
public bool ExportPlate(Plate plate, string path)
|
||||
{
|
||||
Stream stream = null;
|
||||
bool success = false;
|
||||
|
||||
try
|
||||
{
|
||||
stream = File.Create(path);
|
||||
ExportPlate(plate, stream);
|
||||
success = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.Fail("DxfExporter.ExportPlate failed to write plate to file: " + path);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (stream != null)
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
private void AddPlateOutline(Plate plate)
|
||||
{
|
||||
Vector2 pt1;
|
||||
Vector2 pt2;
|
||||
Vector2 pt3;
|
||||
Vector2 pt4;
|
||||
|
||||
switch (plate.Quadrant)
|
||||
{
|
||||
case 1:
|
||||
pt1 = new Vector2(0, 0);
|
||||
pt2 = new Vector2(0, plate.Size.Height);
|
||||
pt3 = new Vector2(plate.Size.Width, plate.Size.Height);
|
||||
pt4 = new Vector2(plate.Size.Width, 0);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
pt1 = new Vector2(0, 0);
|
||||
pt2 = new Vector2(0, plate.Size.Height);
|
||||
pt3 = new Vector2(-plate.Size.Width, plate.Size.Height);
|
||||
pt4 = new Vector2(-plate.Size.Width, 0);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
pt1 = new Vector2(0, 0);
|
||||
pt2 = new Vector2(0, -plate.Size.Height);
|
||||
pt3 = new Vector2(-plate.Size.Width, -plate.Size.Height);
|
||||
pt4 = new Vector2(-plate.Size.Width, 0);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
pt1 = new Vector2(0, 0);
|
||||
pt2 = new Vector2(0, -plate.Size.Height);
|
||||
pt3 = new Vector2(plate.Size.Width, -plate.Size.Height);
|
||||
pt4 = new Vector2(plate.Size.Width, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
doc.Entities.Add(new Line(pt1, pt2) { Layer = plateLayer });
|
||||
doc.Entities.Add(new Line(pt2, pt3) { Layer = plateLayer });
|
||||
doc.Entities.Add(new Line(pt3, pt4) { Layer = plateLayer });
|
||||
doc.Entities.Add(new Line(pt4, pt1) { Layer = plateLayer });
|
||||
|
||||
pt1.X += plate.EdgeSpacing.Left;
|
||||
pt1.Y += plate.EdgeSpacing.Bottom;
|
||||
|
||||
pt2.X = pt1.X;
|
||||
pt2.Y -= plate.EdgeSpacing.Top;
|
||||
|
||||
pt3.X -= plate.EdgeSpacing.Right;
|
||||
pt3.Y = pt2.Y;
|
||||
|
||||
pt4.X = pt3.X;
|
||||
pt4.Y = pt1.Y;
|
||||
|
||||
doc.Entities.Add(new Line(pt1, pt2) { Layer = plateLayer, Linetype = Linetype.Dashed });
|
||||
doc.Entities.Add(new Line(pt2, pt3) { Layer = plateLayer, Linetype = Linetype.Dashed });
|
||||
doc.Entities.Add(new Line(pt3, pt4) { Layer = plateLayer, Linetype = Linetype.Dashed });
|
||||
doc.Entities.Add(new Line(pt4, pt1) { Layer = plateLayer, Linetype = Linetype.Dashed });
|
||||
}
|
||||
|
||||
private void AddProgram(Program program)
|
||||
{
|
||||
mode = program.Mode;
|
||||
|
||||
for (int i = 0; i < program.Length; ++i)
|
||||
{
|
||||
var code = program[i];
|
||||
|
||||
switch (code.Type)
|
||||
{
|
||||
case CodeType.CircularMove:
|
||||
var arc = (CircularMove)code;
|
||||
AddCircularMove(arc);
|
||||
break;
|
||||
|
||||
case CodeType.LinearMove:
|
||||
var line = (LinearMove)code;
|
||||
AddLinearMove(line);
|
||||
break;
|
||||
|
||||
case CodeType.RapidMove:
|
||||
var rapid = (RapidMove)code;
|
||||
AddRapidMove(rapid);
|
||||
break;
|
||||
|
||||
case CodeType.SubProgramCall:
|
||||
var tmpmode = mode;
|
||||
var subpgm = (CNC.SubProgramCall)code;
|
||||
AddProgram(subpgm.Program);
|
||||
mode = tmpmode;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AddLinearMove(LinearMove line)
|
||||
{
|
||||
var pt = line.EndPoint.ToNetDxf();
|
||||
|
||||
if (mode == Mode.Incremental)
|
||||
pt += curpos;
|
||||
|
||||
var ln = new Line(curpos, pt);
|
||||
ln.Layer = cutLayer;
|
||||
doc.Entities.Add(ln);
|
||||
curpos = pt;
|
||||
}
|
||||
|
||||
private void AddRapidMove(RapidMove rapid)
|
||||
{
|
||||
var pt = rapid.EndPoint.ToNetDxf();
|
||||
|
||||
if (mode == Mode.Incremental)
|
||||
pt += curpos;
|
||||
|
||||
var ln = new Line(curpos, pt);
|
||||
ln.Layer = rapidLayer;
|
||||
doc.Entities.Add(ln);
|
||||
curpos = pt;
|
||||
}
|
||||
|
||||
private void AddCircularMove(CircularMove arc)
|
||||
{
|
||||
var center = arc.CenterPoint.ToNetDxf();
|
||||
var endpt = arc.EndPoint.ToNetDxf();
|
||||
|
||||
if (mode == Mode.Incremental)
|
||||
{
|
||||
endpt += curpos;
|
||||
center += curpos;
|
||||
}
|
||||
|
||||
// start angle in radians
|
||||
var startAngle = Math.Atan2(
|
||||
curpos.Y - center.Y,
|
||||
curpos.X - center.X);
|
||||
|
||||
// end angle in radians
|
||||
var endAngle = Math.Atan2(
|
||||
endpt.Y - center.Y,
|
||||
endpt.X - center.X);
|
||||
|
||||
// convert the angles to degrees
|
||||
startAngle = Angle.ToDegrees(startAngle);
|
||||
endAngle = Angle.ToDegrees(endAngle);
|
||||
|
||||
if (arc.Rotation == OpenNest.RotationType.CW)
|
||||
Generic.Swap(ref startAngle, ref endAngle);
|
||||
|
||||
var dx = endpt.X - center.X;
|
||||
var dy = endpt.Y - center.Y;
|
||||
|
||||
var radius = Math.Sqrt(dx * dx + dy * dy);
|
||||
|
||||
if (startAngle.IsEqualTo(endAngle))
|
||||
{
|
||||
var circle = new Circle(center, radius);
|
||||
circle.Layer = cutLayer;
|
||||
doc.Entities.Add(circle);
|
||||
}
|
||||
else
|
||||
{
|
||||
var arc2 = new Arc(center, radius, startAngle, endAngle);
|
||||
arc2.Layer = cutLayer;
|
||||
doc.Entities.Add(arc2);
|
||||
}
|
||||
|
||||
curpos = endpt;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using netDxf;
|
||||
using OpenNest.Geometry;
|
||||
|
||||
namespace OpenNest.IO
|
||||
{
|
||||
public class DxfImporter
|
||||
{
|
||||
public int SplinePrecision { get; set; }
|
||||
|
||||
public DxfImporter()
|
||||
{
|
||||
}
|
||||
|
||||
private List<Entity> GetGeometry(DxfDocument doc)
|
||||
{
|
||||
var entities = new List<Entity>();
|
||||
var lines = new List<Line>(doc.Entities.Lines.Count());
|
||||
var arcs = new List<Arc>(doc.Entities.Arcs.Count());
|
||||
|
||||
foreach (var spline in doc.Entities.Splines)
|
||||
lines.AddRange(spline.ToOpenNest(SplinePrecision));
|
||||
|
||||
foreach (var polyline in doc.Entities.Polylines2D)
|
||||
lines.AddRange(polyline.ToOpenNest());
|
||||
|
||||
foreach (var ellipse in doc.Entities.Ellipses)
|
||||
lines.AddRange(ellipse.ToOpenNest(SplinePrecision));
|
||||
|
||||
foreach (var line in doc.Entities.Lines)
|
||||
lines.Add(line.ToOpenNest());
|
||||
|
||||
foreach (var arc in doc.Entities.Arcs)
|
||||
arcs.Add(arc.ToOpenNest());
|
||||
|
||||
foreach (var circle in doc.Entities.Circles)
|
||||
entities.Add(circle.ToOpenNest());
|
||||
|
||||
foreach (var polyline in doc.Entities.Polylines3D)
|
||||
lines.AddRange(polyline.ToOpenNest());
|
||||
|
||||
Helper.Optimize(lines);
|
||||
Helper.Optimize(arcs);
|
||||
|
||||
entities.AddRange(lines);
|
||||
entities.AddRange(arcs);
|
||||
|
||||
return entities;
|
||||
}
|
||||
|
||||
public bool GetGeometry(Stream stream, out List<Entity> geometry)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
try
|
||||
{
|
||||
var doc = DxfDocument.Load(stream);
|
||||
geometry = GetGeometry(doc);
|
||||
success = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
geometry = new List<Entity>();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (stream != null)
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
public bool GetGeometry(string path, out List<Entity> geometry)
|
||||
{
|
||||
Stream stream = null;
|
||||
bool success = false;
|
||||
|
||||
try
|
||||
{
|
||||
var doc = DxfDocument.Load(path);
|
||||
geometry = GetGeometry(doc);
|
||||
success = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
geometry = new List<Entity>();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (stream != null)
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenNest.Geometry;
|
||||
|
||||
namespace OpenNest.IO
|
||||
{
|
||||
internal static class Extensions
|
||||
{
|
||||
public static Vector ToOpenNest(this netDxf.Vector2 v)
|
||||
{
|
||||
return new Vector(v.X, v.Y);
|
||||
}
|
||||
|
||||
public static Vector ToOpenNest(this netDxf.Vector3 v)
|
||||
{
|
||||
return new Vector(v.X, v.Y);
|
||||
}
|
||||
|
||||
public static Vector ToOpenNest(this netDxf.Entities.Polyline2DVertex v)
|
||||
{
|
||||
return new Vector(v.Position.X, v.Position.Y);
|
||||
}
|
||||
|
||||
public static Arc ToOpenNest(this netDxf.Entities.Arc arc)
|
||||
{
|
||||
return new Arc(
|
||||
arc.Center.X, arc.Center.Y, arc.Radius,
|
||||
Angle.ToRadians(arc.StartAngle),
|
||||
Angle.ToRadians(arc.EndAngle))
|
||||
{
|
||||
Layer = arc.Layer.ToOpenNest()
|
||||
};
|
||||
}
|
||||
|
||||
public static Circle ToOpenNest(this netDxf.Entities.Circle circle)
|
||||
{
|
||||
return new Circle(
|
||||
circle.Center.X, circle.Center.Y,
|
||||
circle.Radius)
|
||||
{
|
||||
Layer = circle.Layer.ToOpenNest()
|
||||
};
|
||||
}
|
||||
|
||||
public static Line ToOpenNest(this netDxf.Entities.Line line)
|
||||
{
|
||||
return new Line(
|
||||
line.StartPoint.X, line.StartPoint.Y,
|
||||
line.EndPoint.X, line.EndPoint.Y)
|
||||
{
|
||||
Layer = line.Layer.ToOpenNest()
|
||||
};
|
||||
}
|
||||
|
||||
public static List<Line> ToOpenNest(this netDxf.Entities.Spline spline, int precision = 200)
|
||||
{
|
||||
var lines = new List<Line>();
|
||||
var pts = spline.PolygonalVertexes(precision);
|
||||
|
||||
if (pts.Count == 0)
|
||||
return lines;
|
||||
|
||||
var lastPoint = pts[0].ToOpenNest();
|
||||
|
||||
for (int i = 1; i < pts.Count; i++)
|
||||
{
|
||||
var nextPoint = pts[i].ToOpenNest();
|
||||
|
||||
lines.Add(new Line(
|
||||
lastPoint,
|
||||
nextPoint) { Layer = spline.Layer.ToOpenNest() });
|
||||
|
||||
lastPoint = nextPoint;
|
||||
}
|
||||
|
||||
if (spline.IsClosed)
|
||||
lines.Add(new Line(lastPoint, pts[0].ToOpenNest()) { Layer = spline.Layer.ToOpenNest() });
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
public static List<Line> ToOpenNest(this netDxf.Entities.Polyline3D polyline)
|
||||
{
|
||||
var lines = new List<Line>();
|
||||
|
||||
if (polyline.Vertexes.Count == 0)
|
||||
return lines;
|
||||
|
||||
var lastPoint = polyline.Vertexes[0].ToOpenNest();
|
||||
|
||||
for (int i = 1; i < polyline.Vertexes.Count; i++)
|
||||
{
|
||||
var nextPoint = polyline.Vertexes[i].ToOpenNest();
|
||||
|
||||
lines.Add(new Line(
|
||||
lastPoint,
|
||||
nextPoint) { Layer = polyline.Layer.ToOpenNest() });
|
||||
|
||||
lastPoint = nextPoint;
|
||||
}
|
||||
|
||||
if (polyline.IsClosed)
|
||||
lines.Add(new Line(lastPoint, polyline.Vertexes[0].ToOpenNest()) { Layer = polyline.Layer.ToOpenNest() });
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
public static List<Line> ToOpenNest(this netDxf.Entities.Polyline2D polyline)
|
||||
{
|
||||
var lines = new List<Line>();
|
||||
|
||||
if (polyline.Vertexes.Count == 0)
|
||||
return lines;
|
||||
|
||||
var lastPoint = polyline.Vertexes[0].ToOpenNest();
|
||||
|
||||
for (int i = 1; i < polyline.Vertexes.Count; i++)
|
||||
{
|
||||
var nextPoint = polyline.Vertexes[i].ToOpenNest();
|
||||
|
||||
lines.Add(new Line(
|
||||
lastPoint,
|
||||
nextPoint) { Layer = polyline.Layer.ToOpenNest() });
|
||||
|
||||
lastPoint = nextPoint;
|
||||
}
|
||||
|
||||
if (polyline.IsClosed)
|
||||
lines.Add(new Line(lastPoint, polyline.Vertexes[0].ToOpenNest()) { Layer = polyline.Layer.ToOpenNest() });
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
public static List<Line> ToOpenNest(this netDxf.Entities.Ellipse ellipse, int precision = 200)
|
||||
{
|
||||
var lines = ellipse.ToPolyline2D(precision).ToOpenNest();
|
||||
|
||||
if (lines.Count < 2)
|
||||
return lines;
|
||||
|
||||
var first = lines.First();
|
||||
var last = lines.Last();
|
||||
|
||||
// workaround for ellipse.ToPolyline not connecting the last and first point.
|
||||
lines.Add(new Line(last.EndPoint, first.StartPoint) { Layer = ellipse.Layer.ToOpenNest() });
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
public static Layer ToOpenNest(this netDxf.Tables.Layer layer)
|
||||
{
|
||||
return new Layer(layer.Name)
|
||||
{
|
||||
Color = layer.Color.ToColor(),
|
||||
IsVisible = layer.IsVisible
|
||||
};
|
||||
}
|
||||
|
||||
public static netDxf.Vector2 ToNetDxf(this Vector v)
|
||||
{
|
||||
return new netDxf.Vector2(v.X, v.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,471 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
using OpenNest.CNC;
|
||||
|
||||
namespace OpenNest.IO
|
||||
{
|
||||
public sealed class NestReader
|
||||
{
|
||||
private ZipArchive zipArchive;
|
||||
private Dictionary<int, Plate> plateDict;
|
||||
private Dictionary<int, Drawing> drawingDict;
|
||||
private Dictionary<int, Program> programDict;
|
||||
private Dictionary<int, Program> plateProgramDict;
|
||||
private Stream stream;
|
||||
private Nest nest;
|
||||
|
||||
private NestReader()
|
||||
{
|
||||
plateDict = new Dictionary<int, Plate>();
|
||||
drawingDict = new Dictionary<int, Drawing>();
|
||||
programDict = new Dictionary<int, Program>();
|
||||
plateProgramDict = new Dictionary<int, Program>();
|
||||
nest = new Nest();
|
||||
}
|
||||
|
||||
public NestReader(string file)
|
||||
: this()
|
||||
{
|
||||
stream = new FileStream(file, FileMode.Open, FileAccess.Read);
|
||||
zipArchive = new ZipArchive(stream, ZipArchiveMode.Read);
|
||||
}
|
||||
|
||||
public NestReader(Stream stream)
|
||||
: this()
|
||||
{
|
||||
this.stream = stream;
|
||||
zipArchive = new ZipArchive(stream, ZipArchiveMode.Read);
|
||||
}
|
||||
|
||||
public Nest Read()
|
||||
{
|
||||
const string plateExtensionPattern = "plate-\\d\\d\\d";
|
||||
const string programExtensionPattern = "program-\\d\\d\\d";
|
||||
|
||||
foreach (var entry in zipArchive.Entries)
|
||||
{
|
||||
var memstream = new MemoryStream();
|
||||
using (var entryStream = entry.Open())
|
||||
{
|
||||
entryStream.CopyTo(memstream);
|
||||
}
|
||||
|
||||
memstream.Position = 0;
|
||||
|
||||
switch (entry.FullName)
|
||||
{
|
||||
case "info":
|
||||
ReadNestInfo(memstream);
|
||||
continue;
|
||||
|
||||
case "drawing-info":
|
||||
ReadDrawingInfo(memstream);
|
||||
continue;
|
||||
|
||||
case "plate-info":
|
||||
ReadPlateInfo(memstream);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Regex.IsMatch(entry.FullName, programExtensionPattern))
|
||||
{
|
||||
ReadProgram(memstream, entry.FullName);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Regex.IsMatch(entry.FullName, plateExtensionPattern))
|
||||
{
|
||||
ReadPlate(memstream, entry.FullName);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
LinkProgramsToDrawings();
|
||||
LinkPartsToPlates();
|
||||
|
||||
AddPlatesToNest();
|
||||
AddDrawingsToNest();
|
||||
|
||||
zipArchive.Dispose();
|
||||
stream.Close();
|
||||
|
||||
return nest;
|
||||
}
|
||||
|
||||
private void ReadNestInfo(Stream stream)
|
||||
{
|
||||
var reader = XmlReader.Create(stream);
|
||||
var spacing = new Spacing();
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
if (!reader.IsStartElement())
|
||||
continue;
|
||||
|
||||
switch (reader.Name)
|
||||
{
|
||||
case "Nest":
|
||||
nest.Name = reader["name"];
|
||||
break;
|
||||
|
||||
case "Units":
|
||||
Units units;
|
||||
TryParseEnum<Units>(reader.ReadString(), out units);
|
||||
nest.Units = units;
|
||||
break;
|
||||
|
||||
case "Customer":
|
||||
nest.Customer = reader.ReadString();
|
||||
break;
|
||||
|
||||
case "DateCreated":
|
||||
nest.DateCreated = DateTime.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "DateLastModified":
|
||||
nest.DateLastModified = DateTime.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Notes":
|
||||
nest.Notes = Uri.UnescapeDataString(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Size":
|
||||
nest.PlateDefaults.Size = Size.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Thickness":
|
||||
nest.PlateDefaults.Thickness = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Quadrant":
|
||||
nest.PlateDefaults.Quadrant = int.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "PartSpacing":
|
||||
nest.PlateDefaults.PartSpacing = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Name":
|
||||
nest.PlateDefaults.Material.Name = reader.ReadString();
|
||||
break;
|
||||
|
||||
case "Grade":
|
||||
nest.PlateDefaults.Material.Grade = reader.ReadString();
|
||||
break;
|
||||
|
||||
case "Density":
|
||||
nest.PlateDefaults.Material.Density = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Left":
|
||||
spacing.Left = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Right":
|
||||
spacing.Right = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Top":
|
||||
spacing.Top = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Bottom":
|
||||
spacing.Bottom = double.Parse(reader.ReadString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
nest.PlateDefaults.EdgeSpacing = spacing;
|
||||
}
|
||||
|
||||
private void ReadDrawingInfo(Stream stream)
|
||||
{
|
||||
var reader = XmlReader.Create(stream);
|
||||
Drawing drawing = null;
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
if (!reader.IsStartElement())
|
||||
continue;
|
||||
|
||||
switch (reader.Name)
|
||||
{
|
||||
case "Drawing":
|
||||
var id = int.Parse(reader["id"]);
|
||||
var name = reader["name"];
|
||||
|
||||
drawingDict.Add(id, (drawing = new Drawing(name)));
|
||||
break;
|
||||
|
||||
case "Customer":
|
||||
drawing.Customer = reader.ReadString();
|
||||
break;
|
||||
|
||||
case "Color":
|
||||
{
|
||||
var parts = reader.ReadString().Split(',');
|
||||
|
||||
if (parts.Length == 3)
|
||||
{
|
||||
byte r = byte.Parse(parts[0]);
|
||||
byte g = byte.Parse(parts[1]);
|
||||
byte b = byte.Parse(parts[2]);
|
||||
|
||||
drawing.Color = Color.FromArgb(r, g, b);
|
||||
}
|
||||
else if (parts.Length == 4)
|
||||
{
|
||||
byte a = byte.Parse(parts[0]);
|
||||
byte r = byte.Parse(parts[1]);
|
||||
byte g = byte.Parse(parts[2]);
|
||||
byte b = byte.Parse(parts[3]);
|
||||
|
||||
drawing.Color = Color.FromArgb(a, r, g, b);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "Required":
|
||||
drawing.Quantity.Required = int.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Name":
|
||||
drawing.Material.Name = reader.ReadString();
|
||||
break;
|
||||
|
||||
case "Grade":
|
||||
drawing.Material.Grade = reader.ReadString();
|
||||
break;
|
||||
|
||||
case "Density":
|
||||
drawing.Material.Density = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Path":
|
||||
drawing.Source.Path = reader.ReadString();
|
||||
break;
|
||||
|
||||
case "Offset":
|
||||
{
|
||||
var parts = reader.ReadString().Split(',');
|
||||
|
||||
if (parts.Length != 2)
|
||||
continue;
|
||||
|
||||
drawing.Source.Offset = new Vector(double.Parse(parts[0]), double.Parse(parts[1]));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
}
|
||||
|
||||
private void ReadPlateInfo(Stream stream)
|
||||
{
|
||||
var reader = XmlReader.Create(stream);
|
||||
var spacing = new Spacing();
|
||||
Plate plate = null;
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
if (!reader.IsStartElement())
|
||||
continue;
|
||||
|
||||
switch (reader.Name)
|
||||
{
|
||||
case "Plate":
|
||||
var id = int.Parse(reader["id"]);
|
||||
|
||||
if (plate != null)
|
||||
plate.EdgeSpacing = spacing;
|
||||
|
||||
plateDict.Add(id, (plate = new Plate()));
|
||||
break;
|
||||
|
||||
case "Size":
|
||||
plate.Size = Size.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Qty":
|
||||
plate.Quantity = int.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Thickness":
|
||||
plate.Thickness = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Quadrant":
|
||||
plate.Quadrant = int.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "PartSpacing":
|
||||
plate.PartSpacing = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Name":
|
||||
plate.Material.Name = reader.ReadString();
|
||||
break;
|
||||
|
||||
case "Grade":
|
||||
plate.Material.Grade = reader.ReadString();
|
||||
break;
|
||||
|
||||
case "Density":
|
||||
plate.Material.Density = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Left":
|
||||
spacing.Left = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Right":
|
||||
spacing.Right = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Top":
|
||||
spacing.Top = double.Parse(reader.ReadString());
|
||||
break;
|
||||
|
||||
case "Bottom":
|
||||
spacing.Bottom = double.Parse(reader.ReadString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (plate != null)
|
||||
plate.EdgeSpacing = spacing;
|
||||
}
|
||||
|
||||
private void ReadProgram(Stream stream, string name)
|
||||
{
|
||||
var id = GetProgramId(name);
|
||||
var reader = new ProgramReader(stream);
|
||||
var pgm = reader.Read();
|
||||
programDict.Add(id, pgm);
|
||||
}
|
||||
|
||||
private void ReadPlate(Stream stream, string name)
|
||||
{
|
||||
var id = GetPlateId(name);
|
||||
var reader = new ProgramReader(stream);
|
||||
var pgm = reader.Read();
|
||||
plateProgramDict.Add(id, pgm);
|
||||
}
|
||||
|
||||
private void LinkProgramsToDrawings()
|
||||
{
|
||||
foreach (var drawingItem in drawingDict)
|
||||
{
|
||||
Program pgm;
|
||||
|
||||
if (programDict.TryGetValue(drawingItem.Key, out pgm))
|
||||
drawingItem.Value.Program = pgm;
|
||||
}
|
||||
}
|
||||
|
||||
private void LinkPartsToPlates()
|
||||
{
|
||||
foreach (var plateProgram in plateProgramDict)
|
||||
{
|
||||
var parts = CreateParts(plateProgram.Value);
|
||||
|
||||
Plate plate;
|
||||
|
||||
if (!plateDict.TryGetValue(plateProgram.Key, out plate))
|
||||
plate = new Plate();
|
||||
|
||||
plate.Parts.AddRange(parts);
|
||||
plateDict[plateProgram.Key] = plate;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddPlatesToNest()
|
||||
{
|
||||
var plates = plateDict.OrderBy(i => i.Key).Select(i => i.Value).ToList();
|
||||
nest.Plates.AddRange(plates);
|
||||
}
|
||||
|
||||
private void AddDrawingsToNest()
|
||||
{
|
||||
var drawings = drawingDict.OrderBy(i => i.Key).Select(i => i.Value).ToList();
|
||||
drawings.ForEach(d => nest.Drawings.Add(d));
|
||||
}
|
||||
|
||||
private List<Part> CreateParts(Program pgm)
|
||||
{
|
||||
var parts = new List<Part>();
|
||||
var pos = Vector.Zero;
|
||||
|
||||
for (int i = 0; i < pgm.Codes.Count; i++)
|
||||
{
|
||||
var code = pgm.Codes[i];
|
||||
|
||||
switch (code.Type)
|
||||
{
|
||||
case CodeType.RapidMove:
|
||||
pos = ((RapidMove)code).EndPoint;
|
||||
break;
|
||||
|
||||
case CodeType.SubProgramCall:
|
||||
var subpgm = (SubProgramCall)code;
|
||||
var dwg = drawingDict[subpgm.Id];
|
||||
var part = new Part(dwg);
|
||||
part.Rotate(Angle.ToRadians(subpgm.Rotation));
|
||||
part.Offset(pos);
|
||||
parts.Add(part);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return parts;
|
||||
}
|
||||
|
||||
private int GetPlateId(string name)
|
||||
{
|
||||
return int.Parse(name.Replace("plate-", ""));
|
||||
}
|
||||
|
||||
private int GetProgramId(string name)
|
||||
{
|
||||
return int.Parse(name.Replace("program-", ""));
|
||||
}
|
||||
|
||||
public static T ParseEnum<T>(string value)
|
||||
{
|
||||
return (T)Enum.Parse(typeof(T), value, true);
|
||||
}
|
||||
|
||||
public static bool TryParseEnum<T>(string value, out T e)
|
||||
{
|
||||
try
|
||||
{
|
||||
e = ParseEnum<T>(value);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
e = ParseEnum<T>(typeof(T).GetEnumValues().GetValue(0).ToString());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private enum NestInfoSection
|
||||
{
|
||||
None,
|
||||
DefaultPlate,
|
||||
Material,
|
||||
EdgeSpacing,
|
||||
Source
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,423 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using OpenNest.CNC;
|
||||
|
||||
namespace OpenNest.IO
|
||||
{
|
||||
public sealed class NestWriter
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of decimal places the output is round to.
|
||||
/// This number must have more decimal places than Tolerance.Epsilon
|
||||
/// </summary>
|
||||
private const int OutputPrecision = 10;
|
||||
|
||||
private readonly Nest nest;
|
||||
private ZipArchive zipArchive;
|
||||
private Dictionary<int, Drawing> drawingDict;
|
||||
|
||||
public NestWriter(Nest nest)
|
||||
{
|
||||
this.drawingDict = new Dictionary<int, Drawing>();
|
||||
this.nest = nest;
|
||||
}
|
||||
|
||||
public bool Write(string file)
|
||||
{
|
||||
this.nest.DateLastModified = DateTime.Now;
|
||||
|
||||
SetDrawingIds();
|
||||
|
||||
using (var fileStream = new FileStream(file, FileMode.Create))
|
||||
using (zipArchive = new ZipArchive(fileStream, ZipArchiveMode.Create))
|
||||
{
|
||||
AddNestInfo();
|
||||
AddPlates();
|
||||
AddPlateInfo();
|
||||
AddDrawings();
|
||||
AddDrawingInfo();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void SetDrawingIds()
|
||||
{
|
||||
int id = 1;
|
||||
|
||||
foreach (var drawing in nest.Drawings)
|
||||
{
|
||||
drawingDict.Add(id, drawing);
|
||||
id++;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddNestInfo()
|
||||
{
|
||||
var stream = new MemoryStream();
|
||||
var writer = XmlWriter.Create(stream, new XmlWriterSettings()
|
||||
{
|
||||
Indent = true
|
||||
});
|
||||
|
||||
writer.WriteStartDocument();
|
||||
writer.WriteStartElement("Nest");
|
||||
writer.WriteAttributeString("name", nest.Name);
|
||||
|
||||
writer.WriteElementString("Units", nest.Units.ToString());
|
||||
writer.WriteElementString("Customer", nest.Customer);
|
||||
writer.WriteElementString("DateCreated", nest.DateCreated.ToString());
|
||||
writer.WriteElementString("DateLastModified", nest.DateLastModified.ToString());
|
||||
|
||||
writer.WriteStartElement("DefaultPlate");
|
||||
writer.WriteElementString("Size", nest.PlateDefaults.Size.ToString());
|
||||
writer.WriteElementString("Thickness", nest.PlateDefaults.Thickness.ToString());
|
||||
writer.WriteElementString("Quadrant", nest.PlateDefaults.Quadrant.ToString());
|
||||
writer.WriteElementString("PartSpacing", nest.PlateDefaults.PartSpacing.ToString());
|
||||
|
||||
writer.WriteStartElement("Material");
|
||||
writer.WriteElementString("Name", nest.PlateDefaults.Material.Name);
|
||||
writer.WriteElementString("Grade", nest.PlateDefaults.Material.Grade);
|
||||
writer.WriteElementString("Density", nest.PlateDefaults.Material.Density.ToString());
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteStartElement("EdgeSpacing");
|
||||
writer.WriteElementString("Left", nest.PlateDefaults.EdgeSpacing.Left.ToString());
|
||||
writer.WriteElementString("Top", nest.PlateDefaults.EdgeSpacing.Top.ToString());
|
||||
writer.WriteElementString("Right", nest.PlateDefaults.EdgeSpacing.Right.ToString());
|
||||
writer.WriteElementString("Bottom", nest.PlateDefaults.EdgeSpacing.Bottom.ToString());
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteElementString("Notes", Uri.EscapeDataString(nest.Notes));
|
||||
|
||||
writer.WriteEndElement(); // DefaultPlate
|
||||
writer.WriteEndElement(); // Nest
|
||||
|
||||
writer.WriteEndDocument();
|
||||
|
||||
writer.Flush();
|
||||
writer.Close();
|
||||
|
||||
stream.Position = 0;
|
||||
|
||||
var entry = zipArchive.CreateEntry("info");
|
||||
using (var entryStream = entry.Open())
|
||||
{
|
||||
stream.CopyTo(entryStream);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddPlates()
|
||||
{
|
||||
int num = 1;
|
||||
|
||||
foreach (var plate in nest.Plates)
|
||||
{
|
||||
var stream = new MemoryStream();
|
||||
var name = string.Format("plate-{0}", num.ToString().PadLeft(3, '0'));
|
||||
|
||||
WritePlate(stream, plate);
|
||||
|
||||
var entry = zipArchive.CreateEntry(name);
|
||||
using (var entryStream = entry.Open())
|
||||
{
|
||||
stream.CopyTo(entryStream);
|
||||
}
|
||||
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddPlateInfo()
|
||||
{
|
||||
var stream = new MemoryStream();
|
||||
var writer = XmlWriter.Create(stream, new XmlWriterSettings()
|
||||
{
|
||||
Indent = true
|
||||
});
|
||||
|
||||
writer.WriteStartDocument();
|
||||
writer.WriteStartElement("Plates");
|
||||
writer.WriteAttributeString("count", nest.Plates.Count.ToString());
|
||||
|
||||
for (int i = 0; i < nest.Plates.Count; ++i)
|
||||
{
|
||||
var plate = nest.Plates[i];
|
||||
|
||||
writer.WriteStartElement("Plate");
|
||||
writer.WriteAttributeString("id", (i + 1).ToString());
|
||||
|
||||
writer.WriteElementString("Quadrant", plate.Quadrant.ToString());
|
||||
writer.WriteElementString("Thickness", plate.Thickness.ToString());
|
||||
writer.WriteElementString("Size", plate.Size.ToString());
|
||||
writer.WriteElementString("Qty", plate.Quantity.ToString());
|
||||
writer.WriteElementString("PartSpacing", plate.PartSpacing.ToString());
|
||||
|
||||
writer.WriteStartElement("Material");
|
||||
writer.WriteElementString("Name", plate.Material.Name);
|
||||
writer.WriteElementString("Grade", plate.Material.Grade);
|
||||
writer.WriteElementString("Density", plate.Material.Density.ToString());
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteStartElement("EdgeSpacing");
|
||||
writer.WriteElementString("Left", plate.EdgeSpacing.Left.ToString());
|
||||
writer.WriteElementString("Top", plate.EdgeSpacing.Top.ToString());
|
||||
writer.WriteElementString("Right", plate.EdgeSpacing.Right.ToString());
|
||||
writer.WriteElementString("Bottom", plate.EdgeSpacing.Bottom.ToString());
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteEndElement(); // Plate
|
||||
writer.Flush();
|
||||
}
|
||||
|
||||
writer.WriteEndElement(); // Plates
|
||||
writer.WriteEndDocument();
|
||||
|
||||
writer.Flush();
|
||||
writer.Close();
|
||||
|
||||
stream.Position = 0;
|
||||
|
||||
var entry = zipArchive.CreateEntry("plate-info");
|
||||
using (var entryStream = entry.Open())
|
||||
{
|
||||
stream.CopyTo(entryStream);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddDrawings()
|
||||
{
|
||||
int num = 1;
|
||||
|
||||
foreach (var dwg in nest.Drawings)
|
||||
{
|
||||
var stream = new MemoryStream();
|
||||
var name = string.Format("program-{0}", num.ToString().PadLeft(3, '0'));
|
||||
|
||||
WriteDrawing(stream, dwg);
|
||||
|
||||
var entry = zipArchive.CreateEntry(name);
|
||||
using (var entryStream = entry.Open())
|
||||
{
|
||||
stream.CopyTo(entryStream);
|
||||
}
|
||||
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
private void AddDrawingInfo()
|
||||
{
|
||||
var stream = new MemoryStream();
|
||||
var writer = XmlWriter.Create(stream, new XmlWriterSettings()
|
||||
{
|
||||
Indent = true
|
||||
});
|
||||
|
||||
writer.WriteStartDocument();
|
||||
writer.WriteStartElement("Drawings");
|
||||
writer.WriteAttributeString("count", nest.Drawings.Count.ToString());
|
||||
|
||||
int id = 1;
|
||||
|
||||
foreach (var drawing in nest.Drawings)
|
||||
{
|
||||
writer.WriteStartElement("Drawing");
|
||||
writer.WriteAttributeString("id", id.ToString());
|
||||
writer.WriteAttributeString("name", drawing.Name);
|
||||
|
||||
writer.WriteElementString("Customer", drawing.Customer);
|
||||
writer.WriteElementString("Color", string.Format("{0}, {1}, {2}, {3}", drawing.Color.A, drawing.Color.R, drawing.Color.G, drawing.Color.B));
|
||||
|
||||
writer.WriteStartElement("Quantity");
|
||||
writer.WriteElementString("Required", drawing.Quantity.Required.ToString());
|
||||
writer.WriteElementString("Nested", drawing.Quantity.Nested.ToString());
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteStartElement("Material");
|
||||
writer.WriteElementString("Name", drawing.Material.Name);
|
||||
writer.WriteElementString("Grade", drawing.Material.Grade);
|
||||
writer.WriteElementString("Density", drawing.Material.Density.ToString());
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteStartElement("Source");
|
||||
writer.WriteElementString("Path", drawing.Source.Path);
|
||||
writer.WriteElementString("Offset", string.Format("{0}, {1}",
|
||||
drawing.Source.Offset.X,
|
||||
drawing.Source.Offset.Y));
|
||||
writer.WriteEndElement(); // Source
|
||||
|
||||
writer.WriteEndElement(); // Drawing
|
||||
|
||||
id++;
|
||||
}
|
||||
|
||||
writer.WriteEndElement(); // Drawings
|
||||
writer.WriteEndDocument();
|
||||
|
||||
writer.Flush();
|
||||
writer.Close();
|
||||
|
||||
stream.Position = 0;
|
||||
|
||||
var entry = zipArchive.CreateEntry("drawing-info");
|
||||
using (var entryStream = entry.Open())
|
||||
{
|
||||
stream.CopyTo(entryStream);
|
||||
}
|
||||
}
|
||||
|
||||
private void WritePlate(Stream stream, Plate plate)
|
||||
{
|
||||
var writer = new StreamWriter(stream);
|
||||
writer.AutoFlush = true;
|
||||
writer.WriteLine("G90");
|
||||
|
||||
foreach (var part in plate.Parts)
|
||||
{
|
||||
var match = drawingDict.Where(dwg => dwg.Value == part.BaseDrawing).FirstOrDefault();
|
||||
var id = match.Key;
|
||||
|
||||
writer.WriteLine("G00X{0}Y{1}", part.Location.X, part.Location.Y);
|
||||
writer.WriteLine("G65P{0}R{1}", id, Angle.ToDegrees(part.Rotation));
|
||||
}
|
||||
|
||||
stream.Position = 0;
|
||||
}
|
||||
|
||||
private void WriteDrawing(Stream stream, Drawing drawing)
|
||||
{
|
||||
var program = drawing.Program;
|
||||
var writer = new StreamWriter(stream);
|
||||
writer.AutoFlush = true;
|
||||
|
||||
writer.WriteLine(program.Mode == Mode.Absolute ? "G90" : "G91");
|
||||
|
||||
for (int i = 0; i < drawing.Program.Length; ++i)
|
||||
{
|
||||
var code = drawing.Program[i];
|
||||
writer.WriteLine(GetCodeString(code));
|
||||
}
|
||||
|
||||
stream.Position = 0;
|
||||
}
|
||||
|
||||
private string GetCodeString(ICode code)
|
||||
{
|
||||
switch (code.Type)
|
||||
{
|
||||
case CodeType.CircularMove:
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
var circularMove = (CircularMove)code;
|
||||
|
||||
if (circularMove.Rotation == RotationType.CW)
|
||||
{
|
||||
sb.Append(string.Format("G02X{0}Y{1}I{2}J{3}",
|
||||
Math.Round(circularMove.EndPoint.X, OutputPrecision),
|
||||
Math.Round(circularMove.EndPoint.Y, OutputPrecision),
|
||||
Math.Round(circularMove.CenterPoint.X, OutputPrecision),
|
||||
Math.Round(circularMove.CenterPoint.Y, OutputPrecision)));
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(string.Format("G03X{0}Y{1}I{2}J{3}",
|
||||
Math.Round(circularMove.EndPoint.X, OutputPrecision),
|
||||
Math.Round(circularMove.EndPoint.Y, OutputPrecision),
|
||||
Math.Round(circularMove.CenterPoint.X, OutputPrecision),
|
||||
Math.Round(circularMove.CenterPoint.Y, OutputPrecision)));
|
||||
}
|
||||
|
||||
if (circularMove.Layer != LayerType.Cut)
|
||||
sb.Append(GetLayerString(circularMove.Layer));
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
case CodeType.Comment:
|
||||
{
|
||||
var comment = (Comment)code;
|
||||
return ":" + comment.Value;
|
||||
}
|
||||
|
||||
case CodeType.LinearMove:
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
var linearMove = (LinearMove)code;
|
||||
|
||||
sb.Append(string.Format("G01X{0}Y{1}",
|
||||
Math.Round(linearMove.EndPoint.X, OutputPrecision),
|
||||
Math.Round(linearMove.EndPoint.Y, OutputPrecision)));
|
||||
|
||||
if (linearMove.Layer != LayerType.Cut)
|
||||
sb.Append(GetLayerString(linearMove.Layer));
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
case CodeType.RapidMove:
|
||||
{
|
||||
var rapidMove = (RapidMove)code;
|
||||
|
||||
return string.Format("G00X{0}Y{1}",
|
||||
Math.Round(rapidMove.EndPoint.X, OutputPrecision),
|
||||
Math.Round(rapidMove.EndPoint.Y, OutputPrecision));
|
||||
}
|
||||
|
||||
case CodeType.SetFeedrate:
|
||||
{
|
||||
var setFeedrate = (Feedrate)code;
|
||||
return "F" + setFeedrate.Value;
|
||||
}
|
||||
|
||||
case CodeType.SetKerf:
|
||||
{
|
||||
var setKerf = (Kerf)code;
|
||||
|
||||
switch (setKerf.Value)
|
||||
{
|
||||
case KerfType.None: return "G40";
|
||||
case KerfType.Left: return "G41";
|
||||
case KerfType.Right: return "G42";
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case CodeType.SubProgramCall:
|
||||
{
|
||||
var subProgramCall = (SubProgramCall)code;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private string GetLayerString(LayerType layer)
|
||||
{
|
||||
switch (layer)
|
||||
{
|
||||
case LayerType.Display:
|
||||
return ":DISPLAY";
|
||||
|
||||
case LayerType.Leadin:
|
||||
return ":LEADIN";
|
||||
|
||||
case LayerType.Leadout:
|
||||
return ":LEADOUT";
|
||||
|
||||
case LayerType.Scribe:
|
||||
return ":SCRIBE";
|
||||
|
||||
default:
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,389 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using OpenNest.CNC;
|
||||
|
||||
namespace OpenNest.IO
|
||||
{
|
||||
internal sealed class ProgramReader
|
||||
{
|
||||
private const int BufferSize = 200;
|
||||
|
||||
private int codeIndex;
|
||||
private CodeBlock block;
|
||||
private CodeSection section;
|
||||
private Program program;
|
||||
private StreamReader reader;
|
||||
|
||||
public ProgramReader(Stream stream)
|
||||
{
|
||||
reader = new StreamReader(stream);
|
||||
program = new Program();
|
||||
}
|
||||
|
||||
public Program Read()
|
||||
{
|
||||
string line;
|
||||
|
||||
while ((line = reader.ReadLine()) != null)
|
||||
{
|
||||
block = ParseBlock(line);
|
||||
ProcessCurrentBlock();
|
||||
}
|
||||
|
||||
return program;
|
||||
}
|
||||
|
||||
private CodeBlock ParseBlock(string line)
|
||||
{
|
||||
var block = new CodeBlock();
|
||||
Code code = null;
|
||||
for (int i = 0; i < line.Length; ++i)
|
||||
{
|
||||
var c = line[i];
|
||||
if (char.IsLetter(c))
|
||||
block.Add((code = new Code(c)));
|
||||
else if (c == ':')
|
||||
{
|
||||
block.Add((new Code(c, line.Remove(0, i + 1).Trim())));
|
||||
break;
|
||||
}
|
||||
else if (code != null)
|
||||
code.Value += c;
|
||||
}
|
||||
return block;
|
||||
}
|
||||
|
||||
private void ProcessCurrentBlock()
|
||||
{
|
||||
var code = GetFirstCode();
|
||||
|
||||
while (code != null)
|
||||
{
|
||||
switch (code.Id)
|
||||
{
|
||||
case ':':
|
||||
program.Codes.Add(new Comment(code.Value));
|
||||
code = GetNextCode();
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
int value = int.Parse(code.Value);
|
||||
|
||||
switch (value)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
section = CodeSection.Line;
|
||||
ReadLine(value == 0);
|
||||
code = GetCurrentCode();
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 3:
|
||||
section = CodeSection.Arc;
|
||||
ReadArc(value == 2 ? RotationType.CW : RotationType.CCW);
|
||||
code = GetCurrentCode();
|
||||
break;
|
||||
|
||||
case 65:
|
||||
section = CodeSection.SubProgram;
|
||||
ReadSubProgram();
|
||||
code = GetCurrentCode();
|
||||
break;
|
||||
|
||||
case 40:
|
||||
program.Codes.Add(new Kerf() { Value = KerfType.None });
|
||||
code = GetNextCode();
|
||||
break;
|
||||
|
||||
case 41:
|
||||
program.Codes.Add(new Kerf() { Value = KerfType.Left });
|
||||
code = GetNextCode();
|
||||
break;
|
||||
|
||||
case 42:
|
||||
program.Codes.Add(new Kerf() { Value = KerfType.Right });
|
||||
code = GetNextCode();
|
||||
break;
|
||||
|
||||
case 90:
|
||||
program.Mode = Mode.Absolute;
|
||||
code = GetNextCode();
|
||||
break;
|
||||
|
||||
case 91:
|
||||
program.Mode = Mode.Incremental;
|
||||
code = GetNextCode();
|
||||
break;
|
||||
|
||||
default:
|
||||
code = GetNextCode();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
program.Codes.Add(new Feedrate() { Value = double.Parse(code.Value) });
|
||||
code = GetNextCode();
|
||||
break;
|
||||
|
||||
default:
|
||||
code = GetNextCode();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ReadLine(bool isRapid)
|
||||
{
|
||||
var line = new LinearMove();
|
||||
double x = 0;
|
||||
double y = 0;
|
||||
var layer = LayerType.Cut;
|
||||
|
||||
while (section == CodeSection.Line)
|
||||
{
|
||||
var code = GetNextCode();
|
||||
|
||||
if (code == null)
|
||||
{
|
||||
section = CodeSection.Unknown;
|
||||
break;
|
||||
}
|
||||
switch (code.Id)
|
||||
{
|
||||
case 'X':
|
||||
x = double.Parse(code.Value);
|
||||
break;
|
||||
|
||||
case 'Y':
|
||||
y = double.Parse(code.Value);
|
||||
break;
|
||||
|
||||
case ':':
|
||||
{
|
||||
var value = code.Value.Trim().ToUpper();
|
||||
|
||||
switch (value)
|
||||
{
|
||||
case "DISPLAY":
|
||||
layer = LayerType.Display;
|
||||
break;
|
||||
|
||||
case "LEADIN":
|
||||
layer = LayerType.Leadin;
|
||||
break;
|
||||
|
||||
case "LEADOUT":
|
||||
layer = LayerType.Leadout;
|
||||
break;
|
||||
|
||||
case "SCRIBE":
|
||||
layer = LayerType.Scribe;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
section = CodeSection.Unknown;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isRapid)
|
||||
program.Codes.Add(new RapidMove(x, y));
|
||||
else
|
||||
program.Codes.Add(new LinearMove(x, y) { Layer = layer });
|
||||
}
|
||||
|
||||
private void ReadArc(RotationType rotation)
|
||||
{
|
||||
double x = 0;
|
||||
double y = 0;
|
||||
double i = 0;
|
||||
double j = 0;
|
||||
var layer = LayerType.Cut;
|
||||
|
||||
while (section == CodeSection.Arc)
|
||||
{
|
||||
var code = GetNextCode();
|
||||
|
||||
if (code == null)
|
||||
{
|
||||
section = CodeSection.Unknown;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (code.Id)
|
||||
{
|
||||
case 'X':
|
||||
x = double.Parse(code.Value);
|
||||
break;
|
||||
|
||||
case 'Y':
|
||||
y = double.Parse(code.Value);
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
i = double.Parse(code.Value);
|
||||
break;
|
||||
|
||||
case 'J':
|
||||
j = double.Parse(code.Value);
|
||||
break;
|
||||
|
||||
case ':':
|
||||
{
|
||||
var value = code.Value.Trim().ToUpper();
|
||||
|
||||
switch (value)
|
||||
{
|
||||
case "DISPLAY":
|
||||
layer = LayerType.Display;
|
||||
break;
|
||||
|
||||
case "LEADIN":
|
||||
layer = LayerType.Leadin;
|
||||
break;
|
||||
|
||||
case "LEADOUT":
|
||||
layer = LayerType.Leadout;
|
||||
break;
|
||||
|
||||
case "SCRIBE":
|
||||
layer = LayerType.Scribe;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
section = CodeSection.Unknown;
|
||||
break;
|
||||
}
|
||||
}
|
||||
program.Codes.Add(new CircularMove()
|
||||
{
|
||||
EndPoint = new Vector(x, y),
|
||||
CenterPoint = new Vector(i, j),
|
||||
Rotation = rotation,
|
||||
Layer = layer
|
||||
});
|
||||
}
|
||||
|
||||
private void ReadSubProgram()
|
||||
{
|
||||
var p = 0;
|
||||
var r = 0.0;
|
||||
|
||||
while (section == CodeSection.SubProgram)
|
||||
{
|
||||
var code = GetNextCode();
|
||||
|
||||
if (code == null)
|
||||
{
|
||||
section = CodeSection.Unknown;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (code.Id)
|
||||
{
|
||||
case 'P':
|
||||
p = int.Parse(code.Value);
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
r = double.Parse(code.Value);
|
||||
break;
|
||||
|
||||
default:
|
||||
section = CodeSection.Unknown;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
program.Codes.Add(new SubProgramCall() { Id = p, Rotation = r });
|
||||
}
|
||||
|
||||
private Code GetNextCode()
|
||||
{
|
||||
codeIndex++;
|
||||
|
||||
if (codeIndex >= block.Count)
|
||||
return null;
|
||||
|
||||
return block[codeIndex];
|
||||
}
|
||||
|
||||
private Code GetCurrentCode()
|
||||
{
|
||||
if (codeIndex >= block.Count)
|
||||
return null;
|
||||
|
||||
return block[codeIndex];
|
||||
}
|
||||
|
||||
private Code GetFirstCode()
|
||||
{
|
||||
if (block.Count == 0)
|
||||
return null;
|
||||
|
||||
codeIndex = 0;
|
||||
return block[codeIndex];
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
reader.Close();
|
||||
}
|
||||
|
||||
private class Code
|
||||
{
|
||||
public Code(char id)
|
||||
{
|
||||
Id = id;
|
||||
Value = string.Empty;
|
||||
}
|
||||
|
||||
public Code(char id, string value)
|
||||
{
|
||||
Id = id;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public char Id { get; private set; }
|
||||
|
||||
public string Value { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Id + Value;
|
||||
}
|
||||
}
|
||||
|
||||
private class CodeBlock : List<Code>
|
||||
{
|
||||
public void Add(char id, string value)
|
||||
{
|
||||
Add(new Code(id, value));
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var builder = new StringBuilder();
|
||||
foreach (var code in this)
|
||||
builder.Append(code.ToString() + " ");
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private enum CodeSection
|
||||
{
|
||||
Unknown,
|
||||
Arc,
|
||||
Line,
|
||||
SubProgram
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Controls;
|
||||
|
||||
namespace OpenNest
|
||||
{
|
||||
public class LayoutPart : IPart
|
||||
{
|
||||
private static Font programIdFont;
|
||||
private static Color selectedColor;
|
||||
private static Pen selectedPen;
|
||||
private static Brush selectedBrush;
|
||||
|
||||
private Color color;
|
||||
private Brush brush;
|
||||
private Pen pen;
|
||||
|
||||
public readonly Part BasePart;
|
||||
|
||||
static LayoutPart()
|
||||
{
|
||||
programIdFont = new Font(SystemFonts.DefaultFont, FontStyle.Bold | FontStyle.Underline);
|
||||
SelectedColor = Color.FromArgb(90, 150, 200, 255);
|
||||
}
|
||||
|
||||
private LayoutPart(Part part)
|
||||
{
|
||||
this.BasePart = part;
|
||||
|
||||
if (part.BaseDrawing.Color.IsEmpty)
|
||||
part.BaseDrawing.Color = Color.FromArgb(130, 204, 130);
|
||||
|
||||
Color = part.BaseDrawing.Color;
|
||||
}
|
||||
|
||||
internal bool IsDirty { get; set; }
|
||||
|
||||
public bool IsSelected { get; set; }
|
||||
|
||||
public GraphicsPath Path { get; private set; }
|
||||
|
||||
public Color Color
|
||||
{
|
||||
get { return color; }
|
||||
set
|
||||
{
|
||||
color = value;
|
||||
|
||||
if (brush != null)
|
||||
brush.Dispose();
|
||||
|
||||
brush = new SolidBrush(value);
|
||||
|
||||
if (pen != null)
|
||||
pen.Dispose();
|
||||
|
||||
pen = new Pen(ControlPaint.Dark(value));
|
||||
}
|
||||
}
|
||||
|
||||
public void Draw(Graphics g)
|
||||
{
|
||||
if (IsSelected)
|
||||
{
|
||||
g.FillPath(selectedBrush, Path);
|
||||
g.DrawPath(selectedPen, Path);
|
||||
}
|
||||
else
|
||||
{
|
||||
g.FillPath(brush, Path);
|
||||
g.DrawPath(pen, Path);
|
||||
}
|
||||
}
|
||||
|
||||
public void Draw(Graphics g, string id)
|
||||
{
|
||||
if (IsSelected)
|
||||
{
|
||||
g.FillPath(selectedBrush, Path);
|
||||
g.DrawPath(selectedPen, Path);
|
||||
}
|
||||
else
|
||||
{
|
||||
g.FillPath(brush, Path);
|
||||
g.DrawPath(pen, Path);
|
||||
}
|
||||
|
||||
var pt = Path.PointCount > 0 ? Path.PathPoints[0] : PointF.Empty;
|
||||
|
||||
g.DrawString(id, programIdFont, Brushes.Black, pt.X, pt.Y);
|
||||
}
|
||||
|
||||
public void Update(DrawControl plateView)
|
||||
{
|
||||
Path = GraphicsHelper.GetGraphicsPath(BasePart.Program, BasePart.Location);
|
||||
Path.Transform(plateView.Matrix);
|
||||
IsDirty = false;
|
||||
}
|
||||
|
||||
public static LayoutPart Create(Part part, PlateView plateView)
|
||||
{
|
||||
var layoutPart = new LayoutPart(part);
|
||||
layoutPart.Update(plateView);
|
||||
|
||||
return layoutPart;
|
||||
}
|
||||
|
||||
public static Color SelectedColor
|
||||
{
|
||||
get { return selectedColor; }
|
||||
set
|
||||
{
|
||||
selectedColor = value;
|
||||
|
||||
if (selectedBrush != null)
|
||||
selectedBrush.Dispose();
|
||||
|
||||
selectedBrush = new SolidBrush(value);
|
||||
|
||||
if (selectedPen != null)
|
||||
selectedPen.Dispose();
|
||||
|
||||
selectedPen = new Pen(ControlPaint.Dark(value));
|
||||
}
|
||||
}
|
||||
|
||||
public Vector Location
|
||||
{
|
||||
get { return BasePart.Location; }
|
||||
set
|
||||
{
|
||||
BasePart.Location = value;
|
||||
IsDirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
public double Rotation
|
||||
{
|
||||
get { return BasePart.Rotation; }
|
||||
}
|
||||
|
||||
public void Rotate(double angle)
|
||||
{
|
||||
BasePart.Rotate(angle);
|
||||
IsDirty = true;
|
||||
}
|
||||
|
||||
public void Rotate(double angle, Vector origin)
|
||||
{
|
||||
BasePart.Rotate(angle, origin);
|
||||
IsDirty = true;
|
||||
}
|
||||
|
||||
public void Offset(double x, double y)
|
||||
{
|
||||
BasePart.Offset(x, y);
|
||||
IsDirty = true;
|
||||
}
|
||||
|
||||
public void Offset(Vector voffset)
|
||||
{
|
||||
BasePart.Offset(voffset);
|
||||
IsDirty = true;
|
||||
}
|
||||
|
||||
public Box BoundingBox
|
||||
{
|
||||
get { return BasePart.BoundingBox; }
|
||||
}
|
||||
|
||||
public double Left
|
||||
{
|
||||
get { return BasePart.Left; }
|
||||
}
|
||||
|
||||
public double Right
|
||||
{
|
||||
get { return BasePart.Right; }
|
||||
}
|
||||
|
||||
public double Top
|
||||
{
|
||||
get { return BasePart.Top; }
|
||||
}
|
||||
|
||||
public double Bottom
|
||||
{
|
||||
get { return BasePart.Bottom; }
|
||||
}
|
||||
|
||||
public void UpdateBounds()
|
||||
{
|
||||
BasePart.UpdateBounds();
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
Color = BasePart.BaseDrawing.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using OpenNest.Forms;
|
||||
|
||||
namespace OpenNest
|
||||
{
|
||||
internal static class MainApp
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
private static void Main()
|
||||
{
|
||||
if (Environment.OSVersion.Version.Major >= 6)
|
||||
SetProcessDPIAware();
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool SetProcessDPIAware();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenNest
|
||||
{
|
||||
public static class MdiExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets the display state of the 3D bevel on MDI client area.
|
||||
/// Source: http://stackoverflow.com/questions/7752696/how-to-remove-3d-border-sunken-from-mdiclient-component-in-mdi-parent-form
|
||||
/// </summary>
|
||||
/// <param name="form"></param>
|
||||
/// <param name="show"></param>
|
||||
/// <returns></returns>
|
||||
public static bool SetBevel(this Form form, bool show)
|
||||
{
|
||||
foreach (Control c in form.Controls)
|
||||
{
|
||||
if (c is MdiClient == false)
|
||||
continue;
|
||||
|
||||
var client = c as MdiClient;
|
||||
|
||||
int windowLong = Win32.GetWindowLong(c.Handle, Win32.GWL_EXSTYLE);
|
||||
|
||||
if (show)
|
||||
windowLong |= Win32.WS_EX_CLIENTEDGE;
|
||||
else
|
||||
windowLong &= ~Win32.WS_EX_CLIENTEDGE;
|
||||
|
||||
Win32.SetWindowLong(c.Handle, Win32.GWL_EXSTYLE, windowLong);
|
||||
|
||||
// Update the non-client area.
|
||||
Win32.SetWindowPos(client.Handle, IntPtr.Zero, 0, 0, 0, 0,
|
||||
Win32.SWP_NOACTIVATE | Win32.SWP_NOMOVE | Win32.SWP_NOSIZE | Win32.SWP_NOZORDER |
|
||||
Win32.SWP_NOOWNERZORDER | Win32.SWP_FRAMECHANGED);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{1F1E40E0-5C53-474F-A258-69C9C3FAC15A}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OpenNest</RootNamespace>
|
||||
<AssemblyName>OpenNest</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<Optimize>false</Optimize>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="netDxf, Version=2023.11.10.0, Culture=neutral, PublicKeyToken=618c63290969e781, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\netDxf.2023.11.10\lib\net48\netDxf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Actions\Action.cs" />
|
||||
<Compile Include="Actions\ActionAddPart.cs" />
|
||||
<Compile Include="Actions\ActionClone.cs" />
|
||||
<Compile Include="Actions\ActionFillArea.cs" />
|
||||
<Compile Include="Actions\ActionSelect.cs" />
|
||||
<Compile Include="Actions\ActionSelectArea.cs" />
|
||||
<Compile Include="Actions\ActionSetSequence.cs" />
|
||||
<Compile Include="Actions\ActionZoomWindow.cs" />
|
||||
<Compile Include="ColorScheme.cs" />
|
||||
<Compile Include="Controls\BottomPanel.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\DrawControl.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\DrawingListBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\EntityView.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\HorizontalLine.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\PlateView.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\QuadrantSelect.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\NumericUpDown.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\VerticalLine.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="GraphicsHelper.cs" />
|
||||
<Compile Include="Forms\AutoNestForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\AutoNestForm.Designer.cs">
|
||||
<DependentUpon>AutoNestForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\CadConverterForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\CadConverterForm.Designer.cs">
|
||||
<DependentUpon>CadConverterForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EditDrawingForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EditDrawingForm.Designer.cs">
|
||||
<DependentUpon>EditDrawingForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EditNestForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EditNestForm.Designer.cs">
|
||||
<DependentUpon>EditNestForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FillPlateForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FillPlateForm.Designer.cs">
|
||||
<DependentUpon>FillPlateForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\CutParametersForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\CutParametersForm.Designer.cs">
|
||||
<DependentUpon>CutParametersForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\MainForm.Designer.cs">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EditNestInfoForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EditNestInfoForm.Designer.cs">
|
||||
<DependentUpon>EditNestInfoForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\OptionsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\OptionsForm.Designer.cs">
|
||||
<DependentUpon>OptionsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EditPlateForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EditPlateForm.Designer.cs">
|
||||
<DependentUpon>EditPlateForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SequenceForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SequenceForm.Designer.cs">
|
||||
<DependentUpon>SequenceForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SetValueForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SetValueForm.Designer.cs">
|
||||
<DependentUpon>SetValueForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\TimingForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\TimingForm.Designer.cs">
|
||||
<DependentUpon>TimingForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="IO\DxfExporter.cs" />
|
||||
<Compile Include="IO\DxfImporter.cs" />
|
||||
<Compile Include="IO\Extensions.cs" />
|
||||
<Compile Include="IO\NestReader.cs" />
|
||||
<Compile Include="IO\NestWriter.cs" />
|
||||
<Compile Include="IO\ProgramReader.cs" />
|
||||
<Compile Include="LayoutPart.cs" />
|
||||
<Compile Include="MdiExtensions.cs" />
|
||||
<Compile Include="MainApp.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="PushDirection.cs" />
|
||||
<Compile Include="ToolStripRenderer.cs" />
|
||||
<Compile Include="SelectionType.cs" />
|
||||
<Compile Include="Win32.cs" />
|
||||
<EmbeddedResource Include="Forms\AutoNestForm.resx">
|
||||
<DependentUpon>AutoNestForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\CadConverterForm.resx">
|
||||
<DependentUpon>CadConverterForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\EditDrawingForm.resx">
|
||||
<DependentUpon>EditDrawingForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\EditNestForm.resx">
|
||||
<DependentUpon>EditNestForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\FillPlateForm.resx">
|
||||
<DependentUpon>FillPlateForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\CutParametersForm.resx">
|
||||
<DependentUpon>CutParametersForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\EditNestInfoForm.resx">
|
||||
<DependentUpon>EditNestInfoForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\OptionsForm.resx">
|
||||
<DependentUpon>OptionsForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\EditPlateForm.resx">
|
||||
<DependentUpon>EditPlateForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\SequenceForm.resx">
|
||||
<DependentUpon>SequenceForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\SetValueForm.resx">
|
||||
<DependentUpon>SetValueForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\TimingForm.resx">
|
||||
<DependentUpon>TimingForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\watermark.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenNest.Core\OpenNest.Core.csproj">
|
||||
<Project>{5a5fde8d-f8db-440e-866c-c4807e1686cf}</Project>
|
||||
<Name>OpenNest.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenNest.Engine\OpenNest.Engine.csproj">
|
||||
<Project>{0083b9cc-54ad-4085-a30d-56bc6834b71a}</Project>
|
||||
<Name>OpenNest.Engine</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\add.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\remove.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\save_as.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\clear.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\clock.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\import.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\move_first.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\move_last.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\move_next.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\move_previous.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\rotate_ccw.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\rotate_cw.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\save.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\zoom_all.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\zoom_in.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\zoom_out.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\doc_new.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\doc_open.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>if $(ConfigurationName) == Release (
|
||||
xcopy "$(TargetDir)*.*" "$(SolutionDir)\..\Installer\" /Y
|
||||
)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenNest")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("OpenNest")]
|
||||
[assembly: AssemblyCopyright("Copyright © AJ Isaacs 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("f99a0ac7-0b95-4c24-b9bc-f18b64d93242")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// 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.2.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.2")]
|
||||
@@ -0,0 +1,253 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenNest.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenNest.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap add {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("add", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap clear {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("clear", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap clock {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("clock", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap doc_new {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("doc_new", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap doc_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("doc_open", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap import {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("import", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap move_first {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("move_first", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap move_last {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("move_last", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap move_next {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("move_next", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap move_previous {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("move_previous", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap remove {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("remove", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap rotate_ccw {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("rotate_ccw", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap rotate_cw {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("rotate_cw", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap save {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("save", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap save_as {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("save_as", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap watermark {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("watermark", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap zoom_all {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("zoom_all", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap zoom_in {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("zoom_in", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap zoom_out {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("zoom_out", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="clear" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\clear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="clock" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\clock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="doc_new" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\doc_new.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="doc_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\doc_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="import" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="move_first" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\move_first.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="move_last" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\move_last.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="move_next" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\move_next.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="move_previous" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\move_previous.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="remove" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\remove.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="rotate_ccw" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\rotate_ccw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="rotate_cw" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\rotate_cw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="save_as" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\save_as.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="watermark" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\watermark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="zoom_all" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\zoom_all.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="zoom_in" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\zoom_in.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="zoom_out" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\zoom_out.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,218 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenNest.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
|
||||
public global::System.Drawing.Point MainWindowLocation {
|
||||
get {
|
||||
return ((global::System.Drawing.Point)(this["MainWindowLocation"]));
|
||||
}
|
||||
set {
|
||||
this["MainWindowLocation"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
|
||||
public global::System.Drawing.Size MainWindowSize {
|
||||
get {
|
||||
return ((global::System.Drawing.Size)(this["MainWindowSize"]));
|
||||
}
|
||||
set {
|
||||
this["MainWindowSize"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Normal")]
|
||||
public global::System.Windows.Forms.FormWindowState MainWindowState {
|
||||
get {
|
||||
return ((global::System.Windows.Forms.FormWindowState)(this["MainWindowState"]));
|
||||
}
|
||||
set {
|
||||
this["MainWindowState"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool PlateViewDrawRapid {
|
||||
get {
|
||||
return ((bool)(this["PlateViewDrawRapid"]));
|
||||
}
|
||||
set {
|
||||
this["PlateViewDrawRapid"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool PlateViewDrawBounds {
|
||||
get {
|
||||
return ((bool)(this["PlateViewDrawBounds"]));
|
||||
}
|
||||
set {
|
||||
this["PlateViewDrawBounds"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool CreateNewNestOnOpen {
|
||||
get {
|
||||
return ((bool)(this["CreateNewNestOnOpen"]));
|
||||
}
|
||||
set {
|
||||
this["CreateNewNestOnOpen"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0.5")]
|
||||
public double AutoSizePlateFactor {
|
||||
get {
|
||||
return ((double)(this["AutoSizePlateFactor"]));
|
||||
}
|
||||
set {
|
||||
this["AutoSizePlateFactor"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1")]
|
||||
public int NestNumber {
|
||||
get {
|
||||
return ((int)(this["NestNumber"]));
|
||||
}
|
||||
set {
|
||||
this["NestNumber"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("200")]
|
||||
public int ImportSplinePrecision {
|
||||
get {
|
||||
return ((int)(this["ImportSplinePrecision"]));
|
||||
}
|
||||
set {
|
||||
this["ImportSplinePrecision"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Inches")]
|
||||
public global::OpenNest.Units DefaultUnit {
|
||||
get {
|
||||
return ((global::OpenNest.Units)(this["DefaultUnit"]));
|
||||
}
|
||||
set {
|
||||
this["DefaultUnit"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("275")]
|
||||
public int SplitterDistance {
|
||||
get {
|
||||
return ((int)(this["SplitterDistance"]));
|
||||
}
|
||||
set {
|
||||
this["SplitterDistance"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("04/08/2015 19:30:00")]
|
||||
public global::System.DateTime LastNestCreatedDate {
|
||||
get {
|
||||
return ((global::System.DateTime)(this["LastNestCreatedDate"]));
|
||||
}
|
||||
set {
|
||||
this["LastNestCreatedDate"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string NestTemplatePath {
|
||||
get {
|
||||
return ((string)(this["NestTemplatePath"]));
|
||||
}
|
||||
set {
|
||||
this["NestTemplatePath"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1")]
|
||||
public decimal LastFeedrate {
|
||||
get {
|
||||
return ((decimal)(this["LastFeedrate"]));
|
||||
}
|
||||
set {
|
||||
this["LastFeedrate"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1")]
|
||||
public decimal LastRapidFeedrate {
|
||||
get {
|
||||
return ((decimal)(this["LastRapidFeedrate"]));
|
||||
}
|
||||
set {
|
||||
this["LastRapidFeedrate"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
||||
public decimal LastPierceTime {
|
||||
get {
|
||||
return ((decimal)(this["LastPierceTime"]));
|
||||
}
|
||||
set {
|
||||
this["LastPierceTime"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="OpenNest.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="MainWindowLocation" Type="System.Drawing.Point" Scope="User">
|
||||
<Value Profile="(Default)">0, 0</Value>
|
||||
</Setting>
|
||||
<Setting Name="MainWindowSize" Type="System.Drawing.Size" Scope="User">
|
||||
<Value Profile="(Default)">0, 0</Value>
|
||||
</Setting>
|
||||
<Setting Name="MainWindowState" Type="System.Windows.Forms.FormWindowState" Scope="User">
|
||||
<Value Profile="(Default)">Normal</Value>
|
||||
</Setting>
|
||||
<Setting Name="PlateViewDrawRapid" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="PlateViewDrawBounds" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="CreateNewNestOnOpen" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="AutoSizePlateFactor" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">0.5</Value>
|
||||
</Setting>
|
||||
<Setting Name="NestNumber" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">1</Value>
|
||||
</Setting>
|
||||
<Setting Name="ImportSplinePrecision" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">200</Value>
|
||||
</Setting>
|
||||
<Setting Name="DefaultUnit" Type="OpenNest.Units" Scope="User">
|
||||
<Value Profile="(Default)">Inches</Value>
|
||||
</Setting>
|
||||
<Setting Name="SplitterDistance" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">275</Value>
|
||||
</Setting>
|
||||
<Setting Name="LastNestCreatedDate" Type="System.DateTime" Scope="User">
|
||||
<Value Profile="(Default)">04/08/2015 19:30:00</Value>
|
||||
</Setting>
|
||||
<Setting Name="NestTemplatePath" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="LastFeedrate" Type="System.Decimal" Scope="User">
|
||||
<Value Profile="(Default)">1</Value>
|
||||
</Setting>
|
||||
<Setting Name="LastRapidFeedrate" Type="System.Decimal" Scope="User">
|
||||
<Value Profile="(Default)">1</Value>
|
||||
</Setting>
|
||||
<Setting Name="LastPierceTime" Type="System.Decimal" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace OpenNest
|
||||
{
|
||||
public enum PushDirection
|
||||
{
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 973 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 992 B |
|
After Width: | Height: | Size: 1012 B |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,8 @@
|
||||
namespace OpenNest
|
||||
{
|
||||
public enum SelectionType
|
||||
{
|
||||
Intersect,
|
||||
Contains
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,534 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
|
||||
namespace OpenNest
|
||||
{
|
||||
public enum ToolbarTheme
|
||||
{
|
||||
Toolbar,
|
||||
MediaToolbar,
|
||||
CommunicationsToolbar,
|
||||
BrowserTabBar,
|
||||
HelpBar
|
||||
}
|
||||
|
||||
/// <summary>Renders a toolstrip using the UxTheme API via VisualStyleRenderer and a specific style.</summary>
|
||||
/// <remarks>Perhaps surprisingly, this does not need to be disposable.</remarks>
|
||||
public class ToolStripRenderer : ToolStripSystemRenderer
|
||||
{
|
||||
VisualStyleRenderer renderer;
|
||||
|
||||
public ToolStripRenderer(ToolbarTheme theme)
|
||||
{
|
||||
Theme = theme;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// It shouldn't be necessary to P/Invoke like this, however VisualStyleRenderer.GetMargins
|
||||
/// misses out a parameter in its own P/Invoke.
|
||||
/// </summary>
|
||||
static internal class NativeMethods
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct MARGINS
|
||||
{
|
||||
public int cxLeftWidth;
|
||||
public int cxRightWidth;
|
||||
public int cyTopHeight;
|
||||
public int cyBottomHeight;
|
||||
}
|
||||
|
||||
[DllImport("uxtheme.dll")]
|
||||
public extern static int GetThemeMargins(IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, int iPropId, IntPtr rect, out MARGINS pMargins);
|
||||
}
|
||||
|
||||
// See http://msdn2.microsoft.com/en-us/library/bb773210.aspx - "Parts and States"
|
||||
// Only menu-related parts/states are needed here, VisualStyleRenderer handles most of the rest.
|
||||
enum MenuParts : int
|
||||
{
|
||||
ItemTMSchema = 1,
|
||||
DropDownTMSchema = 2,
|
||||
BarItemTMSchema = 3,
|
||||
BarDropDownTMSchema = 4,
|
||||
ChevronTMSchema = 5,
|
||||
SeparatorTMSchema = 6,
|
||||
BarBackground = 7,
|
||||
BarItem = 8,
|
||||
PopupBackground = 9,
|
||||
PopupBorders = 10,
|
||||
PopupCheck = 11,
|
||||
PopupCheckBackground = 12,
|
||||
PopupGutter = 13,
|
||||
PopupItem = 14,
|
||||
PopupSeparator = 15,
|
||||
PopupSubmenu = 16,
|
||||
SystemClose = 17,
|
||||
SystemMaximize = 18,
|
||||
SystemMinimize = 19,
|
||||
SystemRestore = 20
|
||||
}
|
||||
|
||||
enum MenuBarStates : int
|
||||
{
|
||||
Active = 1,
|
||||
Inactive = 2
|
||||
}
|
||||
|
||||
enum MenuBarItemStates : int
|
||||
{
|
||||
Normal = 1,
|
||||
Hover = 2,
|
||||
Pushed = 3,
|
||||
Disabled = 4,
|
||||
DisabledHover = 5,
|
||||
DisabledPushed = 6
|
||||
}
|
||||
|
||||
enum MenuPopupItemStates : int
|
||||
{
|
||||
Normal = 1,
|
||||
Hover = 2,
|
||||
Disabled = 3,
|
||||
DisabledHover = 4
|
||||
}
|
||||
|
||||
enum MenuPopupCheckStates : int
|
||||
{
|
||||
CheckmarkNormal = 1,
|
||||
CheckmarkDisabled = 2,
|
||||
BulletNormal = 3,
|
||||
BulletDisabled = 4
|
||||
}
|
||||
|
||||
enum MenuPopupCheckBackgroundStates : int
|
||||
{
|
||||
Disabled = 1,
|
||||
Normal = 2,
|
||||
Bitmap = 3
|
||||
}
|
||||
|
||||
enum MenuPopupSubMenuStates : int
|
||||
{
|
||||
Normal = 1,
|
||||
Disabled = 2
|
||||
}
|
||||
|
||||
enum MarginTypes : int
|
||||
{
|
||||
Sizing = 3601,
|
||||
Content = 3602,
|
||||
Caption = 3603
|
||||
}
|
||||
|
||||
static readonly int RebarBackground = 6;
|
||||
|
||||
Padding GetThemeMargins(IDeviceContext dc, MarginTypes marginType)
|
||||
{
|
||||
NativeMethods.MARGINS margins;
|
||||
try
|
||||
{
|
||||
IntPtr hDC = dc.GetHdc();
|
||||
if (0 == NativeMethods.GetThemeMargins(renderer.Handle, hDC, renderer.Part, renderer.State, (int)marginType, IntPtr.Zero, out margins))
|
||||
return new Padding(margins.cxLeftWidth, margins.cyTopHeight, margins.cxRightWidth, margins.cyBottomHeight);
|
||||
return new Padding(0);
|
||||
}
|
||||
finally
|
||||
{
|
||||
dc.ReleaseHdc();
|
||||
}
|
||||
}
|
||||
|
||||
private static int GetItemState(ToolStripItem item)
|
||||
{
|
||||
bool hot = item.Selected;
|
||||
|
||||
if (item.IsOnDropDown)
|
||||
{
|
||||
if (item.Enabled)
|
||||
return hot ? (int)MenuPopupItemStates.Hover : (int)MenuPopupItemStates.Normal;
|
||||
return hot ? (int)MenuPopupItemStates.DisabledHover : (int)MenuPopupItemStates.Disabled;
|
||||
}
|
||||
else {
|
||||
if (item.Pressed)
|
||||
return item.Enabled ? (int)MenuBarItemStates.Pushed : (int)MenuBarItemStates.DisabledPushed;
|
||||
if (item.Enabled)
|
||||
return hot ? (int)MenuBarItemStates.Hover : (int)MenuBarItemStates.Normal;
|
||||
return hot ? (int)MenuBarItemStates.DisabledHover : (int)MenuBarItemStates.Disabled;
|
||||
}
|
||||
}
|
||||
|
||||
public ToolbarTheme Theme
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
private string RebarClass
|
||||
{
|
||||
get
|
||||
{
|
||||
return SubclassPrefix + "Rebar";
|
||||
}
|
||||
}
|
||||
|
||||
private string ToolbarClass
|
||||
{
|
||||
get
|
||||
{
|
||||
return SubclassPrefix + "ToolBar";
|
||||
}
|
||||
}
|
||||
|
||||
private string MenuClass
|
||||
{
|
||||
get
|
||||
{
|
||||
return SubclassPrefix + "Menu";
|
||||
}
|
||||
}
|
||||
|
||||
private string SubclassPrefix
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (Theme)
|
||||
{
|
||||
case ToolbarTheme.MediaToolbar: return "Media::";
|
||||
case ToolbarTheme.CommunicationsToolbar: return "Communications::";
|
||||
case ToolbarTheme.BrowserTabBar: return "BrowserTabBar::";
|
||||
case ToolbarTheme.HelpBar: return "Help::";
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private VisualStyleElement Subclass(VisualStyleElement element)
|
||||
{
|
||||
return VisualStyleElement.CreateElement(SubclassPrefix + element.ClassName,
|
||||
element.Part, element.State);
|
||||
}
|
||||
|
||||
private bool EnsureRenderer()
|
||||
{
|
||||
if (!IsSupported)
|
||||
return false;
|
||||
|
||||
if (renderer == null)
|
||||
renderer = new VisualStyleRenderer(VisualStyleElement.Button.PushButton.Normal);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Gives parented ToolStrips a transparent background.
|
||||
protected override void Initialize(ToolStrip toolStrip)
|
||||
{
|
||||
if (toolStrip.Parent is ToolStripPanel)
|
||||
toolStrip.BackColor = Color.Transparent;
|
||||
|
||||
base.Initialize(toolStrip);
|
||||
}
|
||||
|
||||
// Using just ToolStripManager.Renderer without setting the Renderer individually per ToolStrip means
|
||||
// that the ToolStrip is not passed to the Initialize method. ToolStripPanels, however, are. So we can
|
||||
// simply initialize it here too, and this should guarantee that the ToolStrip is initialized at least
|
||||
// once. Hopefully it isn't any more complicated than this.
|
||||
protected override void InitializePanel(ToolStripPanel toolStripPanel)
|
||||
{
|
||||
foreach (Control control in toolStripPanel.Controls)
|
||||
if (control is ToolStrip)
|
||||
Initialize((ToolStrip)control);
|
||||
|
||||
base.InitializePanel(toolStripPanel);
|
||||
}
|
||||
|
||||
protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
|
||||
{
|
||||
if (EnsureRenderer())
|
||||
{
|
||||
renderer.SetParameters(MenuClass, (int)MenuParts.PopupBorders, 0);
|
||||
if (e.ToolStrip.IsDropDown)
|
||||
{
|
||||
Region oldClip = e.Graphics.Clip;
|
||||
|
||||
// Tool strip borders are rendered *after* the content, for some reason.
|
||||
// So we have to exclude the inside of the popup otherwise we'll draw over it.
|
||||
Rectangle insideRect = e.ToolStrip.ClientRectangle;
|
||||
insideRect.Inflate(-1, -1);
|
||||
e.Graphics.ExcludeClip(insideRect);
|
||||
|
||||
renderer.DrawBackground(e.Graphics, e.ToolStrip.ClientRectangle, e.AffectedBounds);
|
||||
|
||||
// Restore the old clip in case the Graphics is used again (does that ever happen?)
|
||||
e.Graphics.Clip = oldClip;
|
||||
}
|
||||
}
|
||||
else {
|
||||
base.OnRenderToolStripBorder(e);
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle GetBackgroundRectangle(ToolStripItem item)
|
||||
{
|
||||
if (!item.IsOnDropDown)
|
||||
return new Rectangle(new Point(), item.Bounds.Size);
|
||||
|
||||
// For a drop-down menu item, the background rectangles of the items should be touching vertically.
|
||||
// This ensures that's the case.
|
||||
Rectangle rect = item.Bounds;
|
||||
|
||||
// The background rectangle should be inset two pixels horizontally (on both sides), but we have
|
||||
// to take into account the border.
|
||||
rect.X = item.ContentRectangle.X + 1;
|
||||
rect.Width = item.ContentRectangle.Width - 1;
|
||||
|
||||
// Make sure we're using all of the vertical space, so that the edges touch.
|
||||
rect.Y = 0;
|
||||
return rect;
|
||||
}
|
||||
|
||||
protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e)
|
||||
{
|
||||
if (EnsureRenderer())
|
||||
{
|
||||
int partID = e.Item.IsOnDropDown ? (int)MenuParts.PopupItem : (int)MenuParts.BarItem;
|
||||
renderer.SetParameters(MenuClass, partID, GetItemState(e.Item));
|
||||
|
||||
Rectangle bgRect = GetBackgroundRectangle(e.Item);
|
||||
renderer.DrawBackground(e.Graphics, bgRect, bgRect);
|
||||
}
|
||||
else {
|
||||
base.OnRenderMenuItemBackground(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnRenderToolStripPanelBackground(ToolStripPanelRenderEventArgs e)
|
||||
{
|
||||
if (EnsureRenderer())
|
||||
{
|
||||
// Draw the background using Rebar & RP_BACKGROUND (or, if that is not available, fall back to
|
||||
// Rebar.Band.Normal)
|
||||
if (VisualStyleRenderer.IsElementDefined(VisualStyleElement.CreateElement(RebarClass, RebarBackground, 0)))
|
||||
{
|
||||
renderer.SetParameters(RebarClass, RebarBackground, 0);
|
||||
}
|
||||
else {
|
||||
renderer.SetParameters(RebarClass, 0, 0);
|
||||
}
|
||||
|
||||
if (renderer.IsBackgroundPartiallyTransparent())
|
||||
renderer.DrawParentBackground(e.Graphics, e.ToolStripPanel.ClientRectangle, e.ToolStripPanel);
|
||||
|
||||
renderer.DrawBackground(e.Graphics, e.ToolStripPanel.ClientRectangle);
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
else {
|
||||
base.OnRenderToolStripPanelBackground(e);
|
||||
}
|
||||
}
|
||||
|
||||
// Render the background of an actual menu bar, dropdown menu or toolbar.
|
||||
protected override void OnRenderToolStripBackground(System.Windows.Forms.ToolStripRenderEventArgs e)
|
||||
{
|
||||
if (EnsureRenderer())
|
||||
{
|
||||
if (e.ToolStrip.IsDropDown)
|
||||
{
|
||||
renderer.SetParameters(MenuClass, (int)MenuParts.PopupBackground, 0);
|
||||
}
|
||||
else {
|
||||
// It's a MenuStrip or a ToolStrip. If it's contained inside a larger panel, it should have a
|
||||
// transparent background, showing the panel's background.
|
||||
|
||||
if (e.ToolStrip.Parent is ToolStripPanel)
|
||||
{
|
||||
// The background should be transparent, because the ToolStripPanel's background will be visible.
|
||||
// (Of course, we assume the ToolStripPanel is drawn using the same theme, but it's not my fault
|
||||
// if someone does that.)
|
||||
return;
|
||||
}
|
||||
else {
|
||||
// A lone toolbar/menubar should act like it's inside a toolbox, I guess.
|
||||
// Maybe I should use the MenuClass in the case of a MenuStrip, although that would break
|
||||
// the other themes...
|
||||
if (VisualStyleRenderer.IsElementDefined(VisualStyleElement.CreateElement(RebarClass, RebarBackground, 0)))
|
||||
renderer.SetParameters(RebarClass, RebarBackground, 0);
|
||||
else
|
||||
renderer.SetParameters(RebarClass, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (renderer.IsBackgroundPartiallyTransparent())
|
||||
renderer.DrawParentBackground(e.Graphics, e.ToolStrip.ClientRectangle, e.ToolStrip);
|
||||
|
||||
renderer.DrawBackground(e.Graphics, e.ToolStrip.ClientRectangle, e.AffectedBounds);
|
||||
}
|
||||
else {
|
||||
base.OnRenderToolStripBackground(e);
|
||||
}
|
||||
}
|
||||
|
||||
// The only purpose of this override is to change the arrow colour.
|
||||
// It's OK to just draw over the default arrow since we also pass down arrow drawing to the system renderer.
|
||||
protected override void OnRenderSplitButtonBackground(ToolStripItemRenderEventArgs e)
|
||||
{
|
||||
if (EnsureRenderer())
|
||||
{
|
||||
ToolStripSplitButton sb = (ToolStripSplitButton)e.Item;
|
||||
base.OnRenderSplitButtonBackground(e);
|
||||
|
||||
// It doesn't matter what colour of arrow we tell it to draw. OnRenderArrow will compute it from the item anyway.
|
||||
OnRenderArrow(new ToolStripArrowRenderEventArgs(e.Graphics, sb, sb.DropDownButtonBounds, Color.Red, ArrowDirection.Down));
|
||||
}
|
||||
else {
|
||||
base.OnRenderSplitButtonBackground(e);
|
||||
}
|
||||
}
|
||||
|
||||
Color GetItemTextColor(ToolStripItem item)
|
||||
{
|
||||
int partId = item.IsOnDropDown ? (int)MenuParts.PopupItem : (int)MenuParts.BarItem;
|
||||
renderer.SetParameters(MenuClass, partId, GetItemState(item));
|
||||
return renderer.GetColor(ColorProperty.TextColor);
|
||||
}
|
||||
|
||||
protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
|
||||
{
|
||||
if (EnsureRenderer())
|
||||
e.TextColor = GetItemTextColor(e.Item);
|
||||
|
||||
base.OnRenderItemText(e);
|
||||
}
|
||||
|
||||
protected override void OnRenderImageMargin(ToolStripRenderEventArgs e)
|
||||
{
|
||||
if (EnsureRenderer())
|
||||
{
|
||||
if (e.ToolStrip.IsDropDown)
|
||||
{
|
||||
renderer.SetParameters(MenuClass, (int)MenuParts.PopupGutter, 0);
|
||||
// The AffectedBounds is usually too small, way too small to look right. Instead of using that,
|
||||
// use the AffectedBounds but with the right width. Then narrow the rectangle to the correct edge
|
||||
// based on whether or not it's RTL. (It doesn't need to be narrowed to an edge in LTR mode, but let's
|
||||
// do that anyway.)
|
||||
// Using the DisplayRectangle gets roughly the right size so that the separator is closer to the text.
|
||||
Padding margins = GetThemeMargins(e.Graphics, MarginTypes.Sizing);
|
||||
int extraWidth = (e.ToolStrip.Width - e.ToolStrip.DisplayRectangle.Width - margins.Left - margins.Right - 1) - e.AffectedBounds.Width;
|
||||
Rectangle rect = e.AffectedBounds;
|
||||
rect.Y += 2;
|
||||
rect.Height -= 4;
|
||||
int sepWidth = renderer.GetPartSize(e.Graphics, ThemeSizeType.True).Width;
|
||||
if (e.ToolStrip.RightToLeft == RightToLeft.Yes)
|
||||
{
|
||||
rect = new Rectangle(rect.X - extraWidth, rect.Y, sepWidth, rect.Height);
|
||||
rect.X += sepWidth;
|
||||
}
|
||||
else {
|
||||
rect = new Rectangle(rect.Width + extraWidth - sepWidth, rect.Y, sepWidth, rect.Height);
|
||||
}
|
||||
renderer.DrawBackground(e.Graphics, rect);
|
||||
}
|
||||
}
|
||||
else {
|
||||
base.OnRenderImageMargin(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e)
|
||||
{
|
||||
if (e.ToolStrip.IsDropDown && EnsureRenderer())
|
||||
{
|
||||
renderer.SetParameters(MenuClass, (int)MenuParts.PopupSeparator, 0);
|
||||
Rectangle rect = new Rectangle(e.ToolStrip.DisplayRectangle.Left, 0, e.ToolStrip.DisplayRectangle.Width, e.Item.Height);
|
||||
renderer.DrawBackground(e.Graphics, rect, rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Graphics.DrawLine(Pens.LightGray,
|
||||
e.Item.ContentRectangle.X,
|
||||
e.Item.ContentRectangle.Y,
|
||||
e.Item.ContentRectangle.X,
|
||||
e.Item.ContentRectangle.Y + e.Item.Height - 6);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e)
|
||||
{
|
||||
if (EnsureRenderer())
|
||||
{
|
||||
Rectangle bgRect = GetBackgroundRectangle(e.Item);
|
||||
bgRect.Width = bgRect.Height;
|
||||
|
||||
// Now, mirror its position if the menu item is RTL.
|
||||
if (e.Item.RightToLeft == RightToLeft.Yes)
|
||||
bgRect = new Rectangle(e.ToolStrip.ClientSize.Width - bgRect.X - bgRect.Width, bgRect.Y, bgRect.Width, bgRect.Height);
|
||||
|
||||
renderer.SetParameters(MenuClass, (int)MenuParts.PopupCheckBackground, e.Item.Enabled ? (int)MenuPopupCheckBackgroundStates.Normal : (int)MenuPopupCheckBackgroundStates.Disabled);
|
||||
renderer.DrawBackground(e.Graphics, bgRect);
|
||||
|
||||
Rectangle checkRect = e.ImageRectangle;
|
||||
checkRect.X = bgRect.X + bgRect.Width / 2 - checkRect.Width / 2;
|
||||
checkRect.Y = bgRect.Y + bgRect.Height / 2 - checkRect.Height / 2;
|
||||
|
||||
// I don't think ToolStrip even supports radio box items, so no need to render them.
|
||||
renderer.SetParameters(MenuClass, (int)MenuParts.PopupCheck, e.Item.Enabled ? (int)MenuPopupCheckStates.CheckmarkNormal : (int)MenuPopupCheckStates.CheckmarkDisabled);
|
||||
|
||||
renderer.DrawBackground(e.Graphics, checkRect);
|
||||
}
|
||||
else {
|
||||
base.OnRenderItemCheck(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
|
||||
{
|
||||
// The default renderer will draw an arrow for us (the UXTheme API seems not to have one for all directions),
|
||||
// but it will get the colour wrong in many cases. The text colour is probably the best colour to use.
|
||||
if (EnsureRenderer())
|
||||
e.ArrowColor = GetItemTextColor(e.Item);
|
||||
base.OnRenderArrow(e);
|
||||
}
|
||||
|
||||
protected override void OnRenderOverflowButtonBackground(ToolStripItemRenderEventArgs e)
|
||||
{
|
||||
if (EnsureRenderer())
|
||||
{
|
||||
// BrowserTabBar::Rebar draws the chevron using the default background. Odd.
|
||||
string rebarClass = RebarClass;
|
||||
if (Theme == ToolbarTheme.BrowserTabBar)
|
||||
rebarClass = "Rebar";
|
||||
|
||||
int state = VisualStyleElement.Rebar.Chevron.Normal.State;
|
||||
if (e.Item.Pressed)
|
||||
state = VisualStyleElement.Rebar.Chevron.Pressed.State;
|
||||
else if (e.Item.Selected)
|
||||
state = VisualStyleElement.Rebar.Chevron.Hot.State;
|
||||
|
||||
renderer.SetParameters(rebarClass, VisualStyleElement.Rebar.Chevron.Normal.Part, state);
|
||||
renderer.DrawBackground(e.Graphics, new Rectangle(Point.Empty, e.Item.Size));
|
||||
}
|
||||
else {
|
||||
base.OnRenderOverflowButtonBackground(e);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSupported
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!VisualStyleRenderer.IsSupported)
|
||||
return false;
|
||||
|
||||
// Needs a more robust check. It seems mono supports very different style sets.
|
||||
return
|
||||
VisualStyleRenderer.IsElementDefined(
|
||||
VisualStyleElement.CreateElement("Menu",
|
||||
(int)MenuParts.BarBackground,
|
||||
(int)MenuBarStates.Active));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenNest
|
||||
{
|
||||
public static class Win32
|
||||
{
|
||||
[DllImport("kernel32")]
|
||||
public static extern long WritePrivateProfileString(
|
||||
string section,
|
||||
string key,
|
||||
string val,
|
||||
string filePath);
|
||||
|
||||
[DllImport("kernel32")]
|
||||
public static extern int GetPrivateProfileString(
|
||||
string section,
|
||||
string key,
|
||||
string def,
|
||||
StringBuilder retVal,
|
||||
int size,
|
||||
string filePath);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int GetWindowLong(IntPtr hWnd, int nIndex);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
|
||||
|
||||
[DllImport("user32.dll", ExactSpelling = true)]
|
||||
public static extern int SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
|
||||
|
||||
#region Constants
|
||||
|
||||
public const int GWL_EXSTYLE = -20;
|
||||
public const int WS_EX_CLIENTEDGE = 0x200;
|
||||
public const uint SWP_NOSIZE = 0x0001;
|
||||
public const uint SWP_NOMOVE = 0x0002;
|
||||
public const uint SWP_NOZORDER = 0x0004;
|
||||
public const uint SWP_NOREDRAW = 0x0008;
|
||||
public const uint SWP_NOACTIVATE = 0x0010;
|
||||
public const uint SWP_FRAMECHANGED = 0x0020;
|
||||
public const uint SWP_SHOWWINDOW = 0x0040;
|
||||
public const uint SWP_HIDEWINDOW = 0x0080;
|
||||
public const uint SWP_NOCOPYBITS = 0x0100;
|
||||
public const uint SWP_NOOWNERZORDER = 0x0200;
|
||||
public const uint SWP_NOSENDCHANGING = 0x0400;
|
||||
|
||||
#endregion Constants
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="OpenNest.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
<section name="OpenNest.Resources.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<OpenNest.Properties.Settings>
|
||||
<setting name="MainWindowLocation" serializeAs="String">
|
||||
<value>0, 0</value>
|
||||
</setting>
|
||||
<setting name="MainWindowSize" serializeAs="String">
|
||||
<value>0, 0</value>
|
||||
</setting>
|
||||
<setting name="MainWindowState" serializeAs="String">
|
||||
<value>Normal</value>
|
||||
</setting>
|
||||
<setting name="PlateViewDrawRapid" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="PlateViewDrawBounds" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CreateNewNestOnOpen" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="AutoSizePlateFactor" serializeAs="String">
|
||||
<value>0.5</value>
|
||||
</setting>
|
||||
<setting name="NestNumber" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="ImportSplinePrecision" serializeAs="String">
|
||||
<value>200</value>
|
||||
</setting>
|
||||
<setting name="DefaultUnit" serializeAs="String">
|
||||
<value>Inches</value>
|
||||
</setting>
|
||||
<setting name="SplitterDistance" serializeAs="String">
|
||||
<value>275</value>
|
||||
</setting>
|
||||
<setting name="LastNestCreatedDate" serializeAs="String">
|
||||
<value>04/08/2015 19:30:00</value>
|
||||
</setting>
|
||||
<setting name="NestTemplatePath" serializeAs="String">
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="LastFeedrate" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="LastRapidFeedrate" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
<setting name="LastPierceTime" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
</OpenNest.Properties.Settings>
|
||||
<OpenNest.Resources.Settings>
|
||||
<setting name="MainFormLocation" serializeAs="String">
|
||||
<value>0, 0</value>
|
||||
</setting>
|
||||
<setting name="MainFormSize" serializeAs="String">
|
||||
<value>0, 0</value>
|
||||
</setting>
|
||||
</OpenNest.Resources.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||