예제 #1
0
 public void DidChangeValue(RenameDialog dialog, string value)
 {
     if (controllerDelegate != null)
     {
         int    selectedIndex = controllerDelegate.GetIndexOfSelectedItem(this);
         string originalValue = controllerDelegate.GetTitleForItemAtIndex(this, selectedIndex);
         if (!controllerDelegate.IsNameAvailable(this, value) && value != originalValue)
         {
             dialog.ShowErrorMessage("This name is already used.");
         }
         else
         {
             dialog.ResetErrors();
         }
     }
 }