public Tweet(string header, string body, StoredLists list) { this.header = header; this.body = body; this.list = list; id = header; hashtag = new List <string>(); mentions = new List <string>(); }
public void loadLists() { try { sl = lfj.loadLists(); } catch { MessageBox.Show("No Lists to show"); } }
public Message() { header = ""; body = ""; id = ""; text = ""; sender = ""; splitBody = new string[0]; lenghtCheck = ""; list = new StoredLists(); }
private void btnRefresh_Click(object sender, RoutedEventArgs e) { l = new StoredLists(); LoadFromJson lfj = new LoadFromJson(); l = lfj.loadLists(); lblTrendingOutput.Content = createListsForPrint(orderTrending()); lblMentionsOutput.Content = createListsForPrint(l.mentions); lblSirOutput1.Content = createListsForPrint(l.sir); lblNoiOutput1.Content = createListsForPrint(l.noi); }
public StoredLists loadLists() { string file = listsFolder + "\\lists.json"; using (StreamReader sr = new StreamReader(file)) { string json = sr.ReadToEnd(); JavaScriptSerializer jss = new JavaScriptSerializer(); StoredLists list = jss.Deserialize <StoredLists>(json); return(list); } }
public Email(string header, string body, StoredLists list) { this.header = header; this.body = body; this.list = list; id = header; subject = ""; sortCode = ""; incidentNature = ""; sir = false; quarantine = new List <string>(); sirList = new List <string>(); noiList = new List <string>(); }
/// <summary> /// creates filename with file path /// reads in file and adds to list class /// adds to the list /// uses streamwriter to write to file with new lists /// </summary> /// <param name="lists"></param> public void saveLists(StoredLists lists) { string file = listsFolder + "\\lists.json"; StoredLists readList = new StoredLists(); try { using (StreamReader sr = new StreamReader(file)) { string json = sr.ReadToEnd(); JavaScriptSerializer jss = new JavaScriptSerializer(); readList = jss.Deserialize <StoredLists>(json); } foreach (string m in lists.mentions) { readList.mentions.Add(m); } foreach (string t in lists.trending) { readList.trending.Add(t); } foreach (string s in lists.sir) { readList.sir.Add(s); } foreach (string id in lists.ids) { readList.ids.Add(id); } } catch { readList = lists; } using (StreamWriter sw = new StreamWriter(file)) { JavaScriptSerializer jss = new JavaScriptSerializer(); sw.Write(jss.Serialize(readList)); sw.Close(); } }
public MainWindow() { InitializeComponent(); displayCount = 0; try { l = new StoredLists(); LoadFromJson lfj = new LoadFromJson(); l = lfj.loadLists(); orderTrending(); lblTrendingOutput.Content = createListsForPrint(orderTrending()); lblMentionsOutput.Content = createListsForPrint(l.mentions); lblSirOutput1.Content = createListsForPrint(l.sir); lblNoiOutput1.Content = createListsForPrint(l.noi); } catch { } }
private void addToLists() { StoredLists lists = new StoredLists(); }