diff --git a/ssdumpGUI/ssdumpGUI.Designer.cs b/ssdumpGUI/ssdumpGUI.Designer.cs index 4a60856..c5fc7c7 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); // @@ -127,7 +127,6 @@ private void InitializeComponent() // // cboHostList // - this.cboHostList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboHostList.FormattingEnabled = true; this.cboHostList.Location = new System.Drawing.Point(157, 3); this.cboHostList.Name = "cboHostList"; diff --git a/ssdumpGUI/ssdumpGUI.cs b/ssdumpGUI/ssdumpGUI.cs index 3ae9dc0..b490a43 100644 --- a/ssdumpGUI/ssdumpGUI.cs +++ b/ssdumpGUI/ssdumpGUI.cs @@ -42,9 +42,22 @@ private void exitToolStripMenuItem_Click(object sender, EventArgs e) private void btnExecute_Click(object sender, EventArgs e) { + string NewHostName = cboHostList.Text; + + if (!Properties.Settings.Default.Hosts.Contains(NewHostName)) + { + int NewSelectionIndex = Properties.Settings.Default.Hosts.Count; + Properties.Settings.Default.Hosts.Add(NewHostName); + Properties.Settings.Default.Save(); + cboHostList.DataSource = null; + cboHostList.DataSource = Properties.Settings.Default.Hosts; + cboHostList.SelectedIndex = NewSelectionIndex; + } + 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 +70,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