Browse Source

添加标签预览功能

callm 5 years ago
parent
commit
a7456a34b1

+ 9 - 0
UAS-出货标签管理(贸易版)/UAS-出货标签管理(贸易版).csproj

@@ -275,6 +275,12 @@
     <Compile Include="PowerSetting.Designer.cs">
       <DependentUpon>PowerSetting.cs</DependentUpon>
     </Compile>
+    <Compile Include="PreViewWindow.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="PreViewWindow.Designer.cs">
+      <DependentUpon>PreViewWindow.cs</DependentUpon>
+    </Compile>
     <Compile Include="Properties\Settings1.Designer.cs">
       <AutoGen>True</AutoGen>
       <DesignTimeSharedInput>True</DesignTimeSharedInput>
@@ -395,6 +401,9 @@
     <EmbeddedResource Include="PowerSetting.resx">
       <DependentUpon>PowerSetting.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="PreViewWindow.resx">
+      <DependentUpon>PreViewWindow.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="ReSetMaxNum.resx">
       <DependentUpon>ReSetMaxNum.cs</DependentUpon>
     </EmbeddedResource>

+ 14 - 0
UAS-出货标签管理(贸易版)/UAS_出货标签管理.Designer.cs

@@ -200,6 +200,7 @@
             this.OutboxCapacity = new System.Windows.Forms.NumericUpDown();
             this.OutBoxLabelPrint = new System.Windows.Forms.Button();
             this.OutBoxCombox = new System.Windows.Forms.ComboBox();
+            this.MidLabelPreView = new System.Windows.Forms.LinkLabel();
             ((System.ComponentModel.ISupportInitialize)(this.Si_ItemDGV)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MidSource)).BeginInit();
             this.ShowMenu.SuspendLayout();
@@ -1584,6 +1585,7 @@
             // 
             // MidLabel
             // 
+            this.MidLabel.Controls.Add(this.MidLabelPreView);
             this.MidLabel.Controls.Add(this.GetMidBoxCode);
             this.MidLabel.Controls.Add(this.label9);
             this.MidLabel.Controls.Add(this.MidDocRefresh);
@@ -1978,6 +1980,17 @@
             this.OutBoxCombox.TabIndex = 78;
             this.OutBoxCombox.SelectedIndexChanged += new System.EventHandler(this.OutBoxCombox_SelectedIndexChanged);
             // 
+            // MidLabelPreView
+            // 
+            this.MidLabelPreView.AutoSize = true;
+            this.MidLabelPreView.Location = new System.Drawing.Point(97, 19);
+            this.MidLabelPreView.Name = "MidLabelPreView";
+            this.MidLabelPreView.Size = new System.Drawing.Size(42, 21);
+            this.MidLabelPreView.TabIndex = 119;
+            this.MidLabelPreView.TabStop = true;
+            this.MidLabelPreView.Text = "预览";
+            this.MidLabelPreView.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.MidLabelPreView_LinkClicked);
+            // 
             // UAS_出货标签打印
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -2228,5 +2241,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn pr_spec;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode1;
         private System.Windows.Forms.DataGridViewTextBoxColumn pib_outboxcode2;
+        private System.Windows.Forms.LinkLabel MidLabelPreView;
     }
 }

+ 10 - 0
UAS-出货标签管理(贸易版)/UAS_出货标签管理.cs

@@ -2778,5 +2778,15 @@ namespace UAS_LabelMachine
                 dh.CallProcedure("sp_uploadbarcode", dt1);
             }
         }
+
+        private void MidLabelPreView_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+        {
+            MidFormat = engine.Documents.Open(ftpOperater.DownLoadTo + MidLabelCombox.Text);
+            Resolution re = new Resolution(ImageResolution.Printer);
+            MidFormat.ExportImageToFile(@"C:\打印标签\"+ MidLabelCombox.Text + ".jpg",ImageType.JPEG, Seagull.BarTender.Print.ColorDepth.Mono, re, OverwriteOptions.DoNotOverwrite);
+            PreViewWindow pre = new PreViewWindow(MidLabelCombox.Text);
+            pre.StartPosition = FormStartPosition.CenterScreen;
+            pre.ShowDialog();
+        }
     }
 }