private void btn_AddDyCEBag(object sender, System.Windows.RoutedEventArgs e) { var nameDialog = new NewDyCEBagWindow(); if (nameDialog.ShowDialog() != true) return; var newBag = new DyCEBag {Name = nameDialog.Result}; DB.Instance.Add(newBag); _vm.Bag = newBag; }
/// <summary> /// Function that adds a DyCEBag to the DyCEBag list. /// </summary> /// <param name="bag">The DyCEBag object to be added.</param> public void Add(DyCEBag bag) { DyCEBags.Add(bag); }