Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
SirSparkles committed May 5, 2021
1 parent 0e7a12d commit fdebe00
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions TVRename/Forms/UI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1066,14 +1066,14 @@ private void UI_FormClosing(object sender, FormClosingEventArgs e)
private void ChooseSiteMenu([NotNull] ToolStripSplitButton btn)
{
btn.DropDownItems.Clear();
Searchers searchers = GetUsedSearchers();
btn.DropDownItems.AddRange(GetUsedSearchers().Where(engine => engine.Name.HasValue()).Select(CreateSearcherMenuItem).ToArray());
}

foreach (SearchEngine search in searchers.Where(engine => engine.Name.HasValue()))
{
ToolStripMenuItem tsi = new ToolStripMenuItem(search.Name) {Tag = search};
tsi.Font = new Font(tsi.Font.FontFamily,9,FontStyle.Regular);
btn.DropDownItems.Add(tsi);
}
private static ToolStripItem CreateSearcherMenuItem(SearchEngine search)
{
ToolStripMenuItem tsi = new ToolStripMenuItem(search.Name) {Tag = search};
tsi.Font = new Font(tsi.Font.FontFamily, 9, FontStyle.Regular);
return tsi;
}

private void FillMyShows()
Expand Down Expand Up @@ -3847,11 +3847,11 @@ private void UpdateActionCheckboxes()
SetCheckbox(mcbAll, all.Actions, chk.OfType<Action>());
}

private IEnumerable<Item> RenameActions(IEnumerable<Item> all)
private static IEnumerable<Item> RenameActions(IEnumerable<Item> all)
{
return all.Where(a =>
(a is ActionCopyMoveRename cmr && cmr.Operation == ActionCopyMoveRename.Op.rename) ||
(a is ActionMoveRenameDirectory));
a is ActionCopyMoveRename {Operation: ActionCopyMoveRename.Op.rename} ||
a is ActionMoveRenameDirectory);
}

private static void SetCheckbox([NotNull] ToolStripMenuItem box,[NotNull] IEnumerable<Item> all, [NotNull] IEnumerable<Item> chk)
Expand Down

0 comments on commit fdebe00

Please sign in to comment.