Ver código fonte

提交更改

shim 8 anos atrás
pai
commit
c76dc820ac

+ 6 - 6
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs

@@ -662,17 +662,17 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.彩盒称重_FormClosing);
             this.Load += new System.EventHandler(this.彩盒上料打印_Load);
             this.SizeChanged += new System.EventHandler(this.彩盒称重_SizeChanged);
-            this.panel6.ResumeLayout(false);
+            this.panel6.ResumeLayout(true);
             this.panel6.PerformLayout();
-            this.panel4.ResumeLayout(false);
+            this.panel4.ResumeLayout(true);
             this.panel4.PerformLayout();
-            this.panel3.ResumeLayout(false);
+            this.panel3.ResumeLayout(true);
             this.panel3.PerformLayout();
-            this.panel2.ResumeLayout(false);
+            this.panel2.ResumeLayout(true);
             this.panel2.PerformLayout();
-            this.panel1.ResumeLayout(false);
+            this.panel1.ResumeLayout(true);
             this.panel1.PerformLayout();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }

+ 39 - 0
UAS-MES/PublicMethod/BaseUtil.cs

@@ -3,6 +3,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
+using System.IO;
 using System.Net;
 using System.Net.Sockets;
 using System.Reflection;
@@ -204,6 +205,44 @@ namespace UAS_MES.PublicMethod
             }
         }
 
+        /// <summary>
+        /// 获取打印标签
+        /// </summary>
+        /// <param name="labelName"></param>
+        /// <param name="labelUrl"></param>
+        /// <param name="indate"></param>
+        public static void GetPrintLabel(string labelName, string labelUrl, string indate)
+        {
+            string LabelUrl = labelUrl;
+            string LabelName = labelName;
+            System.DateTime time = Convert.ToDateTime(indate);
+            FileInfo file = new FileInfo(ftpOperater.DownLoadTo + LabelName);
+            if (time.ToString() != file.LastWriteTime.ToString())
+                BaseUtil.GetLabelUrl(LabelUrl, LabelName, time);
+        }
+
+        /// <summary>
+        /// 获取标签的路径
+        /// </summary>
+        /// <param name="URL"></param>
+        /// <param name="LabelName"></param>
+        /// <param name="time"></param>
+        /// <returns></returns>
+        public static string GetLabelUrl(string URL, string LabelName, DateTime time)
+        {
+            //如果是传入的数据是从FTP取的文件
+            if (URL.Contains("ftp:"))
+            {
+                ftpOperater ftp = new ftpOperater();
+                return ftp.Download(LabelName, time);
+            }
+            else
+            {
+                return URL;
+            }
+        }
+
+
         /// <summary>
         /// 移除重复行
         /// </summary>

+ 1 - 1
UAS-MES/UAS-MES.csproj

@@ -41,7 +41,7 @@
     <MinimumRequiredVersion>1.0.0.201</MinimumRequiredVersion>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
-    <ApplicationRevision>246</ApplicationRevision>
+    <ApplicationRevision>248</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>true</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>