예제 #1
0
        protected override void LoadFromObject(VolumeDB.Volume volume)
        {
            if (!(volume is FileSystemVolume))
                throw new ArgumentException(string.Format("must be of type {0}",
                                                          typeof(FileSystemVolume)), "volume");

            base.LoadFromObject(volume);

            FileSystemVolume fsvol = (FileSystemVolume)volume;
            UpdateInfoLabels(fsvol.Files, fsvol.Directories, fsvol.Size);
        }
예제 #2
0
        protected override void LoadFromObject(VolumeDB.Volume volume)
        {
            if (!(volume is AudioCdVolume))
                throw new ArgumentException(string.Format("must be of type {0}",
                                                          typeof(AudioCdVolume)), "volume");

            base.LoadFromObject(volume);

            AudioCdVolume avol = (AudioCdVolume)volume;
            UpdateInfoLabels(avol.Tracks, avol.Duration);
        }
예제 #3
0
        protected override void LoadFromObject(VolumeDB.VolumeItem item)
        {
            if (!(item is FileVolumeItem))
                throw new ArgumentException(string.Format("must be of type {0}",
                                                          typeof(FileVolumeItem)), "item");

            base.LoadFromObject(item);

            FileVolumeItem fvi = (FileVolumeItem)item;
            UpdateLabel(lblSize, Util.GetSizeStr(fvi.Size));
            UpdateLabel(lblHash, string.IsNullOrEmpty(fvi.Hash) ? "-" : fvi.Hash);
        }
예제 #4
0
        protected override void LoadFromObject(VolumeDB.VolumeItem item)
        {
            if (!(item is AudioTrackVolumeItem))
                throw new ArgumentException(string.Format("must be of type {0}",
                                                          typeof(AudioTrackVolumeItem)), "item");

            base.LoadFromObject(item);

            AudioTrackVolumeItem avi = (AudioTrackVolumeItem)item;

            UpdateLabel(lblDuration, avi.Duration.ToString());
            UpdateLabel(lblMimeType, avi.MimeType);
        }
예제 #5
0
        protected override void LoadFromObject(VolumeDB.VolumeItem item)
        {
            if (!(item is FileSystemVolumeItem))
                throw new ArgumentException(string.Format("must be of type {0}",
                                                          typeof(FileSystemVolumeItem)), "item");

            base.LoadFromObject(item);

            FileSystemVolumeItem fsvi = (FileSystemVolumeItem)item;

            UpdateLabel(lblLocation, fsvi.Location);
            UpdateLabel(lblLastWriteTime, fsvi.LastWriteTime.ToString());
            UpdateLabel(lblMimeType, string.IsNullOrEmpty(fsvi.MimeType) ? "-" : fsvi.MimeType);
        }