diff --git a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.Designer.cs b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.Designer.cs index a712d7698..95adc43a0 100644 --- a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.Designer.cs +++ b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.Designer.cs @@ -53,6 +53,7 @@ private void InitializeComponent() this.labelBlurb = new System.Windows.Forms.Label(); this.linkLabelBlurb = new System.Windows.Forms.LinkLabel(); this.labelBlurbCis = new System.Windows.Forms.Label(); + this.buttonOpenLocation = new System.Windows.Forms.Button(); this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx1)).BeginInit(); this.SuspendLayout(); @@ -66,12 +67,13 @@ private void InitializeComponent() this.tableLayoutPanel1.Controls.Add(this.labelBlurb, 0, 0); this.tableLayoutPanel1.Controls.Add(this.linkLabelBlurb, 1, 1); this.tableLayoutPanel1.Controls.Add(this.labelBlurbCis, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.buttonOpenLocation, 2, 4); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; // // labelError // resources.ApplyResources(this.labelError, "labelError"); - this.tableLayoutPanel1.SetColumnSpan(this.labelError, 2); + this.tableLayoutPanel1.SetColumnSpan(this.labelError, 3); this.labelError.Name = "labelError"; // // progressBar1 @@ -91,7 +93,7 @@ private void InitializeComponent() this.columnHost, this.columnHostStatus, this.columnResultImage}); - this.tableLayoutPanel1.SetColumnSpan(this.dataGridViewEx1, 2); + this.tableLayoutPanel1.SetColumnSpan(this.dataGridViewEx1, 3); dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -138,12 +140,13 @@ private void InitializeComponent() // labelBlurb // resources.ApplyResources(this.labelBlurb, "labelBlurb"); - this.tableLayoutPanel1.SetColumnSpan(this.labelBlurb, 2); + this.tableLayoutPanel1.SetColumnSpan(this.labelBlurb, 3); this.labelBlurb.Name = "labelBlurb"; // // linkLabelBlurb // resources.ApplyResources(this.linkLabelBlurb, "linkLabelBlurb"); + this.tableLayoutPanel1.SetColumnSpan(this.linkLabelBlurb, 2); this.linkLabelBlurb.Name = "linkLabelBlurb"; this.linkLabelBlurb.TabStop = true; this.linkLabelBlurb.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelBlurb_LinkClicked); @@ -153,6 +156,13 @@ private void InitializeComponent() resources.ApplyResources(this.labelBlurbCis, "labelBlurbCis"); this.labelBlurbCis.Name = "labelBlurbCis"; // + // buttonOpenLocation + // + resources.ApplyResources(this.buttonOpenLocation, "buttonOpenLocation"); + this.buttonOpenLocation.Name = "buttonOpenLocation"; + this.buttonOpenLocation.UseVisualStyleBackColor = true; + this.buttonOpenLocation.Click += new System.EventHandler(this.buttonOpenLocation_Click); + // // BugToolPageRetrieveData // this.Controls.Add(this.tableLayoutPanel1); @@ -179,5 +189,6 @@ private void InitializeComponent() private System.Windows.Forms.Label labelBlurb; private System.Windows.Forms.LinkLabel linkLabelBlurb; private System.Windows.Forms.Label labelBlurbCis; + private System.Windows.Forms.Button buttonOpenLocation; } } diff --git a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.cs b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.cs index bbfcc31c3..5924131fc 100644 --- a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.cs +++ b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.cs @@ -47,7 +47,7 @@ public partial class BugToolPageRetrieveData : XenTabPage private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private const int MAX_DOWNLOADS_PER_CONNECTION = 3; - public string OutputFile { get; set; } + private bool _packagedReport; public BugToolPageRetrieveData() { @@ -80,6 +80,8 @@ protected override void PageLoadedCore(PageLoadedDirection direction) protected override void PageLeaveCore(PageLoadedDirection direction, ref bool cancel) { _packagedReport = false; + buttonOpenLocation.Visible = false; + if (direction == PageLoadedDirection.Forward) return; @@ -97,7 +99,7 @@ public override void PageCancelled(ref bool cancel) public List SelectedHosts { private get; set; } public List CapabilityList { private get; set; } public string OutputFolder { get; private set; } - private bool _packagedReport; + public string OutputFile { get; set; } #endregion /// @@ -293,6 +295,7 @@ private void RunPackageStatusReportAction(bool successExists) RunRowAction(lastRow); } _packagedReport = true; + buttonOpenLocation.Visible = true; } private void Row_RowStatusChanged(StatusReportRow row) @@ -397,5 +400,17 @@ private void linkLabelBlurb_LinkClicked(object sender, LinkLabelLinkClickedEvent dlg.ShowDialog(Program.MainWindow); } } + + private void buttonOpenLocation_Click(object sender, EventArgs e) + { + try + { + Process.Start("explorer.exe", $"/select, \"{OutputFile}\""); + } + catch (Exception ex) + { + Log.Debug(ex); + } + } } } diff --git a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.resx b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.resx index 50f92d84b..add1e0ad1 100644 --- a/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.resx +++ b/XenAdmin/Wizards/BugToolWizard/BugToolPageRetrieveData.resx @@ -119,7 +119,7 @@ - 2 + 3 True @@ -133,7 +133,7 @@ - 3, 407 + 3, 400 677, 13 @@ -163,10 +163,10 @@ NoControl - 3, 423 + 3, 419 - 677, 16 + 531, 16 5 @@ -260,7 +260,7 @@ 3, 10, 3, 10 - 677, 336 + 677, 329 3 @@ -269,7 +269,7 @@ dataGridViewEx1 - XenAdmin.Controls.DataGridViewEx.DataGridViewEx, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + XenAdmin.Controls.DataGridViewEx.DataGridViewEx, [XenCenter], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null tableLayoutPanel1 @@ -370,6 +370,33 @@ 5 + + 540, 416 + + + 140, 23 + + + 6 + + + &Open report location + + + False + + + buttonOpenLocation + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 6 + Fill @@ -401,7 +428,7 @@ 0 - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelError" Row="3" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="progressBar1" Row="4" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="dataGridViewEx1" Row="2" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="labelBlurb" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="linkLabelBlurb" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelBlurbCis" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="AutoSize,0,Absolute,20,Percent,100,AutoSize,0,AutoSize,0" /></TableLayoutSettings> + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelError" Row="3" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="progressBar1" Row="4" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="dataGridViewEx1" Row="2" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="labelBlurb" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="linkLabelBlurb" Row="1" RowSpan="1" Column="1" ColumnSpan="2" /><Control Name="labelBlurbCis" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="buttonOpenLocation" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100,AutoSize,0" /><Rows Styles="AutoSize,0,Absolute,20,Percent,100,AutoSize,0,AutoSize,0" /></TableLayoutSettings> True @@ -437,6 +464,6 @@ BugToolPageRetrieveData - XenAdmin.Controls.XenTabPage, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + XenAdmin.Controls.XenTabPage, [XenCenter], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null \ No newline at end of file