Skip to content

Commit

Permalink
more rescan menu
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaier committed Oct 20, 2014
1 parent 320171b commit b34483a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions SimpleDLNA/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,12 @@ private void notifyContext_Opening(object sender,
continue;
}
var innerItem = item;
var sm = new ToolStripMenuItem(item.Text) { Tag = innerItem };
var rescan = sm.DropDownItems.Add("Rescan");
rescan.Click += (s, a) =>
var menuItem =
new ToolStripMenuItem(String.Format("Rescan {0}", item.Text)) {
Tag = innerItem,
Image = Properties.Resources.refreshing
};
menuItem.Click += (s, a) =>
{
try {
innerItem.Rescan();
Expand All @@ -429,7 +432,7 @@ private void notifyContext_Opening(object sender,
// no op
}
};
items.Add(sm);
items.Add(menuItem);
}
items.Reverse();
var idx = notifyContext.Items.IndexOf(ContextSeperatorPre) + 1;
Expand Down

0 comments on commit b34483a

Please sign in to comment.