public string IssueYearError(FileInfo file)
{
if (applyToAll.Contains("CSL::YEAR|"))
{
s_index = applyToAll.IndexOf("CSL::YEAR|") + 10;
e_index = applyToAll.IndexOf("***", s_index);
return applyToAll.Substring(s_index, e_index - s_index);
}
InstructionalLabel.Text = "Please provide a year below";
ErrorLabel.Text = "CSL was unable to parse out a year";
SelectionTextBox.Show();
OkButton.Enabled = false; //Will enable when key is pressed
FileNameLabel.Text = file.Name;
FilePathRichTextBox.Text = file.FullName;
this.Activate();
this.ShowDialog();
if (discard)
{
discard = false; //To ensure future Issues aren't discarded
return null;
}
else
{
if (ApplyToAllCheck.Checked)
applyToAll += "CSL::YEAR|" + SelectionTextBox.Text + "***";
ApplyToAllCheck.Checked = false;
return SelectionTextBox.Text;
}
}