Skip to content

Instantly share code, notes, and snippets.

@johnpierson
Created September 6, 2019 02:09
Show Gist options
  • Save johnpierson/ef420d0a42bac1c51c1c747ef36a2aef to your computer and use it in GitHub Desktop.
Save johnpierson/ef420d0a42bac1c51c1c747ef36a2aef to your computer and use it in GitHub Desktop.
public Result OnStartup(UIControlledApplication a)
{
a.ControlledApplication.FileImporting += ControlledApplicationOnFileImporting;
return Result.Succeeded;
}
private void ControlledApplicationOnFileImporting(object sender, FileImportingEventArgs e)
{
TaskDialog.Show("Alert", "Sorry about that. No CAD import for you.");
e.Cancel();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment