Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            HttpConnectionClass token = null;
            int logged_in             = 1;

            try
            {
                token = new HttpConnectionClass(GetToken.getAuthClass());
            }
            catch
            {
                logged_in = 0;
                LoginWindow window = new LoginWindow();
                window.Show();
            }
            if (logged_in == 1)
            {
                string baseuri  = "https://" + token.auth.server;
                var    tootlist = StatusClass_new.GetTimeline(token);
                for (int i = 0; i < tootlist.Length - 1; i++)
                {
                    Toot toot;
                    toot = new Toot(tootlist[i]);
                    Toots.Items.Insert(0, toot);
                }
            }
        }
Ejemplo n.º 2
0
 private void Favorites_Click(object sender, RoutedEventArgs e)
 {
     StatusClass.favourite_toot(toot.id, GetToken.getAuthClass());
     Favorites.Foreground = new SolidColorBrush(Colors.Yellow);
 }
Ejemplo n.º 3
0
 private void Retoot_Click(object sender, RoutedEventArgs e)
 {
     StatusClass.boost_toot(toot_id, GetToken.getAuthClass());
     Retoot.Foreground = new SolidColorBrush(Colors.Green);
 }