这样的话,我们拖控件的动作,就变成半自动代码生成了

[ 1393 查看 / 2 回复 ]

介于手工写代码和全自动代码生成中间。。

我们拖放一个控件,就会在那个根据模板自动生成的designer.cs中加入我们拖的控件。双击那个控件时,就在这个文件中进行相关的事件注册 代码自动生成 。
TOP

  1. namespace [!output NAMESPACE]
    {
        partial class [!output SAFE_ITEM_NAME]
        {
               /// <summary>
               /// Required designer variable.
               /// </summary>
            private System.ComponentModel.IContainer components = null;

            /// <summary>
            /// Clean up any resources being used.
            /// </summary>
               /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
            protected override void Dispose(bool disposing)
            {
                if(disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }

            #region Windows Form 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()
            {
                this.components = new System.ComponentModel.Container();
            }

            #endregion
        }
    }
复制代码
TOP

这样看图是否更清晰一点


 附件: 您所在的用户组无法下载或查看附件
TOP