예제 #1
0
 public override void onStarted(SmcDeviceFinder deviceFinder, int error)
 {
     mDeviceFinder = deviceFinder;
     if (mType != 0)
     {
         mDeviceFinder.setDeviceListener(mType, this);
     }
     else
     {
         mDeviceFinder.setDeviceListener(SmcDevice.TYPE_IMAGEVIEWER, this);
         mDeviceFinder.setDeviceListener(SmcDevice.TYPE_AVPLAYER, this);
     }
     mDeviceFinder.rescan();
     refreshDevicesList();
 }
 public override void onStarted(SmcDeviceFinder deviceFinder, int error)
 {
     mDeviceFinder = deviceFinder;
     mDeviceFinder.setDeviceListener(mType, this);
     mDeviceFinder.rescan();
     refreshDevicesList();
 }
예제 #3
0
 public override void onStopped(SmcDeviceFinder deviceFinder)
 {
     if (mDeviceFinder == deviceFinder)
     {
         if (mType != 0)
         {
             mDeviceFinder.setDeviceListener(mType, null);
         }
         else
         {
             mDeviceFinder.setDeviceListener(SmcDevice.TYPE_IMAGEVIEWER, null);
             mDeviceFinder.setDeviceListener(SmcDevice.TYPE_AVPLAYER, null);
         }
         mDeviceFinder.StatusListener = null;
         mDeviceFinder = null;
     }
 }
예제 #4
0
 public override void onStopped(SmcDeviceFinder deviceFinder)
 {
     // Remove listeners so that no references remain
     // and GC can collect the service and this activity.
     if (mDeviceFinder == deviceFinder)
     {
         if (mType != 0)
         {
             mDeviceFinder.setDeviceListener(mType, null);
         }
         else
         {
             mDeviceFinder.setDeviceListener(SmcDevice.TYPE_IMAGEVIEWER, null);
             mDeviceFinder.setDeviceListener(SmcDevice.TYPE_AVPLAYER, null);
         }
         mDeviceFinder.StatusListener = null;
         mDeviceFinder = null;
     }
 }
예제 #5
0
        ///////////////////////////////////////////////////////////////////////////
        // These methods handle device finder start hide event.
        ///////////////////////////////////////////////////////////////////////////

        public override void onStarted(SmcDeviceFinder deviceFinder, int error)
        {
            if (error == Smc.SUCCESS)
            {
                mDeviceFinder = deviceFinder;
                if (mType != 0)
                {
                    mDeviceFinder.setDeviceListener(mType, this);
                }
                else
                {
                    mDeviceFinder.setDeviceListener(SmcDevice.TYPE_IMAGEVIEWER, this);
                    mDeviceFinder.setDeviceListener(SmcDevice.TYPE_AVPLAYER, this);
                }
                mDeviceFinder.rescan();
                updateButtonCounter();
                restoreDevice();
            }
        }
 public override void onStopped(SmcDeviceFinder deviceFinder)
 {
     // Remove listeners so that no references remain
     // and GC can collect the service and this activity.
     if (mDeviceFinder == deviceFinder)
     {
         mDeviceFinder.setDeviceListener(mType, null);
         mDeviceFinder.StatusListener = null;
         mDeviceFinder = null;
     }
 }
        public virtual void release()
        {
            // Disconnect from remote player
            if (mPlayer != null)
            {
                unregisterListeners();
            }

            // Release the AllShare Service instance.
            if (mDeviceFinder != null)
            {
                mDeviceFinder.setDeviceListener(SmcDevice.TYPE_AVPLAYER, null);
                mDeviceFinder.stop();
            }
        }
예제 #8
0
		///////////////////////////////////////////////////////////////////////////
		// These methods handle device finder start hide event.
		///////////////////////////////////////////////////////////////////////////

		public override void onStarted(SmcDeviceFinder deviceFinder, int error)
		{
			if (error == Smc.SUCCESS)
			{
				mDeviceFinder = deviceFinder;
				if (mType != 0)
				{
					mDeviceFinder.setDeviceListener(mType, this);
				}
				else
				{
					mDeviceFinder.setDeviceListener(SmcDevice.TYPE_IMAGEVIEWER, this);
					mDeviceFinder.setDeviceListener(SmcDevice.TYPE_AVPLAYER, this);
				}
				mDeviceFinder.rescan();
				updateButtonCounter();
				restoreDevice();
			}
		}