Advertisement
ZelAnton

Untitled

Nov 18th, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. public PrintController PrintController {
  2. get {
  3. IntSecurity.SafePrinting.Demand();
  4.  
  5. if (printController == null) {
  6. printController = new StandardPrintController();
  7. new ReflectionPermission(PermissionState.Unrestricted).Assert();
  8. try {
  9. try {
  10. // SECREVIEW 332064: this is here because System.Drawing doesnt want a dependency on
  11. // System.Windows.Forms. Since this creates a public type in another assembly, this
  12. // appears to be OK.
  13. Type type = Type.GetType("System.Windows.Forms.PrintControllerWithStatusDialog, " + AssemblyRef.SystemWindowsForms);
  14. printController = (PrintController) Activator.CreateInstance(type,
  15. BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.CreateInstance,
  16. null, new object[] { printController}, null);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement