From 441363100658b3c0c6051da143f67e81c7544bb8 Mon Sep 17 00:00:00 2001 From: John Link Date: Mon, 28 Mar 2016 10:46:58 -0400 Subject: [PATCH] Added a suggested save file name to the GUI that contains the database name, date, and time. This can be typed over easily but it's nice to have the date/time prepopulated for the user. --- ssdumpGUI/ssdumpGUI.Designer.cs | 2 +- ssdumpGUI/ssdumpGUI.cs | 3 ++- ssdumpGUI/ssdumpGUI.resx | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ssdumpGUI/ssdumpGUI.Designer.cs b/ssdumpGUI/ssdumpGUI.Designer.cs index 4a60856..9884d15 100644 --- a/ssdumpGUI/ssdumpGUI.Designer.cs +++ b/ssdumpGUI/ssdumpGUI.Designer.cs @@ -95,7 +95,7 @@ private void InitializeComponent() // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(92, 22); this.exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // diff --git a/ssdumpGUI/ssdumpGUI.cs b/ssdumpGUI/ssdumpGUI.cs index 3ae9dc0..f30301c 100644 --- a/ssdumpGUI/ssdumpGUI.cs +++ b/ssdumpGUI/ssdumpGUI.cs @@ -45,6 +45,7 @@ private void btnExecute_Click(object sender, EventArgs e) saveFileDialog1.Filter = "sql files (*.sql)|*.sql|All files(*.*)|*.*"; saveFileDialog1.FilterIndex = 1; saveFileDialog1.RestoreDirectory = true; + saveFileDialog1.FileName = txtDatabase.Text + "_" + DateTime.Now.ToString("yyyyMMdd_HHmmss"); if (saveFileDialog1.ShowDialog() == DialogResult.OK) { @@ -57,7 +58,7 @@ private void btnExecute_Click(object sender, EventArgs e) { processor.Execute(); processing.Close(); - MessageBox.Show("SQL Server Dump Complete", "Complete", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); + MessageBox.Show("SQL Server Dump Complete", "Complete", MessageBoxButtons.OK, MessageBoxIcon.None, MessageBoxDefaultButton.Button1); } catch (Exception ex) { diff --git a/ssdumpGUI/ssdumpGUI.resx b/ssdumpGUI/ssdumpGUI.resx index cd6ac4f..e91d848 100644 --- a/ssdumpGUI/ssdumpGUI.resx +++ b/ssdumpGUI/ssdumpGUI.resx @@ -127,6 +127,6 @@ True - 48 + 113 \ No newline at end of file