Академический Документы
Профессиональный Документы
Культура Документы
{
public string var; // Bien chay
public string Fire_val; // Gia tri chay
public string val;//Gia tri cua luat luc truyen vao
public item()
{
var = "";
val = "";
}
}
public Rule()
{
VeTrai= new ArrayList(0);
VePhai= new ArrayList(0);
}
}
// Tạo luật với các giá trị xuất phát cho các biến
public void TaoCacLuat(string sTuoi, string sThucGiac, string sNgu, string sKhoc)
{
// Luat 1 - khoi tao
Rule rl = new Rule();
/// <summary>
/// Hàm kích hoạt luật
/// </summary>
public bool KichHoatLuat(Rule Luat)
{
if( Luat.Chay) return false; // Luat da chay
for(int i=0;i<Luat.VeTrai.Count;i++)
{
item v = (item)Luat.VeTrai[i];
if( !v.val.Equals(v.Fire_val))
return false;
}
item it = new item();
it=(item)Luat.VePhai[0];
it.val=it.Fire_val;
Luat.VePhai.Clear();
Luat.VePhai.Add(it);
return true;
}
str.Trim();
if (str.Length == 0)
str = "HỏiBácSĩ";
return str;
}
} // End class CSTT