コード例 #1
0
 protected override bool ConfirmImport ()
 {
     if (data == null) {
         data = new ItunesImportData ();
         var dialog = new ItunesImportDialog ();
         if (!HandleImportDialog (dialog, delegate { data.library_uri = dialog.LibraryUri; })) {
             data = null;
             return false;
         }
     }
     return true;
 }
コード例 #2
0
 protected override bool ConfirmImport()
 {
     if (data == null)
     {
         data = new ItunesImportData();
         var dialog = new ItunesImportDialog();
         if (!HandleImportDialog(dialog, delegate { data.library_uri = dialog.LibraryUri; }))
         {
             data = null;
             return(false);
         }
     }
     return(true);
 }
コード例 #3
0
        protected override void ImportCore()
        {
            try {
                CountSongs();
                data.empty_library = ServiceManager.SourceManager.MusicLibrary.TrackModel.Count == 0;

                var import_manager = ServiceManager.Get <LibraryImportManager> ();
                using (var xml_reader = new XmlTextReader(data.library_uri)) {
                    ProcessLibraryXml(import_manager, xml_reader);
                }
                import_manager.NotifyAllSources();
            } finally {
                data = null;
            }
        }
コード例 #4
0
        protected override void ImportCore ()
        {
            try {
                CountSongs ();
                data.empty_library = ServiceManager.SourceManager.MusicLibrary.TrackModel.Count == 0;

                var import_manager = ServiceManager.Get<LibraryImportManager> ();
                using (var xml_reader = new XmlTextReader (data.library_uri)) {
                    ProcessLibraryXml (import_manager, xml_reader);
                }
                import_manager.NotifyAllSources ();
            } finally {
                data = null;
            }
        }