代码优化
This commit is contained in:
@@ -1399,7 +1399,7 @@ namespace Ink_Canvas.Windows
|
||||
System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance);
|
||||
presentation = currentPresentationProperty?.GetValue(pptManager) as Microsoft.Office.Interop.PowerPoint.Presentation;
|
||||
}
|
||||
catch { }
|
||||
catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); }
|
||||
|
||||
// 如果 CurrentPresentation 不可用,尝试 GetCurrentActivePresentation
|
||||
if (presentation == null)
|
||||
@@ -1409,7 +1409,7 @@ namespace Ink_Canvas.Windows
|
||||
var getCurrentActivePresentationMethod = pptManager.GetType().GetMethod("GetCurrentActivePresentation");
|
||||
presentation = getCurrentActivePresentationMethod?.Invoke(pptManager, null) as Microsoft.Office.Interop.PowerPoint.Presentation;
|
||||
}
|
||||
catch { }
|
||||
catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); }
|
||||
}
|
||||
|
||||
if (presentation != null)
|
||||
|
||||
Reference in New Issue
Block a user