Пример #1
0
        public ApnItem(Message message, AccountAppDotNet account)
        {
            this.receivingAccount = account;
            apnMessage            = message;
            this.Text             = message.text;
            this.entities         = message.entities;
            isMessage             = true;
            isPrivateMessage      = true;

            scanForImages(message.annotations);
            ApnItemInit();
        }
Пример #2
0
        public ApnItem(Post post, AccountAppDotNet account)
        {
            this.receivingAccount = account;
            if (post == null)
            {
                return;
            }
            apnItem       = post;
            this.entities = post.entities;
            if (apnItem.repost_of != null)
            {
                isRepost      = true;
                this.entities = apnItem.repost_of.entities;
                this.entities = post.repost_of.entities;
                scanForImages(post.repost_of.annotations);
            }
            else
            {
                scanForImages(post.annotations);
            }

            ApnItemInit();
        }
Пример #3
0
 static void apnAuthProcess_AuthSuccess(object sender, AppNetDotNet.AuthorizationWindow.AuthEventArgs e)
 {
     if (e != null)
     {
         if (e.success)
         {
             AccountAppDotNet account = new AccountAppDotNet();
             account.accessToken = e.accessToken;
             if (account.verifyCredentials())
             {
                 AppController.Current.AllAccounts.Add(account);
                 account.UpdateItems();
             }
             else
             {
                 System.Windows.MessageBox.Show(":(", "Authorization failed");
             }
         }
         else
         {
             System.Windows.MessageBox.Show(e.error, "Authorization failed");
         }
     }
 }