Trim all texboxes on job's forms.
This commit is contained in:
Родитель
1886f4f2cd
Коммит
f2000181a1
|
@ -492,6 +492,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
|
||||
private void AddToolStripButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
TrimTextBoxes(this);
|
||||
|
||||
if (JobDetail == null)
|
||||
{
|
||||
var jobKey = new JobKey(jobName.Text, jobGroupComboBox.Text);
|
||||
|
@ -508,5 +510,18 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
Trigger = GetTrigger(JobDetail);
|
||||
Close();
|
||||
}
|
||||
|
||||
private void TrimTextBoxes(Control parentCtrl)
|
||||
{
|
||||
parentCtrl.Controls //Trim all textboxes
|
||||
.OfType<TextBox>()
|
||||
.ToList()
|
||||
.ForEach(t => t.Text = t.Text.Trim());
|
||||
|
||||
foreach (Control c in parentCtrl.Controls)
|
||||
{
|
||||
TrimTextBoxes(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -496,6 +496,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
|
||||
private void AddToolStripButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
TrimTextBoxes(this);
|
||||
|
||||
if (JobDetail == null)
|
||||
{
|
||||
var jobKey = new JobKey(jobName.Text, jobGroupComboBox.Text);
|
||||
|
@ -518,5 +520,18 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
Cancelled = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void TrimTextBoxes(Control parentCtrl)
|
||||
{
|
||||
parentCtrl.Controls //Trim all textboxes
|
||||
.OfType<TextBox>()
|
||||
.ToList()
|
||||
.ForEach(t => t.Text = t.Text.Trim());
|
||||
|
||||
foreach (Control c in parentCtrl.Controls)
|
||||
{
|
||||
TrimTextBoxes(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -976,7 +976,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.statusFileExtensionTextBox.Size = new System.Drawing.Size(101, 29);
|
||||
this.statusFileExtensionTextBox.TabIndex = 7;
|
||||
this.statusFileExtensionTextBox.Text = ".Status";
|
||||
this.statusFileExtensionTextBox.Leave += new System.EventHandler(this.StatusFileExtensionTextBox_Leave_1);
|
||||
this.statusFileExtensionTextBox.Leave += new System.EventHandler(this.StatusFileExtensionTextBox_Leave);
|
||||
//
|
||||
// getExecutionErrorsCheckBox
|
||||
//
|
||||
|
|
|
@ -856,6 +856,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
|
||||
private void AddToolStripButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
TrimTextBoxes(this);
|
||||
|
||||
if (ImportJobDetail == null)
|
||||
{
|
||||
var jobKey = new JobKey(jobName.Text, jobGroupComboBox.Text);
|
||||
|
@ -969,16 +971,16 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
separatorExampleLegalEntityTextBox.Text = tokenList[(int)legalEntityTokenPositionNumericUpDown.Value - 1];
|
||||
}
|
||||
|
||||
private void StatusFileExtensionTextBox_Leave_1(object sender, EventArgs e)
|
||||
private void TrimTextBoxes(Control parentCtrl)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(statusFileExtensionTextBox.Text))
|
||||
parentCtrl.Controls //Trim all textboxes
|
||||
.OfType<TextBox>()
|
||||
.ToList()
|
||||
.ForEach(t => t.Text = t.Text.Trim());
|
||||
|
||||
foreach (Control c in parentCtrl.Controls)
|
||||
{
|
||||
if (statusFileExtensionTextBox.Text.Substring(0, 1) != ".")
|
||||
statusFileExtensionTextBox.Text = $@".{statusFileExtensionTextBox.Text}";
|
||||
}
|
||||
else
|
||||
{
|
||||
statusFileExtensionTextBox.Text = @".Status";
|
||||
TrimTextBoxes(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -791,6 +791,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
|
||||
private void AddToolStripButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
TrimTextBoxes(this);
|
||||
|
||||
if (UploadJobDetail == null)
|
||||
{
|
||||
var jobKey = new JobKey(jobName.Text, jobGroupComboBox.Text);
|
||||
|
@ -826,5 +828,18 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
searchPatternTextBox.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void TrimTextBoxes(Control parentCtrl)
|
||||
{
|
||||
parentCtrl.Controls //Trim all textboxes
|
||||
.OfType<TextBox>()
|
||||
.ToList()
|
||||
.ForEach(t => t.Text = t.Text.Trim());
|
||||
|
||||
foreach (Control c in parentCtrl.Controls)
|
||||
{
|
||||
TrimTextBoxes(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче