SoundPlayer.OnSoundLocationChanged(EventArgs) Metoda
Definicja
Podnosi SoundLocationChanged zdarzenie.Raises the SoundLocationChanged event.
protected:
virtual void OnSoundLocationChanged(EventArgs ^ e);
protected virtual void OnSoundLocationChanged (EventArgs e);
abstract member OnSoundLocationChanged : EventArgs -> unit
override this.OnSoundLocationChanged : EventArgs -> unit
Protected Overridable Sub OnSoundLocationChanged (e As EventArgs)
Parametry
Uwagi
Ta metoda jest wywoływana, gdy została ustawiona nowa ścieżka źródła audio dla tego elementu SoundPlayer .This method is called when a new audio source path for this SoundPlayer has been set.
Podnoszenie zdarzenia wywołuje program obsługi zdarzeń przez delegata.Raising an event invokes the event handler through a delegate. Aby uzyskać więcej informacji, zobacz How to: zapewnianie funkcjonalności zdarzeń oraz Obsługiwanie iwywoływanie zdarzeń.For more information, see How to: Provide Event functionality and Handling and Raising Events.
OnSoundLocationChangedMetoda umożliwia również klasom pochodnym obsłużenia zdarzenia bez dołączania delegata.The OnSoundLocationChanged method also allows derived classes to handle the event without attaching a delegate. Jest to preferowana technika obsługi zdarzenia w klasie pochodnej.This is the preferred technique for handling the event in a derived class.
Uwagi dotyczące dziedziczenia
Podczas zastępowania OnSoundLocationChanged(EventArgs) klasy pochodnej należy wywołać metodę klasy bazowej, aby OnSoundLocationChanged(EventArgs) zarejestrowani delegowani odbierał zdarzenie.When overriding OnSoundLocationChanged(EventArgs) in a derived class, be sure to call the base class's OnSoundLocationChanged(EventArgs) method so that registered delegates receive the event.