private void ActionBookmarkIllust_Click(object sender, RoutedEventArgs e) { string uid = (sender as dynamic).Uid; try { if (uid.Equals("ActionLikeIllust", StringComparison.CurrentCultureIgnoreCase) || uid.Equals("ActionLikeIllustPrivate", StringComparison.CurrentCultureIgnoreCase) || uid.Equals("ActionUnLikeIllust", StringComparison.CurrentCultureIgnoreCase)) { IList <PixivItem> items = new List <PixivItem>(); var host = ((sender as MenuItem).Parent as ContextMenu).PlacementTarget; if (host == HistoryItems) { items = HistoryItems.GetSelectedIllusts(); } try { if (uid.Equals("ActionLikeIllust", StringComparison.CurrentCultureIgnoreCase)) { items.LikeIllust(); } else if (uid.Equals("ActionLikeIllustPrivate", StringComparison.CurrentCultureIgnoreCase)) { items.LikeIllust(false); } else if (uid.Equals("ActionUnLikeIllust", StringComparison.CurrentCultureIgnoreCase)) { items.UnLikeIllust(); } } catch (Exception ex) { ex.ERROR(); } } } catch (Exception ex) { ex.ERROR(); } }