diff --git a/Pages/MailPage.xaml.cs b/Pages/MailPage.xaml.cs index 0bbb11a..f67324a 100644 --- a/Pages/MailPage.xaml.cs +++ b/Pages/MailPage.xaml.cs @@ -62,41 +62,6 @@ protected override async void OnNavigatedTo(NavigationEventArgs e) // 处理传递过来的参数 this.tag = (string)e.Parameter; // 在这里添加你的逻辑 - - } - - - if (this.loginStatus.userData != null) - { - this.listview.ItemsSource = this.loginStatus.userData.letters; - await this.loginStatus.userData.CollectLetter(); - - } - timer.Start(); - } - - - protected override void OnNavigatedFrom(NavigationEventArgs e) - { - base.OnNavigatedFrom(e); - - // 停止定时器,释放资源 - timer.Stop(); - } - - private void listview_ItemClick(object sender, ItemClickEventArgs e) - { - // 获取点击的项的数据 - Models.Letter clickedItem = e.ClickedItem as Models.Letter; - - // 处理点击事件,例如显示一个消息框 - if (clickedItem != null) - { - this.textblock_area.Text = clickedItem.TextBody; - } - else - { - this.textblock_area.Text = @"Error!"; } } } diff --git a/Services/LoginStatus.cs b/Services/LoginStatus.cs index 6f255d6..1e00f86 100644 --- a/Services/LoginStatus.cs +++ b/Services/LoginStatus.cs @@ -10,9 +10,8 @@ namespace MicaApps.Upw.Mail.Services internal class LoginStatus { public Models.UserData userData { get; set; } - - public bool IsLogin { get=>this.userData != null && this.userData.IsLogin;} + public bool IsLogin { get=>this.userData != null && this.userData.IsLogin;} }