using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using TwitterClient.ViewModel;
using System.ComponentModel;
using TwitterClient.Model;

namespace TwitterClient
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private TwitterViewModel viewModel;
        private TimeLines timeLine = TimeLines.UserTimeline;
        public MainWindow()
        {
            InitializeComponent();
            viewModel = (TwitterViewModel)this.DataContext;
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            viewModel.loadUserTweets(timeLine);
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            viewModel.updateTwitter(timeLine);
            textBox1.Text = null;
        }        

        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            InfoDialogBox dialog = new InfoDialogBox();
            dialog.ShowDialog();
        }
    }
}
