/*private IEnumerable<StartupEntryBase> VisibleItems * { * get { return listView1.Items.Cast<ListViewItem>().Select(x => x.Tag as StartupEntryBase); } * }*/ /// <summary> /// Show startup manager dialog. Returns latest startup entry list. /// </summary> /// <param name="owner">Parent form</param> public static IEnumerable <StartupEntryBase> ShowManagerDialog(Form owner) { using (var window = new StartupManagerWindow()) { if (owner != null) { window.StartPosition = FormStartPosition.CenterParent; window.Icon = owner.Icon; } window.ShowDialog(owner); return(window.AllItems); } }
public static StartupManagerWindow ShowManagerWindow() { var window = new StartupManagerWindow(); try { window.Icon = ProcessTools.GetIconFromEntryExe(); } catch (Exception e) { Console.WriteLine(e); } return(window); }