예제 #1
0
 private void ApplyBtn_Click(object sender, RoutedEventArgs e)
 {
     if (UserCookieCollection == null)
     {
         MoblieLoginWindow moblieLoginWindow = new MoblieLoginWindow(this);
         moblieLoginWindow.LoggedIn += MoblieLoginWindow_LoggedIn;
         moblieLoginWindow.Canceled += MoblieLoginWindow_Canceled;
         moblieLoginWindow.Show();
         ApplyBtn.Content   = LoginString;
         ApplyBtn.IsEnabled = false;
     }
     else
     {
         ApplyDrawing();
     }
 }
예제 #2
0
 private void LoginBtn_Click(object sender, RoutedEventArgs e)
 {
     if (LoginBtn.Content.ToString() == "登录")
     {
         MoblieLoginWindow moblieLoginWindow = new MoblieLoginWindow(this);
         moblieLoginWindow.LoggedIn += MoblieLoginWindow_LoggedIn;
         moblieLoginWindow.Canceled += MoblieLoginWindow_Canceled;
         moblieLoginWindow.Show();
         LoginBtn.Content = "登录中...";
     }
     else if (LoginBtn.Content.ToString() == "登出")
     {
         BiliApi.CookieCollection = null;
         ConfigUtil.ConfigManager.SetCookieCollection(null);
         UserInfoBox.Text            = string.Empty;
         UserFaceImage.Source        = null;
         ShowFavoritesBtn.Visibility = Visibility.Collapsed;
         LoginBtn.Content            = "登录";
     }
 }