基本信息
源码名称:C# winform 给指定机器 授权机器码Licence(完整源码)
源码大小:0.41M
文件格式:.zip
开发语言:C#
更新时间:2016-03-25
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
调用方法:
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);
}
}
}