| Line 51... |
Line 51... |
| 51 |
{ |
51 |
{ |
| 52 |
// If key has been entered check it in worker thread, else display error. |
52 |
// If key has been entered check it in worker thread, else display error. |
| 53 |
|
53 |
|
| 54 |
if (this.textBoxKey.Text == string.Empty) |
54 |
if (this.textBoxKey.Text == string.Empty) |
| 55 |
{ |
55 |
{ |
| 56 |
MessageBox.Show("You must enter an API Key", "DNS Manager", MessageBoxButtons.OK, MessageBoxIcon.Error); |
56 |
MessageBox.Show("You must enter an API Key", "Dreamhost DNS Manager", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| 57 |
} |
57 |
} |
| 58 |
else |
58 |
else |
| 59 |
{ |
59 |
{ |
| 60 |
this.buttonSave.Enabled = false; |
60 |
this.buttonSave.Enabled = false; |
| 61 |
this.labelKeyCheck.Text = "Checking key..."; |
61 |
this.labelKeyCheck.Text = "Checking key..."; |
| Line 101... |
Line 101... |
| 101 |
|
101 |
|
| 102 |
if (e.Error != null) |
102 |
if (e.Error != null) |
| 103 |
{ |
103 |
{ |
| 104 |
// Ask whether to retry. |
104 |
// Ask whether to retry. |
| 105 |
|
105 |
|
| 106 |
if (MessageBox.Show(e.Error.Message, "DNS Manager", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error) == DialogResult.Retry) |
106 |
if (MessageBox.Show(e.Error.Message, "Dreamhost DNS Manager", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error) == DialogResult.Retry) |
| 107 |
{ |
107 |
{ |
| 108 |
this.Checker.RunWorkerAsync(this.textBoxKey.Text); |
108 |
this.Checker.RunWorkerAsync(this.textBoxKey.Text); |
| 109 |
return; |
109 |
return; |
| 110 |
} |
110 |
} |
| 111 |
} |
111 |
} |
| Line 119... |
Line 119... |
| 119 |
foreach (string m in (List<string>)e.Result) |
119 |
foreach (string m in (List<string>)e.Result) |
| 120 |
{ |
120 |
{ |
| 121 |
ErrorMessage += "\n - " + m; |
121 |
ErrorMessage += "\n - " + m; |
| 122 |
} |
122 |
} |
| 123 |
|
123 |
|
| 124 |
MessageBox.Show(ErrorMessage, "DNS Manager", MessageBoxButtons.OK, MessageBoxIcon.Error); |
124 |
MessageBox.Show(ErrorMessage, "Dreamhost DNS Manager", MessageBoxButtons.OK, MessageBoxIcon.Error); |
| 125 |
} |
125 |
} |
| 126 |
|
126 |
|
| 127 |
// If key valid |
127 |
// If key valid |
| 128 |
|
128 |
|
| 129 |
else |
129 |
else |