diff --git a/OpenNest/Forms/EditNestForm.Designer.cs b/OpenNest/Forms/EditNestForm.Designer.cs index 3e1360d..60fa820 100644 --- a/OpenNest/Forms/EditNestForm.Designer.cs +++ b/OpenNest/Forms/EditNestForm.Designer.cs @@ -28,6 +28,7 @@ /// private void InitializeComponent() { + components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditNestForm)); splitContainer = new System.Windows.Forms.SplitContainer(); tabControl1 = new System.Windows.Forms.TabControl(); @@ -39,6 +40,9 @@ partsColumn = new System.Windows.Forms.ColumnHeader(); utilColumn = new System.Windows.Forms.ColumnHeader(); toolStrip1 = new System.Windows.Forms.ToolStrip(); + toolStripLabel1 = new System.Windows.Forms.ToolStripButton(); + toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + toolStripLabel2 = new System.Windows.Forms.ToolStripButton(); tabPage2 = new System.Windows.Forms.TabPage(); drawingListBox1 = new OpenNest.Controls.DrawingListBox(); toolStrip2 = new System.Windows.Forms.ToolStrip(); @@ -52,6 +56,7 @@ splitContainer.SuspendLayout(); tabControl1.SuspendLayout(); tabPage1.SuspendLayout(); + toolStrip1.SuspendLayout(); tabPage2.SuspendLayout(); toolStrip2.SuspendLayout(); SuspendLayout(); @@ -107,11 +112,11 @@ platesListView.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0); platesListView.FullRowSelect = true; platesListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - platesListView.Location = new System.Drawing.Point(4, 28); + platesListView.Location = new System.Drawing.Point(4, 30); platesListView.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); platesListView.MultiSelect = false; platesListView.Name = "platesListView"; - platesListView.Size = new System.Drawing.Size(265, 396); + platesListView.Size = new System.Drawing.Size(265, 394); platesListView.TabIndex = 1; platesListView.UseCompatibleStateImageBehavior = false; platesListView.View = System.Windows.Forms.View.Details; @@ -128,16 +133,16 @@ sizeColumn.Width = 80; // // qtyColumn - // + // qtyColumn.Text = "Qty"; - // + // // partsColumn - // + // partsColumn.Text = "Parts"; partsColumn.Width = 45; - // + // // utilColumn - // + // utilColumn.Text = "Util"; utilColumn.Width = 45; // @@ -145,12 +150,38 @@ // toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { toolStripLabel1, toolStripSeparator3, toolStripLabel2 }); toolStrip1.Location = new System.Drawing.Point(4, 3); toolStrip1.Name = "toolStrip1"; - toolStrip1.Size = new System.Drawing.Size(265, 25); + toolStrip1.Size = new System.Drawing.Size(265, 27); toolStrip1.TabIndex = 2; toolStrip1.Text = "toolStrip1"; // + // toolStripLabel1 + // + toolStripLabel1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + toolStripLabel1.Image = Properties.Resources.plus; + toolStripLabel1.Name = "toolStripLabel1"; + toolStripLabel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0); + toolStripLabel1.Size = new System.Drawing.Size(34, 24); + toolStripLabel1.Text = "Remove Selected Plate"; + toolStripLabel1.Click += toolStripLabel1_Click; + // + // toolStripSeparator3 + // + toolStripSeparator3.Name = "toolStripSeparator3"; + toolStripSeparator3.Size = new System.Drawing.Size(6, 27); + // + // toolStripLabel2 + // + toolStripLabel2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + toolStripLabel2.Image = Properties.Resources.delete; + toolStripLabel2.Name = "toolStripLabel2"; + toolStripLabel2.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0); + toolStripLabel2.Size = new System.Drawing.Size(34, 24); + toolStripLabel2.Text = "Remove Selected"; + toolStripLabel2.Click += toolStripLabel2_Click; + // // tabPage2 // tabPage2.Controls.Add(drawingListBox1); @@ -255,6 +286,8 @@ tabControl1.ResumeLayout(false); tabPage1.ResumeLayout(false); tabPage1.PerformLayout(); + toolStrip1.ResumeLayout(false); + toolStrip1.PerformLayout(); tabPage2.ResumeLayout(false); tabPage2.PerformLayout(); toolStrip2.ResumeLayout(false); @@ -283,5 +316,8 @@ private System.Windows.Forms.ToolStripButton toolStripButton3; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripButton hideNestedButton; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripButton toolStripLabel1; + private System.Windows.Forms.ToolStripButton toolStripLabel2; } } \ No newline at end of file diff --git a/OpenNest/Forms/EditNestForm.cs b/OpenNest/Forms/EditNestForm.cs index f6e2629..0a475fc 100644 --- a/OpenNest/Forms/EditNestForm.cs +++ b/OpenNest/Forms/EditNestForm.cs @@ -35,7 +35,6 @@ namespace OpenNest.Forms private Panel plateHeaderPanel; private Label plateInfoLabel; private Button btnFirstPlate; - private Button btnRemovePlate; private Button btnPreviousPlate; private Button btnNextPlate; @@ -127,18 +126,8 @@ namespace OpenNest.Forms navPanel.Controls.AddRange(new Control[] { btnFirstPlate, btnPreviousPlate, btnNextPlate, btnLastPlate }); - btnRemovePlate = CreateNavButton(Resources.remove); - btnRemovePlate.Dock = DockStyle.Right; - btnRemovePlate.Click += (s, e) => RemoveCurrentPlate(); - - var btnAddPlate = CreateNavButton(Resources.add); - btnAddPlate.Dock = DockStyle.Right; - btnAddPlate.Click += (s, e) => Nest.CreatePlate(); - plateHeaderPanel.Controls.Add(navPanel); plateHeaderPanel.Controls.Add(plateInfoLabel); - plateHeaderPanel.Controls.Add(btnRemovePlate); - plateHeaderPanel.Controls.Add(btnAddPlate); // Center the nav panel on resize CenterNavPanel(navPanel); @@ -905,7 +894,7 @@ namespace OpenNest.Forms private void UpdateRemovePlateButton() { - btnRemovePlate.Enabled = PlateManager.CanRemoveCurrent; + toolStripLabel2.Enabled = PlateManager.CanRemoveCurrent; } #endregion diff --git a/OpenNest/Forms/EditNestForm.resx b/OpenNest/Forms/EditNestForm.resx index 01ae9c4..c655c1a 100644 --- a/OpenNest/Forms/EditNestForm.resx +++ b/OpenNest/Forms/EditNestForm.resx @@ -127,7 +127,7 @@ iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wAAADsABataJCQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAABb8SURBVHhe7d15 + vAAADrwBlbxySQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAABb8SURBVHhe7d15 zG1XWQbwpxQ6MojBaCj4h9GAQplCJCpRKAUSoy1ECiYiYBogxhAEJMaEUCiJQ5iDpS1gxYJaUJBJZRQQ RCBKVAwWJUaZEgglDGIotGiWPVe+Lta99xvOsPd+f7/kSZre3u/sffbqu55zvjMkAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA @@ -232,7 +232,7 @@ iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAN - 1QAADdUBPdZY8QAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAEnhSURBVHhe7d15 + 0AAADdABEGw9BwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAEnhSURBVHhe7d15 nB1FuTfwFxAUxX296r2KmoR9FUEtWRREVlFQICIo+wBCCCScJJBAkgZERkXwupCQEMISICGQgIAUkBC2 sMm+Q9Iot+CCN7PvU++nTqZD8jw9M2fppar698cX9ZHp7unTp37PnNNd9f+01v8PoCiEVHsIqc4SUs0V Ui0QUk0TUv1USPUB+u8CAPiMFQB8JKT6ppBqmZBKD+INIdUvhFTr058FAPARKwD4Rkh1lJCqPyb048wR diff --git a/OpenNest/Forms/MainForm.cs b/OpenNest/Forms/MainForm.cs index ca33526..9959dc6 100644 --- a/OpenNest/Forms/MainForm.cs +++ b/OpenNest/Forms/MainForm.cs @@ -120,6 +120,7 @@ namespace OpenNest.Forms { NavigationEnableCheck(); UpdatePlateStatus(); + mnuPlateRemove.Enabled = activeForm?.PlateManager.CanRemoveCurrent ?? false; }; editForm.WindowState = windowState; editForm.Show(); diff --git a/OpenNest/Properties/Resources.Designer.cs b/OpenNest/Properties/Resources.Designer.cs index 953b82e..6873a6e 100644 --- a/OpenNest/Properties/Resources.Designer.cs +++ b/OpenNest/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace OpenNest.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -80,6 +80,16 @@ namespace OpenNest.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap clock { + get { + object obj = ResourceManager.GetObject("clock", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -89,13 +99,13 @@ namespace OpenNest.Properties { return ((System.Drawing.Bitmap)(obj)); } } - + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// - internal static System.Drawing.Bitmap clock { + internal static System.Drawing.Bitmap delete { get { - object obj = ResourceManager.GetObject("clock", resourceCulture); + object obj = ResourceManager.GetObject("delete", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } @@ -170,6 +180,16 @@ namespace OpenNest.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap plus { + get { + object obj = ResourceManager.GetObject("plus", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -179,7 +199,7 @@ namespace OpenNest.Properties { return ((System.Drawing.Bitmap)(obj)); } } - + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/OpenNest/Properties/Resources.resx b/OpenNest/Properties/Resources.resx index b84a2fc..dbaeb93 100644 --- a/OpenNest/Properties/Resources.resx +++ b/OpenNest/Properties/Resources.resx @@ -118,67 +118,73 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\clear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\remove.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\clock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\doc_new.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\doc_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\move_first.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\move_last.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\move_next.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\move_previous.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\remove.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\rotate_ccw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\rotate_cw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\save_as.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\zoom_in.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\watermark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\clear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\save_as.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\move_last.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\import.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\zoom_all.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\zoom_in.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\move_first.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\zoom_out.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\cutoff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\move_next.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\remnants.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\move_previous.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\rotate_cw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\rotate_ccw.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\cutoff.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\doc_open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\doc_new.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/OpenNest/Resources/delete.png b/OpenNest/Resources/delete.png new file mode 100644 index 0000000..3f7789c Binary files /dev/null and b/OpenNest/Resources/delete.png differ diff --git a/OpenNest/Resources/plus.png b/OpenNest/Resources/plus.png new file mode 100644 index 0000000..f2e2518 Binary files /dev/null and b/OpenNest/Resources/plus.png differ