public void Add(string title, string url, string pwd) { WebshellItem h = new WebshellItem(); h.Title = title; h.Url = url; h.Pwd = pwd; ListWebshell.Add(h); Save(); }
public Webshell() { if (!File.Exists(Filewebshell)) { WebshellItem h = new WebshellItem(); h.Title = "Google"; h.Url = "https:\\www.google.com"; h.Pwd = "satria89"; ListWebshell.Add(h); var webshell = JsonConvert.SerializeObject(ListWebshell); Utils.WriteFileAsync(Filewebshell, webshell); } else { Load(); } }