CSL_Test__1.ErrorWindow.IssueYearWarning C# (CSharp) Method

IssueYearWarning() public method

public IssueYearWarning ( FileInfo file, string year ) : string
file FileInfo
year string
return string
        public string IssueYearWarning(FileInfo file, string year)
        {
            InstructionalLabel.Text = "Please provide the correct year";
            ErrorLabel.Text = "This year is unrealistic: \"" + year + "\"";

            SelectionTextBox.Show();
            SelectionTextBox.Text = year;
            FileNameLabel.Text = file.Name;
            FilePathRichTextBox.Text = file.FullName;

            this.Text = "[CSL] -- Warning";
            this.Activate();
            this.ShowDialog();

            if (discard)
            {
                discard = false; //To ensure future Issues aren't discarded
                return null;
            }
            else
                return SelectionTextBox.Text;
        }