// load file scriptmonkey public void ReloadData() { try { var data = Utils.ReadFile(ScriptFile); //read setting.json Userscript = JsonConvert.DeserializeObject <Script>(data); } catch (Exception ex) { Logger.w("Load data error", ex); } }
private void Load() { try { var data = Utils.ReadFile(FileBookmark); ListBookmark = JsonConvert.DeserializeObject <List <BookmarkItem> >(data); } catch (Exception ex) { Logger.w("Cannot Load History", ex); } }
private void Load() { try { var data = Utils.ReadFile(Filewebshell); ListWebshell = JsonConvert.DeserializeObject <List <WebshellItem> >(data); } catch (Exception ex) { Logger.w("Cannot Load History", ex); } }
private void Load() { try { var data = Utils.ReadFile(Filepass); ListPassword = JsonConvert.DeserializeObject <List <PasswordItem> >(data); } catch (Exception ex) { Logger.w("Cannot Load History", ex); } }
private void Load() { try { if (!File.Exists(downloadlog)) { var dl = JsonConvert.SerializeObject(downloads); Utils.WriteFileAsync(downloadlog, dl); } var data = Utils.ReadFile(downloadlog); downloads = JsonConvert.DeserializeObject <Dictionary <int, DownloadItem> >(data); } catch (Exception ex) { Logger.w("Cannot Load Download History", ex); } }
public string GetBanana(int i) { if (Userscript.CacheScripts && _scriptCache.ContainsKey(this[i].Path)) { return(_scriptCache[this[i].Path]); } else { string scriptcontent = Utils.ReadFile(ScriptPath + this[i].Path); var content = "function Scriptmonkey_S" + i + "_proto() {"; if (Userscript.InjectAPI && this[i].RequiresApi) { content += scriptcontent; } if (Userscript.CacheScripts) { _scriptCache.Add(this[i].Path, scriptcontent); } return(content); } }