void OnAnonymous(object sender, EventArgs e) { if (!Client.IsAuthed() && !Client.Config.AllowAnonymous) { MessageLabel.Text = "此站点不支持匿名登录"; return; } (Application.Current as App).ShowForumListPage(Client); }
private void OnItemSelected(object sender, SelectedItemChangedEventArgs e) { var item = e.SelectedItem as MasterPageItem; if (item != null) { var client = new Api.Client(item.Name, item.Config); if (client.IsAuthed()) { (Application.Current as App).ShowForumListPage(client); } else { (Application.Current as App).ShowAccountPage(client); } masterPage.ListView.SelectedItem = null; IsPresented = false; } }