Пример #1
0
        private void DefinePropertyNameMessageSink(SinglePropertyViewModel currentPropVM)
        {
            if (currentPropVM.PropName == String.Empty)
            {
                return;
            }

            Int32 existingProperties =
                PropertyVMs.Count(x => x.PropName == currentPropVM.PropName);

            if (existingProperties > 1 && PropertyVMs.Count > 1)
            {
                PropertyVMs.Remove(currentPropVM);
                messageBoxService.ShowError("That Property Name is in use elsewhere, please retry");
            }
        }
Пример #2
0
 /// <summary>
 /// Executes the AddNewPropertyCommand
 /// </summary>
 private void ExecuteAddNewPropertyCommand()
 {
     PropertyVMs.Add(new SinglePropertyViewModel());
 }
Пример #3
0
 private void RemovePropertyMessageSink(SinglePropertyViewModel propertyToRemove)
 {
     PropertyVMs.Remove(propertyToRemove);
 }