refactor(ui): improve DrawingSelectionForm layout and responsiveness

- Make form wider (584x315) for better content display
- Add anchor properties to controls for responsive resizing
- Adjust control positions and spacing for improved layout
- Update MainForm tab sizes to match new dimensions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-04 09:58:33 -05:00
parent f68bddac93
commit 8b1c2b5b1b
3 changed files with 143 additions and 56 deletions

View File

@@ -40,62 +40,70 @@ namespace ExportDXF.Forms
this.descriptionLabel = new System.Windows.Forms.Label();
this.drawingNumberTextBox = new System.Windows.Forms.TextBox();
this.drawingNumberLabel = new System.Windows.Forms.Label();
this.currentDrawingLabel = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.statusLabel = new System.Windows.Forms.Label();
this.newDrawingPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.qtyNumericUpDown)).BeginInit();
this.SuspendLayout();
//
//
// equipmentLabel
//
//
this.equipmentLabel.AutoSize = true;
this.equipmentLabel.Location = new System.Drawing.Point(12, 15);
this.equipmentLabel.Name = "equipmentLabel";
this.equipmentLabel.Size = new System.Drawing.Size(82, 17);
this.equipmentLabel.TabIndex = 0;
this.equipmentLabel.Text = "Equipment #";
//
//
// equipmentComboBox
//
//
this.equipmentComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.equipmentComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.equipmentComboBox.FormattingEnabled = true;
this.equipmentComboBox.Location = new System.Drawing.Point(100, 12);
this.equipmentComboBox.Name = "equipmentComboBox";
this.equipmentComboBox.Size = new System.Drawing.Size(350, 25);
this.equipmentComboBox.Size = new System.Drawing.Size(470, 25);
this.equipmentComboBox.TabIndex = 1;
this.equipmentComboBox.SelectedIndexChanged += new System.EventHandler(this.equipmentComboBox_SelectedIndexChanged);
//
//
// drawingLabel
//
//
this.drawingLabel.AutoSize = true;
this.drawingLabel.Location = new System.Drawing.Point(12, 48);
this.drawingLabel.Name = "drawingLabel";
this.drawingLabel.Size = new System.Drawing.Size(68, 17);
this.drawingLabel.TabIndex = 2;
this.drawingLabel.Text = "Drawing #";
//
//
// drawingComboBox
//
//
this.drawingComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.drawingComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.drawingComboBox.FormattingEnabled = true;
this.drawingComboBox.Location = new System.Drawing.Point(100, 45);
this.drawingComboBox.Name = "drawingComboBox";
this.drawingComboBox.Size = new System.Drawing.Size(250, 25);
this.drawingComboBox.Size = new System.Drawing.Size(370, 25);
this.drawingComboBox.TabIndex = 3;
//
//
// newDrawingButton
//
this.newDrawingButton.Location = new System.Drawing.Point(356, 44);
//
this.newDrawingButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.newDrawingButton.Location = new System.Drawing.Point(476, 43);
this.newDrawingButton.Name = "newDrawingButton";
this.newDrawingButton.Size = new System.Drawing.Size(94, 27);
this.newDrawingButton.TabIndex = 4;
this.newDrawingButton.Text = "New Drawing";
this.newDrawingButton.UseVisualStyleBackColor = true;
this.newDrawingButton.Click += new System.EventHandler(this.newDrawingButton_Click);
//
//
// newDrawingPanel
//
//
this.newDrawingPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.newDrawingPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.newDrawingPanel.Controls.Add(this.qtyNumericUpDown);
this.newDrawingPanel.Controls.Add(this.qtyLabel);
@@ -105,13 +113,13 @@ namespace ExportDXF.Forms
this.newDrawingPanel.Controls.Add(this.drawingNumberLabel);
this.newDrawingPanel.Location = new System.Drawing.Point(15, 85);
this.newDrawingPanel.Name = "newDrawingPanel";
this.newDrawingPanel.Size = new System.Drawing.Size(435, 120);
this.newDrawingPanel.Size = new System.Drawing.Size(555, 120);
this.newDrawingPanel.TabIndex = 5;
this.newDrawingPanel.Visible = false;
//
//
// qtyNumericUpDown
//
this.qtyNumericUpDown.Location = new System.Drawing.Point(115, 80);
//
this.qtyNumericUpDown.Location = new System.Drawing.Point(124, 72);
this.qtyNumericUpDown.Maximum = new decimal(new int[] {
10000,
0,
@@ -130,86 +138,105 @@ namespace ExportDXF.Forms
0,
0,
0});
//
//
// qtyLabel
//
//
this.qtyLabel.AutoSize = true;
this.qtyLabel.Location = new System.Drawing.Point(10, 82);
this.qtyLabel.Location = new System.Drawing.Point(10, 74);
this.qtyLabel.Name = "qtyLabel";
this.qtyLabel.Size = new System.Drawing.Size(56, 17);
this.qtyLabel.TabIndex = 4;
this.qtyLabel.Text = "Quantity";
//
//
// descriptionTextBox
//
this.descriptionTextBox.Location = new System.Drawing.Point(115, 45);
//
this.descriptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.descriptionTextBox.Location = new System.Drawing.Point(124, 41);
this.descriptionTextBox.Name = "descriptionTextBox";
this.descriptionTextBox.Size = new System.Drawing.Size(300, 25);
this.descriptionTextBox.Size = new System.Drawing.Size(411, 25);
this.descriptionTextBox.TabIndex = 3;
//
//
// descriptionLabel
//
//
this.descriptionLabel.AutoSize = true;
this.descriptionLabel.Location = new System.Drawing.Point(10, 48);
this.descriptionLabel.Location = new System.Drawing.Point(10, 44);
this.descriptionLabel.Name = "descriptionLabel";
this.descriptionLabel.Size = new System.Drawing.Size(75, 17);
this.descriptionLabel.Size = new System.Drawing.Size(74, 17);
this.descriptionLabel.TabIndex = 2;
this.descriptionLabel.Text = "Description";
//
//
// drawingNumberTextBox
//
this.drawingNumberTextBox.Location = new System.Drawing.Point(115, 10);
//
this.drawingNumberTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.drawingNumberTextBox.Location = new System.Drawing.Point(124, 10);
this.drawingNumberTextBox.Name = "drawingNumberTextBox";
this.drawingNumberTextBox.Size = new System.Drawing.Size(300, 25);
this.drawingNumberTextBox.Size = new System.Drawing.Size(411, 25);
this.drawingNumberTextBox.TabIndex = 1;
this.drawingNumberTextBox.TextChanged += new System.EventHandler(this.drawingNumberTextBox_TextChanged);
//
//
// drawingNumberLabel
//
//
this.drawingNumberLabel.AutoSize = true;
this.drawingNumberLabel.Location = new System.Drawing.Point(10, 13);
this.drawingNumberLabel.Name = "drawingNumberLabel";
this.drawingNumberLabel.Size = new System.Drawing.Size(99, 17);
this.drawingNumberLabel.Size = new System.Drawing.Size(108, 17);
this.drawingNumberLabel.TabIndex = 0;
this.drawingNumberLabel.Text = "Drawing Number";
//
//
// currentDrawingLabel
//
this.currentDrawingLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.currentDrawingLabel.AutoEllipsis = true;
this.currentDrawingLabel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.currentDrawingLabel.Location = new System.Drawing.Point(15, 217);
this.currentDrawingLabel.Name = "currentDrawingLabel";
this.currentDrawingLabel.Size = new System.Drawing.Size(557, 41);
this.currentDrawingLabel.TabIndex = 9;
this.currentDrawingLabel.Text = "Loading active drawing...";
//
// okButton
//
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.Enabled = false;
this.okButton.Location = new System.Drawing.Point(294, 250);
this.okButton.Location = new System.Drawing.Point(414, 273);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 30);
this.okButton.TabIndex = 6;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
//
// cancelButton
//
//
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(375, 250);
this.cancelButton.Location = new System.Drawing.Point(495, 273);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 30);
this.cancelButton.TabIndex = 7;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
//
// statusLabel
//
//
this.statusLabel.AutoSize = true;
this.statusLabel.Location = new System.Drawing.Point(15, 220);
this.statusLabel.Location = new System.Drawing.Point(15, 280);
this.statusLabel.Name = "statusLabel";
this.statusLabel.Size = new System.Drawing.Size(44, 17);
this.statusLabel.TabIndex = 8;
this.statusLabel.Text = "Ready";
//
//
// DrawingSelectionForm
//
//
this.AcceptButton = this.okButton;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.CancelButton = this.cancelButton;
this.ClientSize = new System.Drawing.Size(464, 291);
this.ClientSize = new System.Drawing.Size(584, 315);
this.Controls.Add(this.currentDrawingLabel);
this.Controls.Add(this.statusLabel);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
@@ -248,6 +275,7 @@ namespace ExportDXF.Forms
private System.Windows.Forms.Label descriptionLabel;
private System.Windows.Forms.NumericUpDown qtyNumericUpDown;
private System.Windows.Forms.Label qtyLabel;
private System.Windows.Forms.Label currentDrawingLabel;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Label statusLabel;

View File

@@ -1,5 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
@@ -58,4 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
</root>

View File

@@ -104,7 +104,7 @@
this.logEventsTab.Location = new System.Drawing.Point(4, 30);
this.logEventsTab.Name = "logEventsTab";
this.logEventsTab.Padding = new System.Windows.Forms.Padding(3);
this.logEventsTab.Size = new System.Drawing.Size(690, 484);
this.logEventsTab.Size = new System.Drawing.Size(871, 560);
this.logEventsTab.TabIndex = 0;
this.logEventsTab.Text = "Log Events";
this.logEventsTab.UseVisualStyleBackColor = true;
@@ -117,7 +117,7 @@
this.logEventsDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.logEventsDataGrid.Location = new System.Drawing.Point(6, 6);
this.logEventsDataGrid.Name = "logEventsDataGrid";
this.logEventsDataGrid.Size = new System.Drawing.Size(1038, 536);
this.logEventsDataGrid.Size = new System.Drawing.Size(859, 548);
this.logEventsDataGrid.TabIndex = 0;
//
// bomTab
@@ -126,7 +126,7 @@
this.bomTab.Location = new System.Drawing.Point(4, 30);
this.bomTab.Name = "bomTab";
this.bomTab.Padding = new System.Windows.Forms.Padding(3);
this.bomTab.Size = new System.Drawing.Size(690, 484);
this.bomTab.Size = new System.Drawing.Size(871, 560);
this.bomTab.TabIndex = 1;
this.bomTab.Text = "Bill Of Materials";
this.bomTab.UseVisualStyleBackColor = true;
@@ -139,7 +139,7 @@
this.bomDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.bomDataGrid.Location = new System.Drawing.Point(6, 6);
this.bomDataGrid.Name = "bomDataGrid";
this.bomDataGrid.Size = new System.Drawing.Size(1038, 536);
this.bomDataGrid.Size = new System.Drawing.Size(859, 548);
this.bomDataGrid.TabIndex = 1;
//
// cutTemplatesTab
@@ -148,7 +148,7 @@
this.cutTemplatesTab.Location = new System.Drawing.Point(4, 30);
this.cutTemplatesTab.Name = "cutTemplatesTab";
this.cutTemplatesTab.Padding = new System.Windows.Forms.Padding(3);
this.cutTemplatesTab.Size = new System.Drawing.Size(690, 484);
this.cutTemplatesTab.Size = new System.Drawing.Size(871, 560);
this.cutTemplatesTab.TabIndex = 3;
this.cutTemplatesTab.Text = "Cut Templates";
this.cutTemplatesTab.UseVisualStyleBackColor = true;
@@ -161,7 +161,7 @@
this.cutTemplatesDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.cutTemplatesDataGrid.Location = new System.Drawing.Point(6, 6);
this.cutTemplatesDataGrid.Name = "cutTemplatesDataGrid";
this.cutTemplatesDataGrid.Size = new System.Drawing.Size(678, 468);
this.cutTemplatesDataGrid.Size = new System.Drawing.Size(859, 548);
this.cutTemplatesDataGrid.TabIndex = 2;
//
// dwgDetailsTab