Browse Source

作业指导书查询,自动升级程序BUG修复

章政 7 years ago
parent
commit
23d7a62159

+ 25 - 64
UAS-MES/FunctionCode/Query/Query_OperationInstruction.Designer.cs

@@ -30,34 +30,20 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_OperationInstruction));
-            this.MediaPlayer = new AxWMPLib.AxWindowsMediaPlayer();
             this.sn_label = new System.Windows.Forms.Label();
             this.FileList_label = new System.Windows.Forms.Label();
-            this.PageView = new O2S.Components.PDFView4NET.PDFPageView();
             this.PDFDocument = new O2S.Components.PDFView4NET.PDFDocument(this.components);
-            this.PicBox = new System.Windows.Forms.PictureBox();
+            this.OpenFile = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.FileList = new UAS_MES.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.SnCode = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
-            ((System.ComponentModel.ISupportInitialize)(this.MediaPlayer)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.PicBox)).BeginInit();
             this.SuspendLayout();
             // 
-            // MediaPlayer
-            // 
-            this.MediaPlayer.Enabled = true;
-            this.MediaPlayer.Location = new System.Drawing.Point(0, 52);
-            this.MediaPlayer.Name = "MediaPlayer";
-            this.MediaPlayer.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("MediaPlayer.OcxState")));
-            this.MediaPlayer.Size = new System.Drawing.Size(1012, 571);
-            this.MediaPlayer.TabIndex = 0;
-            this.MediaPlayer.Visible = false;
-            // 
             // sn_label
             // 
             this.sn_label.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.sn_label.AutoSize = true;
             this.sn_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_label.Location = new System.Drawing.Point(12, 9);
+            this.sn_label.Location = new System.Drawing.Point(12, 18);
             this.sn_label.Name = "sn_label";
             this.sn_label.Size = new System.Drawing.Size(32, 21);
             this.sn_label.TabIndex = 198;
@@ -68,52 +54,35 @@
             this.FileList_label.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.FileList_label.AutoSize = true;
             this.FileList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.FileList_label.Location = new System.Drawing.Point(245, 9);
+            this.FileList_label.Location = new System.Drawing.Point(245, 18);
             this.FileList_label.Name = "FileList_label";
             this.FileList_label.Size = new System.Drawing.Size(74, 21);
             this.FileList_label.TabIndex = 200;
             this.FileList_label.Text = "文件列表";
             // 
-            // PageView
-            // 
-            this.PageView.AutoScroll = true;
-            this.PageView.BackColor = System.Drawing.SystemColors.Window;
-            this.PageView.DefaultEllipseAnnotationBorderWidth = 1D;
-            this.PageView.DefaultInkAnnotationWidth = 1D;
-            this.PageView.DefaultRectangleAnnotationBorderWidth = 1D;
-            this.PageView.Document = this.PDFDocument;
-            this.PageView.DownscaleLargeImages = false;
-            this.PageView.EnableRepeatedKeys = false;
-            this.PageView.Location = new System.Drawing.Point(0, 52);
-            this.PageView.Name = "PageView";
-            this.PageView.PageDisplayLayout = O2S.Components.PDFView4NET.PDFPageDisplayLayout.OneColumn;
-            this.PageView.PageNumber = 0;
-            this.PageView.RenderingProgressColor = System.Drawing.Color.Empty;
-            this.PageView.RequiredFormFieldHighlightColor = System.Drawing.Color.Empty;
-            this.PageView.ScrollPosition = new System.Drawing.Point(0, 0);
-            this.PageView.Size = new System.Drawing.Size(1012, 571);
-            this.PageView.SubstituteFonts = null;
-            this.PageView.TabIndex = 201;
-            this.PageView.VerticalPageSpacing = 5;
-            this.PageView.Visible = false;
-            this.PageView.WorkMode = O2S.Components.PDFView4NET.UserInteractiveWorkMode.PanAndScan;
-            // 
             // PDFDocument
             // 
             this.PDFDocument.Metadata = null;
             this.PDFDocument.PageLayout = O2S.Components.PDFView4NET.PDFPageLayout.SinglePage;
             this.PDFDocument.PageMode = O2S.Components.PDFView4NET.PDFPageMode.UseNone;
             // 
-            // PicBox
-            // 
-            this.PicBox.Image = global::UAS_MES.Properties.Resources.LoginBG;
-            this.PicBox.Location = new System.Drawing.Point(0, 52);
-            this.PicBox.Name = "PicBox";
-            this.PicBox.Size = new System.Drawing.Size(1012, 571);
-            this.PicBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
-            this.PicBox.TabIndex = 202;
-            this.PicBox.TabStop = false;
-            this.PicBox.Visible = false;
+            // OpenFile
+            // 
+            this.OpenFile.AllPower = null;
+            this.OpenFile.BackColor = System.Drawing.Color.Transparent;
+            this.OpenFile.DownImage = ((System.Drawing.Image)(resources.GetObject("OpenFile.DownImage")));
+            this.OpenFile.Image = null;
+            this.OpenFile.IsShowBorder = true;
+            this.OpenFile.Location = new System.Drawing.Point(566, 14);
+            this.OpenFile.MoveImage = ((System.Drawing.Image)(resources.GetObject("OpenFile.MoveImage")));
+            this.OpenFile.Name = "OpenFile";
+            this.OpenFile.NormalImage = ((System.Drawing.Image)(resources.GetObject("OpenFile.NormalImage")));
+            this.OpenFile.Power = null;
+            this.OpenFile.Size = new System.Drawing.Size(75, 28);
+            this.OpenFile.TabIndex = 201;
+            this.OpenFile.Text = "打开文件";
+            this.OpenFile.UseVisualStyleBackColor = false;
+            this.OpenFile.Click += new System.EventHandler(this.OpenFile_Click);
             // 
             // FileList
             // 
@@ -122,14 +91,13 @@
             this.FileList.FormattingEnabled = true;
             this.FileList.Items.AddRange(new object[] {
             "1.mp4",
-            "2.pdf",
+            "C:\\Users\\callm\\Desktop\\工作文档\\考勤机数据对接\\1.pdf",
             "3.jpg",
             "4.jpeg"});
-            this.FileList.Location = new System.Drawing.Point(325, 9);
+            this.FileList.Location = new System.Drawing.Point(325, 18);
             this.FileList.Name = "FileList";
             this.FileList.Size = new System.Drawing.Size(192, 20);
             this.FileList.TabIndex = 199;
-            this.FileList.SelectedIndexChanged += new System.EventHandler(this.FileList_SelectedIndexChanged);
             // 
             // SnCode
             // 
@@ -137,7 +105,7 @@
             this.SnCode.Anchor = System.Windows.Forms.AnchorStyles.Left;
             this.SnCode.BackColor = System.Drawing.Color.White;
             this.SnCode.ID = null;
-            this.SnCode.Location = new System.Drawing.Point(54, 9);
+            this.SnCode.Location = new System.Drawing.Point(54, 18);
             this.SnCode.Name = "SnCode";
             this.SnCode.Power = null;
             this.SnCode.Size = new System.Drawing.Size(176, 21);
@@ -152,35 +120,28 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1012, 624);
-            this.Controls.Add(this.PicBox);
-            this.Controls.Add(this.PageView);
+            this.Controls.Add(this.OpenFile);
             this.Controls.Add(this.FileList_label);
             this.Controls.Add(this.FileList);
             this.Controls.Add(this.sn_label);
             this.Controls.Add(this.SnCode);
-            this.Controls.Add(this.MediaPlayer);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             this.Name = "Query_OperationInstruction";
             this.Tag = "Query!OperationInstruction";
             this.Text = "作业指导书";
             this.Load += new System.EventHandler(this.Query_OperationInstruction_Load);
             this.SizeChanged += new System.EventHandler(this.Query_OperationInstruction_SizeChanged);
-            ((System.ComponentModel.ISupportInitialize)(this.MediaPlayer)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.PicBox)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
         }
 
         #endregion
-
-        private AxWMPLib.AxWindowsMediaPlayer MediaPlayer;
         private CustomControl.TextBoxWithIcon.SnCollectionBox SnCode;
         private System.Windows.Forms.Label sn_label;
         private CustomControl.ComBoxWithFocus.ComBoxWithFocus FileList;
         private System.Windows.Forms.Label FileList_label;
-        private O2S.Components.PDFView4NET.PDFPageView PageView;
         private O2S.Components.PDFView4NET.PDFDocument PDFDocument;
-        private System.Windows.Forms.PictureBox PicBox;
+        private CustomControl.ButtonUtil.NormalButton OpenFile;
     }
 }

+ 7 - 37
UAS-MES/FunctionCode/Query/Query_OperationInstruction.cs

@@ -17,8 +17,6 @@ namespace UAS_MES.Query
 
         DataHelper dh;
 
-        AutoSizeFormClass asc = new AutoSizeFormClass();
-
         public Query_OperationInstruction()
         {
             InitializeComponent();
@@ -26,17 +24,15 @@ namespace UAS_MES.Query
 
         private void Query_OperationInstruction_Load(object sender, EventArgs e)
         {
-            //asc.controllInitializeSize(this);
             dh = SystemInf.dh;
         }
 
         private void Query_OperationInstruction_SizeChanged(object sender, EventArgs e)
         {
-            //asc.controlAutoSize(this);
-            sn_label.Location = new Point(20, 0);
-            SnCode.Location = new Point(sn_label.Location.X + sn_label.Width + 20, 0);
-            FileList_label.Location = new Point(SnCode.Location.X + SnCode.Width + 20, 0);
-            FileList.Location = new Point(FileList_label.Location.X + FileList_label.Width + 20, 0);
+            sn_label.Location = new Point(20, 20);
+            SnCode.Location = new Point(sn_label.Location.X + sn_label.Width + 20, 20);
+            FileList_label.Location = new Point(SnCode.Location.X + SnCode.Width + 20, 20);
+            FileList.Location = new Point(FileList_label.Location.X + FileList_label.Width + 20, 20);
         }
 
         private void SnCode_KeyDown(object sender, KeyEventArgs e)
@@ -48,36 +44,10 @@ namespace UAS_MES.Query
             }
         }
 
-        private void FileList_SelectedIndexChanged(object sender, EventArgs e)
+        private void OpenFile_Click(object sender, EventArgs e)
         {
-            string FileType = BaseUtil.GetFileSuffix(FileList.Text);
-            switch (FileType)
-            {
-                case "MP4":
-                    MediaPlayer.Visible = true;
-                    PageView.Visible = false;
-                    PicBox.Visible = false;
-                    break;
-                case "PDF":
-                    MediaPlayer.Visible = false;
-                    PageView.Visible = true;
-                    PicBox.Visible = false;
-                    break;
-                case "JPEG":
-                    MediaPlayer.Visible = false;
-                    PageView.Visible = false;
-                    PicBox.Visible = true;
-                    break;
-                case "JPG":
-                    MediaPlayer.Visible = false;
-                    PageView.Visible = false;
-                    PicBox.Visible = true;
-                    break;
-                default:
-                    break;
-            }
+            Query.Query_ShowInstruction showin = new Query_ShowInstruction(FileList.Text);
+            showin.Show();
         }
-
-      
     }
 }

+ 39 - 11
UAS-MES/FunctionCode/Query/Query_OperationInstruction.resx

@@ -117,18 +117,46 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <data name="MediaPlayer.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
-    <value>
-        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
-        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
-        ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAtwAAAAIB
-        AAAAAQAAAAAAAAAAAAAAAKIAAAAAAwAACAAAAAAABQAAAAAAAADwPwMAAAAAAAUAAAAAAAAAAAAIAAIA
-        AAAAAAMAAQAAAAsA//8DAAAAAAALAP//CAACAAAAAAADADIAAAALAAAACAAKAAAAZgB1AGwAbAAAAAsA
-        AAALAAAACwD//wsA//8LAAAACAACAAAAAAAIAAIAAAAAAAgAAgAAAAAACAACAAAAAAALAAAAmGgAAAQ7
-        AAAL
-</value>
-  </data>
   <metadata name="PDFDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="OpenFile.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="OpenFile.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="OpenFile.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
 </root>

+ 122 - 0
UAS-MES/FunctionCode/Query/Query_ShowInstruction.Designer.cs

@@ -0,0 +1,122 @@
+namespace UAS_MES.Query
+{
+    partial class Query_ShowInstruction
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_ShowInstruction));
+            this.PicBox = new System.Windows.Forms.PictureBox();
+            this.PageView = new O2S.Components.PDFView4NET.PDFPageView();
+            this.PDFDocument = new O2S.Components.PDFView4NET.PDFDocument(this.components);
+            this.MediaPlayer = new AxWMPLib.AxWindowsMediaPlayer();
+            ((System.ComponentModel.ISupportInitialize)(this.PicBox)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.MediaPlayer)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // PicBox
+            // 
+            this.PicBox.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.PicBox.Image = global::UAS_MES.Properties.Resources.LoginBG;
+            this.PicBox.Location = new System.Drawing.Point(0, 0);
+            this.PicBox.Name = "PicBox";
+            this.PicBox.Size = new System.Drawing.Size(1006, 600);
+            this.PicBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+            this.PicBox.TabIndex = 203;
+            this.PicBox.TabStop = false;
+            this.PicBox.Visible = false;
+            // 
+            // PageView
+            // 
+            this.PageView.AutoScroll = true;
+            this.PageView.BackColor = System.Drawing.SystemColors.Window;
+            this.PageView.DefaultEllipseAnnotationBorderWidth = 1D;
+            this.PageView.DefaultInkAnnotationWidth = 1D;
+            this.PageView.DefaultRectangleAnnotationBorderWidth = 1D;
+            this.PageView.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.PageView.Document = this.PDFDocument;
+            this.PageView.DownscaleLargeImages = false;
+            this.PageView.EnableRepeatedKeys = false;
+            this.PageView.Location = new System.Drawing.Point(0, 0);
+            this.PageView.Name = "PageView";
+            this.PageView.PageDisplayLayout = O2S.Components.PDFView4NET.PDFPageDisplayLayout.OneColumn;
+            this.PageView.PageNumber = 0;
+            this.PageView.RenderingProgressColor = System.Drawing.Color.Empty;
+            this.PageView.RequiredFormFieldHighlightColor = System.Drawing.Color.Empty;
+            this.PageView.ScrollPosition = new System.Drawing.Point(0, 0);
+            this.PageView.Size = new System.Drawing.Size(1006, 600);
+            this.PageView.SubstituteFonts = null;
+            this.PageView.TabIndex = 204;
+            this.PageView.VerticalPageSpacing = 5;
+            this.PageView.Visible = false;
+            this.PageView.WorkMode = O2S.Components.PDFView4NET.UserInteractiveWorkMode.PanAndScan;
+            // 
+            // PDFDocument
+            // 
+            this.PDFDocument.Metadata = null;
+            this.PDFDocument.PageLayout = O2S.Components.PDFView4NET.PDFPageLayout.SinglePage;
+            this.PDFDocument.PageMode = O2S.Components.PDFView4NET.PDFPageMode.UseNone;
+            // 
+            // MediaPlayer
+            // 
+            this.MediaPlayer.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.MediaPlayer.Enabled = true;
+            this.MediaPlayer.Location = new System.Drawing.Point(0, 0);
+            this.MediaPlayer.Name = "MediaPlayer";
+            this.MediaPlayer.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("MediaPlayer.OcxState")));
+            this.MediaPlayer.Size = new System.Drawing.Size(1006, 600);
+            this.MediaPlayer.TabIndex = 205;
+            this.MediaPlayer.Visible = false;
+            // 
+            // Query_ShowInstruction
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1006, 600);
+            this.Controls.Add(this.MediaPlayer);
+            this.Controls.Add(this.PageView);
+            this.Controls.Add(this.PicBox);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
+            this.Name = "Query_ShowInstruction";
+            this.Tag = "Query!ShowInstruction";
+            this.Text = "作业指导书";
+            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
+            this.Load += new System.EventHandler(this.Quert_ShowInstruction_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.PicBox)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.MediaPlayer)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.PictureBox PicBox;
+        private O2S.Components.PDFView4NET.PDFPageView PageView;
+        private O2S.Components.PDFView4NET.PDFDocument PDFDocument;
+        private AxWMPLib.AxWindowsMediaPlayer MediaPlayer;
+    }
+}

+ 67 - 0
UAS-MES/FunctionCode/Query/Query_ShowInstruction.cs

@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES.PublicMethod;
+
+namespace UAS_MES.Query
+{
+    public partial class Query_ShowInstruction : Form
+    {
+        //文件具体地址
+        string type = "";
+
+        public Query_ShowInstruction(string FileType)
+        {
+            InitializeComponent();
+            MediaPlayer.PlayStateChange += MediaPlayer_PlayStateChange;
+            type = FileType;
+            StartPosition = FormStartPosition.CenterScreen;
+        }
+
+        private void MediaPlayer_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
+        {
+            if ((int)MediaPlayer.playState == 1)
+            {
+                System.Threading.Thread.Sleep(1000);
+                MediaPlayer.Ctlcontrols.play();
+            }
+        }
+
+        private void Quert_ShowInstruction_Load(object sender, EventArgs e)
+        {
+            switch (BaseUtil.GetFileSuffix(type))
+            {
+                case "MP4":
+                    MediaPlayer.Visible = true;
+                    PageView.Visible = false;
+                    PicBox.Visible = false;
+                    MediaPlayer.URL = type;
+                    MediaPlayer.Ctlcontrols.play();
+                    break;
+                case "PDF":
+                    MediaPlayer.Visible = false;
+                    PageView.Visible = true;
+                    PDFDocument.FilePath = type;
+                    PicBox.Visible = false;
+                    break;
+                case "JPEG":
+                    MediaPlayer.Visible = false;
+                    PageView.Visible = false;
+                    PicBox.Visible = true;
+                    break;
+                case "JPG":
+                    MediaPlayer.Visible = false;
+                    PageView.Visible = false;
+                    PicBox.Visible = true;
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+}

+ 134 - 0
UAS-MES/FunctionCode/Query/Query_ShowInstruction.resx

@@ -0,0 +1,134 @@
+<?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">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="PDFDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <data name="MediaPlayer.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
+        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
+        ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAtwAAAAIB
+        AAAAAQAAAAAAAAAAAAAAAKIAAAAAAwAACAAAAAAABQAAAAAAAADwPwMAAAAAAAUAAAAAAAAAAAAIAAIA
+        AAAAAAMAAQAAAAsA//8DAAAAAAALAP//CAACAAAAAAADADIAAAALAAAACAAKAAAAZgB1AGwAbAAAAAsA
+        AAALAAAACwD//wsA//8LAAAACAACAAAAAAAIAAIAAAAAAAgAAgAAAAAACAACAAAAAAALAAAAmGgAAAQ7
+        AAAL
+</value>
+  </data>
+</root>

+ 12 - 1
UAS-MES/PublicMethod/BaseUtil.cs

@@ -67,6 +67,16 @@ namespace UAS_MES.PublicMethod
                 item.SortMode = DataGridViewColumnSortMode.NotSortable;
         }
 
+        /// <summary>
+        /// 获取文件名的后缀
+        /// </summary>
+        /// <param name="FileName"></param>
+        /// <returns></returns>
+        public static string GetFileSuffix(string FileName)
+        {
+            return FileName.Substring(FileName.LastIndexOf(".") + 1).ToUpper();
+        }
+
         public static string GetLocalIP()
         {
             try
@@ -1013,7 +1023,8 @@ namespace UAS_MES.PublicMethod
                         ProInf.Add(processes[i].StartTime.ToString(), processes[i].Id);
                     }
                 }
-                catch {
+                catch
+                {
                 }
             }
             var temp = ProInf.Keys.Max();

+ 5 - 2
UAS_AutoUpdate/CheckUpdateWindow.cs

@@ -80,8 +80,9 @@ namespace UAS_AutoUpdate
                     Close();
                 }
             }
-            catch (Exception)
+            catch (Exception ex)
             {
+                LogManager.DoLog(ex.Message.ToString());
                 Process p = Process.Start("UAS_MES_NEW.exe");
                 CloseWhenFinished = true;
                 Close();
@@ -202,6 +203,9 @@ namespace UAS_AutoUpdate
                 if (!Zipped)
                 {
                     ZipHelper.UnZip(Application.StartupPath + @"\UAS_MES.zip", Application.StartupPath);
+                    Process p = Process.Start("UAS_MES_NEW.exe");
+                    CloseWhenFinished = true;
+                    Close();
                 }
                 else
                 {
@@ -276,7 +280,6 @@ namespace UAS_AutoUpdate
                 }
                 File.Delete(Application.StartupPath + @"\UAS_MES.zip");
                 CheckUpdateWindow.Zipped = true;
-                Process p = Process.Start("UAS_MES_NEW.exe");
             }
         }
     }

+ 65 - 0
UAS_AutoUpdate/LogManager.cs

@@ -0,0 +1,65 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace UAS_AutoUpdate
+{
+    class LogManager
+    {
+        public static string LogAddress = @"C:\UAS_MES";
+        /// <summary>
+        /// 记录操作
+        /// </summary>
+        /// <param name="Message"></param>
+        public static void DoLog(string Message)
+        {
+            try
+            {
+                StreamWriter sw = File.AppendText(LogAddress + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+                sw.WriteLine("\n【时间】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\n");
+                sw.WriteLine("【消息】" + Message + "\n");
+                sw.WriteLine("---------------------------------------------------------------------------------------------------------------");
+                sw.Close();
+            }
+            catch (Exception) { }
+        }
+
+        /// <summary>
+        /// 记录操作和SQL
+        /// </summary>
+        /// <param name="Message"></param>
+        /// <param name="SQL"></param>
+        public static void DoLog(string Message, string SQL)
+        {
+            try
+            {
+                StreamWriter sw = File.AppendText(LogAddress + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+                sw.WriteLine("\n【时间】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\n");
+                sw.WriteLine("【消息】" + Message + "\n");
+                sw.WriteLine("【SQL】" + SQL + "\n");
+                sw.WriteLine("---------------------------------------------------------------------------------------------------------------");
+                sw.Close();
+            }
+            catch (Exception) { }
+        }
+
+        /// <summary>
+        /// 记录SQL
+        /// </summary>
+        /// <param name="SQL"></param>
+        public static void DoSQLLog(string SQL)
+        {
+            try
+            {
+                StreamWriter sw = File.AppendText(LogAddress + DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+                sw.WriteLine("\n【时间】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "\n");
+                sw.WriteLine("【SQL】" + SQL + "\n");
+                sw.WriteLine("---------------------------------------------------------------------------------------------------------------");
+                sw.Close();
+            }
+            catch (Exception) { }
+        }
+    }
+}

+ 1 - 0
UAS_AutoUpdate/UAS_AutoUpdate.csproj

@@ -73,6 +73,7 @@
     <Compile Include="CheckUpdateWindow.Designer.cs">
       <DependentUpon>CheckUpdateWindow.cs</DependentUpon>
     </Compile>
+    <Compile Include="LogManager.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <EmbeddedResource Include="CheckUpdateWindow.resx">