遇到一本好书,终于把事件搞懂了。 using System; class Sender { private int myInt;//字段 public int MyInt//属性 { get{return myInt;} //获取get set { ... ...
引言:运行qt程序涉及到信号槽出现的错误。 1、error: 'connect' was not declared in this scope 原因: 有可能是类中使用了信号槽,却未引入信号与槽的基类QObject 解决方法一: 将connect换成QObject::connect(注意:要在类中加 ...
分类:
其他好文 时间:
2020-07-10 21:13:02
阅读次数:
56
恢复内容开始 #发送邮件 #sender: 发送者 #pwd: key #recver: 收件人 #title: 标题 #text : 内容 def sendMail(sender, sendername, pwd, recver, recvername, title, text): ret = T ...
分类:
编程语言 时间:
2020-07-10 19:14:23
阅读次数:
74
void DataReceived(object sender, SerialDataReceivedEventArgs e) { try { if (!serialPort.IsOpen) { return; } Byte[] receivedData = new Byte[serialPort. ...
分类:
其他好文 时间:
2020-07-07 17:58:20
阅读次数:
56
引用NuGet包 OpenHtmlToPdf 1 protected void btnExportPDF_Click(object sender, EventArgs e) 2 { 3 using (WebClient wc = new WebClient()) 4 { 5 wc.Encoding ...
分类:
Web程序 时间:
2020-07-07 15:32:59
阅读次数:
93
参考代码: protected void Page_Load(object sender, EventArgs e) { if (this.IsPostBack == true) { int row = int.Parse(Request.Form["RowNum"]); int col = int ...
分类:
Web程序 时间:
2020-07-05 15:34:44
阅读次数:
81
一、建造者模式(Builder) 工厂类模式提供的是创建单个类的模式,而建造者模式则是将各种产品集中起来进行管理,用来创建复合对象,所谓复合对象就是指某个类具有不同的属性,其实建造者模式就是前面抽象工厂模式和最后的Test结合起来得到的。我们看一下代码: 还和前面一样,一个Sender接口,两个实现 ...
分类:
编程语言 时间:
2020-06-29 09:18:03
阅读次数:
63
添加Microsoft.Win32程序集 private void OnOpenFile(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Title ...
private void btnUpdate_Click(object sender, EventArgs e) { List<string> listFileName = Directory.GetFiles(@AppConfig.FilePath).ToList(); StringBuilder ...
分类:
数据库 时间:
2020-06-27 09:39:08
阅读次数:
86
如何开启 首先开启一个线程: 1 @property (nonatomic, strong) NSThread *thread; 2 3 - (IBAction)startAction:(id)sender { 4 NSThread *thread = [[NSThread alloc] initW ...
分类:
移动开发 时间:
2020-06-19 16:03:09
阅读次数:
76