Esempio n. 1
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);
        }
Esempio n. 2
0
        private void display(string input)
        {
            LoadFromJson lfj = new LoadFromJson();

            switch (input[0])
            {
            case 'S':
            case 's':
                Sms sms = lfj.loadSms(input);
                lblHeaderOutput.Content = sms.header;
                lblTypeOutput.Content   = "SMS";
                lblSenderOutput.Content = sms.sender;
                lblBodyOutput.Text      = sms.text;
                break;

            case 'T':
            case 't':
                Tweet tweet = lfj.loadTweet(input);
                lblHeaderOutput.Content = tweet.header;
                lblTypeOutput.Content   = "Tweet";
                lblSenderOutput.Content = tweet.sender;
                lblBodyOutput.Text      = tweet.text;
                break;

            case 'E':
            case 'e':
                Email email = lfj.loadEmail(input);
                lblNoiOutput.Content      = email.incidentNature;
                lblSirOutput.Content      = email.subject;
                lblSortCodeOutput.Content = email.sortCode;
                lblHeaderOutput.Content   = email.header;
                lblTypeOutput.Content     = "Email";
                lblSenderOutput.Content   = email.sender;
                lblBodyOutput.Text        = email.text;
                break;

            default:
                MessageBox.Show("Incorrect Input");
                break;
            }
        }
Esempio n. 3
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
            {
            }
        }