Beispiel #1
0
        private void AddStep()
        {
            var vm  = new AddStepViewModel(Recipe);
            var win = new AddStepWindow()
            {
                DataContext = vm
            };

            if (win.ShowDialog() ?? false)
            {
                Recipe.Steps.Add(vm.Step);
            }
        }
Beispiel #2
0
        private void AddStep()
        {
            var vm  = new AddStepViewModel(SelectedRecipe);
            var win = new AddStepWindow()
            {
                DataContext = vm
            };

            if (win.ShowDialog() ?? false)
            {
                SelectedRecipe.Steps.Add(vm.Step);
                SqliteDBManager.Instance.SaveDBChanges();
            }
        }