public static void Unsubscribe( Action<ProjectEventArgs> action )
Public Overloads Shared Sub Unsubscribe( _ ByVal action As Action(Of ProjectEventArgs) _ )
Parameters
- action
- The delegate that is subscribed to the event
public static void Unsubscribe( Action<ProjectEventArgs> action )
Public Overloads Shared Sub Unsubscribe( _ ByVal action As Action(Of ProjectEventArgs) _ )
protected override bool Initialize() //Called when the Module is initialized. { ProjectOpenedEvent.Subscribe(OnProjectOpened); //subscribe to Project opened event return base.Initialize(); } private void OnProjectOpened(ProjectEventArgs obj) //Project Opened event handler { MessageBox.Show($"{Project.Current} has opened"); //show your message box } protected override void Uninitialize() //unsubscribe to the project opened event { ProjectOpenedEvent.Unsubscribe(OnProjectOpened); //unsubscribe return; }
Target Platforms: Windows 11, Windows 10