با سلام
نسخه به روز شده قفل نرم افزاری خودم رو که قبلاً نسخه های 1 و 2 اون رو در این تالار قرار داده بودم رو بازنویسی کردم . میتونین از اون رو دانلود کنین . یک سورس هم ضمیمه کردم که میتونین ازش استفاده کنین چون استفاده از این رفرنس که مثل نسخه 2 اون به صورت Add Reference به پروژه اضافه بشه بسیار ساده هستش من توضیح خاصی در موردش نمیدم و احتمالا اکثر کسانی که از نسخه های قبلی استفاده کردن نباید با این نسخه هم مشکلی داشته باشن .
تصویر Keygen
تصویر نرم افزار ثبت نشده
تصویر نرم افزار بعد از ثبت شدن
نمونه کد استفاده از این نسخه :
Imports PS_27.Protector
Public Class Form1
''' <summary>
''' PS-27 Licensing
''' Please add dll by add reference to your project
''' ================================================== ===============
''' Programmer : Ali Dakhilzadeh
''' This assembly is free.
''' Copyright(c) 2014 by Ali Dakhilzadeh.All right reserved
''' ================================================== ===============
''' For More Info please contact me by visit my weblog or email
''' www.manamsoftware.mihanblog.com
''' alimanam@gmail.com
''' ================================================== ===============
''' </summary>
''' <remarks></remarks>
Private ps As New PS_27.Protector
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lblHardwareid.Text = ps.GetHardwareID
If My.Computer.FileSystem.FileExists(Application.Star tupPath & "\License.lic") = False Then
GroupBox1.Enabled = True
PictureBox1.Image = My.Resources.notRegistred
lblregister.Text = "نرم افزار ثبت نشده است"
Else
Dim lic() As Byte = ps.License(Application.StartupPath & "\License.lic")
If ps.LicenseValidator(lic, "1234567890") Then
GroupBox1.Enabled = False
PictureBox1.Image = My.Resources.Registred
lblregister.Text = "نرم افزار ثبت شده است"
Else
GroupBox1.Enabled = True
PictureBox1.Image = My.Resources.notRegistred
lblregister.Text = "نرم افزار ثبت نشده است"
End If
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Application.Exit()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ps.CheckLicense(txtLicense.Text, "1234567890") Then
ps.RegisterLicense(txtLicense.Text, Application.StartupPath & "\License.lic")
Application.Restart()
End If
End Sub
End Class
سورس طریقه استفاده به سی شارپ
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using PS_27;
namespace How_to_use_PS_27_CSHARP
{
public partial class Form1
{
/// <summary>
/// PS-27 Licensing
/// Please add dll by add reference to your project
/// ================================================== ===============
/// Programmer : Ali Dakhilzadeh
/// This assembly is free.
/// Copyright(c) 2014 by Ali Dakhilzadeh.All right reserved
/// ================================================== ===============
/// For More Info please contact me by visit my weblog or email
/// www.manamsoftware.mihanblog.com
/// alimanam@gmail.com
/// ================================================== ===============
/// </summary>
/// <remarks></remarks>
internal Form1()
{
InitializeComponent();
}
private PS_27.Protector ps = new PS_27.Protector();
private void Form1_Load(object sender, System.EventArgs e)
{
lblHardwareid.Text = ps.GetHardwareID;
if (System.IO.File.Exists(Application.StartupPath + "\\License.lic") == false)
{
GroupBox1.Enabled = true;
PictureBox1.Image = Properties.Resources.notRegistred;
lblregister.Text = "نرم افزار ثبت نشده است";
}
else
{
byte[] lic = ps.License(Application.StartupPath + "\\License.lic");
if (ps.LicenseValidator(lic, "1234567890"))
{
GroupBox1.Enabled = false;
PictureBox1.Image = Properties.Resources.Registred;
lblregister.Text = "نرم افزار ثبت شده است";
}
else
{
GroupBox1.Enabled = true;
PictureBox1.Image = Properties.Resources.notRegistred;
lblregister.Text = "نرم افزار ثبت نشده است";
}
}
}
private void Button2_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
private void Button1_Click(object sender, System.EventArgs e)
{
if (ps.CheckLicense(txtLicense.Text, "1234567890"))
{
ps.RegisterLicense(txtLicense.Text, Application.StartupPath + "\\License.lic");
Application.Restart();
}
}
دانلود نمونه سورس WPF
موفق باشید./