public Sort(VistaControls.ListView listView, List<string> ids, List<int> order) { LV = listView; Rows = listView.Items.Count; _Title = new string[Rows]; _Views = new string[Rows]; _Length = new string[Rows]; _IDs = new string[Rows]; _Order = new int[Rows]; for (int i = 0; i < Rows; i++) _Title[i] = listView.Items[i].Text; for (int i = 0; i < Rows; i++) _Views[i] = listView.Items[i].SubItems[1].Text; for (int i = 0; i < Rows; i++) _Length[i] = listView.Items[i].SubItems[2].Text; for (int i = 0; i < Rows; i++) _IDs[i] = ids[i]; for (int i = 0; i < Rows; i++) _Order[i] = order[i]; for (int i = 0; i < Rows; i++) OCount.Add(i); }
public Download(string url, string saveto, Panel panel, VistaControls.ProgressBar pb, VistaControls.ThemeText.ThemedLabel name, VistaControls.ThemeText.ThemedLabel speed, VistaControls.ThemeText.ThemedLabel percent, VistaControls.Button cancel) { _Panel = panel; this.URL = url; this.Name = Path.GetFileName(url); this.SaveTo = saveto; this._Pb = pb; this._LblPercent = percent; this._LblName = name; this._LblSpeed = speed; this._BtnCancel = cancel; _LblName.Text = Name; _LblPercent.Text = "0% 0B/0B"; _LblSpeed.Text = "0B/s"; this._Client = new WebClient(); _Client.UseDefaultCredentials = true; avg = new long[1000]; }