窗体设计器:工具箱、拖放、属性与事件窗口,读写 VS 格式的 Designer.cs
- Designer.cs 在浏览器端解析为语句列表,未改动的语句保留原文: 教材 25 个参考窗体和全部示例读入再写出逐字节不变 - 编辑操作:添加 / 删除 / 移动 / 改名控件、属性、事件、列表项; 布局语句增删规则与 VS 一致(对全部现有文件执行无变化) - 双击控件或事件:绑定事件并在窗体代码末尾插入处理方法,跳到代码 - 预览复用运行时的 ControlView,设计时与运行时外观一致 - 修正:窗体属性 this.ClientSize = new Size(...) 被误认成创建控件; 示例 Designer.cs 的块头注释改为 VS 的 "// " 格式 - 测试:73 个(读写往返、布局规则、编辑操作、插入事件处理方法) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
03e80ce2e2
commit
ea5a25af06
20 files changed
+2767
-132
No files matched your search
+32
-32
@@ -46,17 +46,17 @@ namespace LED推送模拟量
|
||||
this.grp_show.SuspendLayout();
|
||||
this.grp_config.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
//
|
||||
// led
|
||||
//
|
||||
//
|
||||
this.led.BackColor = System.Drawing.Color.Black;
|
||||
this.led.Location = new System.Drawing.Point(19, 0);
|
||||
this.led.Name = "led";
|
||||
this.led.Size = new System.Drawing.Size(800, 130);
|
||||
this.led.TabIndex = 0;
|
||||
//
|
||||
//
|
||||
// grp_show
|
||||
//
|
||||
//
|
||||
this.grp_show.Controls.Add(this.btn_get);
|
||||
this.grp_show.Controls.Add(this.txt_temperature);
|
||||
this.grp_show.Controls.Add(this.txt_humidity);
|
||||
@@ -70,9 +70,9 @@ namespace LED推送模拟量
|
||||
this.grp_show.TabIndex = 1;
|
||||
this.grp_show.TabStop = false;
|
||||
this.grp_show.Text = "数据显示";
|
||||
//
|
||||
//
|
||||
// btn_get
|
||||
//
|
||||
//
|
||||
this.btn_get.Location = new System.Drawing.Point(287, 47);
|
||||
this.btn_get.Name = "btn_get";
|
||||
this.btn_get.Size = new System.Drawing.Size(51, 103);
|
||||
@@ -80,57 +80,57 @@ namespace LED推送模拟量
|
||||
this.btn_get.Text = "获取";
|
||||
this.btn_get.UseVisualStyleBackColor = true;
|
||||
this.btn_get.Click += new System.EventHandler(this.btn_get_Click);
|
||||
//
|
||||
//
|
||||
// txt_temperature
|
||||
//
|
||||
//
|
||||
this.txt_temperature.Location = new System.Drawing.Point(105, 85);
|
||||
this.txt_temperature.Name = "txt_temperature";
|
||||
this.txt_temperature.Size = new System.Drawing.Size(147, 21);
|
||||
this.txt_temperature.TabIndex = 4;
|
||||
//
|
||||
//
|
||||
// txt_humidity
|
||||
//
|
||||
//
|
||||
this.txt_humidity.Location = new System.Drawing.Point(105, 129);
|
||||
this.txt_humidity.Name = "txt_humidity";
|
||||
this.txt_humidity.Size = new System.Drawing.Size(147, 21);
|
||||
this.txt_humidity.TabIndex = 5;
|
||||
//
|
||||
//
|
||||
// txt_light
|
||||
//
|
||||
//
|
||||
this.txt_light.Location = new System.Drawing.Point(105, 47);
|
||||
this.txt_light.Name = "txt_light";
|
||||
this.txt_light.Size = new System.Drawing.Size(147, 21);
|
||||
this.txt_light.TabIndex = 3;
|
||||
//
|
||||
//
|
||||
// lbl_humidity
|
||||
//
|
||||
//
|
||||
this.lbl_humidity.AutoSize = true;
|
||||
this.lbl_humidity.Location = new System.Drawing.Point(43, 132);
|
||||
this.lbl_humidity.Name = "lbl_humidity";
|
||||
this.lbl_humidity.Size = new System.Drawing.Size(29, 12);
|
||||
this.lbl_humidity.TabIndex = 2;
|
||||
this.lbl_humidity.Text = "湿度";
|
||||
//
|
||||
//
|
||||
// lbl_temperature
|
||||
//
|
||||
//
|
||||
this.lbl_temperature.AutoSize = true;
|
||||
this.lbl_temperature.Location = new System.Drawing.Point(43, 88);
|
||||
this.lbl_temperature.Name = "lbl_temperature";
|
||||
this.lbl_temperature.Size = new System.Drawing.Size(29, 12);
|
||||
this.lbl_temperature.TabIndex = 1;
|
||||
this.lbl_temperature.Text = "温度";
|
||||
//
|
||||
//
|
||||
// lbl_light
|
||||
//
|
||||
//
|
||||
this.lbl_light.AutoSize = true;
|
||||
this.lbl_light.Location = new System.Drawing.Point(43, 50);
|
||||
this.lbl_light.Name = "lbl_light";
|
||||
this.lbl_light.Size = new System.Drawing.Size(41, 12);
|
||||
this.lbl_light.TabIndex = 0;
|
||||
this.lbl_light.Text = "光照度";
|
||||
//
|
||||
//
|
||||
// grp_config
|
||||
//
|
||||
//
|
||||
this.grp_config.Controls.Add(this.com_ledPort);
|
||||
this.grp_config.Controls.Add(this.lbl_ledPort);
|
||||
this.grp_config.Controls.Add(this.btn_open);
|
||||
@@ -142,26 +142,26 @@ namespace LED推送模拟量
|
||||
this.grp_config.TabIndex = 2;
|
||||
this.grp_config.TabStop = false;
|
||||
this.grp_config.Text = "配置";
|
||||
//
|
||||
//
|
||||
// com_ledPort
|
||||
//
|
||||
//
|
||||
this.com_ledPort.FormattingEnabled = true;
|
||||
this.com_ledPort.Location = new System.Drawing.Point(127, 84);
|
||||
this.com_ledPort.Name = "com_ledPort";
|
||||
this.com_ledPort.Size = new System.Drawing.Size(121, 20);
|
||||
this.com_ledPort.TabIndex = 3;
|
||||
//
|
||||
//
|
||||
// lbl_ledPort
|
||||
//
|
||||
//
|
||||
this.lbl_ledPort.AutoSize = true;
|
||||
this.lbl_ledPort.Location = new System.Drawing.Point(48, 87);
|
||||
this.lbl_ledPort.Name = "lbl_ledPort";
|
||||
this.lbl_ledPort.Size = new System.Drawing.Size(47, 12);
|
||||
this.lbl_ledPort.TabIndex = 2;
|
||||
this.lbl_ledPort.Text = "LED串口";
|
||||
//
|
||||
//
|
||||
// btn_open
|
||||
//
|
||||
//
|
||||
this.btn_open.Location = new System.Drawing.Point(173, 121);
|
||||
this.btn_open.Name = "btn_open";
|
||||
this.btn_open.Size = new System.Drawing.Size(75, 23);
|
||||
@@ -169,26 +169,26 @@ namespace LED推送模拟量
|
||||
this.btn_open.Text = "开启";
|
||||
this.btn_open.UseVisualStyleBackColor = true;
|
||||
this.btn_open.Click += new System.EventHandler(this.btn_open_Click);
|
||||
//
|
||||
//
|
||||
// com_adamPort
|
||||
//
|
||||
//
|
||||
this.com_adamPort.FormattingEnabled = true;
|
||||
this.com_adamPort.Location = new System.Drawing.Point(127, 41);
|
||||
this.com_adamPort.Name = "com_adamPort";
|
||||
this.com_adamPort.Size = new System.Drawing.Size(121, 20);
|
||||
this.com_adamPort.TabIndex = 1;
|
||||
//
|
||||
//
|
||||
// lbl_adamPort
|
||||
//
|
||||
//
|
||||
this.lbl_adamPort.AutoSize = true;
|
||||
this.lbl_adamPort.Location = new System.Drawing.Point(46, 44);
|
||||
this.lbl_adamPort.Name = "lbl_adamPort";
|
||||
this.lbl_adamPort.Size = new System.Drawing.Size(65, 12);
|
||||
this.lbl_adamPort.TabIndex = 0;
|
||||
this.lbl_adamPort.Text = "模拟量串口";
|
||||
//
|
||||
//
|
||||
// frm_LED
|
||||
//
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(834, 380);
|
||||
|
||||
Reference in new issue
Block a user