From debbb97a893601d61d79ab8db759df6b6179f9ea Mon Sep 17 00:00:00 2001 From: tobiichiamane Date: Wed, 4 Dec 2019 19:37:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=9E=E6=8E=89Spam=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=87=BA=E7=8E=B0=E7=9A=84=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PixivFSUWP/MainPage.xaml.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/PixivFSUWP/MainPage.xaml.cs b/PixivFSUWP/MainPage.xaml.cs index 54ac0bc..adbf778 100644 --- a/PixivFSUWP/MainPage.xaml.cs +++ b/PixivFSUWP/MainPage.xaml.cs @@ -190,10 +190,15 @@ private void BtnMe_Click(object sender, RoutedEventArgs e) private async void BtnSearch_Click(object sender, RoutedEventArgs e) { - if (ContentFrame.Content is SearchPage) - await (ContentFrame.Content as SearchPage).ShowSearch(); - else - ContentFrame.Navigate(typeof(SearchPage)); + try + { + if (ContentFrame.Content is SearchPage) + await (ContentFrame.Content as SearchPage).ShowSearch(); + else + ContentFrame.Navigate(typeof(SearchPage)); + } + //吞掉异常,这个异常没有意义 + catch { } } public void UpdateNavButtonState()