基本信息
源码名称:c#与halcon联合编程工厂测量实例
源码大小:10.03M
文件格式:.zip
开发语言:C#
更新时间:2019-03-28
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WinRobots { public partial class frmShow : Form { public frmShow() { InitializeComponent(); init(); } public void init() { foreach (Control Con in this.Controls) { if (Con is Button) { Con.Click = new EventHandler(FAction); } } } private void FAction(object sender, EventArgs e) { foreach (Control Con in this.Controls) { if (Con is Button) { Con.BackgroundImage = global::WinRobots.Properties.Resources._2_0btn_35; } } Button _Control = sender as Button; _Control.BackgroundImage = global::WinRobots.Properties.Resources.common_top_btn_press; switch (_Control.Text.Trim()) { case "取消"://停止 this.Close(); break; case "回退"://停止 if (this.textBox1.Text.Trim().Length > 0) { this.textBox1.Text = this.textBox1.Text.Remove(this.textBox1.Text.Length - 1); } break; case "清除"://停止 this.textBox1.Text = ""; break; case "确定"://停止 this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Text = textBox1.Text; this.Close(); break; case "."://停止 this.textBox1.Text = "."; break; case "0"://停止 this.textBox1.Text = "0"; break; case "1"://停止 this.textBox1.Text = "1"; break; case "2"://停止 this.textBox1.Text = "2"; break; case "3"://停止 this.textBox1.Text = "3"; break; case "4"://停止 this.textBox1.Text = "4"; break; case "5"://停止 this.textBox1.Text = "5"; break; case "6"://停止 this.textBox1.Text = "6"; break; case "7"://停止 this.textBox1.Text = "7"; break; case "8"://停止 this.textBox1.Text = "8"; break; case "9"://停止 this.textBox1.Text = "9"; break; case "-"://停止 if (this.textBox1.Text.Trim().Length == 0) { this.textBox1.Text = "-"; break; } if (this.textBox1.Text.Substring(0, 1) == "-") { this.textBox1.Text = this.textBox1.Text.Replace("-",""); } else { this.textBox1.Text = "-" this.textBox1.Text; } break; } } } }