public void OnFireEvent(EFireCategory fireCategory) { FireAlarmEvent fe = new FireAlarmEvent(fireCategory); if (DFireEvent != null) DFireEvent(this, fe); }
public void OnFireEvent(EFireCategory fireCategory) { FireAlarmEventArgs fe = new FireAlarmEventArgs(fireCategory); if (FireEvent != null) FireEvent(this, fe); }
public void OnFireEvent(EFireCategory fireCategory) { FireAlarmEventArgs fe = new FireAlarmEventArgs(fireCategory); //Check to make sure event cannot be triggered while event contains null data if(FireEvent != null){ //Call fire event, giving it itself as an object argument and the passed-in fire severity as an argument. FireEvent(this,fe); } }
private void btnFireAlarm_Click(object sender, EventArgs e) { if (rdoMinor.Checked) fireCategory = EFireCategory.MINOR; if (rdoSerious.Checked) fireCategory = EFireCategory.SERIOUS; if (rdoInferno.Checked) fireCategory = EFireCategory.INFERNO; fireSubject.OnFireEvent(fireCategory); }
private void rbFireAlarm_Click(object sender, EventArgs e) { if (rbSerious.Checked) selectedCat = EFireCategory.Serious; if (rbMinor.Checked) selectedCat = EFireCategory.Minor; if (rbInferno.Checked) selectedCat = EFireCategory.Inferno; fireAlarmSubject.OnFireEvent(selectedCat); }
private void button1_Click(object sender, EventArgs e) { if (rbInferno.Checked) currFireCategory = EFireCategory.INFERNO; else if (rbSerious.Checked) currFireCategory = EFireCategory.SERIOUS; else currFireCategory = EFireCategory.MINOR; fireAlarmSubject.OnFireEvent(currFireCategory); }
public void onFireEvent(EFireCategory fCat) { //Create new custom event args using supplied category FireAlarmEventArgs fe = new FireAlarmEventArgs(fCat); //Check there is a observer registed or system will crash if (FireEvent != null) { FireEvent(this, fe); } }
private void btnAlarm_Click(object sender, EventArgs e) { if (rdoMinor.Checked) { currentFire = EFireCategory.MINOR; } else if (rdoSerious.Checked) { currentFire = EFireCategory.SERIOUS; } else { currentFire = EFireCategory.INFERNO; } fas.OnFireEvent(currentFire); }
public FireAlarmEventArgs(EFireCategory currentFireCategory) { FireCategory = currentFireCategory; }
public FireAlarmEventArgs(EFireCategory currentCategory) { FireCategory = currentCategory; }
public FireAlarmEvent(EFireCategory fireCategory) { FireCategory = fireCategory; }
public FireAlarmEvent(EFireCategory fireCategory) { FireCategory = fireCategory; }