public Result OnStartup(UIControlledApplication application)
        {
            SetupUI(application);

            if (FindSurfaceRevitPlugin.OnPluginStartUp() == false)
            {
                return(Result.Failed);
            }

            // subscribe Revit internal event callback
            application.Idling += new EventHandler <Autodesk.Revit.UI.Events.IdlingEventArgs>((sender, e) => FindSurfaceRevitPlugin.OnPluginIdling());
            application.ControlledApplication.DocumentChanged += new EventHandler <Autodesk.Revit.DB.Events.DocumentChangedEventArgs>((sender, e) => FindSurfaceRevitPlugin.OnContentChanged(e));
            application.ControlledApplication.DocumentClosing += new EventHandler <Autodesk.Revit.DB.Events.DocumentClosingEventArgs>((sender, e) => FindSurfaceRevitPlugin.OnDocumentClosing(e));

            NoticeForm form = new NoticeForm();

            form.ShowDialog();

            return(Result.Succeeded);
        }