Exemplo n.º 1
0
 private void tbGenerateXML_Click(object sender, EventArgs e)
 {
     if (_saveFileDialog.ShowDialog(this) == DialogResult.OK)
     {
         var serializer = new VirtualMovieFolderSerializer();
         serializer.SerializeTreeView(Properties.Settings.Default.Paths, _saveFileDialog.FileName);
     }
 }
Exemplo n.º 2
0
        private void tbSaveVirtualTree_Click(object sender, EventArgs e)
        {
            if (_saveFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                var roots  = (ArrayList)treeListVirtualFolders.Roots;
                var movies = new List <Movie>();

                foreach (Movie movie in roots)
                {
                    movies.Add(movie);
                }

                var serializer = new VirtualMovieFolderSerializer();
                serializer.SerializeTreeView(movies, _saveFileDialog.FileName);
            }
        }