示例#1
0
        public Exporter(List <Track> playlist, string outPath)
        {
            this.playlist = playlist;
            this.outPath  = outPath;
            InitializeComponent();
            this.SetColors();
            if (playlist.Count == 0 || !Directory.Exists(outPath))
            {
                infoLabel.Text = "Playlist empty or directory doesn't exist.";
                return;
            }
            List <string> outPathFiles = Directory.EnumerateFiles(outPath).ToList();

            foreach (string s in outPathFiles)
            {
                PathAndSize pns = new PathAndSize(s);
                pns.size = new FileInfo(s).Length;
                pathsNSizes.Add(pns);
            }
            foreach (Track t in playlist)
            {
                t.GetSize();
            }
            exporterWorker.RunWorkerAsync();
            total        = playlist.Count;
            updatedCount = 0;
        }
示例#2
0
        public Exporter(List <List <Track> > listOfLists, List <string> playlistNames, string outPath)
        {
            this.playlistNames = playlistNames;
            this.listOfLists   = listOfLists;
            this.outPath       = outPath;
            InitializeComponent();
            this.SetColors();
            if (listOfLists.Count == 0 || !Directory.Exists(outPath))
            {
                infoLabel.Text = "Playlist empty or directory doesn't exist.";
                return;
            }
            List <string> outPathFiles = Directory.EnumerateFiles(outPath).ToList();

            foreach (string s in outPathFiles)
            {
                PathAndSize pns = new PathAndSize(s);
                pns.size = new FileInfo(s).Length;
                pathsNSizes.Add(pns);
            }

            exporterWorker.RunWorkerAsync();
        }