Exemplo n.º 1
0
        public FrmTagWizard([NotNull] TagWizardViewModel viewModel)
        {
            InitializeComponent();
            _viewModel = viewModel ?? throw new ArgumentNullException(nameof(viewModel));
            ;
            ViewModelBindingSource.DataSource = _viewModel;

            TagsGrid.DoubleClick += TableDoubleClick;
        }
Exemplo n.º 2
0
        private void AddTagButton_Click(object sender, EventArgs e)
        {
            var tagWizardViewModel = new TagWizardViewModel(DreamTagParser.ParseStringToDreamTags(_viewModel.Tags),
                                                            _tagStatistics);
            var wizard = new FrmTagWizard(tagWizardViewModel);
            var result = wizard.ShowDialog();

            if (result == DialogResult.OK)
            {
                _viewModel.Tags = tagWizardViewModel.TagsToAdd;
            }
        }