From 8292f6c1b73091af3a181ba96c5087a21a1b12e9 Mon Sep 17 00:00:00 2001 From: dantezhu Date: Wed, 27 May 2020 16:08:12 +0800 Subject: [PATCH 1/3] =?UTF-8?q?Revert=20"GUI=E4=B9=9F=E5=8A=A0=E5=85=A5She?= =?UTF-8?q?et=20Name=E7=9A=84=E9=80=89=E9=A1=B9"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8d64cba41ca5f9fddf60d63fd1780d3493c3f476. --- GUI/MainForm.Designer.cs | 318 +++++++++++++++++---------------------- GUI/MainForm.cs | 2 - GUI/MainForm.resx | 3 - 3 files changed, 137 insertions(+), 186 deletions(-) diff --git a/GUI/MainForm.Designer.cs b/GUI/MainForm.Designer.cs index cfcdf0f..bbf7fc8 100644 --- a/GUI/MainForm.Designer.cs +++ b/GUI/MainForm.Designer.cs @@ -1,37 +1,34 @@ -namespace excel2json.GUI { - partial class MainForm { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { +namespace excel2json.GUI { + partial class MainForm { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { System.Windows.Forms.Label label2; System.Windows.Forms.Label label1; System.Windows.Forms.Label label4; System.Windows.Forms.Label label3; System.Windows.Forms.Label label5; - System.Windows.Forms.Label label6; - System.ComponentModel.ComponentResourceManager resources = - new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.statusStrip = new System.Windows.Forms.StatusStrip(); this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStrip = new System.Windows.Forms.ToolStrip(); @@ -57,33 +54,30 @@ private void InitializeComponent() this.tabControlCode = new System.Windows.Forms.TabControl(); this.tabPageJSON = new System.Windows.Forms.TabPage(); this.backgroundWorker = new System.ComponentModel.BackgroundWorker(); - this.comboBoxSheetName = new System.Windows.Forms.ComboBox(); label2 = new System.Windows.Forms.Label(); label1 = new System.Windows.Forms.Label(); label4 = new System.Windows.Forms.Label(); label3 = new System.Windows.Forms.Label(); label5 = new System.Windows.Forms.Label(); - label6 = new System.Windows.Forms.Label(); this.statusStrip.SuspendLayout(); this.toolStrip.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize) (this.splitContainer1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); this.flowLayoutPanel1.SuspendLayout(); this.panelExcelDropBox.SuspendLayout(); this.flowLayoutPanel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize) (this.pictureBoxExcel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxExcel)).BeginInit(); this.groupBox1.SuspendLayout(); this.tabControlCode.SuspendLayout(); this.SuspendLayout(); // // label2 // - label2.Location = new System.Drawing.Point(11, 99); - label2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + label2.Location = new System.Drawing.Point(6, 49); label2.Name = "label2"; - label2.Size = new System.Drawing.Size(142, 24); + label2.Size = new System.Drawing.Size(77, 12); label2.TabIndex = 1; label2.Text = "Encoding:"; label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -91,52 +85,47 @@ private void InitializeComponent() // label1 // label1.AutoSize = true; - label1.Location = new System.Drawing.Point(36, 43); - label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + label1.Location = new System.Drawing.Point(6, 23); label1.Name = "label1"; - label1.Size = new System.Drawing.Size(117, 24); + label1.Size = new System.Drawing.Size(77, 12); label1.TabIndex = 1; label1.Text = "Export Type:"; label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // - label4.Location = new System.Drawing.Point(11, 149); - label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + label4.Location = new System.Drawing.Point(6, 75); label4.Name = "label4"; - label4.Size = new System.Drawing.Size(142, 24); + label4.Size = new System.Drawing.Size(77, 12); label4.TabIndex = 6; label4.Text = "Lowcase:"; label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label3 // - label3.Location = new System.Drawing.Point(11, 203); - label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + label3.Location = new System.Drawing.Point(6, 101); label3.Name = "label3"; - label3.Size = new System.Drawing.Size(142, 24); + label3.Size = new System.Drawing.Size(77, 12); label3.TabIndex = 4; label3.Text = "Header:"; label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label5 // - label5.Location = new System.Drawing.Point(11, 253); - label5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + label5.Location = new System.Drawing.Point(6, 127); label5.Name = "label5"; - label5.Size = new System.Drawing.Size(142, 24); + label5.Size = new System.Drawing.Size(77, 12); label5.TabIndex = 9; label5.Text = "Date Format:"; label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // statusStrip // - this.statusStrip.ImageScalingSize = new System.Drawing.Size(24, 24); - this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {this.statusLabel}); - this.statusStrip.Location = new System.Drawing.Point(0, 1095); + this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.statusLabel}); + this.statusStrip.Location = new System.Drawing.Point(0, 540); this.statusStrip.Name = "statusStrip"; - this.statusStrip.Padding = new System.Windows.Forms.Padding(2, 0, 26, 0); - this.statusStrip.Size = new System.Drawing.Size(1437, 29); + this.statusStrip.Size = new System.Drawing.Size(784, 22); this.statusStrip.TabIndex = 2; this.statusStrip.Text = "Ready"; // @@ -145,7 +134,7 @@ private void InitializeComponent() this.statusLabel.IsLink = true; this.statusLabel.Name = "statusLabel"; this.statusLabel.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.statusLabel.Size = new System.Drawing.Size(211, 24); + this.statusLabel.Size = new System.Drawing.Size(130, 17); this.statusLabel.Text = "https://neil3d.github.io"; this.statusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.statusLabel.Click += new System.EventHandler(this.statusLabel_Click); @@ -154,15 +143,16 @@ private void InitializeComponent() // this.toolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.toolStrip.ImageScalingSize = new System.Drawing.Size(24, 24); - this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] - { - this.btnImportExcel, this.toolStripSeparator1, this.btnCopyJSON, this.btnSaveJson, - this.toolStripSeparator2, this.btnHelp - }); + this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnImportExcel, + this.toolStripSeparator1, + this.btnCopyJSON, + this.btnSaveJson, + this.toolStripSeparator2, + this.btnHelp}); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip"; - this.toolStrip.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0); - this.toolStrip.Size = new System.Drawing.Size(1437, 55); + this.toolStrip.Size = new System.Drawing.Size(784, 46); this.toolStrip.TabIndex = 4; this.toolStrip.Text = "Import excel file and export as JSON"; // @@ -171,7 +161,7 @@ private void InitializeComponent() this.btnImportExcel.Image = global::excel2json.Properties.Resources.excel; this.btnImportExcel.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnImportExcel.Name = "btnImportExcel"; - this.btnImportExcel.Size = new System.Drawing.Size(121, 52); + this.btnImportExcel.Size = new System.Drawing.Size(76, 43); this.btnImportExcel.Text = "Import Excel"; this.btnImportExcel.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.btnImportExcel.ToolTipText = "Import Excel .xlsx file"; @@ -180,14 +170,14 @@ private void InitializeComponent() // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 55); + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 46); // // btnCopyJSON // this.btnCopyJSON.Image = global::excel2json.Properties.Resources.clipboard; this.btnCopyJSON.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnCopyJSON.Name = "btnCopyJSON"; - this.btnCopyJSON.Size = new System.Drawing.Size(111, 52); + this.btnCopyJSON.Size = new System.Drawing.Size(70, 43); this.btnCopyJSON.Text = "Copy JSON"; this.btnCopyJSON.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.btnCopyJSON.ToolTipText = "Copy JSON string to clipboard"; @@ -198,7 +188,7 @@ private void InitializeComponent() this.btnSaveJson.Image = global::excel2json.Properties.Resources.json; this.btnSaveJson.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnSaveJson.Name = "btnSaveJson"; - this.btnSaveJson.Size = new System.Drawing.Size(105, 52); + this.btnSaveJson.Size = new System.Drawing.Size(66, 43); this.btnSaveJson.Text = "Save JSON"; this.btnSaveJson.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.btnSaveJson.ToolTipText = "Save JSON file"; @@ -207,14 +197,14 @@ private void InitializeComponent() // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(6, 55); + this.toolStripSeparator2.Size = new System.Drawing.Size(6, 46); // // btnHelp // this.btnHelp.Image = global::excel2json.Properties.Resources.about; this.btnHelp.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnHelp.Name = "btnHelp"; - this.btnHelp.Size = new System.Drawing.Size(55, 52); + this.btnHelp.Size = new System.Drawing.Size(36, 43); this.btnHelp.Text = "Help"; this.btnHelp.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.btnHelp.ToolTipText = "Help Document on web"; @@ -225,8 +215,7 @@ private void InitializeComponent() this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer1.Location = new System.Drawing.Point(0, 55); - this.splitContainer1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.splitContainer1.Location = new System.Drawing.Point(0, 46); this.splitContainer1.Name = "splitContainer1"; // // splitContainer1.Panel1 @@ -236,9 +225,8 @@ private void InitializeComponent() // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.tabControlCode); - this.splitContainer1.Size = new System.Drawing.Size(1437, 1040); + this.splitContainer1.Size = new System.Drawing.Size(784, 494); this.splitContainer1.SplitterDistance = 261; - this.splitContainer1.SplitterWidth = 7; this.splitContainer1.TabIndex = 5; // // flowLayoutPanel1 @@ -248,9 +236,8 @@ private void InitializeComponent() this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(259, 1038); + this.flowLayoutPanel1.Size = new System.Drawing.Size(259, 492); this.flowLayoutPanel1.TabIndex = 0; // // panelExcelDropBox @@ -259,15 +246,13 @@ private void InitializeComponent() this.panelExcelDropBox.BackColor = System.Drawing.SystemColors.ControlLight; this.panelExcelDropBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelExcelDropBox.Controls.Add(this.flowLayoutPanel2); - this.panelExcelDropBox.Location = new System.Drawing.Point(15, 16); - this.panelExcelDropBox.Margin = new System.Windows.Forms.Padding(15, 16, 15, 16); + this.panelExcelDropBox.Location = new System.Drawing.Point(8, 8); + this.panelExcelDropBox.Margin = new System.Windows.Forms.Padding(8); this.panelExcelDropBox.Name = "panelExcelDropBox"; - this.panelExcelDropBox.Size = new System.Drawing.Size(447, 422); + this.panelExcelDropBox.Size = new System.Drawing.Size(245, 212); this.panelExcelDropBox.TabIndex = 1; - this.panelExcelDropBox.DragDrop += - new System.Windows.Forms.DragEventHandler(this.panelExcelDropBox_DragDrop); - this.panelExcelDropBox.DragEnter += - new System.Windows.Forms.DragEventHandler(this.panelExcelDropBox_DragEnter); + this.panelExcelDropBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.panelExcelDropBox_DragDrop); + this.panelExcelDropBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.panelExcelDropBox_DragEnter); // // flowLayoutPanel2 // @@ -276,31 +261,27 @@ private void InitializeComponent() this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(445, 420); + this.flowLayoutPanel2.Size = new System.Drawing.Size(243, 210); this.flowLayoutPanel2.TabIndex = 0; // // pictureBoxExcel // this.pictureBoxExcel.Image = global::excel2json.Properties.Resources.excel_64; - this.pictureBoxExcel.Location = new System.Drawing.Point(5, 5); - this.pictureBoxExcel.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.pictureBoxExcel.Location = new System.Drawing.Point(3, 3); this.pictureBoxExcel.Name = "pictureBoxExcel"; - this.pictureBoxExcel.Size = new System.Drawing.Size(435, 200); + this.pictureBoxExcel.Size = new System.Drawing.Size(237, 100); this.pictureBoxExcel.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.pictureBoxExcel.TabIndex = 0; this.pictureBoxExcel.TabStop = false; // // labelExcelFile // - this.labelExcelFile.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte) (134))); - this.labelExcelFile.Location = new System.Drawing.Point(5, 210); - this.labelExcelFile.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.labelExcelFile.Font = new System.Drawing.Font("Microsoft YaHei", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.labelExcelFile.Location = new System.Drawing.Point(3, 106); this.labelExcelFile.Name = "labelExcelFile"; this.labelExcelFile.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.labelExcelFile.Size = new System.Drawing.Size(435, 140); + this.labelExcelFile.Size = new System.Drawing.Size(237, 70); this.labelExcelFile.TabIndex = 1; this.labelExcelFile.Text = "Drop you .xlsx file here!"; this.labelExcelFile.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -308,8 +289,6 @@ private void InitializeComponent() // groupBox1 // this.groupBox1.AutoSize = true; - this.groupBox1.Controls.Add(label6); - this.groupBox1.Controls.Add(this.comboBoxSheetName); this.groupBox1.Controls.Add(label5); this.groupBox1.Controls.Add(this.comboBoxDateFormat); this.groupBox1.Controls.Add(this.btnReimport); @@ -322,11 +301,10 @@ private void InitializeComponent() this.groupBox1.Controls.Add(this.comboBoxEncoding); this.groupBox1.Controls.Add(this.comboBoxType); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox1.Location = new System.Drawing.Point(15, 470); - this.groupBox1.Margin = new System.Windows.Forms.Padding(15, 16, 15, 16); + this.groupBox1.Location = new System.Drawing.Point(8, 236); + this.groupBox1.Margin = new System.Windows.Forms.Padding(8); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5); - this.groupBox1.Size = new System.Drawing.Size(447, 438); + this.groupBox1.Size = new System.Drawing.Size(245, 210); this.groupBox1.TabIndex = 3; this.groupBox1.TabStop = false; this.groupBox1.Text = "Options"; @@ -335,20 +313,20 @@ private void InitializeComponent() // this.comboBoxDateFormat.DisplayMember = "0"; this.comboBoxDateFormat.FormattingEnabled = true; - this.comboBoxDateFormat.Items.AddRange(new object[] {"yyyy/MM/dd", "yyyy/MM/dd hh:mm:ss"}); - this.comboBoxDateFormat.Location = new System.Drawing.Point(164, 248); - this.comboBoxDateFormat.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.comboBoxDateFormat.Items.AddRange(new object[] { + "yyyy/MM/dd", + "yyyy/MM/dd hh:mm:ss"}); + this.comboBoxDateFormat.Location = new System.Drawing.Point(89, 124); this.comboBoxDateFormat.Name = "comboBoxDateFormat"; - this.comboBoxDateFormat.Size = new System.Drawing.Size(272, 32); + this.comboBoxDateFormat.Size = new System.Drawing.Size(150, 20); this.comboBoxDateFormat.TabIndex = 8; this.comboBoxDateFormat.ValueMember = "0"; // // btnReimport // - this.btnReimport.Location = new System.Drawing.Point(128, 360); - this.btnReimport.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.btnReimport.Location = new System.Drawing.Point(70, 167); this.btnReimport.Name = "btnReimport"; - this.btnReimport.Size = new System.Drawing.Size(137, 45); + this.btnReimport.Size = new System.Drawing.Size(75, 23); this.btnReimport.TabIndex = 7; this.btnReimport.Text = "Reimport"; this.btnReimport.UseVisualStyleBackColor = true; @@ -359,11 +337,12 @@ private void InitializeComponent() this.comboBoxLowcase.DisplayMember = "0"; this.comboBoxLowcase.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxLowcase.FormattingEnabled = true; - this.comboBoxLowcase.Items.AddRange(new object[] {"Yes", "No"}); - this.comboBoxLowcase.Location = new System.Drawing.Point(164, 144); - this.comboBoxLowcase.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.comboBoxLowcase.Items.AddRange(new object[] { + "Yes", + "No"}); + this.comboBoxLowcase.Location = new System.Drawing.Point(89, 72); this.comboBoxLowcase.Name = "comboBoxLowcase"; - this.comboBoxLowcase.Size = new System.Drawing.Size(272, 32); + this.comboBoxLowcase.Size = new System.Drawing.Size(150, 20); this.comboBoxLowcase.TabIndex = 5; this.comboBoxLowcase.ValueMember = "0"; // @@ -371,11 +350,15 @@ private void InitializeComponent() // this.comboBoxHeader.DisplayMember = "0"; this.comboBoxHeader.FormattingEnabled = true; - this.comboBoxHeader.Items.AddRange(new object[] {"2", "3", "4", "5", "6"}); - this.comboBoxHeader.Location = new System.Drawing.Point(164, 196); - this.comboBoxHeader.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.comboBoxHeader.Items.AddRange(new object[] { + "2", + "3", + "4", + "5", + "6"}); + this.comboBoxHeader.Location = new System.Drawing.Point(89, 98); this.comboBoxHeader.Name = "comboBoxHeader"; - this.comboBoxHeader.Size = new System.Drawing.Size(272, 32); + this.comboBoxHeader.Size = new System.Drawing.Size(150, 20); this.comboBoxHeader.TabIndex = 3; this.comboBoxHeader.ValueMember = "0"; // @@ -384,10 +367,9 @@ private void InitializeComponent() this.comboBoxEncoding.DisplayMember = "0"; this.comboBoxEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxEncoding.FormattingEnabled = true; - this.comboBoxEncoding.Location = new System.Drawing.Point(164, 92); - this.comboBoxEncoding.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.comboBoxEncoding.Location = new System.Drawing.Point(89, 46); this.comboBoxEncoding.Name = "comboBoxEncoding"; - this.comboBoxEncoding.Size = new System.Drawing.Size(272, 32); + this.comboBoxEncoding.Size = new System.Drawing.Size(150, 20); this.comboBoxEncoding.TabIndex = 0; this.comboBoxEncoding.ValueMember = "0"; // @@ -396,11 +378,12 @@ private void InitializeComponent() this.comboBoxType.DisplayMember = "0"; this.comboBoxType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxType.FormattingEnabled = true; - this.comboBoxType.Items.AddRange(new object[] {"Array", "Dict Object"}); - this.comboBoxType.Location = new System.Drawing.Point(164, 40); - this.comboBoxType.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.comboBoxType.Items.AddRange(new object[] { + "Array", + "Dict Object"}); + this.comboBoxType.Location = new System.Drawing.Point(89, 20); this.comboBoxType.Name = "comboBoxType"; - this.comboBoxType.Size = new System.Drawing.Size(272, 32); + this.comboBoxType.Size = new System.Drawing.Size(150, 20); this.comboBoxType.TabIndex = 0; this.comboBoxType.ValueMember = "0"; // @@ -409,19 +392,17 @@ private void InitializeComponent() this.tabControlCode.Controls.Add(this.tabPageJSON); this.tabControlCode.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControlCode.Location = new System.Drawing.Point(0, 0); - this.tabControlCode.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.tabControlCode.Name = "tabControlCode"; this.tabControlCode.SelectedIndex = 0; - this.tabControlCode.Size = new System.Drawing.Size(1167, 1038); + this.tabControlCode.Size = new System.Drawing.Size(517, 492); this.tabControlCode.TabIndex = 0; // // tabPageJSON // - this.tabPageJSON.Location = new System.Drawing.Point(4, 33); - this.tabPageJSON.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.tabPageJSON.Location = new System.Drawing.Point(4, 22); this.tabPageJSON.Name = "tabPageJSON"; - this.tabPageJSON.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5); - this.tabPageJSON.Size = new System.Drawing.Size(1159, 1001); + this.tabPageJSON.Padding = new System.Windows.Forms.Padding(3); + this.tabPageJSON.Size = new System.Drawing.Size(509, 466); this.tabPageJSON.TabIndex = 0; this.tabPageJSON.Text = "JSON"; this.tabPageJSON.UseVisualStyleBackColor = true; @@ -429,43 +410,18 @@ private void InitializeComponent() // backgroundWorker // this.backgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker_DoWork); - this.backgroundWorker.RunWorkerCompleted += - new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker_RunWorkerCompleted); - // - // label6 - // - label6.Location = new System.Drawing.Point(11, 306); - label6.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - label6.Name = "label6"; - label6.Size = new System.Drawing.Size(142, 24); - label6.TabIndex = 11; - label6.Text = "Sheet Name:"; - label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // comboBoxSheetName - // - this.comboBoxSheetName.DisplayMember = "0"; - this.comboBoxSheetName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxSheetName.FormattingEnabled = true; - this.comboBoxSheetName.Items.AddRange(new object[] {"Yes", "No"}); - this.comboBoxSheetName.Location = new System.Drawing.Point(164, 301); - this.comboBoxSheetName.Margin = new System.Windows.Forms.Padding(5); - this.comboBoxSheetName.Name = "comboBoxSheetName"; - this.comboBoxSheetName.Size = new System.Drawing.Size(272, 32); - this.comboBoxSheetName.TabIndex = 10; - this.comboBoxSheetName.ValueMember = "0"; + this.backgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker_RunWorkerCompleted); // // MainForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1437, 1124); + this.ClientSize = new System.Drawing.Size(784, 562); this.Controls.Add(this.splitContainer1); this.Controls.Add(this.toolStrip); this.Controls.Add(this.statusStrip); - this.Icon = ((System.Drawing.Icon) (resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); - this.MinimumSize = new System.Drawing.Size(1448, 1144); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MinimumSize = new System.Drawing.Size(800, 600); this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "excel2json"; @@ -475,46 +431,46 @@ private void InitializeComponent() this.toolStrip.PerformLayout(); this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize) (this.splitContainer1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); this.flowLayoutPanel1.ResumeLayout(false); this.flowLayoutPanel1.PerformLayout(); this.panelExcelDropBox.ResumeLayout(false); this.flowLayoutPanel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize) (this.pictureBoxExcel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxExcel)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.tabControlCode.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); - } - #endregion - private System.Windows.Forms.StatusStrip statusStrip; - private System.Windows.Forms.ToolStripStatusLabel statusLabel; - private System.Windows.Forms.ToolStrip toolStrip; - private System.Windows.Forms.ToolStripButton btnImportExcel; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; - private System.Windows.Forms.ToolStripButton btnHelp; - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.ToolStripButton btnCopyJSON; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.Panel panelExcelDropBox; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; - private System.Windows.Forms.PictureBox pictureBoxExcel; - private System.Windows.Forms.Label labelExcelFile; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.ComboBox comboBoxEncoding; - private System.Windows.Forms.ComboBox comboBoxType; - private System.Windows.Forms.ComboBox comboBoxLowcase; - private System.Windows.Forms.ComboBox comboBoxHeader; - private System.ComponentModel.BackgroundWorker backgroundWorker; - private System.Windows.Forms.ToolStripButton btnSaveJson; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + } + + #endregion + private System.Windows.Forms.StatusStrip statusStrip; + private System.Windows.Forms.ToolStripStatusLabel statusLabel; + private System.Windows.Forms.ToolStrip toolStrip; + private System.Windows.Forms.ToolStripButton btnImportExcel; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripButton btnHelp; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.ToolStripButton btnCopyJSON; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Panel panelExcelDropBox; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private System.Windows.Forms.PictureBox pictureBoxExcel; + private System.Windows.Forms.Label labelExcelFile; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.ComboBox comboBoxEncoding; + private System.Windows.Forms.ComboBox comboBoxType; + private System.Windows.Forms.ComboBox comboBoxLowcase; + private System.Windows.Forms.ComboBox comboBoxHeader; + private System.ComponentModel.BackgroundWorker backgroundWorker; + private System.Windows.Forms.ToolStripButton btnSaveJson; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.Button btnReimport; private System.Windows.Forms.TabControl tabControlCode; private System.Windows.Forms.TabPage tabPageJSON; private System.Windows.Forms.ComboBox comboBoxDateFormat; - private System.Windows.Forms.ComboBox comboBoxSheetName; - } + } } \ No newline at end of file diff --git a/GUI/MainForm.cs b/GUI/MainForm.cs index 5b7829e..a716854 100644 --- a/GUI/MainForm.cs +++ b/GUI/MainForm.cs @@ -46,7 +46,6 @@ public MainForm() { this.comboBoxLowcase.SelectedIndex = 1; this.comboBoxHeader.SelectedIndex = 1; this.comboBoxDateFormat.SelectedIndex = 0; - this.comboBoxSheetName.SelectedIndex = 1; this.comboBoxEncoding.Items.Clear(); this.comboBoxEncoding.Items.Add("utf8-nobom"); @@ -127,7 +126,6 @@ private void loadExcelAsync(string path) { options.Lowcase = this.comboBoxLowcase.SelectedIndex == 0; options.HeaderRows = int.Parse(this.comboBoxHeader.Text); options.DateFormat = this.comboBoxDateFormat.Text; - options.ForceSheetName = this.comboBoxSheetName.SelectedIndex == 0; //-- start import this.backgroundWorker.RunWorkerAsync(options); diff --git a/GUI/MainForm.resx b/GUI/MainForm.resx index 61980bb..e6640fa 100644 --- a/GUI/MainForm.resx +++ b/GUI/MainForm.resx @@ -138,9 +138,6 @@ 17, 17 - - False - 241, 17 From 9171f3aa08e8a82891e4554e7e1de504c8109031 Mon Sep 17 00:00:00 2001 From: dantezhu Date: Wed, 27 May 2020 16:16:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B9=8B=E5=89=8DGUI=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=9C=89bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GUI/MainForm.Designer.cs | 61 +++++++++++++++++++++++++++++----------- GUI/MainForm.cs | 2 ++ GUI/MainForm.resx | 3 ++ 3 files changed, 50 insertions(+), 16 deletions(-) diff --git a/GUI/MainForm.Designer.cs b/GUI/MainForm.Designer.cs index bbf7fc8..e6d1e51 100644 --- a/GUI/MainForm.Designer.cs +++ b/GUI/MainForm.Designer.cs @@ -28,6 +28,7 @@ private void InitializeComponent() { System.Windows.Forms.Label label4; System.Windows.Forms.Label label3; System.Windows.Forms.Label label5; + System.Windows.Forms.Label label6; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.statusStrip = new System.Windows.Forms.StatusStrip(); this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel(); @@ -54,11 +55,13 @@ private void InitializeComponent() { this.tabControlCode = new System.Windows.Forms.TabControl(); this.tabPageJSON = new System.Windows.Forms.TabPage(); this.backgroundWorker = new System.ComponentModel.BackgroundWorker(); + this.comboBoxSheetName = new System.Windows.Forms.ComboBox(); label2 = new System.Windows.Forms.Label(); label1 = new System.Windows.Forms.Label(); label4 = new System.Windows.Forms.Label(); label3 = new System.Windows.Forms.Label(); label5 = new System.Windows.Forms.Label(); + label6 = new System.Windows.Forms.Label(); this.statusStrip.SuspendLayout(); this.toolStrip.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -134,7 +137,7 @@ private void InitializeComponent() { this.statusLabel.IsLink = true; this.statusLabel.Name = "statusLabel"; this.statusLabel.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.statusLabel.Size = new System.Drawing.Size(130, 17); + this.statusLabel.Size = new System.Drawing.Size(139, 17); this.statusLabel.Text = "https://neil3d.github.io"; this.statusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.statusLabel.Click += new System.EventHandler(this.statusLabel_Click); @@ -152,7 +155,7 @@ private void InitializeComponent() { this.btnHelp}); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip"; - this.toolStrip.Size = new System.Drawing.Size(784, 46); + this.toolStrip.Size = new System.Drawing.Size(784, 48); this.toolStrip.TabIndex = 4; this.toolStrip.Text = "Import excel file and export as JSON"; // @@ -161,7 +164,7 @@ private void InitializeComponent() { this.btnImportExcel.Image = global::excel2json.Properties.Resources.excel; this.btnImportExcel.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnImportExcel.Name = "btnImportExcel"; - this.btnImportExcel.Size = new System.Drawing.Size(76, 43); + this.btnImportExcel.Size = new System.Drawing.Size(85, 45); this.btnImportExcel.Text = "Import Excel"; this.btnImportExcel.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.btnImportExcel.ToolTipText = "Import Excel .xlsx file"; @@ -170,14 +173,14 @@ private void InitializeComponent() { // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 46); + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 48); // // btnCopyJSON // this.btnCopyJSON.Image = global::excel2json.Properties.Resources.clipboard; this.btnCopyJSON.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnCopyJSON.Name = "btnCopyJSON"; - this.btnCopyJSON.Size = new System.Drawing.Size(70, 43); + this.btnCopyJSON.Size = new System.Drawing.Size(78, 45); this.btnCopyJSON.Text = "Copy JSON"; this.btnCopyJSON.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.btnCopyJSON.ToolTipText = "Copy JSON string to clipboard"; @@ -188,7 +191,7 @@ private void InitializeComponent() { this.btnSaveJson.Image = global::excel2json.Properties.Resources.json; this.btnSaveJson.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnSaveJson.Name = "btnSaveJson"; - this.btnSaveJson.Size = new System.Drawing.Size(66, 43); + this.btnSaveJson.Size = new System.Drawing.Size(75, 45); this.btnSaveJson.Text = "Save JSON"; this.btnSaveJson.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.btnSaveJson.ToolTipText = "Save JSON file"; @@ -197,14 +200,14 @@ private void InitializeComponent() { // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(6, 46); + this.toolStripSeparator2.Size = new System.Drawing.Size(6, 48); // // btnHelp // this.btnHelp.Image = global::excel2json.Properties.Resources.about; this.btnHelp.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnHelp.Name = "btnHelp"; - this.btnHelp.Size = new System.Drawing.Size(36, 43); + this.btnHelp.Size = new System.Drawing.Size(39, 45); this.btnHelp.Text = "Help"; this.btnHelp.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.btnHelp.ToolTipText = "Help Document on web"; @@ -215,7 +218,7 @@ private void InitializeComponent() { this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; - this.splitContainer1.Location = new System.Drawing.Point(0, 46); + this.splitContainer1.Location = new System.Drawing.Point(0, 48); this.splitContainer1.Name = "splitContainer1"; // // splitContainer1.Panel1 @@ -225,7 +228,7 @@ private void InitializeComponent() { // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.tabControlCode); - this.splitContainer1.Size = new System.Drawing.Size(784, 494); + this.splitContainer1.Size = new System.Drawing.Size(784, 492); this.splitContainer1.SplitterDistance = 261; this.splitContainer1.TabIndex = 5; // @@ -237,7 +240,7 @@ private void InitializeComponent() { this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(259, 492); + this.flowLayoutPanel1.Size = new System.Drawing.Size(259, 490); this.flowLayoutPanel1.TabIndex = 0; // // panelExcelDropBox @@ -277,7 +280,7 @@ private void InitializeComponent() { // // labelExcelFile // - this.labelExcelFile.Font = new System.Drawing.Font("Microsoft YaHei", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.labelExcelFile.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.labelExcelFile.Location = new System.Drawing.Point(3, 106); this.labelExcelFile.Name = "labelExcelFile"; this.labelExcelFile.RightToLeft = System.Windows.Forms.RightToLeft.No; @@ -289,6 +292,8 @@ private void InitializeComponent() { // groupBox1 // this.groupBox1.AutoSize = true; + this.groupBox1.Controls.Add(label6); + this.groupBox1.Controls.Add(this.comboBoxSheetName); this.groupBox1.Controls.Add(label5); this.groupBox1.Controls.Add(this.comboBoxDateFormat); this.groupBox1.Controls.Add(this.btnReimport); @@ -304,7 +309,7 @@ private void InitializeComponent() { this.groupBox1.Location = new System.Drawing.Point(8, 236); this.groupBox1.Margin = new System.Windows.Forms.Padding(8); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(245, 210); + this.groupBox1.Size = new System.Drawing.Size(245, 238); this.groupBox1.TabIndex = 3; this.groupBox1.TabStop = false; this.groupBox1.Text = "Options"; @@ -324,7 +329,7 @@ private void InitializeComponent() { // // btnReimport // - this.btnReimport.Location = new System.Drawing.Point(70, 167); + this.btnReimport.Location = new System.Drawing.Point(68, 195); this.btnReimport.Name = "btnReimport"; this.btnReimport.Size = new System.Drawing.Size(75, 23); this.btnReimport.TabIndex = 7; @@ -394,7 +399,7 @@ private void InitializeComponent() { this.tabControlCode.Location = new System.Drawing.Point(0, 0); this.tabControlCode.Name = "tabControlCode"; this.tabControlCode.SelectedIndex = 0; - this.tabControlCode.Size = new System.Drawing.Size(517, 492); + this.tabControlCode.Size = new System.Drawing.Size(517, 490); this.tabControlCode.TabIndex = 0; // // tabPageJSON @@ -402,7 +407,7 @@ private void InitializeComponent() { this.tabPageJSON.Location = new System.Drawing.Point(4, 22); this.tabPageJSON.Name = "tabPageJSON"; this.tabPageJSON.Padding = new System.Windows.Forms.Padding(3); - this.tabPageJSON.Size = new System.Drawing.Size(509, 466); + this.tabPageJSON.Size = new System.Drawing.Size(509, 464); this.tabPageJSON.TabIndex = 0; this.tabPageJSON.Text = "JSON"; this.tabPageJSON.UseVisualStyleBackColor = true; @@ -412,6 +417,29 @@ private void InitializeComponent() { this.backgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker_DoWork); this.backgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker_RunWorkerCompleted); // + // label6 + // + label6.Location = new System.Drawing.Point(6, 153); + label6.Name = "label6"; + label6.Size = new System.Drawing.Size(77, 12); + label6.TabIndex = 11; + label6.Text = "SheetName:"; + label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // comboBoxSheetName + // + this.comboBoxSheetName.DisplayMember = "0"; + this.comboBoxSheetName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxSheetName.FormattingEnabled = true; + this.comboBoxSheetName.Items.AddRange(new object[] { + "Yes", + "No"}); + this.comboBoxSheetName.Location = new System.Drawing.Point(89, 150); + this.comboBoxSheetName.Name = "comboBoxSheetName"; + this.comboBoxSheetName.Size = new System.Drawing.Size(150, 20); + this.comboBoxSheetName.TabIndex = 10; + this.comboBoxSheetName.ValueMember = "0"; + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -472,5 +500,6 @@ private void InitializeComponent() { private System.Windows.Forms.TabControl tabControlCode; private System.Windows.Forms.TabPage tabPageJSON; private System.Windows.Forms.ComboBox comboBoxDateFormat; + private System.Windows.Forms.ComboBox comboBoxSheetName; } } \ No newline at end of file diff --git a/GUI/MainForm.cs b/GUI/MainForm.cs index a716854..5b7829e 100644 --- a/GUI/MainForm.cs +++ b/GUI/MainForm.cs @@ -46,6 +46,7 @@ public MainForm() { this.comboBoxLowcase.SelectedIndex = 1; this.comboBoxHeader.SelectedIndex = 1; this.comboBoxDateFormat.SelectedIndex = 0; + this.comboBoxSheetName.SelectedIndex = 1; this.comboBoxEncoding.Items.Clear(); this.comboBoxEncoding.Items.Add("utf8-nobom"); @@ -126,6 +127,7 @@ private void loadExcelAsync(string path) { options.Lowcase = this.comboBoxLowcase.SelectedIndex == 0; options.HeaderRows = int.Parse(this.comboBoxHeader.Text); options.DateFormat = this.comboBoxDateFormat.Text; + options.ForceSheetName = this.comboBoxSheetName.SelectedIndex == 0; //-- start import this.backgroundWorker.RunWorkerAsync(options); diff --git a/GUI/MainForm.resx b/GUI/MainForm.resx index e6640fa..61980bb 100644 --- a/GUI/MainForm.resx +++ b/GUI/MainForm.resx @@ -138,6 +138,9 @@ 17, 17 + + False + 241, 17 From 39b4ec78d9ea19c548daac00c9b1d0ccd65d470a Mon Sep 17 00:00:00 2001 From: dantezhu Date: Wed, 27 May 2020 16:22:32 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E4=B8=BAdict=E6=97=B6=E4=BC=9A=E6=9C=89=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JsonExporter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/JsonExporter.cs b/JsonExporter.cs index 89e6cd8..ae61560 100644 --- a/JsonExporter.cs +++ b/JsonExporter.cs @@ -95,7 +95,8 @@ private object convertSheetToDict(DataTable sheet, bool lowcase) { ID = string.Format("row_{0}", i); var rowObject = convertRowToDict(sheet, row, lowcase, firstDataRow); - rowObject[ID] = ID; + // 多余的字段 + // rowObject[ID] = ID; importData[ID] = rowObject; }