Note and attribute writing methods required to write components

xiaoxiao2021-03-06  85

Using system.componentmodel; using system.collection; using system.diagnostics;

A summary description of Namespace WindowsApplication1 {///

/// component1. /// /// #Region three methods for components / * // specifies the bitmap associated with the button type. [Toolboxbitmap (@ "c: / documents and settings / joe / mypics / myImage .bmp ")] // Specifies the bitmap associated with the Button type. [ToolboxBitmap (typeof (Button))] // Specifies a type that indicates the assembly to search, and the name // of an image resource to look for. [Toolboxbitmap (TypeOf (MyControl), "MyControlBitmap")] * / #ndregion public class mycomponent1: system.componentmodel.component {/// // The required designer variable. /// private system.com = null; /// test is a method in the myclass class. /// < / summary>

Public String Test () {Return "Note";

/// Used to indeicate status. Description in the ";} private string ffield =" in the properties box! "; [[ Description ("The Image Associated with The Control"] PUBLIC STRING FIELD

{///

/// My test class ///

Get {return ffield;} set {}} private string ffield1 = "Type in the property box!"; [Category ("Appearance")] Public String Field1 {///

/// My test class // /

Get {returnifeld1;} set {}}

Public mycomponent1 (system.componentmodel.icontainer container) {// // Windows.Forms class write designer supports /// container.add (this); initializationComponent ();

// // Todo: Add any constructor code after the initializationComponent call //} public mycomponent1 () {///// windows.forms class writing Designer Support for /// initializationComponent ();

// // Todo: Add any constructor code after INITIALIZEComponent call //}

///

/// Clean all the resources being used. /// Protected Override Void Dispose (Bool Disposing) {if (disponents! = Null) {components.dispose ();}} Base.Dispose

#REGION component designer generated code ///

/// designer supports the required method - Do not use the code editor to modify the // / this method. /// private vid initializecomponent () {components = new system.componentmodel.container ();} #ENDREGON}}

转载请注明原文地址:https://www.9cbs.com/read-122371.html

New Post(0)