// Organize BG color by genre private void DBView_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e) { // Set BGColor per genre foreach (DataGridViewRow row in DBView.Rows) { SongItem rowObject = (SongItem)row.DataBoundItem; row.DefaultCellStyle.BackColor = rowObject.genreColor; } // Put each of the columns into programmatic sort mode. foreach (DataGridViewColumn column in DBView.Columns) { column.SortMode = DataGridViewColumnSortMode.Programmatic; } }
//Function to copy DLC files to output static void BuildDLC(SongItem song, uint id, string folderid) { string SourcePath = Global.PathSongs + song.folder; //Check if folder exist if (!Directory.Exists(SourcePath)) { MessageBox.Show(song.folder + Global.MsgDLC3, Global.TlDLC2); return; } string DestinationPath = Global.PathWay1 + folderid + Global.PathWay2; Directory.CreateDirectory(DestinationPath); //Now Create all of the directories foreach (string dirPath in Directory.GetDirectories(SourcePath, "*", SearchOption.AllDirectories)) { Directory.CreateDirectory(dirPath.Replace(SourcePath, DestinationPath)); } //Copy all the files & Replaces any files with the same name foreach (string newPath in Directory.GetFiles(SourcePath, "*.*", SearchOption.AllDirectories)) { File.Copy(newPath, newPath.Replace(SourcePath, DestinationPath), true); } //Correct unique ID string SongInfoPath = DestinationPath + Global.PathSongDat; //Check if file exist if (!File.Exists(SongInfoPath)) { MessageBox.Show(Global.MsgDLC4, Global.TlDLC2); return; } //Inject ID function InjectID(id, song.starUra, SongInfoPath); }