public override void UploadChanges(SongDatabase db, int serverid, IWaitDialog dlg) { InetSongDb xmldb = new InetSongDb(); object req1 = null; using (Stream fr = Read(ref req1)) xmldb.Load(fr); CloseRead(req1); object request = null; using (Stream fw = Write(ref request)) { db.PublishSongsChanges(serverid, xmldb, dlg); xmldb.Save(fw); } CloseWrite(request); }
public override void Format(InetSongDb xmldb, Stream fw, IWaitDialog wait, object props) { xmldb.Save(fw); }
public override void UploadWhole(SongDatabase db, int serverid, IWaitDialog dlg) { InetSongDb xmldb = new InetSongDb(); object request = null; using (Stream fw = Write(ref request)) { db.PublishAllSongs(serverid, xmldb, dlg); xmldb.Save(fw); } CloseWrite(request); }
private void button6_Click(object sender, EventArgs e) { if (SelectedServer != null) { if (saveXML.ShowDialog() == DialogResult.OK) { InetSongDb xmldb = new InetSongDb(); xmldb.Songs.AddRange(m_dbwrap.Database.LoadSongs(null, null, "server_id=" + SelectedServer.ToString())); using (FileStream fw = new FileStream(saveXML.FileName, FileMode.Create)) { xmldb.Save(fw); } } } }