public static Dictionary <string, Fic> GetFics() { var res = Liter.GetFics(); return(res); // Leaving this code below temporarily var sd = XmlOperator.LoadFics(); return(new Dictionary <string, Fic>(sd)); }
public static void XmlToLdb() { SerializableDictionary <string, Fic> fics; List <string> lib = new List <string>(); SerializableDictionary <string, string> libHash; SerializableDictionary <string, string> kindleFiles; Dictionary <string, Fic> nDictFics = new Dictionary <string, Fic>(); Dictionary <string, string> nDictLibHash = new Dictionary <string, string>(); Dictionary <string, string> nDictKindle = new Dictionary <string, string>(); bool success = false; try { fics = XmlOperator.LoadFics(); nDictFics = new Dictionary <string, Fic>(fics); success = true; } catch (Exception) { } try { lib = XmlOperator.GetFolders(); } catch (Exception) { } try { libHash = XmlOperator.DeserializeFile <SerializableDictionary <string, string> >(Constants.LibHashList); nDictLibHash = new Dictionary <string, string>(libHash); success = true; } catch (Exception) { } try { kindleFiles = XmlOperator.DeserializeFile <SerializableDictionary <string, string> >(Constants.KindleList); nDictKindle = new Dictionary <string, string>(kindleFiles); success = true; } catch (Exception) { } if (success) { try { Liter.StoreFics(nDictFics); } catch (Exception) { } try { foreach (string fldrpath in lib) { Liter.AddLib(fldrpath); } } catch (Exception) { throw; } try { // LibHash // Not implemented } catch (Exception) { } try { //Kindle Liter.StoreKindleHashes(nDictKindle); } catch (Exception) { throw; } } }
public static Dictionary <string, string> LoadKindle() { return(Liter.LoadKindleHashes()); }
public static void StoreKindle(Dictionary <string, string> hashes) { Liter.StoreKindleHashes(hashes); }
internal static void StoreLibHashes(Dictionary <string, string> fileHashes) { Liter.StoreHashes(fileHashes); }
public static void AddLibraryFolder(string folderpath) { Liter.AddLib(folderpath); }
public static List <string> GetLibFolders() { return(Liter.GetLib()); }
public static void StoreFics(Dictionary <string, Fic> fics) { Liter.StoreFics(fics); //SerializableDictionary<string, Fic> sd = new SerializableDictionary<string, Fic>(fics); //XmlOperator.StoreWorks(sd); }