private void OnQuickInfoRemoved(QuickInfoViewModel viewModel) { var id = viewModel.Id; _quickInfosById.Remove(id); _quickInfos.Remove(viewModel); _viewConfiguration.Titles.Remove(id); _analyserConfiguration.QuickInfos.Remove(id); viewModel.OnRemoved -= OnQuickInfoRemoved; }
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); }