private void Add(CustomLogFileFormat customFormat) { var viewModel = new CustomFormatViewModel(_serviceContainer, _settings, _plugin, _encodings, customFormat); viewModel.RemoveCommand = new DelegateCommand2(() => Remove(viewModel)); _formats.Add(viewModel); }
private void Remove(CustomFormatViewModel viewModel) { _formats.Remove(viewModel); _settings.CustomFormats.Remove(viewModel.CustomFormat); }