Beispiel #1
0
        private void btnDownload_Click(object sender, EventArgs e)
        {
            var selectedRows = dgvFolders.SelectedRows;

            if (selectedRows.Count > 0)
            {
                foreach (DataGridViewRow row in selectedRows)
                {
                    DgvModel     data      = row.DataBoundItem as DgvModel;
                    const string extension = "nfo";

                    if (data != null)
                    {
                        string items = MusicManager.Load(data.Path);
                        if (!string.IsNullOrWhiteSpace(items))
                        {
                            List <DgvModel> modelList = ToModel(items, data.Path);
                            foreach (DgvModel model in modelList)
                            {
                                if (Path.GetExtension(model.Path).TrimStart('.').Equals(extension, StringComparison.OrdinalIgnoreCase))
                                {
                                    MusicManager.DownloadFile(model.Path, @"C:\Users\mteodorescu\Downloads\pics\");
                                }
                            }
                        }
                    }
                }
            }
        }
Beispiel #2
0
        private void dgvFolders_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DgvModel data = dgvFolders?.CurrentRow.DataBoundItem as DgvModel;

            if (data != null)
            {
                string items = MusicManager.Load(data.Path);
                LoadData(items, data.Path);
            }
        }