protected virtual void OnSaveImage(SaveImageEventArgs e) { if (SaveImage != null) { SaveImage(this, e); } }
private void btnOK_Click(object sender, RoutedEventArgs e) { // get the file name string fileName = txtImageName.Text + ".png"; bool overwrite = chkbOverwrite.IsChecked.Value; SaveImageEventArgs eArgs = new SaveImageEventArgs(Path, fileName, overwrite); OnSaveImage(eArgs); this.Close(); }