private void cboManual_SelectedIndexChanged(object sender, EventArgs e) { if (string.IsNullOrEmpty(cboP1.Text) || string.IsNullOrEmpty(cboP2.Text) || string.IsNullOrEmpty(cboC.Text) || string.IsNullOrEmpty(cboType.Text)) { return; } var sb = new StringBuilder(); var q = new char[3]; q[0] = cboP1.Text[0]; q[1] = cboP2.Text[0]; q[2] = cboC.Text[0]; var type = int.Parse(cboType.Text); var syl = new Syllogism(q, type); var strSyl = Syllogism.GenerateSyllogism(type, q, txtS.Text, txtP.Text, txtM.Text); sb.AppendLine(syl.ToString()); sb.AppendLine(); sb.AppendLine(strSyl); if (syl.IsValid) { sb.AppendLine("HỢP LỆ"); } else { sb.AppendLine("KHÔNG HỢP LỆ"); } txtManualResult.Text = sb.ToString(); }
public void Can_init_correct_syllogism() { var s = new Syllogism("PPE".ToCharArray(), 1); var str = s.ToString(); Console.WriteLine(str); }