Exemplo n.º 1
0
        private void ButtonAdd_Click(object sender, RoutedEventArgs e)
        {
            if (_vm == null)
            {
                return;
            }
            var           engine = new EngineViewModel();
            AddEngineForm form   = new AddEngineForm(OsLocalization.Entity.BtnAdd, engine, _vm.Engines.ToList());
            var           result = form.ShowDialog();

            if (result.HasValue && result.Value == true)
            {
                _vm.AddEngine(engine);
            }
            ChangeContext();
        }