EasyTrial
1.0 Documentation
EasyTrial is a class library that lets you create a trial version
for you application with few lines of code without bothering yourself with any
technical issues.
Contents:
1- Why EasyTrial?
2- Library description.
3-
How to use EasyTrial.
4- Important notes and guidelines. Important
We offer 24/7
technical support for any questions or inquiries you may face with EasyTrial,
you can contact us at
support@awady.net and recieve reply within 24
hours.
Why EasyTrial?
1- Highly secure:
-Information
regarding the trial version is stored in multiple places that work as backup for
each other.
-Information regarding the trial version is
hidden and very hard to reach.
-EasyTrial uses MD5
hashing system, which makes the stored information very secure, even when
reached it will be
unchangeable
because of hashing.
-AntiCracking system, if anyone
tries to mess with your trial version stored information, which are very hard to
be found,
EasyTrial will detect it and
the trial version will end, as a punishment.
-EasyTrial
library is obfuscated, preventing any reverse engineering trials.
2- If you released insecure trial version it will be easily cracked,
causing a lot of financial loss, on the other hand if you
didn't
release a trial version you'll
lose a lot of customers who wanted to by your product but wanted to try it
first, EasyTrial can
solve this hard
equation.
3- No confusion or time wasted trying to know how to use
EasyTrial, full easy-to-read documentation for C#.net and Visual
Basic.net is provided to save your time.
4- We
offer 24/7 technical support for any questions or inquiries you may face with
EasyTrial, you can contact us at
support@awady.net and
recieve reply within 24 hours.
Library description:
EasyTrial
UsageTimesLimited Class:
It allows you to create a trial
version that can be executed for limited number of times, for example if you set
the number
of times to 5, then
every time the user runs the software, 1 will be subtracted from the remaining
times.
Members:
1-
CreateTrial: allows you to create usage times limited trial
version.
CreateTrial(int NumOfTimes, string
AppName)
Parameters:
NumOfTimes: the number of times you want the user to use your
software for.
AppName:
the software name, recommended to be 10+ characters.
2- Expired: sure you want to check if your software
trial has expired or not, use this property in an if condition so your
software does what you want it to do when
the trial version expires.
True: the trial
version has expired.
False: the trial version is
still valid.
3- RemainingTimes: if
you want your user to know how many times are still there in his trial version
then you are going
to need this property, you can get how many times still
remaining in the trial version, and let it
appear in a label or textbox
etc.
TimeLimited
Class:
It allows you to create a
trial version that runs for a limited amount of time, for example if you set the
hours parameter to
2, and
minutes parameter to 30, then your trial version will run for only 2 hours and
30 minutes, every time your user runs
the software a timer will
start, if the user closed the software after 7 minutes for example, then the
remaining time will be
2 hours and 23 minutes, and
so on.
Members:
1-
CreateTrial: allows you to create time limited trial
version.
CreateTrial(int NumOfHours, int NumOfMins,
string AppName)
Parameters:
NumOfHours: the number of
hours you want your user to use your software for.
NumOfMins: the number of minutes, after the hours, that
you want your user to use your software for.
AppName: the software name, recommended to be 10+
characters.
2-
Expired: sure you want to check if your software trial has expired or not, use
this property in an if condition so your
software does what you want it to do when the trial version
expires.
True: the trial version has
expired.
False: the trial version is still
valid.
3- RemainingTimeF1: if you
want your user to know how long is still there in his trial version then you are
going to need
this, you can get how long is still
remaining in the trial version, and let it appear in a label or
textbox etc. in the format "xx:xx".
4- RemainingTimeF2: if you want your user to know how
long is still there in his trial version then you are going to need
this, you can get how long is still remaining in the trial version,
and let it appear in a label or
textbox etc. in the format "xx Hours xx
Minutes".
DaysLimited
Class:
It allows you to create a
trial version that works for limited number of days only then expire, for
example if today is 2nd Jan
and you set the number of days to 10 days, then your
application will be available for usage between 2nd and
12th Jan, if
the user tried to run it in
any other time it will not work, date turn-arounds are handled, it is not easy
to fool EasyTrial.
Members:
1-
CreateTrial: allows you to create days limited trial
version.
CreateTrial(int NumOfDays, string
AppName)
Parameters:
NumOfDays: the number of days
you want your software to be available for.
AppName: the software name, recommended to be 10+
characters.
2- Expired: sure you
want to check if your software trial has expired or not, use this property in an
if condition so your
software does
what you want it to do when the trial version expires.
True: the trial version has expired.
False: the trial version is still valid.
3- RemainingDays: if you want your user to know how
many days are still there in his trial version then you are going to
need this, you can get how many days still remaining in the
trial version, and let it appear in a label
or textbox etc.
MoreLimits
Class:
It gives you more other
limitations that you can use for your trial version, and it can be used solely
or with one of the
options
listed above.
Members:
1-
Messages: it shows a message box repeatedly every a predefined interval, for
example if you set the message
parameter to "This is a trial version." and time parameter to
5, then every 5 seconds a message box will
pop-up with this defined message.
Messages(string Message, int
TimeInterval)
Parameters:
Message: the
message you want to appear in the message box.
TimeInterval: the interval, in seconds, that you want the message
to be shown after.
2-
ExitProgram: it allows you to create a timer that exits the software after a
predefined time interval, for example if
you set
the time parameter to 30, then the software will self-terminate after 30
seconds.
ExitProgam(int TimeInterval)
Parameters:
TimeInterval:
the interval, in seconds, that you want your software to be terminated
after.
3-
AboutEasyTrial: Shows a message box including Awady EasyTrial about
information.
How to use EasyTrial:
Important note: Please
follow the steps accurately, the order of lines of code shown in the examples
must be considered.
1- Create a new smart device project.
2- Add EasyTrial dll
file to your solution references.
3- Add EasyTrial easy lines of
code.
a- If you are using
UsageTimesLimited class.
Add the following using
statement to the declared used namespaces.
C#
using EasyTrial;
VB
Imports EasyTrial
Add the following lines of code to the main form
load event.
C#
//Creates
a trial version, replace 20 with the desired number of times, replace
MyTrialVersion with
your software
name.
EasyTrial.UsageTimesLimited.CreateTrial(20,
"MyTrialVersion");
//Checks if the trial version has ended or not.
if (EasyTrial.UsageTimesLimited.Expired ==
true)
{
//Insert what would you like to do when the trial version
ends.
}
//Optional, used only if you want to know or let your user know
how many times are still remaining
in the trial version,
replace txtShowRemainingTimes.Text with your desired object, or you may even
put it in
a message box.
txtShowRemainingTimes.Text = EasyTrial.UsageTimesLimited.RemainingTimes;
//Insert any lines of code you may want to put in the main form
load event.
VB
' Creates a trial
version, replace 20 with the desired number of times, replace MyTrialVersion
with
your software
name.
EasyTrial.UsageTimesLimited.CreateTrial(20, "MyTrialVersion")
'Checks if
the trial version has ended or not.
If EasyTrial.UsageTimesLimited.Expired = True Then
'Insert what would you like to do when the trial version
ends.
EndIf
'Optional, used only if you want to know or let your user know how
many times are still remaining
in the
trial version, replace txtShowRemainingTimes.Text with your desired object, or
you may even
put it in a message box.
txtShowRemainingTimes.Text = EasyTrial.UsageTimesLimited.RemainingTimes;
Note: Remember code lines
order must be as listed above.
b- If you are using
TimeLimited class.
Add the using statement to the
declared used namespaces.
C#
using EasyTrial;
VB
Imports EasyTrial
Add the following lines of code to the main form load
event.
C#
//Creates a trial version, replace 2 with the desired number of
hours, replace 30 with the desired
number of
minutes, replace MyTrialVersion with your software name.
EasyTrial.TimeLimited.CreateTrial(2,30,"MyTrialVersion");
//Checks if the trial version has ended or not.
if (EasyTrial.TimeLimited.Expired == true)
{
//Insert
what would you like to do when the trial version ends.
}
//Optional, used only
if you want to know or let your user know how long is still remaining in the
trial version, replace
txtShowRemainingTime.Text with your desired object, or you may even put it
in a message box.
txtShowRemainingTime.Text = EasyTrial.TimeLimited.RemainingTimeF1;
//Insert
any lines of code you may want to put in the main form load
event.
VB
'Creates a trial version, replace 2 with the desired number of
hours, replace 30 with the desired
number of minutes,
replace MyTrialVersion with your software name.
EasyTrial.TimeLimited.CreateTrial(2,30,"MyTrialVersion")
'Checks if the trial version has ended or not.
If EasyTrial.TimeLimited.Expired = True Then
'Insert
what would you like to do when the trial version ends.
EndIf
'Optional, used only if
you want to know or let your user know how long is still remaining in the
trial version, replace
txtShowRemainingTime.Text with your desired object, or you may even put it
in a message box.
txtShowRemainingTime.Text = EasyTrial.TimeLimited.RemainingTimeF1
'Insert
any lines of code you may want to put in the main form load
event.
Note: Remember code lines order must be as listed
above.
c- If you are using
DaysLimited class.
Add the using statement to the
declared used namespaces.
C#
using
EasyTrial;
VB
Imports EasyTrial
Add the
following lines of code to the main form load event.
C#
//Creates a trial
version, replace 30 with the desired number of days, replace MyTrialVersion with
your software name.
EasyTrial.DaysLimited.CreateTrial(30,"MyTrialVersion");
//Checks if the trial version has ended or not.
if (EasyTrial.DaysLimited.Expired == true)
{
//Insert
what would you like to do when the trial version ends.
}
//Optional, used only
if you want to know or let your user know how many days are still remaining
in the trial version, replace
txtShowRemainingDays.Text with your desired object, or you may even
put it in a message box.
txtShowRemainingDays.Text = EasyTrial.DaysLimited.RemainingDays;
//Insert
any lines of code you may want to put in the main form load
event.
VB
'Creates a trial version, replace 30 with the desired number of
days, replace MyTrialVersion with
your
software name.
EasyTrial.DaysLimited.CreateTrial(30,"MyTrialVersion")
'Checks if the trial version has ended or not.
If EasyTrial.DaysLimited.Expired = True Then
'Insert
what would you like to do when the trial version ends.
EndIf
'Optional, used only if
you want to know or let your user know how many days are still remaining in
the trial version, replace
txtShowRemainingDays.Text with your desired object, or you may even put
it in a message box.
txtShowRemainingDays.Text = EasyTrial.DaysLimited.RemainingDays
'Insert
any lines of code you may want to put in the main form load
event.
Note: Remember code lines order must be as listed
above.
d- If you are using MoreLimits
class.
Add the using statement to the declared used
namespaces.
C#
using
EasyTrial;
VB
Imports EasyTrial
Add the
following lines of code to the main form load event.
C#
//Shows the message box
desired, replace the message string with your desired message, replace 10
with the desired time interval.
EasyTrial.MoreLimits.Messages("This is a trial version.", 10);
//Insert any lines of code you may want to put in the main form
load event.
VB
'Shows the message box desired, replace the message string with
your desired message, replace 10
with the
desired time interval.
EasyTrial.MoreLimits.Messages("This is a trial
version.",
10)
'Insert any lines of
code you may want to put in the main form load event.
OR
C#
//Exits the software, replace 30 with the desired time
interval.
EasyTrial.MoreLimits.ExitProgam(30);
//Insert
any lines of code you may want to put in the main form load
event.
VB
'Exits the software, replace 30 with the desired time
interval.
EasyTrial.MoreLimits.ExitProgam(30)
'Insert
any lines of code you may want to put in the main form load
event.
OR
You can even use Messages
and ExitProgram together.
C#
//Shows the message box
desired, replace the message string with your desired message, replace 10
with the desired time interval.
EasyTrial.MoreLimits.Messages("This is a trial version.", 10);
//Exits the software, replace 30 with the desired time
interval.
EasyTrial.MoreLimits.ExitProgam(30);
//Insert
any lines of code you may want to put in the main form load
event.
VB
'Shows the message box
desired, replace the message string with your desired message, replace 10
with the desired time interval.
EasyTrial.MoreLimits.Messages("This is a trial version.", 10)
'Exits the software, replace 30 with the desired time
interval.
EasyTrial.MoreLimits.ExitProgam(30)
'Insert
any lines of code you may want to put in the main form load
event.
OR
You can use any or both of
them with one of the three first classes, i.e. UsageTimesLimited, TimeLimited,
DaysLimited,
by inserting the
above code after the code of the class you are going to use.
Note: Remember code lines
order must be as listed above.
Important notes and
guidelines:
1- Never ever try to use two of UsageTimesLimited, TimeLimited,
DaysLimited classes in one application, only use one.
2- You can use one of
UsageTimesLimited, TimeLimited, and DaysLimited classes with the MoreLimits
class in the same
application.
3- UsageTimesLimited
class supports up to 300 times.
TimeLimited class
supports up to 5 hours.
DaysLimited class supports up to
366 days.
MoreLimits class support is unlimited.
4-
EasyTrial is designed for Visual Studio 2003 and Visual Studio 2005, for smart
device applications only, i.e. Microsoft
Compact
Framework.net.
For information, support or technical questions,
please feel free to contact us:
support@awady.net