private void AddQuickInfo(Guid id, QuickInfoViewConfiguration viewConfig, QuickInfoConfiguration analyserConfig)
        {
            var viewModel = new QuickInfoViewModel(id, viewConfig, analyserConfig);

            viewModel.OnRemoved += OnQuickInfoRemoved;
            viewModel.IsEditing  = IsEditing;

            _quickInfosById.Add(id, viewModel);
            _quickInfos.Add(viewModel);
        }
        private void AddQuickInfo()
        {
            var id             = Guid.NewGuid();
            var viewConfig     = new QuickInfoViewConfiguration(id);
            var analyserConfig = new QuickInfoConfiguration(id);

            AddQuickInfo(id, viewConfig, analyserConfig);

            _viewConfiguration.Add(viewConfig);
            _analyserConfiguration.Add(analyserConfig);

            EmitTemplateModified();
        }
Ejemplo n.º 3
0
        public QuickInfoViewModel(Guid id, QuickInfoViewConfiguration viewConfig, QuickInfoConfiguration analyserConfig)
        {
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }
            if (viewConfig == null)
            {
                throw new ArgumentNullException(nameof(viewConfig));
            }
            if (analyserConfig == null)
            {
                throw new ArgumentNullException(nameof(analyserConfig));
            }

            _id             = id;
            _viewConfig     = viewConfig;
            _analyserConfig = analyserConfig;
            _removeCommand  = new DelegateCommand2(Remove);
            _formatter      = new QuickInfoFormatter(analyserConfig);
        }
 public void Add(QuickInfoViewConfiguration config)
 {
     _titles.Add(config.Id, config);
 }