示例#1
0
        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;
            }
        }
示例#2
0
        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);
            }
        }