Ejemplo n.º 1
0
        private void AddQuickInfo()
        {
            var id             = Guid.NewGuid();
            var viewConfig     = new QuickInfoViewConfiguration();
            var analyserConfig = new QuickInfoConfiguration();
            var viewModel      = new QuickInfoViewModel(id, viewConfig, analyserConfig);

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

            _viewConfiguration.Titles.Add(id, viewConfig);
            _analyserConfiguration.QuickInfos.Add(id, analyserConfig);
            _quickInfosById.Add(id, viewModel);
            _quickInfos.Add(viewModel);
        }
Ejemplo n.º 2
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);
 }