protected internal override bool RaiseClosingEvent(int buttonId)
        {
            TaskDialogClosingEventArgs args;

            if ((int)TaskDialogCommonButtons.MinCustomControlId <= buttonId)
            {
                var control = FindButton(buttonId);
                if (control == null)
                {
                    throw new InvalidOperationException(Properties.DialogErrorMessages.TaskDialogInvalidateButtonId);
                }

                args = TaskDialogClosingEventArgs.Create(control);
            }
            else
            {
                args = TaskDialogClosingEventArgs.Create((TaskDialogCommonButtons)buttonId);
            }

            OnClosing(args);
            return(!args.Cancel);
        }
 protected virtual void OnClosing(TaskDialogClosingEventArgs args)
 {
     this.Closing?.Invoke(this, args);
 }