diff --git a/DDUtilityApp/MESDOWNLOADER/FrmServerLog.Designer.cs b/DDUtilityApp/MESDOWNLOADER/FrmServerLog.Designer.cs index bf9c8a2..1126617 100644 --- a/DDUtilityApp/MESDOWNLOADER/FrmServerLog.Designer.cs +++ b/DDUtilityApp/MESDOWNLOADER/FrmServerLog.Designer.cs @@ -28,7 +28,7 @@ /// private void InitializeComponent() { - Telerik.WinControls.UI.TableViewDefinition tableViewDefinition4 = new Telerik.WinControls.UI.TableViewDefinition(); + Telerik.WinControls.UI.TableViewDefinition tableViewDefinition1 = new Telerik.WinControls.UI.TableViewDefinition(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.panel1 = new System.Windows.Forms.Panel(); this.pnlAPList = new System.Windows.Forms.FlowLayoutPanel(); @@ -43,6 +43,7 @@ this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.treeFolder = new System.Windows.Forms.TreeView(); this.gridFiles = new JWH.CONTROL.GridViewEx(); + this.chkMerge = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -73,7 +74,7 @@ // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); - this.splitContainer1.Size = new System.Drawing.Size(794, 569); + this.splitContainer1.Size = new System.Drawing.Size(987, 569); this.splitContainer1.SplitterDistance = 94; this.splitContainer1.TabIndex = 0; // @@ -84,21 +85,22 @@ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(794, 94); + this.panel1.Size = new System.Drawing.Size(987, 94); this.panel1.TabIndex = 0; // // pnlAPList // this.pnlAPList.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlAPList.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.pnlAPList.Location = new System.Drawing.Point(722, 0); + this.pnlAPList.Location = new System.Drawing.Point(825, 0); this.pnlAPList.Name = "pnlAPList"; this.pnlAPList.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0); - this.pnlAPList.Size = new System.Drawing.Size(72, 94); + this.pnlAPList.Size = new System.Drawing.Size(162, 94); this.pnlAPList.TabIndex = 1; // // pnlCommand // + this.pnlCommand.Controls.Add(this.chkMerge); this.pnlCommand.Controls.Add(this.btnDownPathOpen); this.pnlCommand.Controls.Add(this.btnDownPathChange); this.pnlCommand.Controls.Add(this.btnRefresh); @@ -109,13 +111,13 @@ this.pnlCommand.Dock = System.Windows.Forms.DockStyle.Left; this.pnlCommand.Location = new System.Drawing.Point(0, 0); this.pnlCommand.Name = "pnlCommand"; - this.pnlCommand.Size = new System.Drawing.Size(722, 94); + this.pnlCommand.Size = new System.Drawing.Size(825, 94); this.pnlCommand.TabIndex = 0; // // btnDownPathOpen // this.btnDownPathOpen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnDownPathOpen.Location = new System.Drawing.Point(622, 62); + this.btnDownPathOpen.Location = new System.Drawing.Point(637, 63); this.btnDownPathOpen.Name = "btnDownPathOpen"; this.btnDownPathOpen.Size = new System.Drawing.Size(90, 23); this.btnDownPathOpen.TabIndex = 6; @@ -125,7 +127,7 @@ // btnDownPathChange // this.btnDownPathChange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnDownPathChange.Location = new System.Drawing.Point(622, 37); + this.btnDownPathChange.Location = new System.Drawing.Point(637, 38); this.btnDownPathChange.Name = "btnDownPathChange"; this.btnDownPathChange.Size = new System.Drawing.Size(90, 23); this.btnDownPathChange.TabIndex = 5; @@ -135,7 +137,7 @@ // btnRefresh // this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnRefresh.Location = new System.Drawing.Point(622, 10); + this.btnRefresh.Location = new System.Drawing.Point(637, 11); this.btnRefresh.Name = "btnRefresh"; this.btnRefresh.Size = new System.Drawing.Size(90, 23); this.btnRefresh.TabIndex = 4; @@ -152,7 +154,7 @@ this.tboxDownPath.Multiline = true; this.tboxDownPath.Name = "tboxDownPath"; this.tboxDownPath.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.tboxDownPath.Size = new System.Drawing.Size(480, 47); + this.tboxDownPath.Size = new System.Drawing.Size(495, 47); this.tboxDownPath.TabIndex = 3; // // label2 @@ -171,7 +173,7 @@ this.cboxServer.FormattingEnabled = true; this.cboxServer.Location = new System.Drawing.Point(136, 12); this.cboxServer.Name = "cboxServer"; - this.cboxServer.Size = new System.Drawing.Size(480, 20); + this.cboxServer.Size = new System.Drawing.Size(495, 20); this.cboxServer.TabIndex = 1; // // label1 @@ -196,8 +198,8 @@ // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.gridFiles); - this.splitContainer2.Size = new System.Drawing.Size(794, 471); - this.splitContainer2.SplitterDistance = 264; + this.splitContainer2.Size = new System.Drawing.Size(987, 471); + this.splitContainer2.SplitterDistance = 328; this.splitContainer2.TabIndex = 0; // // treeFolder @@ -205,7 +207,7 @@ this.treeFolder.Dock = System.Windows.Forms.DockStyle.Fill; this.treeFolder.Location = new System.Drawing.Point(0, 0); this.treeFolder.Name = "treeFolder"; - this.treeFolder.Size = new System.Drawing.Size(264, 471); + this.treeFolder.Size = new System.Drawing.Size(328, 471); this.treeFolder.TabIndex = 0; // // gridFiles @@ -217,20 +219,30 @@ // // // - this.gridFiles.MasterTemplate.ViewDefinition = tableViewDefinition4; - this.gridFiles.Name = "gridViewEx1"; + this.gridFiles.MasterTemplate.ViewDefinition = tableViewDefinition1; + this.gridFiles.Name = "gridFiles"; // // // this.gridFiles.RootElement.ControlBounds = new System.Drawing.Rectangle(0, 0, 240, 150); - this.gridFiles.Size = new System.Drawing.Size(526, 471); + this.gridFiles.Size = new System.Drawing.Size(655, 471); this.gridFiles.TabIndex = 0; // + // chkMerge + // + this.chkMerge.AutoSize = true; + this.chkMerge.Location = new System.Drawing.Point(734, 15); + this.chkMerge.Name = "chkMerge"; + this.chkMerge.Size = new System.Drawing.Size(60, 16); + this.chkMerge.TabIndex = 7; + this.chkMerge.Text = "Merge"; + this.chkMerge.UseVisualStyleBackColor = true; + // // FrmServerLog // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 575); + this.ClientSize = new System.Drawing.Size(993, 575); this.Controls.Add(this.splitContainer1); this.Name = "FrmServerLog"; this.Padding = new System.Windows.Forms.Padding(3); @@ -268,5 +280,6 @@ private System.Windows.Forms.Button btnRefresh; private System.Windows.Forms.TreeView treeFolder; private JWH.CONTROL.GridViewEx gridFiles; + private System.Windows.Forms.CheckBox chkMerge; } } \ No newline at end of file diff --git a/DDUtilityApp/MESDOWNLOADER/FrmServerLog.cs b/DDUtilityApp/MESDOWNLOADER/FrmServerLog.cs index 38a4045..1258bc5 100644 --- a/DDUtilityApp/MESDOWNLOADER/FrmServerLog.cs +++ b/DDUtilityApp/MESDOWNLOADER/FrmServerLog.cs @@ -397,21 +397,41 @@ namespace DDUtilityApp.MESDOWNLOADER } // FileMerge - if (downloads.Count == 1) + if (this.chkMerge.Checked) { - string fileName = downloads[0]; - if (hasZip) + if (downloads.Count == 1) { - string path = System.IO.Path.Combine(this.tboxDownPath.Text, this.cboxServer.Text, fileName); - string command = $"/select,{path}"; - Process.Start($"explorer.exe", command); + string fileName = downloads[0]; + if (hasZip) + { + string path = System.IO.Path.Combine(this.tboxDownPath.Text, this.cboxServer.Text, fileName); + string command = $"/select,{path}"; + Process.Start($"explorer.exe", command); + } + else + { + string extension = System.IO.Path.GetExtension(fileName); + if (string.Compare(extension, ".Log", true) != 0) + System.IO.File.Move(fileName, fileName += ".log"); + System.Diagnostics.Process.Start(fileName); + } } else { - string extension = System.IO.Path.GetExtension(fileName); - if (string.Compare(extension, ".Log", true) != 0) - System.IO.File.Move(fileName, fileName += ".log"); - System.Diagnostics.Process.Start(fileName); + if (hasZip) + { + string path = System.IO.Path.Combine(this.tboxDownPath.Text, this.cboxServer.Text); + string command = $"/select,{path}"; + Process.Start($"explorer.exe", path); + } + else + { + string fileName = Util.GetFileMerge(downloads); + string extension = System.IO.Path.GetExtension(fileName); + if (string.Compare(extension, ".Log", true) != 0) + System.IO.File.Move(fileName, fileName += ".log"); + System.Diagnostics.Process.Start(fileName); + } } } else @@ -424,11 +444,8 @@ namespace DDUtilityApp.MESDOWNLOADER } else { - string fileName = Util.GetFileMerge(downloads); - string extension = System.IO.Path.GetExtension(fileName); - if (string.Compare(extension, ".Log", true) != 0) - System.IO.File.Move(fileName, fileName += ".log"); - System.Diagnostics.Process.Start(fileName); + foreach (string download in downloads) + System.Diagnostics.Process.Start(download); } } } diff --git a/DDUtilityApp/MESDOWNLOADER/FrmServerLog.resx b/DDUtilityApp/MESDOWNLOADER/FrmServerLog.resx index 85d34e3..1af7de1 100644 --- a/DDUtilityApp/MESDOWNLOADER/FrmServerLog.resx +++ b/DDUtilityApp/MESDOWNLOADER/FrmServerLog.resx @@ -117,7 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17, 17 - \ No newline at end of file