Browse Source

SOP功能优化

callm 2 years ago
parent
commit
0410b2549b
5 changed files with 6183 additions and 586 deletions
  1. 1 2
      FileWatcher/Login.Designer.cs
  2. 2 2
      FileWatcher/SOP.Designer.cs
  3. 12 3
      FileWatcher/SOP.cs
  4. 505 179
      FileWatcher/tool/Spire.Pdf.xml
  5. 5663 400
      FileWatcher/tool/Spire.XLS.xml

+ 1 - 2
FileWatcher/Login.Designer.cs

@@ -131,8 +131,7 @@
             // 
             // Login
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
             this.ClientSize = new System.Drawing.Size(762, 458);
             this.Controls.Add(this.Master);
             this.Controls.Add(this.label4);

+ 2 - 2
FileWatcher/SOP.Designer.cs

@@ -119,7 +119,7 @@
             // 
             this.OperatResult.Location = new System.Drawing.Point(823, 32);
             this.OperatResult.Name = "OperatResult";
-            this.OperatResult.Size = new System.Drawing.Size(591, 874);
+            this.OperatResult.Size = new System.Drawing.Size(1110, 874);
             this.OperatResult.TabIndex = 12;
             this.OperatResult.Text = "";
             this.OperatResult.TextChanged += new System.EventHandler(this.OperatResult_TextChanged);
@@ -200,7 +200,7 @@
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1442, 934);
+            this.ClientSize = new System.Drawing.Size(1945, 934);
             this.Controls.Add(this.pr_spec);
             this.Controls.Add(this.PDF);
             this.Controls.Add(this.JPG);

+ 12 - 3
FileWatcher/SOP.cs

@@ -9,8 +9,6 @@ using System.Threading;
 using System.Net.Sockets;
 using System.Data;
 using System.Web.Script.Serialization;
-using NPOI.HSSF.UserModel;
-using NPOI.SS.UserModel;
 
 namespace FileWatcher
 {
@@ -70,6 +68,17 @@ namespace FileWatcher
             {
                 for (int i = 0; i < workbook.Worksheets.Count; i++)
                 {
+                    for (int k = 0; k < workbook.Worksheets[i].TextBoxes.Count; k++)
+                    {
+                        if (workbook.Worksheets[i].TextBoxes[k].RichText.Text.Length > 1)
+                        {
+                            //OperatResult.AppendText(workbook.Worksheets[i].TextBoxes[k].ID + " " + workbook.Worksheets[i].TextBoxes[k].Name + " " + workbook.Worksheets[i].TextBoxes[k].RichText.GetFont(0).FontName + " " + workbook.Worksheets[i].TextBoxes[k].RichText.GetFont(0).Size);
+                            workbook.Worksheets[i].TextBoxes[k].RichText.Text = workbook.Worksheets[i].TextBoxes[k].RichText.Text;
+                            workbook.Worksheets[i].TextBoxes[k].Width = workbook.Worksheets[i].TextBoxes[k].Width * 2;
+                            workbook.Worksheets[i].TextBoxes[k].Height = workbook.Worksheets[i].TextBoxes[k].Height * 2;
+                            workbook.Worksheets[i].TextBoxes[k].HAlignment = CommentHAlignType.Center;
+                        }
+                    }
                     Workbook bw = new Workbook();
                     Worksheet she = bw.CreateEmptySheet();
                     she.Name = workbook.Worksheets[i].Name;
@@ -90,7 +99,7 @@ namespace FileWatcher
             }
             catch (Exception ex)
             {
-                Console.WriteLine(ex.Message);
+                OperatResult.AppendText(ex.Message + "\n");
             }
         }
 

File diff suppressed because it is too large
+ 505 - 179
FileWatcher/tool/Spire.Pdf.xml


File diff suppressed because it is too large
+ 5663 - 400
FileWatcher/tool/Spire.XLS.xml


Some files were not shown because too many files changed in this diff