コード例 #1
0
        private void Add(CustomLogFileFormat customFormat)
        {
            var viewModel = new CustomFormatViewModel(_serviceContainer,
                                                      _settings,
                                                      _plugin,
                                                      _encodings,
                                                      customFormat);

            viewModel.RemoveCommand = new DelegateCommand2(() => Remove(viewModel));
            _formats.Add(viewModel);
        }
コード例 #2
0
 private void Remove(CustomFormatViewModel viewModel)
 {
     _formats.Remove(viewModel);
     _settings.CustomFormats.Remove(viewModel.CustomFormat);
 }