private void AddDefaultCatalogs(BookDataContext dataContext)
        {
            /*
            var catalog = new CatalogModel
            {
                Url = "http://data.fbreader.org/catalogs/litres2/index.php5",
                Title = "FBReader_Litres",
                Description = "description",
                IconLocalPath = "/Resources/Icons/litres_icon.jpg",
                SearchUrl = "http://data.fbreader.org/catalogs/litres2/search.php5?query={0}",
                Type = CatalogType.Litres
            };
            dataContext.Catalogs.InsertOnSubmit(catalog);
            /*/
            var catalog = new CatalogModel
            {
                Url = "http://sopdsbook.ru:8081/",
                Title ="Ѕиблиотеке",
                Description = "description",
                IconLocalPath = "/Resources/Icons/cops_icon.jpg",
                SearchUrl = "http://sopdsbook.ru:8081/?searchType=books&searchTerm={0}",
                OpenSearchDescriptionUrl = "http://sopdsbook.ru:8081/web?id=07",

                Type = CatalogType.OPDS
            };
            dataContext.Catalogs.InsertOnSubmit(catalog);
            //*/

            dataContext.SubmitChanges();
        }
Ejemplo n.º 2
0
 public override void Update(BookDataContext db, DatabaseSchemaUpdater updater)
 {
     db.Catalogs.InsertOnSubmit(new CatalogModel
                                {
                                    Title = string.Empty,
                                    Description = string.Empty,
                                    IconLocalPath = "",
                                    Type = CatalogType.StorageFolder,
                                    AccessDenied = true
                                });
     db.SubmitChanges();
 }
Ejemplo n.º 3
0
        private void AddDefaultCatalogs(BookDataContext dataContext)
        {
            var catalog = new CatalogModel
            {
                Url = "http://data.fbreader.org/catalogs/litres2/index.php5",
                Title = "FBReader_Litres",
                Description = "description",
                IconLocalPath = "/Resources/Icons/litres_icon.jpg",
                SearchUrl = "http://data.fbreader.org/catalogs/litres2/search.php5?query={0}",
                Type = CatalogType.Litres
            };
            dataContext.Catalogs.InsertOnSubmit(catalog);
            
//            catalog = new CatalogModel
//            {
//                Url = "http://flibusta.net/opds",
//                Title = "FBReader_Flibusta",
//                Description = "description",
//                IconLocalPath = "/Resources/Icons/flibusta_icon.jpg",
//                SearchUrl = "http://flibusta.net/opds/search?searchTerm={0}&searchType=books",
//                Type = CatalogType.OPDS
//            };
//            dataContext.Catalogs.InsertOnSubmit(catalog);

            catalog = new CatalogModel
            {
                Url = "http://manybooks.net/opds/index.php",
                Title = "FBReader_Manybooks",
                Description = "description",
                IconLocalPath = "/Resources/Icons/Manybooks.png",
                Type = CatalogType.OPDS
            };
            dataContext.Catalogs.InsertOnSubmit(catalog);

            catalog = new CatalogModel
            {
                Url = "http://data.fbreader.org/catalogs/prochtenie/index.xml",
                Title = "FBReader_Prochtenie",
                Description = "description",
                IconLocalPath = "/Resources/Icons/prochtenie_catalog.png",
                Type = CatalogType.OPDS
            };
            dataContext.Catalogs.InsertOnSubmit(catalog);

            catalog = new CatalogModel
						{
								Title = UIStrings.SkyDrive_Catalog_Title,
								Description = UIStrings.SkyDrive_Catalog_Description,
								IconLocalPath = "/Resources/Icons/skydrive.png",
								Type = CatalogType.SkyDrive,
								AccessDenied = true
						};
            dataContext.Catalogs.InsertOnSubmit(catalog);

           
            catalog = new CatalogModel
            {
                Title = UIStrings.SDCard_Catalog_Title,
                Description = UIStrings.SDCard_Catalog_Description,
                IconLocalPath = "/Resources/Icons/sd_card.png",
                Type = CatalogType.SDCard
            };

            dataContext.Catalogs.InsertOnSubmit(catalog);
            

            dataContext.SubmitChanges();
        }