예제 #1
0
        public void Rename()
        {
            var dialog = new RenameViewModel(this.smartSet.Name, item => this.smartSet.Category.Items.ContainsKey(item) == false);

            if (dialog.ShowDialog() == true)
            {
                this.smartSet.Name = dialog.NewName;
            }
        }
예제 #2
0
        public void Rename()
        {
            var dialog = new RenameViewModel(this.category.Name, item => this.category.Parent.Categories.ContainsKey(item) == false);

            if (dialog.ShowDialog() != true)
            {
                return;
            }

            try
            {
                this.category.Name = dialog.NewName;
            }
            catch (Exception e)
            {
                AppMessageBox.ShowError(e);
            }
        }