private void Mnu_reGroupData_Click(object sender, RoutedEventArgs e) { MessageBoxResult result = MessageBox.Show("Regrouping the set can remove any groups that you have created thus far, do you want to proceed?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Stop); if (result == MessageBoxResult.Yes) { CarboSettings settings = new CarboSettings().Load(); //CarboGroupSettings groupSettings = new CarboGroupSettings(); //groupSettings = groupSettings.DeSerializeXML(); GroupWindow importGroupWindow = new GroupWindow(CarboLifeProject.getAllElements, CarboLifeProject.CarboDatabase, settings); importGroupWindow.ShowDialog(); if (importGroupWindow.dialogOk == true) { //Save non-element items; ObservableCollection <CarboGroup> userGroups = new ObservableCollection <CarboGroup>(); userGroups = CarboLifeProject.GetGroupsWithoutElements(); CarboLifeProject.SetGroups(importGroupWindow.carboGroupList); CarboLifeProject.AddGroups(userGroups); refreshData(); } } }