Example #1
0
        public void LoadBatch(ProActiveBatch batch)
        {
            lstBatch.BeginUpdate();
            lstBatch.Items.Clear();
            var index = 1;

            foreach (var batchItem in batch.Queue.Values)
            {
                var batchSet = batchItem.GoProSet;
                foreach (var video in batchItem.Videos)
                {
                    var rename = $"{batchSet.Date} - {index++} {batchSet.Title} {video.Name} {batchSet.Tags}";

                    var item = new ListViewItem();
                    item.Tag  = rename;
                    item.Name = video.File.FullName;
                    item.Text = video.Name;
                    item.SubItems.Add(rename);
                    item.SubItems.Add("Queued");
                    lstBatch.Items.Add(item);
                }
            }
            lstBatch.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
            lstBatch.EndUpdate();
        }
Example #2
0
        public ProActiveBatch PrepareBatch()
        {
            var batch = new ProActiveBatch();

            foreach (ListViewItem item in VideoList.Items)
            {
                var video = (GoProVideo)item.Tag;

                if (item.Checked)
                {
                    if (!batch.Queue.ContainsKey(video.Group))
                    {
                        batch.Queue.Add(video.Group, new ProActiveSet());
                    }
                    var batchSet = batch.Queue[video.Group];
                    batchSet.GoProSet = (GoProSet)item.Group.Tag;
                    batchSet.Videos.Add(video);
                }
                else
                {
                    batch.Exclude.Add(video);
                }
            }
            return(batch);
        }