Exemplo n.º 1
0
		} // end private void BuildOnInitMethod(System.CodeDom.CodeTypeDeclaration typeDeclaration)
		
		/// <summary>
		/// Build the code-behind InitializeComponent method.
		/// </summary>
		/// <param name="typeDeclaration"></param>
		private void BuildInitializeComponentMethod(System.CodeDom.CodeTypeDeclaration typeDeclaration)
		{
			System.CodeDom.CodeMemberMethod codeMethodInitializeComponent;
			System.CodeDom.CodeAttachEventStatement attachEventStatement;
			codeMethodInitializeComponent = new System.CodeDom.CodeMemberMethod();
			codeMethodInitializeComponent.Name = "InitializeComponent";
			attachEventStatement = new System.CodeDom.CodeAttachEventStatement();
			attachEventStatement.Event = new System.CodeDom.CodeEventReferenceExpression(new System.CodeDom.CodeThisReferenceExpression(), "Load");
			attachEventStatement.Listener = new System.CodeDom.CodeDelegateCreateExpression(new System.CodeDom.CodeTypeReference(typeof(System.EventHandler)), new System.CodeDom.CodeThisReferenceExpression(), "Page_Load");
			codeMethodInitializeComponent.Statements.Add(attachEventStatement);
			typeDeclaration.Members.Add(codeMethodInitializeComponent);
		} // end private void BuildInitializeComponentMethod(System.CodeDom.CodeTypeDeclaration typeDeclaration)
Exemplo n.º 2
0
 protected abstract void GenerateAttachEventStatement(System.CodeDom.CodeAttachEventStatement e);