Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Mar 13, 2014
1 parent 7365b66 commit 5601968
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions frmConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@ private void refreshAll()
chkUsePlugins.Checked = cf.ReadBool("system", "enable_plugin");
chkAllowLongSleep.Checked = cf.ReadBool("system", "allow_long_sleep");
txtReconnectGap.Text = cf.Read("system", "reconnect_gap");
if (new Regex(@"\d+\:\d+", RegexOptions.Compiled).IsMatch(txtReconnectGap.Text))
if (txtReconnectGap.Text == "")
{
txtReconnectGap.Text = "0";
cboReconnectGapIndicator.SelectedIndex = 0;
}
else if (new Regex(@"\d+\:\d+", RegexOptions.Compiled).IsMatch(txtReconnectGap.Text))
cboReconnectGapIndicator.SelectedIndex = 2;
else if (txtReconnectGap.Text == "0")
cboReconnectGapIndicator.SelectedIndex = 0;
Expand Down Expand Up @@ -1901,7 +1906,10 @@ private void txtReconnectGap_TextChanged(object sender, EventArgs e)
private void cboReconnectGapIndicator_SelectedIndexChanged(object sender, EventArgs e)
{
if (cboReconnectGapIndicator.SelectedIndex == 0)
txtReconnectGap.Enabled=false;
{
txtReconnectGap.Enabled = false;
txtReconnectGap.Text = "0";
}
else
txtReconnectGap.Enabled = true;
txtReconnectGap_TextChanged(sender, e);
Expand Down

0 comments on commit 5601968

Please sign in to comment.