public void Edit() { var dialog = new SmartSetEditViewModel(this.SmartSet.RuleItems, this.browser.Rules) { SmartSetName = this.smartSet.Name, }; if (dialog.ShowDialog() == true) { this.smartSet.RuleItems = dialog.RuleItems; } }
public void NewSmartSet() { var dialog = new SmartSetEditViewModel(this.browser.Rules); if (dialog.ShowDialog() != true) { return; } try { var smartSet = this.category.CreateItem(dialog.SmartSetName); smartSet.RuleItems = dialog.RuleItems; } catch (Exception e) { AppMessageBox.ShowError(e); } }