void mModel_OnAmbienceChanged(object sender, AmbienceEventArgs e) { //redefine the brush in function of the chosen background type SetBackgroundType(mModel.Ambience.BackgroundType); //refresh everything Invalidate(); }
protected virtual void RaiseOnAmbienceChanged(AmbienceEventArgs e) { EventHandler <AmbienceEventArgs> handler = OnAmbienceChanged; if (handler != null) { handler(this, e); } }
void mAmbience_OnAmbienceChanged(object sender, AmbienceEventArgs e) { //pass on the good news, eventually the View will be notified and the canvas will be redrawn RaiseOnAmbienceChanged(e); }