Esempio n. 1
0
        internal PodSleuthDevice(IVolume volume)
        {
            this.volume = volume;

            volume_info     = new _VolumeInfo(volume);
            production_info = new _ProductionInfo(volume);
            model_info      = new _ModelInfo(volume);

            if (volume.PropertyExists(PodsleuthPrefix + "control_path"))
            {
                string relative_control = volume.GetPropertyString(PodsleuthPrefix + "control_path");
                if (relative_control[0] == Path.DirectorySeparatorChar)
                {
                    relative_control = relative_control.Substring(1);
                }

                ControlPath = Path.Combine(VolumeInfo.MountPoint, relative_control);
            }

            ArtworkFormats = new ReadOnlyCollection <ArtworkFormat> (LoadArtworkFormats());

            if (volume.PropertyExists(PodsleuthPrefix + "firmware_version"))
            {
                FirmwareVersion = volume.GetPropertyString(PodsleuthPrefix + "firmware_version");
            }

            if (volume.PropertyExists(PodsleuthPrefix + "firewire_id"))
            {
                FirewireId = volume.GetPropertyString(PodsleuthPrefix + "firewire_id");
            }

            RescanDisk();
        }
Esempio n. 2
0
        public void Dump()
        {
            Console.WriteLine("iPod");
            Console.WriteLine(" Firewire ID:      {0}", FirewireId);
            Console.WriteLine(" Firmware Version: {0}", FirmwareVersion);
            Console.WriteLine(" Control Path:     {0}", ControlPath);
            Console.WriteLine();


            Console.WriteLine(" Volume Information");
            VolumeInfo.Dump();
            Console.WriteLine();

            Console.WriteLine(" Model Information");
            ModelInfo.Dump();
            Console.WriteLine();

            Console.WriteLine(" Production Information");
            ProductionInfo.Dump();
            Console.WriteLine();

            Console.WriteLine(" Database Information");
            Console.WriteLine("  Song Count: " + TrackDatabase.Tracks.Count);
            Console.WriteLine("  Photo Formats:");

            foreach (ArtworkFormat format in LookupArtworkFormats(ArtworkUsage.Photo))
            {
                Console.WriteLine("   {0}x{1} using {2}, rotated {3}", format.Width,
                                  format.Height, format.PixelFormat, format.Rotation);
            }
        }
        internal PodSleuthDevice (IVolume volume)
        {
            this.volume = volume;

            volume_info = new _VolumeInfo (volume);
            production_info = new _ProductionInfo (volume);
            model_info = new _ModelInfo (volume);

            if (volume.PropertyExists (PodsleuthPrefix + "control_path")) {
                string relative_control = volume.GetPropertyString (PodsleuthPrefix + "control_path");
                if (relative_control[0] == Path.DirectorySeparatorChar) {
                    relative_control = relative_control.Substring (1);
                }

                ControlPath = Path.Combine(VolumeInfo.MountPoint, relative_control);
            }

            ArtworkFormats = new ReadOnlyCollection<ArtworkFormat> (LoadArtworkFormats ());

            if (volume.PropertyExists (PodsleuthPrefix + "firmware_version")) {
                FirmwareVersion = volume.GetPropertyString (PodsleuthPrefix + "firmware_version");
            }

            if (volume.PropertyExists (PodsleuthPrefix + "firewire_id")) {
                FirewireId = volume.GetPropertyString (PodsleuthPrefix + "firewire_id");
            }

            RescanDisk ();
        }