public string GetTempFile(eDBSongFileType filetype) { string tempfile = string.Empty; if (filetype == eDBSongFileType.musecorefile) { tempfile = $@"{Application.StartupPath}\temp\senotes.mscz"; } else if (filetype == eDBSongFileType.pdffile) { tempfile = $@"{Application.StartupPath}\temp\senotes.pdf"; } else if (filetype == eDBSongFileType.mp3file) { tempfile = $@"{Application.StartupPath}\temp\senotes.mp3"; } else if (filetype == eDBSongFileType.textfile) { tempfile = $@"{Application.StartupPath}\temp\senotes.txt"; } else if (filetype == eDBSongFileType.songimage) { tempfile = $@"{Application.StartupPath}\temp\image.png"; } return(tempfile); }
public void GetWriteTemp(DBClass db, Guid key, string filekey, string filename, eDBSongFileType filetype) { db.DatabasePath = PfadClass.Instance().DatabasePfad; var data = db.GetByID(key); Notes actData = data[0]; foreach (var fls in actData.SongFiles) { string guid = fls.FilesID.ToString(); if (guid == filekey.ToString()) { db.GetAndWriteMemoryStreamToFile(guid, filename); } } }