private System.ComponentModel.Container components = null;If I am subclassing from the MM framework which already has this line, do I need to have it as well, same with the method call or can I shorten the whole thing to just a class define and a empty constructor.
using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Drawing.Design; using System.Drawing.Drawing2D; using System.Data; using System.IO; using System.Windows.Forms; using OakLeaf.MM.Main.Windows.Forms; namespace Apps4U.Windows.Forms { /// <summary> /// Summary description for a4uTextBox. /// </summary> public class a4uTextBox : mmTextBox { /// <summary> /// Required designer variable. /// </summary> ----> private System.ComponentModel.Container components = null; public a4uTextBox(System.ComponentModel.IContainer container) { /// /// Required for Windows.Forms Class Composition Designer support /// container.Add(this); InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // } public a4uTextBox() { /// /// Required for Windows.Forms Class Composition Designer support /// InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // } /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { components = new System.ComponentModel.Container(); } #endregion } }MM
// Copyright, 2002 Oak Leaf Enterprises Solution Design, Inc. // No part of this software or its associated documentation // may be stored in a retrieval system, copied, transmitted, // distributed, transcribed or reproduced in any other way or // disclosed to any third parties without the written permission // of Oak Leaf Enterprises Solution Design, Inc. using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Drawing.Design; using System.Drawing.Drawing2D; using System.Data; using System.IO; using System.Windows.Forms; using OakLeaf.MM.Main.Business; using OakLeaf.MM.Main.Builders; using OakLeaf.MM.Main.Security; namespace OakLeaf.MM.Main.Windows.Forms { /// <summary> /// Summary description for mmTextBox. /// </summary> [ToolboxBitmap(typeof(TextBox)), DefaultProperty("Name")] public class mmTextBox : TextBox, ImmBindingSimple, ImmUISecurity { /// <summary> /// Required designer variable. /// </summary> ---> private System.ComponentModel.Container components = null; /// <summary> /// Constructor /// </summary> public mmTextBox() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); } /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } /// <summary> /// Override the Text property so the class name isn't /// automatically stored in the text property when /// an mmTextbox is dropped on a form /// </summary> ---> #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { } #endregion #region ImmUISecurity Members #endregion #region ImmSecurityBase Members #endregion #region ImmBindingSimple Members #endregion #region ImmBinding Members #endregion #region ImmBindingBase Members #endregion } }