private void ShowUsageReportingPrompt(Window ownerWindow)
        {
            // If an owner window is not supplied, then we will fallback onto 
            // using the application's main window. In native host application
            // scenario (e.g. Revit), the "Application.Current" will be "null".
            // The owner window is important so that usage report window always 
            // get shown on top of the owner window, otherwise it is possible 
            // for usage report window to show up in the background (behind all
            // other full screen windows), and Dynamo main window will appear 
            // to be frozen because control cannot return to it.
            // 
            if (ownerWindow == null && (null != Application.Current))
                ownerWindow = Application.Current.MainWindow;

            var usageReportingPrompt = new UsageReportingAgreementPrompt(resourceProvider, dynamoViewModel)
            {
                Owner = ownerWindow
            };
            usageReportingPrompt.Loaded += UsageReportingPromptLoaded;
            usageReportingPrompt.ShowDialog();
            usageReportingPrompt.Loaded -= UsageReportingPromptLoaded;
        }
        private static void ShowUsageReportingPrompt()
        {
            UsageReportingPrompt = new UsageReportingAgreementPrompt();
            if (null != Application.Current)
                UsageReportingPrompt.Owner = Application.Current.MainWindow;

            UsageReportingPrompt.ShowDialog();
        }