AlexxEG/YouTube-Downloader

New idea

Closed this issue ยท 10 comments

@AlexxEG i have come up with new idea in queues tab.

Go ahead

removing status column and writing its content on ptogressbar this way:

screenshot 8

i included this component class in the project and replaced ProgressBar with ProgBar
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

class ProgBar : ProgressBar
{
    protected override CreateParams CreateParams
    {
        get
        {
            CreateParams result = base.CreateParams;
            if (Environment.OSVersion.Platform == PlatformID.Win32NT
                && Environment.OSVersion.Version.Major >= 6)
            {
                result.ExStyle |= 0x02000000; // WS_EX_COMPOSITED 
            }

            return result;
        }
    }
    protected override void WndProc(ref Message m)
    {
        base.WndProc(ref m);
        if (m.Msg == 0x000F)
        {
            using (Graphics graphics = CreateGraphics())
            using (SolidBrush brush = new SolidBrush(ForeColor))
            {
                SizeF textSize = graphics.MeasureString(Text, Font);
                graphics.DrawString(Text, Font, brush, (Width - textSize.Width) / 2, (Height - textSize.Height) / 2);
            }
        }
    }
    [EditorBrowsable(EditorBrowsableState.Always)]
    [Browsable(true)]
    public override string Text
    {
        get
        {
            return base.Text;
        }
        set
        {
            base.Text = value;
            Refresh();
        }
    }

    [EditorBrowsable(EditorBrowsableState.Always)]
    [Browsable(true)]
    public override Font Font
    {
        get
        {
            return base.Font;
        }
        set
        {
            base.Font = value;
            Refresh();
        }
    }
}

I tried removing status column in queues listview and rearranged subitems order in OperationListViewItem but i get exceptions at these lines ๐Ÿ˜•

screenshot 11

That looks really good, I think I'm going to use it eventually. Thank you for the idea!

Just wanna polish and finish up some other stuff before I start changing the UI again, even though it's a relatively small change.

The error is because I assume the program is trying to access the status column but it's not there anymore.

No the status column is there but I have shrinked it's width that is why it is not visible

I have come up with some newer ideas, take a look

I added a filter to playlist

filter

  1. Removing Items
private void btnRemoveItem_Click(object sender, EventArgs e)
        {
            string[] deletefiles = lvControl.txtFilter.Text.Split(';');
            foreach (string s in deletefiles)
            {
                IEnumerable<ListViewItem> lvg = lvPlaylistVideos.CheckedItems.Cast<ListViewItem>().Where(i => i.Text.Contains(s));
                foreach (ListViewItem lii in lvg)
                {
                    lvPlaylistVideos.Items.Remove(lii);
                }
            }
        }
  1. Checking & Unchecking Items
private void btnCheckUncheckItem_Click(object sender, EventArgs e)
        {
            IEnumerable<ListViewItem> lv = lvPlaylistVideos.CheckedItems.Cast<ListViewItem>().Where(i => i.Text.Contains(lvControl.txtFilter.Text));
            foreach (ListViewItem items in lv)
            {
                if (items.Checked)
                {
                    items.Checked = false;
                }
                else
                {
                    items.Checked = true;
                }
            }
        }
  1. Searching Items
private void btnSearch_Click(object sender, EventArgs e)
        {
            string[] deletefiles = lvControl.txtFilter.Text.Split(';');
            foreach (string s in deletefiles)
            {
                IEnumerable<ListViewItem> lvg = lvPlaylistVideos.CheckedItems.Cast<ListViewItem>().Where(i => i.Text.Contains(s));
                foreach (ListViewItem lii in lvg)
                {
                    lii.BackColor = Color.LightGray;
                }
            }
        }

Very good. Would be nice if you open a new issue though, easier to keep track of that way.

Fixed!!!! ๐Ÿ‘

I tried removing status column in queues listview and rearranged subitems order in OperationListViewItem but i get exceptions at these lines ๐Ÿ˜•

screenshot 11

removed status column and rearranged input column index
 public class OperationListViewItem : ListViewItem
    {
        private const int ColumnProgressBar = 1;
       - private const int ColumnInputLabel = 5;
       + private const int ColumnInputLabel = 4;

Let there be an option to auto delete completed task

I think a clear all button would be better :)