예제 #1
0
        public void SaveList(FirePlayList list)
        {
            if (save_textBox.Text == string.Empty)
            {
                MessageBox.Show("No save file selected! ", "Select Save File", MessageBoxButtons.OK);
                return;
            }
            if (File.Exists(save_textBox.Text))
            {
                File.Delete(save_textBox.Text);
            }
            if (!save_textBox.Text.EndsWith(".fps.xml") && !save_textBox.Text.EndsWith(".xml"))
            {
                save_textBox.Text = save_textBox.Text + ".fps.xml";
            }

            if (EPClass.ExportList == null || EPClass.ExportListDefaulted == null)
            {
                MessageBox.Show("Missing Playlists", "You have no sellected playlists", MessageBoxButtons.OK);
                return;
            }
            if (!System.IO.Directory.Exists(Path.GetDirectoryName(EPClass.Location)))
            {
                MessageBox.Show("Location Dyrectory is wrong!", "Wrong dyrectory", MessageBoxButtons.OK);
            }
            ExportWindow.SavePlaylistToFileAsPlainTextXML(list, EPClass.Location);
            Task.Run(() => MessageBox.Show("Done ", "Done", MessageBoxButtons.OK));
        }