Skip to content

Commit

Permalink
Merge pull request #8 from johnlink/feature/6_let_users_type_in_host_…
Browse files Browse the repository at this point in the history
…list

Changed the host drop down from a locked list to one the user can type into.
  • Loading branch information
AaronKelley committed Mar 28, 2016
2 parents dcda5dd + 11b2eca commit d512ee8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 0 additions & 1 deletion ssdumpGUI/ssdumpGUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions ssdumpGUI/ssdumpGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ 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;
Expand Down

0 comments on commit d512ee8

Please sign in to comment.