实例介绍
【实例简介】
【实例截图】
【核心代码】
调用方法:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Register;
namespace pdfPrint
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (Register.AppRegister.checkLicence("PRINT"))
Application.Run(new Form1());
}
}
}
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Register
{
public class FrmRegistercs : Form
{
private string m_softwareCode;
private IContainer components = null;
private GroupBox groupBox1;
private TextBox textBox1;
private Button buttonOK;
private Button buttonCancle;
public FrmRegistercs(string appCode, string sofewareCode)
{
this.InitializeComponent();
this.textBox1.Text = appCode;
this.m_softwareCode = sofewareCode;
}
private void FrmRegistercs_Load(object sender, EventArgs e)
{
}
private void buttonOK_Click(object sender, EventArgs e)
{
if (AppRegister.checkLicence(this.m_softwareCode))
{
base.DialogResult = DialogResult.OK;
base.Close();
}
}
private void buttonCancle_Click(object sender, EventArgs e)
{
base.Close();
}
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.groupBox1 = new GroupBox();
this.textBox1 = new TextBox();
this.buttonOK = new Button();
this.buttonCancle = new Button();
this.groupBox1.SuspendLayout();
base.SuspendLayout();
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Location = new Point(19, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new Size(370, 73);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "请将下面申请码发给发行商注册";
this.textBox1.Location = new Point(6, 30);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new Size(350, 21);
this.textBox1.TabIndex = 0;
this.buttonOK.Location = new Point(94, 100);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new Size(63, 37);
this.buttonOK.TabIndex = 1;
this.buttonOK.Text = "重新授权";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click = new EventHandler(this.buttonOK_Click);
this.buttonCancle.Location = new Point(227, 100);
this.buttonCancle.Name = "buttonCancle";
this.buttonCancle.Size = new Size(63, 37);
this.buttonCancle.TabIndex = 1;
this.buttonCancle.Text = "取消";
this.buttonCancle.UseVisualStyleBackColor = true;
this.buttonCancle.Click = new EventHandler(this.buttonCancle_Click);
base.AutoScaleDimensions = new SizeF(6f, 12f);
//base.AutoScaleMode = AutoScaleMode.Font;
base.ClientSize = new Size(400, 144);
base.Controls.Add(this.buttonCancle);
base.Controls.Add(this.buttonOK);
base.Controls.Add(this.groupBox1);
//base.FormBorderStyle = FormBorderStyle.FixedSingle;
base.Name = "FrmRegistercs";
base.Load = new EventHandler(this.FrmRegistercs_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
base.ResumeLayout(false);
}
}
}
好例子网口号:伸出你的我的手 — 分享!
网友评论
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明


支持(0) 盖楼(回复)
支持(0) 盖楼(回复)
支持(0) 盖楼(回复)
支持(0) 盖楼(回复)
支持(0) 盖楼(回复)