コード例 #1
0
        }     // end of  public void GetAllImagesFromCamera()

        private void DisplayObject(PortableDevice device, PortableDeviceObject portableDeviceObject)
        {
            if (portableDeviceObject is PortableDeviceFolder)
            {
                DisplayFolderContents(device, (PortableDeviceFolder)portableDeviceObject);
            }
        }
コード例 #2
0
        private int GetCountOfImageRec(PortableDevice device, PortableDeviceObject portableDeviceObject)
        {
            int count = 0;

            foreach (var item in ((PortableDeviceFolder)portableDeviceObject).Files)
            {
                if (item is PortableDeviceFolder)
                {
                    count = count + GetCountOfImageRec(device, (PortableDeviceFolder)item);
                }


                if (item is PortableDeviceFile)
                {
                    count++;
                }
            }

            return(count);
        }