Ejemplo n.º 1
0
        private void OnAddClick(object sender, EventArgs e)
        {
            if (this.viewModel.EntityMetadataList.Count == 0)
            {
                return;
            }


            using (var dialog = new ConfiguratorDialog2(this.messenger, this.viewModel.EntityMetadataList))
            {
                if (dialog.ShowDialog(this) != DialogResult.OK)
                {
                    return;
                }

                var memento = dialog.Memento;

                if (this.viewModel.Memento == null)
                {
                    this.viewModel.Memento = new EngineMemento();
                }

                this.viewModel.Memento.Entities.Add(memento);
                this.viewModel.RefreshMemento();
            }
        }