/// <summary> /// Registers Ci Menu Callbackhandler in TvPlugin, connects to a server side event /// </summary> public static void RegisterCiMenuCallbacks(CiMenuCallbackSink sink) { RefreshRemotingConnectionStatus(); // Define sink for events RemotingConfiguration.RegisterWellKnownServiceType( typeof (CiMenuCallbackSink), "ServerEvents", WellKnownObjectMode.Singleton); // Assign the callback from the server to here _tvControl.OnCiMenu += new CiMenuCallback(sink.FireCiMenuCallback); }
/// <summary> /// Unregisters Ci Menu Callbackhandler in TvPlugin when it's no longer required /// </summary> public static void UnRegisterCiMenuCallbacks(CiMenuCallbackSink sink) { // Assign the callback from the server to here _tvControl.OnCiMenu -= new CiMenuCallback(sink.FireCiMenuCallback); }