private void NameBoxTextChanged(object sender, EventArgs e) { var ea = new ImageNameChangedEventArgs(ImageName); if (ImageNameChanged != null) ImageNameChanged(this, ea); _okButton.Enabled = !ea.Cancel; }
private void NameBoxTextChanged(object sender, EventArgs e) { var ea = new ImageNameChangedEventArgs(ImageName); if (ImageNameChanged != null) { ImageNameChanged(this, ea); } _okButton.Enabled = !ea.Cancel; }
void ImageNameForm_ImageNameChanged(object sender, ImageNameChangedEventArgs e) { e.Cancel = !IsNameValid(e.ImageName) || _rootFolder.HasImage(e.ImageName); }