/// <summary> /// Handles the OnAmbienceChanged event of the mModel control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:Netron.Diagramming.Core.AmbienceEventArgs"/> instance containing the event data.</param> void mModel_OnAmbienceChanged(object sender, AmbienceEventArgs e) { //redefine the brush in function of the chosen background type SetBackgroundType(mModel.CurrentPage.Ambience.BackgroundType); //refresh everything Invalidate(); }
/// <summary> /// Raises the <see cref="OnAmbienceChanged"/> event /// </summary> /// <param name="e"></param> protected virtual void RaiseOnAmbienceChanged(AmbienceEventArgs e) { EventHandler <AmbienceEventArgs> handler = OnAmbienceChanged; if (handler != null) { handler(this, e); } }
/// <summary> /// Raises the <see cref="OnAmbienceChanged"/> event /// </summary> /// <param name="e"></param> private void RaiseOnAmbienceChanged(AmbienceEventArgs e) { EventHandler <AmbienceEventArgs> handler = OnAmbienceChanged; if (handler != null) { handler(this, e); } }
/// <summary> /// Handles the OnAmbienceChanged event of the <see cref="Ambience"/>. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:Netron.Diagramming.Core.AmbienceEventArgs"/> instance containing the event data.</param> 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); }
void mModel_OnAmbienceChanged(object sender, AmbienceEventArgs e) { RaiseOnAmbienceChanged(e); }
void mDefaultPage_OnAmbienceChanged(object sender, AmbienceEventArgs e) { RaiseOnAmbienceChanged(e); }