예제 #1
0
        protected override void OnClicked(IOfficeApplication application)
        {
			try
            {
	            var applicationState = application.ApplicationCompareState();

	            if (applicationState == OfficeApplicationReadyState.Success)
	            {
	                Utils.LaunchDeckCompare(application.ActiveDocument.FullPath);
	            }
	            else Utils.ShowErrorMessage(applicationState);
 			}
            catch (Exception e)
            {
                Logger.LogError(e);
            }
        }
예제 #2
0
        protected override void OnClicked(IOfficeApplication application)
        {
		    try
            {
	            var applicationState = application.ApplicationCompareState();

	            if (applicationState == OfficeApplicationReadyState.Success)
	            {
	                    using (var activeDocument = application.ActiveDocument)
	                {
	                    var d = new SelectDocumentsWindow(activeDocument);
                        new System.Windows.Interop.WindowInteropHelper(d).Owner = Process.GetCurrentProcess().MainWindowHandle;
	                    d.ShowDialog();
	                }
	            }
               else Utils.ShowErrorMessage(applicationState);
 			}
            catch (Exception e)
            {
                Logger.LogError(e);
            }
        }