public static unsafe void Notify(PluginNotification* notification) { switch (notification->Reason) { case PluginNotificationReason.DatabaseLoaded: DataSource = new DataSource( databasePath: Marshal.PtrToStringAnsi(notification->DatabasePath), mainWnd: notification->MainWnd); RightClickMenu = new RightClickMenu(DataSource); break; case PluginNotificationReason.DatabaseUnloaded: DataSource.DatabasePath = null; break; case PluginNotificationReason.StatusRightClick: RightClickMenu.ContextMenu.IsOpen = true; break; case PluginNotificationReason.SettingsChange: break; } }