private void button7_Click(object sender, EventArgs e) { Statement1 = txtStatement1.Text; Statement2 = txtStatement2.Text; Statement3 = txtStatement3.Text; Conclusion4 = txtConclusion4.Text; Statement s1 = new Statement(Statement1.ToUpper().Trim()); Statement s2 = new Statement(Statement2.ToUpper().Trim()); Statement s3 = new Statement(Statement3.ToUpper().Trim()); IList <Statement> StatementList = new List <Statement> { }; if (!String.IsNullOrEmpty(Statement1.Trim())) { StatementList.Add(s1); } if (!String.IsNullOrEmpty(Statement2.Trim())) { StatementList.Add(s2); } if (!String.IsNullOrEmpty(Statement3.Trim())) { StatementList.Add(s3); } Conclusion c4 = null; if (!String.IsNullOrEmpty(Conclusion4.Trim())) { c4 = new Conclusion(Conclusion4.ToUpper().Trim(), StatementList); } IList <Statement> sList = new List <Statement>(); StatementList = CorrespondingPair.GetCorrespondingAlignedStatementsByConclusion(c4, StatementList, out sList); if (StatementList.Count == 1) { lblResult.Text = "Corresponding Statement is : " + "\n\n" + "1 ) " + StatementList[0].StatementName.ToUpper() + "\n"; } else if (StatementList.Count == 2) { lblResult.Text = "Corresponding Statements are : " + "\n\n" + "1 ) " + StatementList[0].StatementName.ToUpper() + "\n" + "2 ) " + StatementList[1].StatementName.ToUpper() + "\n"; } else if (StatementList.Count == 3) { lblResult.Text = "Corresponding Statements are : " + "\n\n" + "1 ) " + StatementList[0].StatementName.ToUpper() + "\n" + "2 ) " + StatementList[1].StatementName.ToUpper() + "\n" + "3 ) " + StatementList[2].StatementName.ToUpper() + "\n"; } }
public Conclusion(string conclusion, IList <Statement> statementList)//=>return conclusion validity by using this constructor { this.ConclusionName = conclusion; PopulateAllProperties(); IList <Statement> sList = new List <Statement>(); this.CorrespondingAlignedStatements = CorrespondingPair.GetCorrespondingAlignedStatementsByConclusion(this, statementList, out sList); this.sortedStatementList = sList; this.ConclusionValidity = GetConclusionValidity(); }