The Labs \ Source Viewer \ SSCLI \ System.ComponentModel.Design \ ActiveDesignerEventArgs

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ActiveDocumentEvent.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. /*
  16. */
  17. namespace System.ComponentModel.Design
  18. {
  19.     using System;
  20.     using System.ComponentModel;
  21.     using System.Diagnostics;
  22.     using System.Security.Permissions;
  23.     using Microsoft.Win32;
  24.    
  25.     /// <devdoc>
  26.     /// <para>Provides data for the <see cref='System.ComponentModel.Design.IDesignerEventService.ActiveDesigner'/>
  27.     /// event.</para>
  28.     /// </devdoc>
  29.     [HostProtection(SharedState = true)]
  30.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name = "FullTrust")]
  31.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]
  32.     public class ActiveDesignerEventArgs : EventArgs
  33.     {
  34.         /// <devdoc>
  35.         /// The document that is losing activation.
  36.         /// </devdoc>
  37.         private readonly IDesignerHost oldDesigner;
  38.        
  39.         /// <devdoc>
  40.         /// The document that is gaining activation.
  41.         /// </devdoc>
  42.         private readonly IDesignerHost newDesigner;
  43.        
  44.         /// <devdoc>
  45.         /// <para>Initializes a new instance of the <see cref='System.ComponentModel.Design.ActiveDesignerEventArgs'/>
  46.         /// class.</para>
  47.         /// </devdoc>
  48.         public ActiveDesignerEventArgs(IDesignerHost oldDesigner, IDesignerHost newDesigner)
  49.         {
  50.             this.oldDesigner = oldDesigner;
  51.             this.newDesigner = newDesigner;
  52.         }
  53.        
  54.         /// <devdoc>
  55.         /// <para>
  56.         /// Gets or
  57.         /// sets the document that is losing activation.
  58.         /// </para>
  59.         /// </devdoc>
  60.         public IDesignerHost OldDesigner {
  61.             get { return oldDesigner; }
  62.         }
  63.        
  64.         /// <devdoc>
  65.         /// <para>
  66.         /// Gets or
  67.         /// sets the document that is gaining activation.
  68.         /// </para>
  69.         /// </devdoc>
  70.         public IDesignerHost NewDesigner {
  71.             get { return newDesigner; }
  72.         }
  73.        
  74.     }
  75. }

Developer Fusion