public DescriptionsPlugin(
            ILoggerFacade logger,
            IUnityContainer container,
            IEventAggregator eventAggregator,
            [Import(typeof(IUrakawaSession), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            IUrakawaSession session,
            [Import(typeof(IShellView), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            IShellView shellView,
            [Import(typeof(IDescriptionsView), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            DescriptionsView view
            )
        {
            m_Logger           = logger;
            m_Container        = container;
            m_ShellView        = shellView;
            m_DescriptionsView = view;

            m_UrakawaSession  = session;
            m_EventAggregator = eventAggregator;

            CommandShowDescriptions = new RichDelegateCommand(
                Tobi_Plugin_Descriptions_Lang.CmdEditDescriptions_ShortDesc,
                Tobi_Plugin_Descriptions_Lang.CmdEditDescriptions_LongDesc,
                null, // KeyGesture obtained from settings (see last parameters below)
                m_ShellView.LoadTangoIcon(@"edit-find-replace"),
                ShowDialog,
                CanShowDialog,
                Settings_KeyGestures.Default,
                PropertyChangedNotifyBase.GetMemberName(() => Settings_KeyGestures.Default.Keyboard_EditDescriptions));

            m_ShellView.RegisterRichCommand(CommandShowDescriptions);

            //m_Logger.Log(@"DescriptionsPlugin init", Category.Debug, Priority.Medium);
        }
Пример #2
0
        public DescriptionsNavigationView(
            IEventAggregator eventAggregator,
            ILoggerFacade logger,
            [Import(typeof(IUrakawaSession), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            IUrakawaSession urakawaSession,
            [Import(typeof(IShellView), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            IShellView shellView,
            [Import(typeof(DescriptionsNavigationViewModel), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            DescriptionsNavigationViewModel viewModel,
            [Import(typeof(IDescriptionsView), RequiredCreationPolicy = CreationPolicy.Shared, AllowDefault = false)]
            DescriptionsView view
            )
        {
            m_UrakawaSession  = urakawaSession;
            m_EventAggregator = eventAggregator;
            m_Logger          = logger;

            m_ShellView = shellView;
            ViewModel   = viewModel;
            DataContext = ViewModel;

            m_DescriptionsView = view;

            InitializeComponent();
            ViewModel.SetView(this);
        }