Пример #1
0
 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);
 }
Пример #2
0
 public override void Format(InetSongDb xmldb, Stream fw, IWaitDialog wait, object props)
 {
     xmldb.Save(fw);
 }
Пример #3
0
 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);
 }
Пример #4
0
 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);
             }
         }
     }
 }