示例#1
0
 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>();
 }
示例#2
0
 public void loadLists()
 {
     try
     {
         sl = lfj.loadLists();
     }
     catch
     {
         MessageBox.Show("No Lists to show");
     }
 }
示例#3
0
 public Message()
 {
     header      = "";
     body        = "";
     id          = "";
     text        = "";
     sender      = "";
     splitBody   = new string[0];
     lenghtCheck = "";
     list        = new StoredLists();
 }
示例#4
0
        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);
        }
示例#5
0
        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);
            }
        }
示例#6
0
 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>();
 }
示例#7
0
        /// <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();
            }
        }
示例#8
0
        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
            {
            }
        }
示例#9
0
 private void addToLists()
 {
     StoredLists lists = new StoredLists();
 }