This commit is contained in:
Danil Kislov
2019-03-18 19:10:20 +03:00
parent 1913cbb7c3
commit f5ef4c55bc
4 changed files with 58 additions and 9 deletions
+9 -1
View File
@@ -31,6 +31,8 @@ namespace JiraTimeBotForm.UI
chkAddComments.Checked = settings.AddCommentsToWorklog;
txtRoundTo.Text = settings.RountToMinutes.ToString();
cboWorkType.SelectedIndex = (int) settings.WorkType;
txtJQL.Text = settings.JiraQuery;
txtJQL.Enabled = settings.WorkType == WorkType.JiraLogs;
}
public Settings ReadSettingsAndLock()
@@ -50,7 +52,8 @@ namespace JiraTimeBotForm.UI
//DummyMode = txtDummyMode.Checked,
AddCommentsToWorklog = chkAddComments.Checked,
RountToMinutes = roundTo,
WorkType = (WorkType) cboWorkType.SelectedIndex
WorkType = (WorkType) cboWorkType.SelectedIndex,
JiraQuery = txtJQL.Text,
};
//LockUnlock(false);
@@ -73,5 +76,10 @@ namespace JiraTimeBotForm.UI
{
e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
}
private void cboWorkType_SelectedIndexChanged(object sender, EventArgs e)
{
txtJQL.Enabled = (cboWorkType.SelectedIndex == 1);
}
}
}