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(); }
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(); }
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"); } } }