feat(desktop): build releases in a panel beside the Drawing Sets lists

The modal release dialog is replaced by ReleasePanel, docked beside the
Library and Sets tabs and shared by both. A double-click or Enter adds a
set at one kit or a library drawing on its own at the entered quantity;
adding one already listed adds to its quantity. Lines are edited in
place with a remove button, and the nests it will make preview live.

Each group now merges into a matching Draft nest by default: the only
one, or the most recently saved of several (chosen in the row); a draft
open in a tab blocks Make Nests instead of making a parallel nest.
Nest after release is remembered per user. Edit Set and Edit Drawing
move to their buttons and right-click menus.

The Drawing Sets window is now an unowned top-level window with its own
taskbar entry and remembered bounds, closed with the main window; a
release not yet made survives closing it, and Make Nests brings the
main window forward. ReleaseSetForm remains as a thin dialog host for
releasing from Nest > Add from Drawing Library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-10-24 21:21:27 -04:00
1 parent d4269c1f06
commit 27796851f3
19 files changed
+2843 -2386

No files matched your search

File diff suppressed because it is too large. Load diff
+58 -26
View File
@@ -19,14 +19,17 @@ namespace OpenNest.Controls
/// <see cref="DrawingLibraryBrowseSession"/>, filtered to the nest's material and thickness
/// unless Show all is ticked. Add downloads the listed revision's exact package, plans it
/// with <see cref="LibraryDrawingInsert"/>, shows any warning or refusal first and only then
/// changes the nest. Opened without a nest, it lists every active drawing and has no Add or
/// In This Nest tab; a double-click edits the drawing instead. Edit Drawing changes the
/// changes the nest. Opened without a nest, it lists every active drawing and has no In This
/// Nest tab; as the Library tab of <see cref="DrawingSetsForm"/> a double-click, Enter or Add
/// to Release adds the drawing on its own, at the entered quantity, to the window's
/// <see cref="ReleasePanel"/>, and elsewhere a double-click edits it. Edit Drawing changes the
/// selected drawing's details, notes and nesting settings (Cut first, priority, rotation,
/// color) on the server as a new revision with the same package. With a set
/// store, the drawing grid's menu lists the sets a drawing is in, adds it to a set, lists
/// the releases that had it on its own (the Releases tab of <see cref="DrawingSetsForm"/>,
/// filtered to it) and, once release is enabled, releases it; sets themselves are browsed
/// and released in <see cref="DrawingSetsForm"/>.
/// filtered to it) and, once release is enabled, adds it to the release (with a nest, Make
/// Nests opens the release dialog on it); sets themselves are browsed and released in
/// <see cref="DrawingSetsForm"/>.
/// The details pane previews the selected revision's geometry, downloaded shortly after
/// the selection settles and cached per revision for the dialog's lifetime. The In This
/// Nest tab lists the nest's drawings and edits their required quantities in place.
@@ -73,10 +76,11 @@ namespace OpenNest.Controls
internal Func<DrawingSetEditSession, DrawingSetRecord> EditSet { get; set; }
/// <summary>
/// Shows the release dialog for a drawing read from the library, at a quantity; set by
/// <see cref="EnableRelease"/> and replaced by tests.
/// Adds a drawing read from the library, at a quantity, to the release: the host's
/// release panel, or with a nest the release dialog; set by <see cref="EnableRelease(Action{DrawingLibraryRecord, int})"/>
/// or <see cref="EnableRelease(INestRepository, Action{Nest, NestRecord}, Func{Guid, bool})"/>.
/// </summary>
internal Action<DrawingLibraryRecord, int> ShowRelease { get; set; }
internal Action<DrawingLibraryRecord, int> AddToRelease { get; private set; }
/// <summary>
/// Shows the releases that had a drawing on its own: opens a Drawing Sets window on its
@@ -387,18 +391,43 @@ namespace OpenNest.Controls
{
if (e.RowIndex < 0)
return;
if (nest == null)
await EditSelectedAsync();
else
await AddSelectedAsync();
await ActivateSelectedAsync();
}
private async void AddButton_Click(object sender, EventArgs e) => await AddSelectedAsync();
// Without a nest a drawing is added to the release where there is one, else edited.
private Task ActivateSelectedAsync() =>
nest != null ? AddSelectedAsync()
: AddToRelease != null ? AddSelectedToReleaseAsync()
: EditSelectedAsync();
private async void AddButton_Click(object sender, EventArgs e) =>
await (nest == null ? AddSelectedToReleaseAsync() : AddSelectedAsync());
/// <summary>
/// Lets the drawing menu release a drawing on its own: nests are saved through
/// <paramref name="nests"/> and each is opened with <paramref name="openNest"/>; a nest
/// <paramref name="isNestOpen"/> reports as open in a tab is never merged into.
/// Without a nest: a double-click, Enter, Add to Release or the drawing menu adds the
/// drawing on its own, at the entered quantity, through <paramref name="addToRelease"/>
/// (the Drawing Sets window's release panel).
/// </summary>
public void EnableRelease(Action<DrawingLibraryRecord, int> addToRelease)
{
if (sets == null || nest != null)
return;
AddToRelease = addToRelease ?? throw new ArgumentNullException(nameof(addToRelease));
addButton.Text = "Add to Release";
addButton.Visible = true;
releaseMenuItem.Text = "Add to Release";
releaseMenuItem.ToolTipText = "Add this drawing on its own, at the entered quantity, to the release";
releaseSeparator.Visible = true;
releaseMenuItem.Visible = true;
UpdateFilterLabel();
UpdateCommands();
}
/// <summary>
/// With a nest: lets the drawing menu release a drawing on its own in the release dialog:
/// nests are saved through <paramref name="nests"/> and each is opened with
/// <paramref name="openNest"/>; a nest <paramref name="isNestOpen"/> reports as open in a
/// tab is never merged into.
/// </summary>
public void EnableRelease(INestRepository nests, Action<Nest, NestRecord> openNest, Func<Guid, bool> isNestOpen = null)
{
@@ -406,7 +435,7 @@ namespace OpenNest.Controls
return;
ArgumentNullException.ThrowIfNull(nests);
ArgumentNullException.ThrowIfNull(openNest);
ShowRelease = (record, quantity) =>
AddToRelease = (record, quantity) =>
{
using var form = new ReleaseSetForm(sets, library, nests, serverUrl, Array.Empty<DrawingSetRecord>(),
new[] { new SetReleaseDrawingLine(record, quantity) }, openNest)
@@ -431,11 +460,11 @@ namespace OpenNest.Controls
editMenuItem.Enabled = record is { Archived: false } && !adding;
usedInSetsMenuItem.Enabled = record != null && !adding;
addToSetMenuItem.Enabled = record != null && !adding;
releaseMenuItem.Enabled = record is { Archived: false } && !adding && ShowRelease != null;
releaseMenuItem.Enabled = record is { Archived: false } && !adding && AddToRelease != null;
releasesMenuItem.Enabled = record != null && !adding;
}
private async void ReleaseMenuItem_Click(object sender, EventArgs e) => await ReleaseSelectedAsync();
private async void ReleaseMenuItem_Click(object sender, EventArgs e) => await AddSelectedToReleaseAsync();
private void ReleasesMenuItem_Click(object sender, EventArgs e)
{
@@ -444,13 +473,13 @@ namespace OpenNest.Controls
}
/// <summary>
/// Reads the selected drawing's current record and opens the release dialog with it at
/// the entered quantity; more drawings and sets can be added there.
/// Reads the selected drawing's current record and adds it to the release at the entered
/// quantity.
/// </summary>
internal async Task ReleaseSelectedAsync()
internal async Task AddSelectedToReleaseAsync()
{
var listed = SelectedRecord();
if (listed == null || ShowRelease == null || adding)
if (listed == null || AddToRelease == null || adding)
return;
DrawingLibraryRecord current;
@@ -484,7 +513,7 @@ namespace OpenNest.Controls
return;
}
ShowRelease(current, (int)quantityBox.Value);
AddToRelease(current, (int)quantityBox.Value);
}
private async void UsedInSetsMenuItem_Click(object sender, EventArgs e) => await ShowUsedInSetsAsync();
@@ -623,7 +652,7 @@ namespace OpenNest.Controls
{
if (keyData == Keys.Enter && drawingGrid.ContainsFocus && SelectedRecord() != null)
{
_ = nest == null ? EditSelectedAsync() : AddSelectedAsync();
_ = ActivateSelectedAsync();
return true;
}
@@ -743,7 +772,8 @@ namespace OpenNest.Controls
private void UpdateCommands()
{
addButton.Enabled = !adding && nest != null && SelectedRecord() != null;
addButton.Enabled = !adding && (nest != null ? SelectedRecord() != null
: AddToRelease != null && SelectedRecord() is { Archived: false });
editButton.Enabled = !adding && SelectedRecord() is { Archived: false };
}
@@ -751,7 +781,9 @@ namespace OpenNest.Controls
{
if (nest == null)
{
filterLabel.Text = "Showing every active drawing. Double-click one to edit it.";
filterLabel.Text = AddToRelease != null
? "Showing every active drawing. Double-click one to add it to the release."
: "Showing every active drawing. Double-click one to edit it.";
return;
}
+29 -4
View File
@@ -48,6 +48,9 @@ namespace OpenNest.Controls
statusLabel = new System.Windows.Forms.Label();
searchTimer = new System.Windows.Forms.Timer(components);
moreMenu = new System.Windows.Forms.ContextMenuStrip(components);
addToReleaseMenuItem = new System.Windows.Forms.ToolStripMenuItem();
editMenuItem = new System.Windows.Forms.ToolStripMenuItem();
editSeparator = new System.Windows.Forms.ToolStripSeparator();
archiveMenuItem = new System.Windows.Forms.ToolStripMenuItem();
historyMenuItem = new System.Windows.Forms.ToolStripMenuItem();
previewMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -135,7 +138,7 @@ namespace OpenNest.Controls
setGrid.AllowUserToDeleteRows = false;
setGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { nameColumn, customerColumn, membersColumn, revisionColumn, savedColumn, savedByColumn, stateColumn });
setGrid.Dock = System.Windows.Forms.DockStyle.Fill;
setGrid.MultiSelect = false;
setGrid.MultiSelect = true;
setGrid.Name = "setGrid";
setGrid.ReadOnly = true;
setGrid.RowHeadersVisible = false;
@@ -319,7 +322,7 @@ namespace OpenNest.Controls
releaseButton.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3);
releaseButton.Name = "releaseButton";
releaseButton.TabIndex = 7;
releaseButton.Text = "&Make Nests...";
releaseButton.Text = "&Add to Release";
releaseButton.UseVisualStyleBackColor = true;
releaseButton.Visible = false;
releaseButton.Click += ReleaseButton_Click;
@@ -340,10 +343,29 @@ namespace OpenNest.Controls
//
// moreMenu
//
moreMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { previewMenuItem, archiveMenuItem, historyMenuItem, releasesMenuItem, importSeparator, importBomMenuItem });
moreMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { addToReleaseMenuItem, editMenuItem, previewMenuItem, editSeparator, archiveMenuItem, historyMenuItem, releasesMenuItem, importSeparator, importBomMenuItem });
moreMenu.Name = "moreMenu";
moreMenu.Opening += MoreMenu_Opening;
//
// addToReleaseMenuItem
//
addToReleaseMenuItem.Enabled = false;
addToReleaseMenuItem.Name = "addToReleaseMenuItem";
addToReleaseMenuItem.Text = "Add to Re&lease";
addToReleaseMenuItem.Visible = false;
addToReleaseMenuItem.Click += ReleaseButton_Click;
//
// editMenuItem
//
editMenuItem.Enabled = false;
editMenuItem.Name = "editMenuItem";
editMenuItem.Text = "&Edit Set...";
editMenuItem.Click += EditButton_Click;
//
// editSeparator
//
editSeparator.Name = "editSeparator";
//
// previewMenuItem
//
previewMenuItem.Enabled = false;
@@ -369,7 +391,7 @@ namespace OpenNest.Controls
//
releasesMenuItem.Enabled = false;
releasesMenuItem.Name = "releasesMenuItem";
releasesMenuItem.Text = "Re&leases...";
releasesMenuItem.Text = "Relea&ses...";
releasesMenuItem.Click += ReleasesMenuItem_Click;
//
// importSeparator
@@ -432,6 +454,9 @@ namespace OpenNest.Controls
private System.Windows.Forms.Label statusLabel;
private System.Windows.Forms.Timer searchTimer;
private System.Windows.Forms.ContextMenuStrip moreMenu;
private System.Windows.Forms.ToolStripMenuItem addToReleaseMenuItem;
private System.Windows.Forms.ToolStripMenuItem editMenuItem;
private System.Windows.Forms.ToolStripSeparator editSeparator;
private System.Windows.Forms.ToolStripMenuItem archiveMenuItem;
private System.Windows.Forms.ToolStripMenuItem historyMenuItem;
private System.Windows.Forms.ToolStripMenuItem previewMenuItem;
+67 -42
View File
@@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -15,11 +17,13 @@ namespace OpenNest.Controls
/// <summary>
/// Browses the server's drawing sets one bounded page at a time through
/// <see cref="DrawingSetBrowseSession"/>, and creates, edits, archives or restores them and
/// shows their history. <see cref="DrawingSetsForm"/> hosts it on its Sets tab to manage and
/// release sets, and shows a set's Releases on its Releases tab. New Set, Edit, Preview and
/// Make Nests are buttons; Preview, Archive/Restore, History and Releases, then Import BOM,
/// are in the More menu, which is also the list's right-click menu. Preview shows all of a
/// set's drawings in one window at the same scale (<see cref="DrawingSetPreviewForm"/>). In pick mode
/// shows their history. <see cref="DrawingSetsForm"/> hosts it on its Sets tab beside its
/// <see cref="ReleasePanel"/>, and shows a set's Releases on its Releases tab. Once release is
/// enabled, a double-click or Enter adds the set to the release (Add to Release does so for
/// every selected set); Edit opens the set editor. New Set, Edit, Preview and Add to Release
/// are buttons; Add to Release, Edit Set, Preview, Archive/Restore, History and Releases, then
/// Import BOM, are in the More menu, which is also the list's right-click menu. Preview shows
/// all of a set's drawings in one window at the same scale (<see cref="DrawingSetPreviewForm"/>). In pick mode
/// (<see cref="ChooseDrawingSetForm"/>) only active sets are listed, and choosing a set or
/// New Set raises <see cref="SetActivated"/> or <see cref="NewSetChosen"/> instead.
/// </summary>
@@ -28,9 +32,6 @@ namespace OpenNest.Controls
private IDrawingSetStore sets;
private IDrawingLibraryStore library;
private string serverUrl;
private INestRepository nests;
private Action<Nest, NestRecord> openNest;
private Func<Guid, bool> isNestOpen = _ => false;
private DrawingSetBrowseSession session;
private BrowsePager<DrawingSetPage, DrawingSetSortField> pager;
private bool pick;
@@ -57,8 +58,8 @@ namespace OpenNest.Controls
/// <summary>Shows the same-scale preview of a set read with its members; replaced by tests.</summary>
internal Action<DrawingSetRecord> ShowPreview { get; set; }
/// <summary>Shows the release dialog for a set read with its members; replaced by tests.</summary>
internal Action<DrawingSetRecord> ShowRelease { get; set; }
/// <summary>Adds a set read with its members to the release; set by <see cref="EnableRelease"/>.</summary>
internal Action<DrawingSetRecord> AddToRelease { get; private set; }
/// <summary>Pick mode: an active set was double-clicked (or chosen with Enter).</summary>
public event EventHandler SetActivated;
@@ -88,6 +89,14 @@ namespace OpenNest.Controls
/// <summary>The highlighted set as listed (without members).</summary>
public DrawingSetRecord SelectedSet => setGrid.CurrentRow?.Tag as DrawingSetRecord;
/// <summary>The selected sets as listed, in list order; the highlighted one when none is selected.</summary>
internal IReadOnlyList<DrawingSetRecord> SelectedSets()
{
var selected = setGrid.SelectedRows.Cast<DataGridViewRow>().OrderBy(r => r.Index)
.Select(r => r.Tag).OfType<DrawingSetRecord>().ToList();
return selected.Count > 0 || SelectedSet == null ? selected : new[] { SelectedSet };
}
/// <param name="library">Used by the set editor to pick drawings.</param>
/// <param name="pick">Choose an active set instead of managing them.</param>
public void Initialize(IDrawingSetStore sets, IDrawingLibraryStore library, string serverUrl, bool pick = false)
@@ -135,11 +144,9 @@ namespace OpenNest.Controls
});
form.ShowDialog(FindForm());
};
ShowRelease = set =>
{
using var form = new ReleaseSetForm(sets, library, nests, this.serverUrl, set, openNest) { IsNestOpen = isNestOpen };
form.ShowDialog(FindForm());
};
setGrid.MultiSelect = !pick;
// Add to Release acts on every selected set.
setGrid.SelectionChanged += (_, _) => UpdateCommands();
if (pick)
{
@@ -155,19 +162,16 @@ namespace OpenNest.Controls
}
/// <summary>
/// Shows Release, which makes nests from the selected set and any others the operator
/// adds: saves them through <paramref name="nests"/> and opens each with
/// <paramref name="openNest"/>. <paramref name="isNestOpen"/> says whether a server nest
/// is open in a tab, which keeps a release from merging into it.
/// Shows Add to Release and makes a double-click or Enter add the set, read with its
/// members' current drawings, through <paramref name="addToRelease"/>.
/// </summary>
public void EnableRelease(INestRepository nests, Action<Nest, NestRecord> openNest, Func<Guid, bool> isNestOpen = null)
public void EnableRelease(Action<DrawingSetRecord> addToRelease)
{
this.isNestOpen = isNestOpen ?? (_ => false);
if (session == null || pick)
throw new InvalidOperationException("Release needs an initialized set browser that is not picking.");
this.nests = nests ?? throw new ArgumentNullException(nameof(nests));
this.openNest = openNest ?? throw new ArgumentNullException(nameof(openNest));
AddToRelease = addToRelease ?? throw new ArgumentNullException(nameof(addToRelease));
releaseButton.Visible = true;
addToReleaseMenuItem.Visible = true;
UpdateCommands();
}
@@ -223,6 +227,8 @@ namespace OpenNest.Controls
return;
if (pick)
ActivateSelected();
else if (AddToRelease != null)
await AddSelectedToReleaseAsync(highlightedOnly: true);
else
await EditSelectedAsync();
}
@@ -249,6 +255,8 @@ namespace OpenNest.Controls
{
if (pick)
ActivateSelected();
else if (AddToRelease != null)
_ = AddSelectedToReleaseAsync();
else
_ = EditSelectedAsync();
return true;
@@ -277,7 +285,7 @@ namespace OpenNest.Controls
ShowReleases?.Invoke(set);
}
private async void ReleaseButton_Click(object sender, EventArgs e) => await ReleaseSelectedAsync();
private async void ReleaseButton_Click(object sender, EventArgs e) => await AddSelectedToReleaseAsync();
private async void ImportBomMenuItem_Click(object sender, EventArgs e) => await ImportBomAsync();
@@ -307,24 +315,41 @@ namespace OpenNest.Controls
statusLabel.Text = $"Saved set '{saved.Name}' revision {saved.Revision}.";
}
/// <summary>Reads the selected active set with its members' current drawings and opens the release dialog.</summary>
internal async Task ReleaseSelectedAsync()
/// <summary>
/// Reads each selected active set with its members' current drawings and adds it to the
/// release at one kit; <paramref name="highlightedOnly"/> takes just the highlighted one,
/// as a double-click does.
/// </summary>
internal async Task AddSelectedToReleaseAsync(bool highlightedOnly = false)
{
var listed = SelectedSet;
if (session == null || nests == null || listed == null || listed.Archived || busy)
if (session == null || AddToRelease == null || busy)
return;
var chosen = (highlightedOnly && SelectedSet != null ? new[] { SelectedSet } : SelectedSets())
.Where(s => !s.Archived).ToList();
if (chosen.Count == 0)
return;
DrawingSetRecord current;
var read = new List<DrawingSetRecord>();
var gone = new List<string>();
busy = true;
UpdateCommands();
statusLabel.Text = $"Reading set '{listed.Name}'...";
try
{
current = await sets.GetAsync(listed.Id);
foreach (var listed in chosen)
{
statusLabel.Text = $"Reading set '{listed.Name}'...";
var current = await sets.GetAsync(listed.Id);
if (IsDisposed)
return;
if (current == null || current.Archived)
gone.Add(listed.Name);
else
read.Add(current);
}
}
catch (Exception ex) when (ex is IOException || ex is HttpRequestException || ex is TaskCanceledException)
{
Fail($"Could not read set '{listed.Name}': {ex.Message}");
Fail($"Could not read the set: {ex.Message}");
return;
}
finally
@@ -334,19 +359,15 @@ namespace OpenNest.Controls
UpdateCommands();
}
if (IsDisposed)
return;
statusLabel.Text = "";
if (current == null || current.Archived)
foreach (var set in read)
AddToRelease(set);
if (gone.Count > 0)
{
ShowMessage(current == null
? $"Set '{listed.Name}' no longer exists on the server."
: $"Set '{listed.Name}' was archived. Restore it to release it.", MessageBoxButtons.OK, MessageBoxIcon.Warning);
ShowMessage($"No longer releasable (deleted or archived since listed): {string.Join(", ", gone.Select(n => $"'{n}'"))}.",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
await RunAsync(session.RefreshAsync);
return;
}
ShowRelease(current);
}
/// <summary>
@@ -554,6 +575,8 @@ namespace OpenNest.Controls
var ready = session != null && !busy;
newButton.Enabled = ready;
editButton.Enabled = ready && selected is { Archived: false };
editMenuItem.Enabled = editButton.Enabled;
editMenuItem.Visible = editSeparator.Visible = !pick;
previewButton.Enabled = previewMenuItem.Enabled = ready && !pick && selected is { MemberCount: > 0 };
archiveMenuItem.Enabled = ready && selected != null;
archiveMenuItem.Text = selected is { Archived: true } ? "&Restore" : "&Archive";
@@ -562,7 +585,9 @@ namespace OpenNest.Controls
importBomMenuItem.Enabled = ready && !pick;
moreButton.Enabled = previewMenuItem.Enabled || archiveMenuItem.Enabled || historyMenuItem.Enabled || releasesMenuItem.Enabled
|| importBomMenuItem.Enabled;
releaseButton.Enabled = ready && nests != null && selected is { Archived: false, MemberCount: > 0 };
releaseButton.Enabled = ready && AddToRelease != null
&& SelectedSets().Any(s => !s.Archived && s.MemberCount > 0);
addToReleaseMenuItem.Enabled = releaseButton.Enabled;
}
}
}
+4 -2
View File
@@ -19,7 +19,8 @@ public static class GridStyle
private static readonly Color SelectionBackColor = Color.FromArgb(204, 228, 247);
private static readonly Color LineColor = Color.FromArgb(230, 230, 230);
public static T Apply<T>(T grid) where T : DataGridView
/// <param name="sizeColumns">False leaves column widths to the grid, as for columns that fill it.</param>
public static T Apply<T>(T grid, bool sizeColumns = true) where T : DataGridView
{
grid.AllowUserToResizeRows = false;
grid.BackgroundColor = SystemColors.Window;
@@ -44,7 +45,8 @@ public static class GridStyle
grid.RowHeadersDefaultCellStyle.SelectionBackColor = SelectionBackColor;
grid.RowHeadersDefaultCellStyle.SelectionForeColor = Color.Black;
grid.RowHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
SizeColumnsOnceToContent(grid);
if (sizeColumns)
SizeColumnsOnceToContent(grid);
return grid;
}
+468
View File
@@ -0,0 +1,468 @@
namespace OpenNest.Controls
{
partial class ReleasePanel
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing)
{
cancellation?.Dispose();
if (components != null)
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle rightAligned = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle wrapped = new System.Windows.Forms.DataGridViewCellStyle();
layoutTable = new System.Windows.Forms.TableLayoutPanel();
headingLabel = new System.Windows.Forms.Label();
hintLabel = new System.Windows.Forms.Label();
lineGrid = new System.Windows.Forms.DataGridView();
lineNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
lineQuantityColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
lineUnitColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
lineRemoveColumn = new System.Windows.Forms.DataGridViewButtonColumn();
detailsTable = new System.Windows.Forms.TableLayoutPanel();
customerLabel = new System.Windows.Forms.Label();
customerValue = new System.Windows.Forms.Label();
notesLabel = new System.Windows.Forms.Label();
notesBox = new System.Windows.Forms.TextBox();
nestsTable = new System.Windows.Forms.TableLayoutPanel();
nestsLabel = new System.Windows.Forms.Label();
includeArchivedCheckBox = new System.Windows.Forms.CheckBox();
groupGrid = new System.Windows.Forms.DataGridView();
includeColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
groupColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
partsColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
targetColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
statusColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
previewLabel = new System.Windows.Forms.Label();
bottomTable = new System.Windows.Forms.TableLayoutPanel();
fixDrawingsButton = new System.Windows.Forms.Button();
nestAfterReleaseCheckBox = new System.Windows.Forms.CheckBox();
clearButton = new System.Windows.Forms.Button();
releaseButton = new System.Windows.Forms.Button();
statusLabel = new System.Windows.Forms.Label();
groupMenu = new System.Windows.Forms.ContextMenuStrip(components);
layoutTable.SuspendLayout();
((System.ComponentModel.ISupportInitialize)lineGrid).BeginInit();
detailsTable.SuspendLayout();
nestsTable.SuspendLayout();
((System.ComponentModel.ISupportInitialize)groupGrid).BeginInit();
bottomTable.SuspendLayout();
SuspendLayout();
//
// layoutTable
//
layoutTable.ColumnCount = 1;
layoutTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
layoutTable.Controls.Add(headingLabel, 0, 0);
layoutTable.Controls.Add(hintLabel, 0, 1);
layoutTable.Controls.Add(lineGrid, 0, 2);
layoutTable.Controls.Add(detailsTable, 0, 3);
layoutTable.Controls.Add(nestsTable, 0, 4);
layoutTable.Controls.Add(groupGrid, 0, 5);
layoutTable.Controls.Add(previewLabel, 0, 6);
layoutTable.Controls.Add(bottomTable, 0, 7);
layoutTable.Controls.Add(statusLabel, 0, 8);
layoutTable.Dock = System.Windows.Forms.DockStyle.Fill;
layoutTable.Location = new System.Drawing.Point(0, 0);
layoutTable.Name = "layoutTable";
layoutTable.RowCount = 9;
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F));
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 60F));
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.Size = new System.Drawing.Size(560, 600);
layoutTable.TabIndex = 0;
//
// headingLabel
//
headingLabel.AutoEllipsis = true;
headingLabel.Dock = System.Windows.Forms.DockStyle.Fill;
headingLabel.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold);
headingLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 3);
headingLabel.Name = "headingLabel";
headingLabel.Size = new System.Drawing.Size(100, 24);
headingLabel.TabIndex = 0;
headingLabel.Text = "Release";
//
// hintLabel
//
hintLabel.AutoSize = true;
hintLabel.ForeColor = System.Drawing.SystemColors.GrayText;
hintLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 6);
hintLabel.Name = "hintLabel";
hintLabel.TabIndex = 1;
hintLabel.Text = "Double-click a set or a drawing to add it.";
//
// lineGrid
//
lineGrid.AllowUserToAddRows = false;
lineGrid.AllowUserToDeleteRows = false;
lineGrid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
lineGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { lineNameColumn, lineQuantityColumn, lineUnitColumn, lineRemoveColumn });
lineGrid.Dock = System.Windows.Forms.DockStyle.Fill;
lineGrid.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
lineGrid.Margin = new System.Windows.Forms.Padding(3, 0, 3, 6);
lineGrid.MultiSelect = false;
lineGrid.Name = "lineGrid";
lineGrid.RowHeadersVisible = false;
lineGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
lineGrid.StandardTab = true;
lineGrid.TabIndex = 2;
lineGrid.CellContentClick += LineGrid_CellContentClick;
lineGrid.CellValidating += LineGrid_CellValidating;
lineGrid.CellValueChanged += LineGrid_CellValueChanged;
lineGrid.KeyDown += LineGrid_KeyDown;
//
// lineNameColumn
//
lineNameColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
lineNameColumn.HeaderText = "Set or drawing";
lineNameColumn.Name = "lineNameColumn";
lineNameColumn.ReadOnly = true;
lineNameColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// lineQuantityColumn
//
rightAligned.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
lineQuantityColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
lineQuantityColumn.DefaultCellStyle = rightAligned;
lineQuantityColumn.HeaderText = "Qty";
lineQuantityColumn.Name = "lineQuantityColumn";
lineQuantityColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
lineQuantityColumn.ToolTipText = "Kits of a set (every quantity in it is multiplied) or pieces of a drawing.";
lineQuantityColumn.Width = 55;
//
// lineUnitColumn
//
lineUnitColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
lineUnitColumn.HeaderText = "";
lineUnitColumn.Name = "lineUnitColumn";
lineUnitColumn.ReadOnly = true;
lineUnitColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
lineUnitColumn.Width = 42;
//
// lineRemoveColumn
//
lineRemoveColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
lineRemoveColumn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
lineRemoveColumn.HeaderText = "";
lineRemoveColumn.Name = "lineRemoveColumn";
lineRemoveColumn.Text = "✕";
lineRemoveColumn.ToolTipText = "Remove from the release";
lineRemoveColumn.UseColumnTextForButtonValue = true;
lineRemoveColumn.Width = 30;
//
// detailsTable
//
detailsTable.AutoSize = true;
detailsTable.ColumnCount = 2;
detailsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
detailsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
detailsTable.Controls.Add(customerLabel, 0, 0);
detailsTable.Controls.Add(customerValue, 1, 0);
detailsTable.Controls.Add(notesLabel, 0, 1);
detailsTable.Controls.Add(notesBox, 1, 1);
detailsTable.Dock = System.Windows.Forms.DockStyle.Fill;
detailsTable.Margin = new System.Windows.Forms.Padding(0, 0, 0, 6);
detailsTable.Name = "detailsTable";
detailsTable.RowCount = 2;
detailsTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
detailsTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
detailsTable.TabIndex = 3;
//
// customerLabel
//
customerLabel.Anchor = System.Windows.Forms.AnchorStyles.Left;
customerLabel.AutoSize = true;
customerLabel.Name = "customerLabel";
customerLabel.TabIndex = 0;
customerLabel.Text = "Customer:";
//
// customerValue
//
customerValue.AutoEllipsis = true;
customerValue.Dock = System.Windows.Forms.DockStyle.Fill;
customerValue.Name = "customerValue";
customerValue.Size = new System.Drawing.Size(100, 22);
customerValue.TabIndex = 1;
customerValue.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// notesLabel
//
notesLabel.Anchor = System.Windows.Forms.AnchorStyles.Left;
notesLabel.AutoSize = true;
notesLabel.Name = "notesLabel";
notesLabel.TabIndex = 2;
notesLabel.Text = "Notes:";
//
// notesBox
//
notesBox.Dock = System.Windows.Forms.DockStyle.Fill;
notesBox.MaxLength = 4000;
notesBox.Name = "notesBox";
notesBox.TabIndex = 3;
//
// nestsTable
//
nestsTable.AutoSize = true;
nestsTable.ColumnCount = 2;
nestsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
nestsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
nestsTable.Controls.Add(nestsLabel, 0, 0);
nestsTable.Controls.Add(includeArchivedCheckBox, 1, 0);
nestsTable.Dock = System.Windows.Forms.DockStyle.Fill;
nestsTable.Margin = new System.Windows.Forms.Padding(0);
nestsTable.Name = "nestsTable";
nestsTable.RowCount = 1;
nestsTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
nestsTable.TabIndex = 4;
//
// nestsLabel
//
nestsLabel.Anchor = System.Windows.Forms.AnchorStyles.Left;
nestsLabel.AutoSize = true;
nestsLabel.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold);
nestsLabel.Name = "nestsLabel";
nestsLabel.TabIndex = 0;
nestsLabel.Text = "Nests it will make";
//
// includeArchivedCheckBox
//
includeArchivedCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Right;
includeArchivedCheckBox.AutoSize = true;
includeArchivedCheckBox.Name = "includeArchivedCheckBox";
includeArchivedCheckBox.TabIndex = 1;
includeArchivedCheckBox.Text = "Include archived drawings";
includeArchivedCheckBox.UseVisualStyleBackColor = true;
includeArchivedCheckBox.Visible = false;
includeArchivedCheckBox.CheckedChanged += IncludeArchivedCheckBox_CheckedChanged;
//
// groupGrid
//
groupGrid.AllowUserToAddRows = false;
groupGrid.AllowUserToDeleteRows = false;
groupGrid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
groupGrid.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
groupGrid.ContextMenuStrip = groupMenu;
groupGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { includeColumn, groupColumn, partsColumn, targetColumn, statusColumn });
groupGrid.Dock = System.Windows.Forms.DockStyle.Fill;
groupGrid.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
groupGrid.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3);
groupGrid.MultiSelect = false;
groupGrid.Name = "groupGrid";
groupGrid.RowHeadersVisible = false;
groupGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
groupGrid.StandardTab = true;
groupGrid.TabIndex = 5;
groupGrid.CellValueChanged += GroupGrid_CellValueChanged;
groupGrid.CurrentCellDirtyStateChanged += GroupGrid_CurrentCellDirtyStateChanged;
groupGrid.DataError += GroupGrid_DataError;
groupGrid.CellDoubleClick += GroupGrid_CellDoubleClick;
groupGrid.CellMouseDown += GroupGrid_CellMouseDown;
groupGrid.CurrentCellChanged += GroupGrid_CurrentCellChanged;
//
// includeColumn
//
includeColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
includeColumn.HeaderText = "";
includeColumn.Name = "includeColumn";
includeColumn.ToolTipText = "Untick to leave this material out of the release.";
includeColumn.Width = 28;
//
// groupColumn
//
wrapped.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
groupColumn.DefaultCellStyle = wrapped;
groupColumn.FillWeight = 40F;
groupColumn.HeaderText = "Material";
groupColumn.Name = "groupColumn";
groupColumn.ReadOnly = true;
groupColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// partsColumn
//
partsColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
partsColumn.DefaultCellStyle = rightAligned;
partsColumn.HeaderText = "Parts";
partsColumn.Name = "partsColumn";
partsColumn.ReadOnly = true;
partsColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
partsColumn.Width = 50;
//
// targetColumn
//
targetColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
targetColumn.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
targetColumn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
targetColumn.HeaderText = "Nest";
targetColumn.Name = "targetColumn";
targetColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
targetColumn.ToolTipText = "Merge into a Draft nest of the same material (it is renested), or make a new one.";
targetColumn.Width = 150;
//
// statusColumn
//
statusColumn.DefaultCellStyle = wrapped;
statusColumn.FillWeight = 60F;
statusColumn.HeaderText = "What happens";
statusColumn.Name = "statusColumn";
statusColumn.ReadOnly = true;
statusColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// previewLabel
//
previewLabel.AutoSize = true;
previewLabel.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3);
previewLabel.Name = "previewLabel";
previewLabel.TabIndex = 6;
//
// bottomTable
//
bottomTable.AutoSize = true;
bottomTable.ColumnCount = 5;
bottomTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
bottomTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
bottomTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
bottomTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
bottomTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
bottomTable.Controls.Add(fixDrawingsButton, 0, 0);
bottomTable.Controls.Add(nestAfterReleaseCheckBox, 2, 0);
bottomTable.Controls.Add(clearButton, 3, 0);
bottomTable.Controls.Add(releaseButton, 4, 0);
bottomTable.Dock = System.Windows.Forms.DockStyle.Fill;
bottomTable.Margin = new System.Windows.Forms.Padding(0, 3, 0, 0);
bottomTable.Name = "bottomTable";
bottomTable.RowCount = 1;
bottomTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
bottomTable.TabIndex = 7;
//
// fixDrawingsButton
//
fixDrawingsButton.AutoSize = true;
fixDrawingsButton.Enabled = false;
fixDrawingsButton.Name = "fixDrawingsButton";
fixDrawingsButton.TabIndex = 0;
fixDrawingsButton.Text = "Fix Drawings...";
fixDrawingsButton.UseVisualStyleBackColor = true;
fixDrawingsButton.Visible = false;
fixDrawingsButton.Click += FixDrawingsButton_Click;
//
// nestAfterReleaseCheckBox
//
nestAfterReleaseCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Right;
nestAfterReleaseCheckBox.AutoSize = true;
nestAfterReleaseCheckBox.Checked = true;
nestAfterReleaseCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
nestAfterReleaseCheckBox.Margin = new System.Windows.Forms.Padding(3, 3, 9, 3);
nestAfterReleaseCheckBox.Name = "nestAfterReleaseCheckBox";
nestAfterReleaseCheckBox.TabIndex = 1;
nestAfterReleaseCheckBox.Text = "Nest after release";
nestAfterReleaseCheckBox.UseVisualStyleBackColor = true;
nestAfterReleaseCheckBox.CheckedChanged += NestAfterReleaseCheckBox_CheckedChanged;
//
// clearButton
//
clearButton.AutoSize = true;
clearButton.Enabled = false;
clearButton.Name = "clearButton";
clearButton.TabIndex = 2;
clearButton.Text = "Clear";
clearButton.UseVisualStyleBackColor = true;
clearButton.Click += ClearButton_Click;
//
// releaseButton
//
releaseButton.AutoSize = true;
releaseButton.Enabled = false;
releaseButton.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold);
releaseButton.MinimumSize = new System.Drawing.Size(0, 32);
releaseButton.Name = "releaseButton";
releaseButton.TabIndex = 3;
releaseButton.Text = "Make Nests";
releaseButton.UseVisualStyleBackColor = true;
releaseButton.Click += ReleaseButton_Click;
//
// statusLabel
//
statusLabel.AutoSize = true;
statusLabel.Margin = new System.Windows.Forms.Padding(3, 6, 3, 0);
statusLabel.Name = "statusLabel";
statusLabel.TabIndex = 8;
//
// groupMenu
//
groupMenu.Name = "groupMenu";
groupMenu.Opening += GroupMenu_Opening;
//
// ReleasePanel
//
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
Controls.Add(layoutTable);
Font = new System.Drawing.Font("Segoe UI", 9.75F);
MinimumSize = new System.Drawing.Size(420, 360);
Name = "ReleasePanel";
Size = new System.Drawing.Size(560, 600);
Resize += ReleasePanel_Resize;
layoutTable.ResumeLayout(false);
layoutTable.PerformLayout();
((System.ComponentModel.ISupportInitialize)lineGrid).EndInit();
detailsTable.ResumeLayout(false);
detailsTable.PerformLayout();
nestsTable.ResumeLayout(false);
nestsTable.PerformLayout();
((System.ComponentModel.ISupportInitialize)groupGrid).EndInit();
bottomTable.ResumeLayout(false);
bottomTable.PerformLayout();
ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel layoutTable;
private System.Windows.Forms.Label headingLabel;
private System.Windows.Forms.Label hintLabel;
private System.Windows.Forms.DataGridView lineGrid;
private System.Windows.Forms.DataGridViewTextBoxColumn lineNameColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn lineQuantityColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn lineUnitColumn;
private System.Windows.Forms.DataGridViewButtonColumn lineRemoveColumn;
private System.Windows.Forms.TableLayoutPanel detailsTable;
private System.Windows.Forms.Label customerLabel;
private System.Windows.Forms.Label customerValue;
private System.Windows.Forms.Label notesLabel;
private System.Windows.Forms.TextBox notesBox;
private System.Windows.Forms.TableLayoutPanel nestsTable;
private System.Windows.Forms.Label nestsLabel;
private System.Windows.Forms.CheckBox includeArchivedCheckBox;
private System.Windows.Forms.DataGridView groupGrid;
private System.Windows.Forms.DataGridViewCheckBoxColumn includeColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn groupColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn partsColumn;
private System.Windows.Forms.DataGridViewComboBoxColumn targetColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn statusColumn;
private System.Windows.Forms.Label previewLabel;
private System.Windows.Forms.TableLayoutPanel bottomTable;
private System.Windows.Forms.Button fixDrawingsButton;
private System.Windows.Forms.CheckBox nestAfterReleaseCheckBox;
private System.Windows.Forms.Button clearButton;
private System.Windows.Forms.Button releaseButton;
private System.Windows.Forms.Label statusLabel;
private System.Windows.Forms.ContextMenuStrip groupMenu;
}
}
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -298,7 +298,7 @@ namespace OpenNest.Controls
newReleaseButton.AutoSize = true;
newReleaseButton.Name = "newReleaseButton";
newReleaseButton.TabIndex = 3;
newReleaseButton.Text = "New Release...";
newReleaseButton.Text = "New Release";
newReleaseButton.UseVisualStyleBackColor = true;
newReleaseButton.Visible = false;
newReleaseButton.Click += NewReleaseButton_Click;
+11 -34
View File
@@ -17,8 +17,9 @@ namespace OpenNest.Controls
/// the release did to each and their current status, or Deleted. A filter narrows the list
/// to the releases that include one set, or one library drawing on its own; the filter
/// shows above the list until Clear Filter. The server joins every nest's current metadata
/// on each read. New Release opens the release dialog empty; the list re-reads once a
/// release is recorded. Undo Release deletes the nests a release created and restores the
/// on each read. New Release switches to the Sets tab, where the window's
/// <see cref="ReleasePanel"/> builds the release; the list re-reads when the tab is shown
/// again. Undo Release deletes the nests a release created and restores the
/// drafts it merged into, all or nothing; nests changed since can be left as they are.
/// </summary>
public partial class SetReleasesView : UserControl
@@ -38,11 +39,8 @@ namespace OpenNest.Controls
/// <summary>Shows a message and returns the operator's answer; replaced by tests.</summary>
internal Func<string, MessageBoxButtons, MessageBoxIcon, DialogResult> ShowMessage { get; set; }
/// <summary>
/// Shows the release dialog empty and returns true when it recorded a release; set by
/// <see cref="EnableRelease"/> and replaced by tests.
/// </summary>
internal Func<bool> ShowNewRelease { get; set; }
/// <summary>Starts a release in the host's release panel; set by <see cref="EnableRelease"/>.</summary>
internal Action StartRelease { get; private set; }
public SetReleasesView()
{
@@ -71,27 +69,12 @@ namespace OpenNest.Controls
ShowMessage = (text, buttons, icon) => MessageBox.Show(FindForm(), text, FindForm()?.Text ?? "Releases", buttons, icon);
}
/// <summary>
/// Shows New Release: the release dialog starts empty, saves nests through
/// <paramref name="nests"/> and opens each with <paramref name="openNest"/>; a nest
/// <paramref name="isNestOpen"/> reports as open in a tab is never merged into.
/// </summary>
public void EnableRelease(IDrawingLibrary library, INestRepository nests, string serverUrl,
Action<Nest, NestRecord> openNest, Func<Guid, bool> isNestOpen = null)
/// <summary>Shows New Release, which calls <paramref name="startRelease"/>.</summary>
public void EnableRelease(Action startRelease)
{
ArgumentNullException.ThrowIfNull(library);
ArgumentNullException.ThrowIfNull(nests);
ArgumentNullException.ThrowIfNull(openNest);
if (sets == null)
throw new InvalidOperationException("New Release needs an initialized releases view.");
ShowNewRelease = () =>
{
using var form = new ReleaseSetForm(sets, library, nests, serverUrl, Array.Empty<DrawingSetRecord>(),
Array.Empty<SetReleaseDrawingLine>(), openNest)
{ IsNestOpen = isNestOpen ?? (_ => false) };
form.ShowDialog(FindForm());
return form.Result?.Release != null;
};
StartRelease = startRelease ?? throw new ArgumentNullException(nameof(startRelease));
newReleaseButton.Visible = true;
}
@@ -137,16 +120,10 @@ namespace OpenNest.Controls
: "";
}
private async void NewReleaseButton_Click(object sender, EventArgs e) => await NewReleaseAsync();
/// <summary>Opens the empty release dialog and, once it recorded a release, shows the newest page.</summary>
internal async Task NewReleaseAsync()
private void NewReleaseButton_Click(object sender, EventArgs e)
{
if (ShowNewRelease == null || undoing)
return;
var recorded = ShowNewRelease();
if (recorded && !IsDisposed)
await LoadPageAsync(0);
if (!undoing)
StartRelease?.Invoke();
}
private async void PreviousButton_Click(object sender, EventArgs e) =>
+36 -2
View File
@@ -18,6 +18,8 @@ namespace OpenNest.Forms
private void InitializeComponent()
{
layoutTable = new System.Windows.Forms.TableLayoutPanel();
splitContainer = new System.Windows.Forms.SplitContainer();
releasePanel = new OpenNest.Controls.ReleasePanel();
tabs = new System.Windows.Forms.TabControl();
libraryTab = new System.Windows.Forms.TabPage();
libraryView = new OpenNest.Controls.DrawingLibraryView();
@@ -28,6 +30,10 @@ namespace OpenNest.Forms
buttonPanel = new System.Windows.Forms.FlowLayoutPanel();
closeButton = new System.Windows.Forms.Button();
layoutTable.SuspendLayout();
((System.ComponentModel.ISupportInitialize)splitContainer).BeginInit();
splitContainer.Panel1.SuspendLayout();
splitContainer.Panel2.SuspendLayout();
splitContainer.SuspendLayout();
tabs.SuspendLayout();
libraryTab.SuspendLayout();
setsTab.SuspendLayout();
@@ -39,7 +45,7 @@ namespace OpenNest.Forms
//
layoutTable.ColumnCount = 1;
layoutTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
layoutTable.Controls.Add(tabs, 0, 0);
layoutTable.Controls.Add(splitContainer, 0, 0);
layoutTable.Controls.Add(buttonPanel, 0, 1);
layoutTable.Dock = System.Windows.Forms.DockStyle.Fill;
layoutTable.Location = new System.Drawing.Point(0, 0);
@@ -51,6 +57,27 @@ namespace OpenNest.Forms
layoutTable.Size = new System.Drawing.Size(984, 601);
layoutTable.TabIndex = 0;
//
// splitContainer
//
splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
splitContainer.Margin = new System.Windows.Forms.Padding(0);
splitContainer.Name = "splitContainer";
splitContainer.Panel1.Controls.Add(tabs);
splitContainer.Panel2.Controls.Add(releasePanel);
splitContainer.Panel2.Padding = new System.Windows.Forms.Padding(6, 0, 0, 0);
splitContainer.Panel2Collapsed = true;
splitContainer.Size = new System.Drawing.Size(1008, 580);
splitContainer.SplitterDistance = 560;
splitContainer.TabIndex = 0;
//
// releasePanel
//
releasePanel.Dock = System.Windows.Forms.DockStyle.Fill;
releasePanel.Margin = new System.Windows.Forms.Padding(0);
releasePanel.Name = "releasePanel";
releasePanel.TabIndex = 0;
//
// tabs
//
tabs.Controls.Add(libraryTab);
@@ -137,16 +164,21 @@ namespace OpenNest.Forms
ClientSize = new System.Drawing.Size(1024, 641);
Controls.Add(layoutTable);
Font = new System.Drawing.Font("Segoe UI", 9.75F);
MinimizeBox = false;
MinimumSize = new System.Drawing.Size(720, 440);
Name = "DrawingSetsForm";
ShowIcon = false;
ShowInTaskbar = false;
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Activated += DrawingSetsForm_Activated;
FormClosing += DrawingSetsForm_FormClosing;
Text = "Drawing Sets";
Shown += DrawingSetsForm_Shown;
layoutTable.ResumeLayout(false);
layoutTable.PerformLayout();
splitContainer.Panel1.ResumeLayout(false);
splitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)splitContainer).EndInit();
splitContainer.ResumeLayout(false);
tabs.ResumeLayout(false);
libraryTab.ResumeLayout(false);
setsTab.ResumeLayout(false);
@@ -159,6 +191,8 @@ namespace OpenNest.Forms
#endregion
private System.Windows.Forms.TableLayoutPanel layoutTable;
private System.Windows.Forms.SplitContainer splitContainer;
private OpenNest.Controls.ReleasePanel releasePanel;
private System.Windows.Forms.TabControl tabs;
private System.Windows.Forms.TabPage libraryTab;
private OpenNest.Controls.DrawingLibraryView libraryView;
+87 -10
View File
@@ -12,12 +12,17 @@ namespace OpenNest.Forms
/// <see cref="DrawingLibraryView"/>; Sets browses, edits and releases the server's drawing sets with
/// <see cref="DrawingSetBrowser"/>; Releases lists the releases with
/// <see cref="SetReleasesView"/>, and a set's Releases (or a library drawing's) opens that
/// tab filtered to it. It needs no open nest, since a release creates new nests or merges
/// into draft ones and opens each in its own tab. Each tab reads its list when first shown;
/// Releases re-reads its page whenever it is shown again, so a release made on Sets appears.
/// tab filtered to it. Once release is enabled, a <see cref="ReleasePanel"/> beside the
/// Library and Sets tabs builds one release from both: a double-click adds a set or a
/// drawing to it. It needs no open nest, since a release creates new nests or merges into
/// draft ones and opens each in its own tab. Each tab reads its list when first shown;
/// Releases re-reads its page whenever it is shown again, so a release made meanwhile appears.
/// </summary>
public partial class DrawingSetsForm : Form
{
private const int ReleasePanelWidth = 620;
private readonly IDrawingSetStore sets;
private readonly IDrawingLibraryStore library;
private readonly string serverUrl;
private bool shown;
@@ -28,6 +33,9 @@ namespace OpenNest.Forms
internal SetReleasesView Releases => releasesView;
/// <summary>The release being built; shown beside the Library and Sets tabs once release is enabled.</summary>
internal ReleasePanel ReleasePanel => releasePanel;
/// <summary>True while the Releases tab is showing.</summary>
public bool ShowsReleases => tabs.SelectedTab == releasesTab;
@@ -35,6 +43,7 @@ namespace OpenNest.Forms
public DrawingSetsForm(IDrawingSetStore sets, IDrawingLibraryStore library, string serverUrl)
{
InitializeComponent();
this.sets = sets ?? throw new ArgumentNullException(nameof(sets));
this.library = library ?? throw new ArgumentNullException(nameof(library));
this.serverUrl = serverUrl ?? "";
browser.Initialize(sets, library, serverUrl);
@@ -43,20 +52,87 @@ namespace OpenNest.Forms
libraryView.ShowReleases = drawing => _ = ShowReleasesAsync(drawing: drawing);
releasesView.Initialize(sets);
Text = $"Drawing Library — {serverUrl}";
// Shown as an MDI child, where a DialogResult button no longer closes the window.
// Shown modeless, where a DialogResult button does not close the window.
closeButton.Click += (_, _) => Close();
Load += (_, _) => FitReleasePanel();
}
/// <summary>
/// Shows Release, and New Release on the Releases tab: nests are saved through
/// <paramref name="nests"/> and each is opened with <paramref name="openNest"/>; a nest
/// <paramref name="isNestOpen"/> reports as open in a tab is never merged into.
/// Shows the release panel beside the Library and Sets tabs, and New Release on the
/// Releases tab: nests are saved through <paramref name="nests"/> and each is opened with
/// <paramref name="openNest"/>; a nest <paramref name="isNestOpen"/> reports as open in a
/// tab is never merged into.
/// </summary>
public void EnableRelease(INestRepository nests, Action<Nest, NestRecord> openNest, Func<Guid, bool> isNestOpen = null)
{
libraryView.EnableRelease(nests, openNest, isNestOpen);
browser.EnableRelease(nests, openNest, isNestOpen);
releasesView.EnableRelease(library, nests, serverUrl, openNest, isNestOpen);
releasePanel.Initialize(sets, library, nests, serverUrl, openNest);
releasePanel.IsNestOpen = isNestOpen ?? (_ => false);
browser.EnableRelease(set => releasePanel.AddSet(set));
libraryView.EnableRelease((drawing, quantity) => releasePanel.AddDrawings(new[] { drawing }, quantity));
releasesView.EnableRelease(StartRelease);
UpdateReleasePanel();
}
/// <summary>Raised once Make Nests has opened the nests it made.</summary>
public event EventHandler NestsOpened
{
add => releasePanel.NestsOpened += value;
remove => releasePanel.NestsOpened -= value;
}
/// <summary>The release being built, to keep while the window is closed; null when there is none.</summary>
public ReleaseDraft TakeRelease() => releasePanel.TakeDraft();
/// <summary>Lists a release kept by <see cref="TakeRelease"/> again.</summary>
public void RestoreRelease(ReleaseDraft draft) => releasePanel.Restore(draft);
// New Release: the release is built on the Sets tab, starting afresh once one has run.
private void StartRelease()
{
ShowSets();
if (releasePanel.Result != null && releasePanel.ConfirmDiscard())
releasePanel.Clear();
releasePanel.Focus();
}
// The panel shows beside the lists it adds from, never over the releases.
private void UpdateReleasePanel()
{
var show = releasePanel.IsInitialized && !ShowsReleases;
if (splitContainer.Panel2Collapsed == !show)
return;
splitContainer.Panel2Collapsed = !show;
if (show)
FitReleasePanel();
}
private void FitReleasePanel()
{
if (splitContainer.Panel2Collapsed)
return;
splitContainer.Panel1MinSize = 300;
splitContainer.Panel2MinSize = releasePanel.MinimumSize.Width;
var available = splitContainer.Width - splitContainer.SplitterWidth;
if (available >= splitContainer.Panel1MinSize + splitContainer.Panel2MinSize)
splitContainer.SplitterDistance = System.Math.Clamp(available - ReleasePanelWidth,
splitContainer.Panel1MinSize, available - splitContainer.Panel2MinSize);
}
// A draft closed in a tab meanwhile can be merged into now.
private void DrawingSetsForm_Activated(object sender, EventArgs e) => releasePanel.RefreshOpenNests();
private void DrawingSetsForm_FormClosing(object sender, FormClosingEventArgs e)
{
// Nests may be on their way to the server; Make Nests stops between uploads, never mid-way.
if (releasePanel.IsRunning)
{
e.Cancel = true;
MessageBox.Show(this, "Make Nests is still running. Stop it, or wait for it to finish, before closing.",
Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
if (e.CloseReason == CloseReason.UserClosing && !releasePanel.ConfirmDiscard())
e.Cancel = true;
}
/// <summary>
@@ -106,6 +182,7 @@ namespace OpenNest.Forms
private async void Tabs_SelectedIndexChanged(object sender, EventArgs e)
{
UpdateReleasePanel();
if (shown)
await RefreshSelectedTabAsync();
}
+30 -6
View File
@@ -11,6 +11,10 @@ namespace OpenNest.Forms
{
public partial class MainForm
{
// The Drawing Sets window while it is open, and the release it was building when it last closed.
private DrawingSetsForm drawingSetsForm;
private Controls.ReleaseDraft releaseDraft;
private void LoadNest(Nest nest, FormWindowState windowState = FormWindowState.Maximized,
Guid remoteId = default, string serverUrl = null, int remoteRevision = 0)
{
@@ -144,9 +148,10 @@ namespace OpenNest.Forms
return;
// One Drawing Sets window at a time: a second menu click brings it forward on the tab asked for.
var open = MdiChildren.OfType<DrawingSetsForm>().FirstOrDefault();
if (open != null)
if (drawingSetsForm is { IsDisposed: false } open)
{
if (open.WindowState == FormWindowState.Minimized)
open.WindowState = FormWindowState.Normal;
open.Activate();
if (releases)
_ = open.ShowReleasesAsync();
@@ -174,16 +179,35 @@ namespace OpenNest.Forms
return;
}
// An MDI child beside the nest tabs, maximized when it opens; disposed when closed.
var form = new DrawingSetsForm(sets, library, NestStorage.Settings.ServerUrl);
// A window of its own, beside the main window rather than in it: the main window's
// menus and toolbar edit nests. It is not owned, so either can be in front.
var form = new DrawingSetsForm(sets, library, NestStorage.Settings.ServerUrl)
{
Icon = Icon,
ShowIcon = true,
ShowInTaskbar = true,
MinimizeBox = true,
};
form.EnableRelease(nests, OpenServerNest, IsServerNestOpen);
form.RestoreRelease(releaseDraft);
releaseDraft = null;
// The nests a release made open here, so this window comes forward to show them.
form.NestsOpened += (_, _) => Activate();
if (releases)
_ = form.ShowReleasesAsync();
else if (libraryTab)
form.ShowLibrary();
form.ImportBomWhenShown = importBom;
form.MdiParent = this;
form.WindowState = FormWindowState.Maximized;
MainWindowSettings.LoadDrawingSets(form);
form.FormClosed += (_, _) =>
{
// A release not yet made is kept for the next time the window opens in this run.
releaseDraft = form.TakeRelease();
MainWindowSettings.SaveDrawingSets(form);
if (drawingSetsForm == form)
drawingSetsForm = null;
};
drawingSetsForm = form;
form.Show();
}
+9 -1
View File
@@ -307,7 +307,15 @@ namespace OpenNest.Forms
protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
{
base.OnClosing(e);
MainWindowSettings.Save(this);
// The Drawing Sets window closes with this one; while Make Nests runs, neither does.
if (!e.Cancel && drawingSetsForm is { IsDisposed: false } sets)
{
sets.Close();
if (!sets.IsDisposed)
e.Cancel = true;
}
if (!e.Cancel)
MainWindowSettings.Save(this);
}
#endregion
+35
View File
@@ -38,6 +38,41 @@ namespace OpenNest.Forms
Settings.Default.Save();
}
/// <summary>
/// Places the Drawing Sets window where it last closed when that still shows on a
/// screen; the first time, maximized on the main window's screen.
/// </summary>
public static void LoadDrawingSets(Form form)
{
var bounds = new System.Drawing.Rectangle(Settings.Default.DrawingSetsWindowLocation, Settings.Default.DrawingSetsWindowSize);
form.StartPosition = FormStartPosition.Manual;
if (bounds.Width > 0 && bounds.Height > 0
&& Array.Exists(Screen.AllScreens, s => s.WorkingArea.IntersectsWith(bounds)))
{
form.Bounds = bounds;
form.WindowState = Settings.Default.DrawingSetsWindowState == FormWindowState.Maximized
? FormWindowState.Maximized : FormWindowState.Normal;
return;
}
var owner = Application.OpenForms.Count > 0 ? Screen.FromControl(Application.OpenForms[0]) : Screen.PrimaryScreen;
var area = owner.WorkingArea;
form.Bounds = new System.Drawing.Rectangle(area.X + area.Width / 10, area.Y + area.Height / 10,
area.Width * 8 / 10, area.Height * 8 / 10);
form.WindowState = FormWindowState.Maximized;
}
/// <summary>Remembers the Drawing Sets window's restored bounds and whether it was maximized.</summary>
public static void SaveDrawingSets(Form form)
{
var bounds = form.WindowState == FormWindowState.Normal ? form.Bounds : form.RestoreBounds;
Settings.Default.DrawingSetsWindowLocation = bounds.Location;
Settings.Default.DrawingSetsWindowSize = bounds.Size;
Settings.Default.DrawingSetsWindowState = form.WindowState == FormWindowState.Maximized
? FormWindowState.Maximized : FormWindowState.Normal;
Settings.Default.Save();
}
/// <summary>
/// One-time upgrade: converts a legacy .nstdot nest template
/// (NestTemplatePath setting) into defaults.json, then clears the
+46 -536
View File
@@ -6,12 +6,9 @@ namespace OpenNest.Forms
protected override void Dispose(bool disposing)
{
if (disposing)
if (disposing && (components != null))
{
cancellation?.Dispose();
searchCancellation?.Dispose();
if (components != null)
components.Dispose();
components.Dispose();
}
base.Dispose(disposing);
}
@@ -20,583 +17,96 @@ namespace OpenNest.Forms
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle rightAligned = new System.Windows.Forms.DataGridViewCellStyle();
layoutTable = new System.Windows.Forms.TableLayoutPanel();
setLabel = new System.Windows.Forms.Label();
addSetTable = new System.Windows.Forms.TableLayoutPanel();
addSetLabel = new System.Windows.Forms.Label();
addSetCombo = new System.Windows.Forms.ComboBox();
addSetButton = new System.Windows.Forms.Button();
addDrawingsButton = new System.Windows.Forms.Button();
removeSetButton = new System.Windows.Forms.Button();
setGrid = new System.Windows.Forms.DataGridView();
lineTypeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
setNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
setCustomerColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
setRevisionColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
kitsColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
optionsTable = new System.Windows.Forms.TableLayoutPanel();
includeArchivedCheckBox = new System.Windows.Forms.CheckBox();
nestAfterReleaseCheckBox = new System.Windows.Forms.CheckBox();
notesLabel = new System.Windows.Forms.Label();
notesBox = new System.Windows.Forms.TextBox();
previewTable = new System.Windows.Forms.TableLayoutPanel();
previewLabel = new System.Windows.Forms.Label();
optionsButton = new System.Windows.Forms.Button();
groupGrid = new System.Windows.Forms.DataGridView();
includeColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
materialColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
gradeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
thicknessColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
unitsColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
cutTypeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
drawingsColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
partsColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
targetColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
statusColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
skippedLabel = new System.Windows.Forms.Label();
bottomTable = new System.Windows.Forms.TableLayoutPanel();
summaryLabel = new System.Windows.Forms.Label();
releaseButton = new System.Windows.Forms.Button();
releasePanel = new OpenNest.Controls.ReleasePanel();
buttonPanel = new System.Windows.Forms.FlowLayoutPanel();
closeButton = new System.Windows.Forms.Button();
statusLabel = new System.Windows.Forms.Label();
searchTimer = new System.Windows.Forms.Timer(components);
fixDrawingsButton = new System.Windows.Forms.Button();
groupMenu = new System.Windows.Forms.ContextMenuStrip(components);
addDrawingsButton = new System.Windows.Forms.Button();
layoutTable.SuspendLayout();
addSetTable.SuspendLayout();
((System.ComponentModel.ISupportInitialize)setGrid).BeginInit();
optionsTable.SuspendLayout();
previewTable.SuspendLayout();
((System.ComponentModel.ISupportInitialize)groupGrid).BeginInit();
bottomTable.SuspendLayout();
buttonPanel.SuspendLayout();
SuspendLayout();
//
// layoutTable
//
layoutTable.ColumnCount = 1;
layoutTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
layoutTable.Controls.Add(setLabel, 0, 0);
layoutTable.Controls.Add(addSetTable, 0, 1);
layoutTable.Controls.Add(setGrid, 0, 2);
layoutTable.Controls.Add(optionsTable, 0, 3);
layoutTable.Controls.Add(previewTable, 0, 4);
layoutTable.Controls.Add(groupGrid, 0, 5);
layoutTable.Controls.Add(skippedLabel, 0, 6);
layoutTable.Controls.Add(bottomTable, 0, 7);
layoutTable.Controls.Add(statusLabel, 0, 8);
layoutTable.Controls.Add(releasePanel, 0, 0);
layoutTable.Controls.Add(buttonPanel, 0, 1);
layoutTable.Dock = System.Windows.Forms.DockStyle.Fill;
layoutTable.Location = new System.Drawing.Point(0, 0);
layoutTable.Name = "layoutTable";
layoutTable.Padding = new System.Windows.Forms.Padding(8);
layoutTable.RowCount = 9;
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 130F));
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowCount = 2;
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
layoutTable.Size = new System.Drawing.Size(1104, 661);
layoutTable.Size = new System.Drawing.Size(760, 640);
layoutTable.TabIndex = 0;
//
// setLabel
//
setLabel.AutoEllipsis = true;
setLabel.Dock = System.Windows.Forms.DockStyle.Fill;
setLabel.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold);
setLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 6);
setLabel.Name = "setLabel";
setLabel.Size = new System.Drawing.Size(100, 20);
setLabel.TabIndex = 0;
setLabel.Text = "Sets and drawings to release";
//
// addSetTable
//
addSetTable.AutoSize = true;
addSetTable.ColumnCount = 5;
addSetTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
addSetTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 360F));
addSetTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
addSetTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
addSetTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
addSetTable.Controls.Add(addSetLabel, 0, 0);
addSetTable.Controls.Add(addSetCombo, 1, 0);
addSetTable.Controls.Add(addSetButton, 2, 0);
addSetTable.Controls.Add(addDrawingsButton, 3, 0);
addSetTable.Controls.Add(removeSetButton, 4, 0);
addSetTable.Dock = System.Windows.Forms.DockStyle.Fill;
addSetTable.Margin = new System.Windows.Forms.Padding(0, 0, 0, 3);
addSetTable.Name = "addSetTable";
addSetTable.RowCount = 1;
addSetTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
addSetTable.TabIndex = 1;
//
// addSetLabel
//
addSetLabel.Anchor = System.Windows.Forms.AnchorStyles.Left;
addSetLabel.AutoSize = true;
addSetLabel.Name = "addSetLabel";
addSetLabel.TabIndex = 0;
addSetLabel.Text = "Add a set:";
//
// addSetCombo
//
addSetCombo.Dock = System.Windows.Forms.DockStyle.Fill;
addSetCombo.Name = "addSetCombo";
addSetCombo.TabIndex = 1;
addSetCombo.TextUpdate += AddSetCombo_TextUpdate;
addSetCombo.DropDown += AddSetCombo_DropDown;
addSetCombo.KeyDown += AddSetCombo_KeyDown;
//
// addSetButton
//
addSetButton.AutoSize = true;
addSetButton.Name = "addSetButton";
addSetButton.TabIndex = 2;
addSetButton.Text = "Add";
addSetButton.UseVisualStyleBackColor = true;
addSetButton.Click += AddSetButton_Click;
//
// addDrawingsButton
//
addDrawingsButton.Anchor = System.Windows.Forms.AnchorStyles.Left;
addDrawingsButton.AutoSize = true;
addDrawingsButton.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3);
addDrawingsButton.Name = "addDrawingsButton";
addDrawingsButton.TabIndex = 3;
addDrawingsButton.Text = "Add Drawings...";
addDrawingsButton.UseVisualStyleBackColor = true;
addDrawingsButton.Click += AddDrawingsButton_Click;
//
// removeSetButton
//
removeSetButton.Anchor = System.Windows.Forms.AnchorStyles.Left;
removeSetButton.AutoSize = true;
removeSetButton.Name = "removeSetButton";
removeSetButton.TabIndex = 4;
removeSetButton.Text = "Remove";
removeSetButton.UseVisualStyleBackColor = true;
removeSetButton.Click += RemoveSetButton_Click;
//
// setGrid
//
setGrid.AllowUserToAddRows = false;
setGrid.AllowUserToDeleteRows = false;
setGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { lineTypeColumn, setNameColumn, setCustomerColumn, setRevisionColumn, kitsColumn });
setGrid.Dock = System.Windows.Forms.DockStyle.Fill;
setGrid.Margin = new System.Windows.Forms.Padding(3, 3, 3, 6);
setGrid.MultiSelect = false;
setGrid.Name = "setGrid";
setGrid.RowHeadersVisible = false;
setGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
setGrid.StandardTab = true;
setGrid.TabIndex = 2;
setGrid.CellValidating += SetGrid_CellValidating;
setGrid.CellValueChanged += SetGrid_CellValueChanged;
setGrid.SelectionChanged += SetGrid_SelectionChanged;
//
// lineTypeColumn
//
lineTypeColumn.HeaderText = "Type";
lineTypeColumn.Name = "lineTypeColumn";
lineTypeColumn.ReadOnly = true;
lineTypeColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
lineTypeColumn.Width = 70;
//
// setNameColumn
//
setNameColumn.Width = 260;
setNameColumn.HeaderText = "Set or drawing";
setNameColumn.Name = "setNameColumn";
setNameColumn.ReadOnly = true;
setNameColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// setCustomerColumn
//
setCustomerColumn.HeaderText = "Customer";
setCustomerColumn.Name = "setCustomerColumn";
setCustomerColumn.ReadOnly = true;
setCustomerColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
setCustomerColumn.Width = 200;
//
// setRevisionColumn
//
setRevisionColumn.DefaultCellStyle = rightAligned;
setRevisionColumn.HeaderText = "Revision";
setRevisionColumn.Name = "setRevisionColumn";
setRevisionColumn.ReadOnly = true;
setRevisionColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
setRevisionColumn.Width = 75;
//
// kitsColumn
//
kitsColumn.DefaultCellStyle = rightAligned;
kitsColumn.HeaderText = "Quantity";
kitsColumn.Name = "kitsColumn";
kitsColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
kitsColumn.ToolTipText = "How many to make. For a set, every quantity in the set is multiplied by it.";
kitsColumn.Width = 80;
//
// optionsTable
//
optionsTable.AutoSize = true;
optionsTable.ColumnCount = 3;
optionsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
optionsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
optionsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
optionsTable.Controls.Add(nestAfterReleaseCheckBox, 0, 0);
optionsTable.Controls.Add(notesLabel, 1, 0);
optionsTable.Controls.Add(notesBox, 2, 0);
optionsTable.Dock = System.Windows.Forms.DockStyle.Fill;
optionsTable.Margin = new System.Windows.Forms.Padding(0, 0, 0, 6);
optionsTable.Name = "optionsTable";
optionsTable.RowCount = 1;
optionsTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
optionsTable.TabIndex = 3;
//
// includeArchivedCheckBox
//
includeArchivedCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Left;
includeArchivedCheckBox.AutoSize = true;
includeArchivedCheckBox.Margin = new System.Windows.Forms.Padding(12, 3, 3, 3);
includeArchivedCheckBox.Name = "includeArchivedCheckBox";
includeArchivedCheckBox.TabIndex = 1;
includeArchivedCheckBox.Visible = false;
includeArchivedCheckBox.Text = "Include archived drawings";
includeArchivedCheckBox.UseVisualStyleBackColor = true;
includeArchivedCheckBox.CheckedChanged += Options_Changed;
//
// nestAfterReleaseCheckBox
//
nestAfterReleaseCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Left;
nestAfterReleaseCheckBox.AutoSize = true;
nestAfterReleaseCheckBox.Checked = true;
nestAfterReleaseCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
nestAfterReleaseCheckBox.Name = "nestAfterReleaseCheckBox";
nestAfterReleaseCheckBox.TabIndex = 0;
nestAfterReleaseCheckBox.Text = "Nest after release";
nestAfterReleaseCheckBox.UseVisualStyleBackColor = true;
nestAfterReleaseCheckBox.CheckedChanged += NestAfterReleaseCheckBox_CheckedChanged;
//
// notesLabel
//
notesLabel.Anchor = System.Windows.Forms.AnchorStyles.Left;
notesLabel.AutoSize = true;
notesLabel.Margin = new System.Windows.Forms.Padding(12, 0, 3, 0);
notesLabel.Name = "notesLabel";
notesLabel.TabIndex = 1;
notesLabel.Text = "Release notes:";
//
// notesBox
//
notesBox.Dock = System.Windows.Forms.DockStyle.Fill;
notesBox.MaxLength = 4000;
notesBox.Name = "notesBox";
notesBox.TabIndex = 2;
//
// previewTable
//
previewTable.AutoSize = true;
previewTable.ColumnCount = 3;
previewTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
previewTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
previewTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
previewTable.Controls.Add(previewLabel, 0, 0);
previewTable.Controls.Add(includeArchivedCheckBox, 1, 0);
previewTable.Controls.Add(optionsButton, 2, 0);
previewTable.Dock = System.Windows.Forms.DockStyle.Fill;
previewTable.Margin = new System.Windows.Forms.Padding(0, 0, 0, 3);
previewTable.Name = "previewTable";
previewTable.RowCount = 1;
previewTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
previewTable.TabIndex = 4;
//
// previewLabel
//
previewLabel.AutoSize = true;
previewLabel.Dock = System.Windows.Forms.DockStyle.Fill;
previewLabel.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6);
previewLabel.Name = "previewLabel";
previewLabel.TabIndex = 0;
//
// optionsButton
//
optionsButton.Anchor = System.Windows.Forms.AnchorStyles.Right;
optionsButton.AutoSize = true;
optionsButton.Name = "optionsButton";
optionsButton.TabIndex = 2;
optionsButton.Text = "Options ▸";
optionsButton.UseVisualStyleBackColor = true;
optionsButton.Click += OptionsButton_Click;
//
// groupGrid
//
groupGrid.AllowUserToAddRows = false;
groupGrid.AllowUserToDeleteRows = false;
groupGrid.ContextMenuStrip = groupMenu;
groupGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { includeColumn, materialColumn, gradeColumn, thicknessColumn, unitsColumn, cutTypeColumn, drawingsColumn, partsColumn, targetColumn, statusColumn });
groupGrid.Dock = System.Windows.Forms.DockStyle.Fill;
groupGrid.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
groupGrid.MultiSelect = false;
groupGrid.Name = "groupGrid";
groupGrid.RowHeadersVisible = false;
groupGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
groupGrid.StandardTab = true;
groupGrid.TabIndex = 5;
groupGrid.CellValueChanged += GroupGrid_CellValueChanged;
groupGrid.CurrentCellDirtyStateChanged += GroupGrid_CurrentCellDirtyStateChanged;
groupGrid.DataError += GroupGrid_DataError;
groupGrid.CellDoubleClick += GroupGrid_CellDoubleClick;
groupGrid.CellMouseDown += GroupGrid_CellMouseDown;
groupGrid.CurrentCellChanged += GroupGrid_CurrentCellChanged;
//
// includeColumn
//
includeColumn.HeaderText = "Release";
includeColumn.Name = "includeColumn";
includeColumn.Visible = false;
includeColumn.Width = 65;
//
// materialColumn
//
materialColumn.HeaderText = "Material";
materialColumn.Name = "materialColumn";
materialColumn.ReadOnly = true;
materialColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
materialColumn.Width = 140;
//
// gradeColumn
//
gradeColumn.HeaderText = "Grade";
gradeColumn.Name = "gradeColumn";
gradeColumn.ReadOnly = true;
gradeColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
gradeColumn.Width = 90;
//
// thicknessColumn
//
rightAligned.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
thicknessColumn.DefaultCellStyle = rightAligned;
thicknessColumn.HeaderText = "Thickness";
thicknessColumn.Name = "thicknessColumn";
thicknessColumn.ReadOnly = true;
thicknessColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
thicknessColumn.Width = 80;
//
// unitsColumn
//
unitsColumn.HeaderText = "Units";
unitsColumn.Name = "unitsColumn";
unitsColumn.ReadOnly = true;
unitsColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
unitsColumn.Width = 55;
//
// cutTypeColumn
//
cutTypeColumn.HeaderText = "Cut type";
cutTypeColumn.Name = "cutTypeColumn";
cutTypeColumn.ReadOnly = true;
cutTypeColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
cutTypeColumn.Width = 75;
//
// drawingsColumn
//
drawingsColumn.DefaultCellStyle = rightAligned;
drawingsColumn.HeaderText = "Drawings";
drawingsColumn.Name = "drawingsColumn";
drawingsColumn.ReadOnly = true;
drawingsColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
drawingsColumn.Width = 70;
//
// partsColumn
//
partsColumn.DefaultCellStyle = rightAligned;
partsColumn.HeaderText = "Parts";
partsColumn.Name = "partsColumn";
partsColumn.ReadOnly = true;
partsColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
partsColumn.Width = 65;
//
// targetColumn
//
targetColumn.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
targetColumn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
targetColumn.HeaderText = "Nest";
targetColumn.Name = "targetColumn";
targetColumn.Visible = false;
targetColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
targetColumn.ToolTipText = "Make a new Draft nest, or merge into a Draft nest of the same material and renest it.";
targetColumn.Width = 260;
//
// statusColumn
//
statusColumn.Width = 200;
statusColumn.HeaderText = "Status";
statusColumn.Name = "statusColumn";
statusColumn.ReadOnly = true;
statusColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// skippedLabel
//
skippedLabel.AutoSize = true;
skippedLabel.ForeColor = System.Drawing.SystemColors.GrayText;
skippedLabel.Margin = new System.Windows.Forms.Padding(3, 6, 3, 0);
skippedLabel.MaximumSize = new System.Drawing.Size(1080, 0);
skippedLabel.Name = "skippedLabel";
skippedLabel.TabIndex = 6;
skippedLabel.Visible = false;
//
// bottomTable
//
bottomTable.AutoSize = true;
bottomTable.ColumnCount = 4;
bottomTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
bottomTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
bottomTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
bottomTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
bottomTable.Controls.Add(summaryLabel, 0, 0);
bottomTable.Controls.Add(fixDrawingsButton, 1, 0);
bottomTable.Controls.Add(releaseButton, 2, 0);
bottomTable.Controls.Add(closeButton, 3, 0);
bottomTable.Dock = System.Windows.Forms.DockStyle.Fill;
bottomTable.Margin = new System.Windows.Forms.Padding(0, 6, 0, 0);
bottomTable.Name = "bottomTable";
bottomTable.RowCount = 1;
bottomTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
bottomTable.TabIndex = 7;
//
// summaryLabel
//
summaryLabel.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
summaryLabel.AutoEllipsis = true;
summaryLabel.Name = "summaryLabel";
summaryLabel.TabIndex = 0;
//
// fixDrawingsButton
//
fixDrawingsButton.AutoSize = true;
fixDrawingsButton.Enabled = false;
fixDrawingsButton.Margin = new System.Windows.Forms.Padding(3, 3, 12, 3);
fixDrawingsButton.Name = "fixDrawingsButton";
fixDrawingsButton.TabIndex = 1;
fixDrawingsButton.Text = "Fix Drawings...";
fixDrawingsButton.UseVisualStyleBackColor = true;
fixDrawingsButton.Click += FixDrawingsButton_Click;
//
// releaseButton
//
releaseButton.AutoSize = true;
releaseButton.Enabled = false;
releaseButton.Name = "releaseButton";
releaseButton.TabIndex = 2;
releaseButton.Text = "Make Nests...";
releaseButton.UseVisualStyleBackColor = true;
releaseButton.Click += ReleaseButton_Click;
// releasePanel
//
releasePanel.Dock = System.Windows.Forms.DockStyle.Fill;
releasePanel.Margin = new System.Windows.Forms.Padding(0);
releasePanel.Name = "releasePanel";
releasePanel.TabIndex = 0;
//
// buttonPanel
//
buttonPanel.AutoSize = true;
buttonPanel.Controls.Add(closeButton);
buttonPanel.Controls.Add(addDrawingsButton);
buttonPanel.Dock = System.Windows.Forms.DockStyle.Fill;
buttonPanel.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
buttonPanel.Margin = new System.Windows.Forms.Padding(0, 6, 0, 0);
buttonPanel.Name = "buttonPanel";
buttonPanel.TabIndex = 1;
//
// closeButton
//
closeButton.AutoSize = true;
closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
closeButton.Name = "closeButton";
closeButton.TabIndex = 3;
closeButton.TabIndex = 1;
closeButton.Text = "Close";
closeButton.UseVisualStyleBackColor = true;
closeButton.Click += CloseButton_Click;
//
// statusLabel
// addDrawingsButton
//
statusLabel.AutoEllipsis = true;
statusLabel.Dock = System.Windows.Forms.DockStyle.Fill;
statusLabel.Margin = new System.Windows.Forms.Padding(3, 6, 3, 0);
statusLabel.Name = "statusLabel";
statusLabel.Size = new System.Drawing.Size(100, 20);
statusLabel.TabIndex = 8;
//
// searchTimer
//
searchTimer.Interval = 250;
searchTimer.Tick += SearchTimer_Tick;
//
// groupMenu
//
groupMenu.Name = "groupMenu";
groupMenu.Opening += GroupMenu_Opening;
addDrawingsButton.AutoSize = true;
addDrawingsButton.Margin = new System.Windows.Forms.Padding(3, 3, 12, 3);
addDrawingsButton.Name = "addDrawingsButton";
addDrawingsButton.TabIndex = 0;
addDrawingsButton.Text = "Add Drawings...";
addDrawingsButton.UseVisualStyleBackColor = true;
addDrawingsButton.Click += AddDrawingsButton_Click;
//
// ReleaseSetForm
//
AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
ClientSize = new System.Drawing.Size(1104, 661);
CancelButton = closeButton;
ClientSize = new System.Drawing.Size(760, 640);
Controls.Add(layoutTable);
Font = new System.Drawing.Font("Segoe UI", 9.75F);
MinimizeBox = false;
MinimumSize = new System.Drawing.Size(860, 520);
MinimumSize = new System.Drawing.Size(560, 480);
Name = "ReleaseSetForm";
ShowIcon = false;
ShowInTaskbar = false;
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Text = "Release Drawing Sets and Drawings";
Text = "Make Nests";
FormClosing += ReleaseSetForm_FormClosing;
layoutTable.ResumeLayout(false);
layoutTable.PerformLayout();
addSetTable.ResumeLayout(false);
addSetTable.PerformLayout();
((System.ComponentModel.ISupportInitialize)setGrid).EndInit();
optionsTable.ResumeLayout(false);
optionsTable.PerformLayout();
previewTable.ResumeLayout(false);
previewTable.PerformLayout();
((System.ComponentModel.ISupportInitialize)groupGrid).EndInit();
bottomTable.ResumeLayout(false);
bottomTable.PerformLayout();
buttonPanel.ResumeLayout(false);
buttonPanel.PerformLayout();
ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel layoutTable;
private System.Windows.Forms.Label setLabel;
private System.Windows.Forms.TableLayoutPanel addSetTable;
private System.Windows.Forms.Label addSetLabel;
private System.Windows.Forms.ComboBox addSetCombo;
private System.Windows.Forms.Button addSetButton;
private System.Windows.Forms.Button addDrawingsButton;
private System.Windows.Forms.Button removeSetButton;
private System.Windows.Forms.DataGridView setGrid;
private System.Windows.Forms.DataGridViewTextBoxColumn lineTypeColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn setNameColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn setCustomerColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn setRevisionColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn kitsColumn;
private System.Windows.Forms.TableLayoutPanel optionsTable;
private System.Windows.Forms.CheckBox includeArchivedCheckBox;
private System.Windows.Forms.CheckBox nestAfterReleaseCheckBox;
private System.Windows.Forms.Label notesLabel;
private System.Windows.Forms.TextBox notesBox;
private System.Windows.Forms.TableLayoutPanel previewTable;
private System.Windows.Forms.Label previewLabel;
private System.Windows.Forms.Button optionsButton;
private System.Windows.Forms.DataGridView groupGrid;
private System.Windows.Forms.DataGridViewCheckBoxColumn includeColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn materialColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn gradeColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn thicknessColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn unitsColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn cutTypeColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn drawingsColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn partsColumn;
private System.Windows.Forms.DataGridViewComboBoxColumn targetColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn statusColumn;
private System.Windows.Forms.Label skippedLabel;
private System.Windows.Forms.Button fixDrawingsButton;
private System.Windows.Forms.ContextMenuStrip groupMenu;
private System.Windows.Forms.TableLayoutPanel bottomTable;
private System.Windows.Forms.Label summaryLabel;
private System.Windows.Forms.Button releaseButton;
private OpenNest.Controls.ReleasePanel releasePanel;
private System.Windows.Forms.FlowLayoutPanel buttonPanel;
private System.Windows.Forms.Button closeButton;
private System.Windows.Forms.Label statusLabel;
private System.Windows.Forms.Timer searchTimer;
private System.Windows.Forms.Button addDrawingsButton;
}
}
File diff suppressed because it is too large. Load diff
+53
View File
@@ -384,5 +384,58 @@ namespace OpenNest.Properties {
this["CutOffHeadLockOvercutInches"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
// Make Nests nests each group with Auto Nest; the release panel remembers the last choice.
public bool ReleaseNestAfter {
get {
return ((bool)(this["ReleaseNestAfter"]));
}
set {
this["ReleaseNestAfter"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
// The Drawing Sets window's restored location.
public global::System.Drawing.Point DrawingSetsWindowLocation {
get {
return ((global::System.Drawing.Point)(this["DrawingSetsWindowLocation"]));
}
set {
this["DrawingSetsWindowLocation"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
// The Drawing Sets window's restored size; empty until it first closes.
public global::System.Drawing.Size DrawingSetsWindowSize {
get {
return ((global::System.Drawing.Size)(this["DrawingSetsWindowSize"]));
}
set {
this["DrawingSetsWindowSize"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Maximized")]
// Whether the Drawing Sets window opens maximized.
public global::System.Windows.Forms.FormWindowState DrawingSetsWindowState {
get {
return ((global::System.Windows.Forms.FormWindowState)(this["DrawingSetsWindowState"]));
}
set {
this["DrawingSetsWindowState"] = value;
}
}
}
}
+12
View File
@@ -92,5 +92,17 @@
<Setting Name="CutOffHeadLockOvercutInches" Type="System.Double" Scope="User">
<Value Profile="(Default)">1.5</Value>
</Setting>
<Setting Name="ReleaseNestAfter" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="DrawingSetsWindowLocation" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="DrawingSetsWindowSize" Type="System.Drawing.Size" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="DrawingSetsWindowState" Type="System.Windows.Forms.FormWindowState" Scope="User">
<Value Profile="(Default)">Maximized</Value>
</Setting>
</Settings>
</SettingsFile>
+108 -84
View File
@@ -325,9 +325,12 @@ The browser's **Cut first** column shows the setting.
**File > Drawing Library...** (Database mode only, like Drawing Sets) opens the
drawing sets window on its **Library** tab ([below](#drawing-sets-desktop)),
the same browser without a nest: it lists every active drawing, has no Add to
Nest or In This Nest tab, and a double-click or Enter edits the selected drawing. Its
right-click menu has Edit Drawing and the set and release items below.
the same browser without a nest: it lists every active drawing and has no Add to
Nest or In This Nest tab. There a double-click, Enter or **Add to Release** adds
the selected drawing on its own, at the entered **Quantity**, to the window's
release panel ([below](#make-nests-the-release-panel)); **Edit Drawing...** (the
button or the right-click menu) edits it. Its right-click menu also has the set
and release items below.
### Edit Drawing (desktop)
@@ -360,7 +363,7 @@ Edit Drawing opens from:
right-click it, or **Edit Drawing...** beside the grid. It first reads the
member's current record, so a set read earlier does not cause a conflict; the
row then shows what was saved. The set itself is unchanged and needs no save;
- the release dialog: a group refused for its drawings (no material or
- the release panel: a group refused for its drawings (no material or
thickness, or two drawings with one name) has **Fix Drawings...**, which opens
Edit Drawing on each drawing it is refused for in turn (Cancel stops), as does
a double-click on the group; with a releasable group selected, it takes the
@@ -405,19 +408,28 @@ revision; save the nest to keep it.
**File > Drawing Sets...** (Database mode only) opens the drawing sets window;
it needs no open nest, since releasing a set makes new nests or merges into
draft ones and opens each in its own tab. The window has three tabs, **Library**
draft ones and opens each in its own tab. It is a window of its own beside the
main window (in the taskbar, with its own minimize button), not a tab inside it,
since the main window's menus and toolbar are for editing nests. There is one
at a time: the menu items bring it forward on the tab asked for. It opens
maximized the first time, then where and as it was last closed, and closes with
the main window. The window has three tabs, **Library**
(**File > Drawing Library...** opens on it), **Sets** and **Releases**
([below](#releases-tab)); **File > Releases...** is a shortcut that opens the
same window on the Releases tab. Each tab reads its list when first
same window on the Releases tab. Beside the Library and Sets tabs is the
release panel ([below](#make-nests-the-release-panel)), which builds one release
from both. Each tab reads its list when first
shown, and Releases re-reads its page each time it is shown again. Sets lists sets a page at a time
(`OpenNest.Data.DrawingSetBrowseSession`): search by name, customer or notes,
sort by name, customer, revision or saved time, and **Show archived**. Selecting
a set shows its notes. Below the list are **New Set...**, **Edit...** (also a
double-click or Enter on a set), **More ▾** and **Make Nests...** in bold, the
main action (below). **More ▾**, also the list's right-click
menu (the menu key or Shift+F10 opens it from the keyboard), holds **Archive**
or **Restore**, **History...** and **Releases...** for the selected set, then
**Import BOM...** ([below](#import-bom-to-a-set-desktop)), which needs no selection.
a set shows its notes. A double-click or Enter adds the set to the release at
one kit (again adds another kit). Below the list are **New Set...**, **Edit...**,
**More ▾** and **Add to Release** in bold, which adds every selected set
(Ctrl- or Shift-click selects several). **More ▾**, also the list's right-click
menu (the menu key or Shift+F10 opens it from the keyboard), holds **Add to
Release** and **Edit Set...**, then **Archive** or **Restore**, **History...**
and **Releases...** for the selected set, then **Import BOM...**
([below](#import-bom-to-a-set-desktop)), which needs no selection.
- **New Set...** and **Edit...** open the set editor
(`OpenNest.Data.DrawingSetEditSession`): name, customer, notes and the member
@@ -456,7 +468,7 @@ or **Restore**, **History...** and **Releases...** for the selected set, then
Database mode opens the drawing sets window straight into it) turns a BOM into a
new drawing set. It sits in More rather than beside New Set because it is another
way to start a set, used once per job, and the Sets tab keeps New Set, Edit and
Make Nests as its only buttons; File > Import BOM stays the familiar way in.
Add to Release as its only buttons; File > Import BOM stays the familiar way in.
1. Choose the BOM (`.xlsx`, read by `BomReader`) and the folder of its drawings,
the **Set name** (prefilled from the BOM file name without a trailing " BOM")
@@ -497,7 +509,7 @@ Make Nests as its only buttons; File > Import BOM stays the familiar way in.
leaves the set unchanged; Read BOM again then reuses those drawings, so
importing twice never stores a drawing twice.
Releasing the set (**Make Nests...**) then makes the nests, replacing File-mode
Releasing the set (**Make Nests** in the release panel) then makes the nests, replacing File-mode
BOM import's Create Nests for Database mode. In File mode, **File > Import BOM...**
still makes nests directly, unchanged.
@@ -506,10 +518,12 @@ whose current revision contains it) or **Add to Set...**: choose an active set
or **New Set**, and the set editor opens with the drawing added at the entered
quantity for review and Save. **Releases...** opens the drawing sets window on
its Releases tab, filtered to the releases that had the drawing on its own (see
below), with Undo Release. When the dialog was opened
from a nest, **Make Nests...** reads the drawing's current record and opens the
release dialog with it on its own at the entered quantity; more drawings and
sets are added there.
below), with Undo Release. In the drawing sets window, **Add to Release** adds
the drawing to the release panel. When the dialog was opened from a nest,
**Make Nests...** reads the drawing's current record and opens the release panel
in a dialog of its own with the drawing on its own at the entered quantity;
**Add Drawings...** there adds more library drawings (sets are released from the
drawing sets window).
The nest's drawing list has **Add Library Drawings to Set...** (right-click any
drawing; it acts on the whole nest, `OpenNest.Data.NestSetMerge`). It takes each
@@ -525,80 +539,89 @@ library's latest revision. Anything kept, skipped, archived in the library or
newer there than in the nest is listed first, then the set editor opens for
review and Save; nothing is stored before then.
**Make Nests...** (on the drawing sets window's Sets tab) reads the
selected active set with its members and opens the release dialog with it listed.
More sets are added from **Add a set**: the list opens with the first active sets
by name and narrows as you type; Enter or **Add** takes the picked set, or the one
set whose name is exactly what was typed. **Add Drawings...** adds library drawings on
their own, outside any set: it browses every active drawing as the set editor's
library pane does (search, server-side sort, pages, several selected at once),
and **Add to Release**, a double-click or Enter adds the selection at the
entered quantity. It stays open for more; a drawing already listed is greyed
and skipped, and an archived one is refused. **Remove** takes a set or drawing
out while another remains. The list shows each line's type; **Quantity** is how
many of a set (1 to 1000, multiplying its quantities) or of a drawing (1 to
100,000), and a set or drawing is listed once. A drawing that a set also lists
becomes one item with both quantities. The heading reads as a sentence of what
is listed, such as "Release set 'Frame kit' ×2", or the first few lines by name
and quantity when there are several.
<a id="make-nests-the-release-panel"></a>
### Make Nests: the release panel (desktop)
Below, a sentence previews what **Make Nests...** will do, such as "Creates 3
nests: A36 Grade A 0.25 in, 304 0.1875 in, ...", and the grid has one row per
material (name, grade, thickness, units and cut type) across all the sets and
drawings (`OpenNest.Data.SetReleasePlan`): material, grade, thickness, units,
cut type, drawings, parts and status. Refused groups (two drawings with one name,
or drawings without material or thickness) show why in the status column and
the preview counts them. **Fix Drawings...** opens
[Edit Drawing](#edit-drawing-desktop) on the selected refused group's drawings,
or the first refused group's when another row is selected, and rebuilds the plan
with what was saved. Archived members are left out and named below the grid.
The release panel (`OpenNest.Controls.ReleasePanel`) sits beside the Library and
Sets tabs and holds one release in progress for both. Adding is a double-click
(or Enter) in either list: a set is read with its members' current drawings and
listed at one kit; a library drawing is read afresh and listed on its own at the
Library tab's **Quantity**. Adding a set or drawing already listed adds to its
quantity instead, so double-clicking a set twice makes it ×2 kits. An archived
set or drawing is refused. Each line shows its name, its quantity (edited in
place: 1 to 1000 kits of a set, multiplying its quantities, or 1 to 100,000
pieces of a drawing) and **kits** or **pcs**; **✕** (or Delete) removes it. A
drawing that a set also lists becomes one item with both quantities. Above the
lines, the heading reads as a sentence of what is listed, such as "Release set
'Frame kit' ×2", or the first few lines when there are several. Below them are
the release's **Customer** (the one every line names, or left blank when they
differ) and **Notes**. Closing the window keeps a release not yet made for the
next time it opens in this run of OpenNest; it is not saved to disk.
The common case needs nothing more: every releasable material makes a new Draft
nest and **Nest after release** is ticked. **Options ▸** expands the choices that
change that: a **Release** tick per group (refused groups cannot be ticked), the
**Nest** column, and **Include archived drawings**, which puts archived members
back in. A tick survives changing the sets, quantities or the archived toggle.
Collapsing Options hides only what is at its default: an unticked group keeps the
Release column shown, and a ticked Include archived drawings stays shown. The
**Nest** column also shows, with a hint in the preview, whenever a Draft nest
exists that a material could merge into.
**Nests it will make** previews, live as lines change, one row per material
(name, grade, thickness, units and cut type) across all the sets and drawings
(`OpenNest.Data.SetReleasePlan`): a tick, the material, its parts, its **Nest**
and **What happens**. Untick a group to leave it out; the choice survives
changing the lines. Refused groups (two drawings with one name, or drawings
without material or thickness) cannot be ticked and say why at once.
**Fix Drawings...** opens [Edit Drawing](#edit-drawing-desktop) on the selected
refused group's drawings, or the first refused group's when another row is
selected, and rebuilds the plan with what was saved. Archived members are left
out and named below the grid, where **Include archived drawings** appears to put
them back in.
**Nest** is **New Draft nest** or **Merge into** one of the Draft nests of the
group's material, grade and thickness, listed with their sheet count and when
they were saved. A merge adds the demand to that draft's drawings and discards
every sheet (placements, cutoffs, cut plans), keeping drawing-level setup such as
cut pins (the status column says so); **Undo Release** restores it. A draft open
in a tab of this desktop is refused, since that tab could hold edits the merge
would leave behind: close it first.
A group **merges into a Draft nest by default**, which is what Draft status is
for: the plan looks up the Draft nests of the group's material, grade and
thickness (`SetReleasePlan.FindDraftsAsync`) and
**Nest after release** (ticked by default) runs Auto Nest on every released
- with exactly one, merges into it: the row says "→ merges into N26-0007";
- with several, merges into the most recently saved; the **Nest** list in the
row offers the others (newest first) and **New Draft nest**, and the row says
how many match;
- with none, makes a new Draft nest ("→ new Draft nest");
- when the draft it would merge into is open in a tab of this desktop, the row
says "N26-0007 is open — save and close it to merge into it" and **Make Nests**
waits: the tab could hold edits the merge would leave behind, and a parallel
nest is never made silently. Close the tab (the panel checks again when the
window is activated), choose New Draft nest for the group, or untick it.
Make Nests also waits until every chosen group's drafts have been looked up. A
merge adds the demand to that draft's drawings and renests the whole draft: every
sheet (placements, cutoffs, cut plans) is discarded and rebuilt, keeping
drawing-level setup such as cut pins; **Undo Release** restores it. With **Nest
after release** unticked, the row says the merged draft is left without sheets
until it is nested.
**Nest after release** (beside the button, ticked by default; the panel
remembers the operator's last choice) runs Auto Nest on every released
group, new or merged, before anything is saved (`OpenNest.Engine.Jobs.NestRenest`):
every drawing's required quantity, the selected engine, sheets from the nest's
plate defaults and plate-size options, as the Auto Nest dialog would offer them.
A layout is kept only when it is valid; otherwise the nest is saved without
sheets and its status says "Auto Nest could not keep a layout: open it and run
Auto Nest". The status column lists each group's sheets and utilization, and any
Auto Nest". The row lists each group's sheets and utilization, and any
copies left unplaced, which stay as remaining quantity. Unticked, new nests are
saved without sheets and merged drafts are left cleared for Auto Nest.
**Make Nests...** confirms, then runs `OpenNest.Data.SetReleaseSession`: every ticked
group's new nest is made as File > New would (the server's next nest name, the
saved plate defaults and clamps), in the group's units, with the saved plate size
and spacings converted (25.4 mm per inch) when those differ; the nest takes the
group's material, grade and thickness, the sets' customer when they share one,
and the **Draft** status (with drawings on their own, their library customers
count too). A merged draft is saved only while nobody else has
saved it since it was listed. Each created or merged nest opens in its own tab,
bound to its server record, and the release (with the release notes) is
recorded. A release with drawings on their own first checks that the server can
record them (see below) and, on an older server, saves nothing and says so. The
grid then shows every group's outcome: Created or Merged into with
the nest name, Refused or Failed with the reason, or Not started. Cancel during
preparing or nesting saves nothing; once saving starts it stops between saves,
never during one. When every nest was saved but recording failed,
the button becomes **Try Again** and posts the same release again without making
the nests again. A dialog
runs one release.
**Make Nests (n)**, in bold, with n the groups ticked, is the only step that
writes; **Clear** empties the panel. It runs `OpenNest.Data.SetReleaseSession`:
every ticked group's new nest is made as File > New would (the server's next nest
name, the saved plate defaults and clamps), in the group's units, with the saved
plate size and spacings converted (25.4 mm per inch) when those differ; the nest
takes the group's material, grade and thickness, the release's customer when
there is one, and the **Draft** status. A merged draft is saved only while nobody
else has saved it since it was listed. Each created or merged nest opens in its
own tab of the main window, bound to its server record, the main window comes
forward, and the release (with its notes) is recorded. A release with drawings
on their own first checks that the server can record them (see below) and, on an
older server, saves nothing and says so. Each row then shows its group's outcome:
Created or Merged into with the nest name, Refused or Failed with the reason, or
Not started. **Stop** (Clear while running) during preparing or nesting saves
nothing; once saving starts it stops between saves, never during one, and the
window does not close while it runs. When every nest was saved but recording
failed, the button becomes **Try Again** and posts the same release again
without making the nests again; until then nothing more can be added. After a
release, the next double-click starts the next one.
<a id="releases-tab"></a>
The **Releases** tab lists every release on the server, newest first, 100 at a
@@ -611,9 +634,9 @@ notes. The selected release's nests show their **Material**, the **Action**
Deleted. **Undo Release...** deletes the nests the release created (they can be
recovered) and restores the drafts it merged into. When some nests were changed
after the release, it lists them and offers to undo the others, leaving those as
they are. **New Release...** opens the release dialog empty; sets are added by
name and drawings with Add Drawings, and once the dialog records a release the
list re-reads from the newest.
they are. **New Release** switches to the Sets tab, where the release panel
builds the next release; the list re-reads from the newest when the tab is
shown again.
A filter narrows the tab to one set or one drawing, shown above the list
("Releases of set 'Frame A'") until **Clear Filter** lists every release again:
@@ -783,7 +806,8 @@ material or a positive thickness goes to one refused "unassigned" group, listed
`SetReleasePlan.FindDraftsAsync(nests, group)` lists the Draft nests a group
could merge into, using the nest query's status, material, grade and thickness
filters. Units and cut type are not in nest metadata, so they are checked on the
downloaded nest.
downloaded nest. The desktop merges into the most recently saved of them by
default and never into one open in a tab ([release panel](#make-nests-the-release-panel)).
`SetReleaseSession.RunAsync` releases the chosen releasable groups in plan order.
A group named in its `mergeInto` map merges into that draft instead of making a