コード例 #1
0
        private void SaveSongAs(Song song)
        {
            if (song == null)
            {
                throw new ArgumentNullException("song");
            }

            SaveFilenameDialog dlg = new SaveFilenameDialog(song.Title);

            dlg.Owner = this;

            if (dlg.ShowDialog() == true)
            {
                song.Save(new Uri("song:///" + dlg.Filename));
            }
        }
コード例 #2
0
        private void SaveSongAs(Song song)
        {
            if (song == null)
                throw new ArgumentNullException("song");

            SaveFilenameDialog dlg = new SaveFilenameDialog(song.Title);
            dlg.Owner = this;

            if (dlg.ShowDialog() == true)
            {
                song.Save(new Uri("song:///" + dlg.Filename));
            }
        }