public void Init() { if (!OkrRepository.ExistDB()) { string db = OkrConstant.DB; Stream stream = Application.GetResourceStream(new Uri(OkrConstant.DBPATH, UriKind.Relative)).Stream; using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication()) { if (!storage.FileExists(db)) { IsolatedStorageFileStream outFile = storage.CreateFile(db); outFile.Write(AtUtils.ReadToEnd(stream), 0, (int)stream.Length); stream.Close(); outFile.Close(); } } } }
public static string GetValue(string key) { return(OkrRepository.GetConfig(key).AtConfig); }