Subversion Repositories SoapBoxCore

Rev

Rev 8 | Rev 13 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8 Rev 12
Line 37... Line 37...
37
using System.Collections.ObjectModel;
37
using System.Collections.ObjectModel;
38
using System.Windows;
38
using System.Windows;
39
 
39
 
40
namespace SoapBox.Core.Workbench
40
namespace SoapBox.Core.Workbench
41
{
41
{
42
    [Export("/Workbench/MainMenu", typeof(IMenuItem))]
42
    [Export(ExtensionPoints.Workbench.MainMenu.Self, typeof(IMenuItem))]
43
    class HelpMenu : AbstractMenuItem
43
    class HelpMenu : AbstractMenuItem, IPartImportsSatisfiedNotification
44
    {
44
    {
45
        [ImportingConstructor]
-
 
46
        public HelpMenu(
45
        public HelpMenu()
47
            [Import("/Services/ExtensionService")] IExtensionService extensionService,
-
 
48
            [ImportMany("/Workbench/MainMenu/HelpMenu", typeof(IMenuItem))] IEnumerable<IMenuItem> menu)
-
 
49
        {
46
        {
50
            ID = "Help";
47
            ID = "Help";
51
            Header = Resources.Strings.Workbench_MainMenu_Help;
48
            Header = Resources.Strings.Workbench_MainMenu_Help;
52
            Items = extensionService.Sort(menu);
-
 
53
            InsertRelativeToID = "Window";
49
            InsertRelativeToID = "Window";
54
            BeforeOrAfter = RelativeDirection.After;
50
            BeforeOrAfter = RelativeDirection.After;
-
 
51
        }
-
 
52
 
-
 
53
        [Import(Services.Host.ExtensionService)]
-
 
54
        private IExtensionService extensionService { get; set; }
-
 
55
 
-
 
56
        [ImportMany(ExtensionPoints.Workbench.MainMenu.HelpMenu, typeof(IMenuItem), AllowRecomposition=true)]
-
 
57
        private IEnumerable<IMenuItem> menu { get; set; }
-
 
58
 
-
 
59
        public void OnImportsSatisfied()
-
 
60
        {
-
 
61
            Items = extensionService.Sort(menu);
55
        }
62
        }
56
    }
63
    }
57
}
64
}
58
 
65