예제 #1
0
    /// <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);
    }
예제 #2
0
 /// <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);
 }