コード例 #1
0
        public LoggerViewModel(IUnityContainer container, AbstractWorkspace workspace)
        {
            _workspace = workspace;
            _container = container;
            Name       = "Logger";
            Title      = "Logger";
            ContentId  = "Logger";
            _model     = new LoggerModel();
            Model      = _model;
            IsVisible  = false;

            _view             = new LoggerView();
            _view.DataContext = _model;
            View = _view;

            _aggregator = _container.Resolve <IEventAggregator>();
            _aggregator.GetEvent <LogEvent>().Subscribe(AddLog);
        }
コード例 #2
0
ファイル: LoggerViewModel.cs プロジェクト: vinodj/Wide
        public LoggerViewModel(IUnityContainer container, AbstractWorkspace workspace)
        {
            _workspace = workspace;
            _container = container;
            Name = "Logger";
            Title = "Logger";
            ContentId = "Logger";
            _model = new LoggerModel();
            Model = _model;
            IsVisible = false;

            _view = new LoggerView();
            _view.DataContext = _model;
            View = _view;

            _aggregator = _container.Resolve<IEventAggregator>();
            _aggregator.GetEvent<LogEvent>().Subscribe(AddLog);
        }