/// This verifies the license meets its desired validation criteria. This includes
@@ -94,16 +86,16 @@ protected internal override void PrepareTextInformationAboutConstraint( StringBu
/// \t{UpdateURL}
///
///
- public override bool Validate( Type typeToValidate, ref int vc, ref int rtc )
+ public override bool Validate(Type typeToValidate, ref int vc, ref int rtc)
{
- if ( !base.Validate( typeToValidate, ref vc, ref rtc ) )
+ if (!base.Validate(typeToValidate, ref vc, ref rtc))
return false;
- if ( m_Allows )
+ if (m_Allows)
return true;
StringBuilder errStr = new StringBuilder();
- errStr.Append( String.Format( Resources.LicMessageFunctionNotAllowed, this.Name, this.UpdateURL ) );
+ errStr.Append($"{Resources.LicMessageFunctionNotAllowed} {this.Name}; {Resources.GetUpgrade} {this.UpdateURL}");
errStr.AppendLine();
- AddFailureReasonText( errStr.ToString() );
+ AddFailureReasonText(errStr.ToString());
return false;
}
///
@@ -115,15 +107,15 @@ public override bool Validate( Type typeToValidate, ref int vc, ref int rtc )
///
/// Thrown if the XmlNode is null.
///
- public override void FromXml( XmlNode itemsNode )
+ public override void FromXml(XmlNode itemsNode)
{
- base.FromXml( itemsNode );
- XmlNode updateURLTextNode = itemsNode.SelectSingleNode( "UpdateUrl/text()" );
- if ( updateURLTextNode != null )
+ base.FromXml(itemsNode);
+ XmlNode updateURLTextNode = itemsNode.SelectSingleNode("UpdateUrl/text()");
+ if (updateURLTextNode != null)
UpdateURL = updateURLTextNode.Value;
- XmlNode allowed = itemsNode.SelectSingleNode( "Allow/text()" );
- if ( allowed != null )
- Allow = Convert.ToBoolean( allowed.Value );
+ XmlNode allowed = itemsNode.SelectSingleNode("Allow/text()");
+ if (allowed != null)
+ Allow = Convert.ToBoolean(allowed.Value);
}
#endregion AbstractConstraint implementation
#region AbstractLicenseData implementation
@@ -133,10 +125,10 @@ public override void FromXml( XmlNode itemsNode )
///
/// A String representing the FunctionConstraint as Xml data.
///
- protected override void ToXmlString( XmlTextWriter xmlWriter )
+ protected override void ToXmlString(XmlTextWriter xmlWriter)
{
- xmlWriter.WriteElementString( "UpdateUrl", this.UpdateURL );
- xmlWriter.WriteElementString( "Allow", Convert.ToString( Allow ) );
+ xmlWriter.WriteElementString("UpdateUrl", this.UpdateURL);
+ xmlWriter.WriteElementString("Allow", Convert.ToString(Allow));
}
#endregion AbstractLicenseData implementation
#region Properties
@@ -150,22 +142,19 @@ protected override void ToXmlString( XmlTextWriter xmlWriter )
/// Gets the end date/time for this FunctionConstraint.
///
[
- Bindable( false ),
- Browsable( true ),
- Category( "Constraints" ),
- DefaultValue( null ),
- Description( "Gets or sets the allow property. If the value is false the constrain is not valid" ),
- DesignerSerializationVisibility( DesignerSerializationVisibility.Visible )
+ Bindable(false),
+ Browsable(true),
+ Category("Constraints"),
+ DefaultValue(null),
+ Description("Gets or sets the allow property. If the value is false the constrain is not valid"),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)
]
public bool Allow
{
- get
- {
- return this.m_Allows;
- }
+ get => this.m_Allows;
set
{
- if ( !this.m_Allows.Equals( value ) )
+ if (!this.m_Allows.Equals(value))
{
this.m_Allows = value;
this.IsModified = true;
@@ -178,25 +167,22 @@ public bool Allow
///
/// The new URL.
///
- /// Returns the URL, as a , which points to where an update can be obtained.
+ /// Returns the URL, as a , which points to where an update can be obtained.
///
[
- Bindable( false ),
- Browsable( true ),
- Category( "Data" ),
- DefaultValue( "" ),
- Description( "Gets or Sets the URL, as a String, which points to where an update can be obtained." ),
- DesignerSerializationVisibility( DesignerSerializationVisibility.Visible )
+ Bindable(false),
+ Browsable(true),
+ Category("Data"),
+ DefaultValue(""),
+ Description("Gets or Sets the URL, as a String, which points to where an update can be obtained."),
+ DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)
]
public string UpdateURL
{
- get
- {
- return this.updateUrl;
- }
+ get => this.updateUrl;
set
{
- if ( !this.UpdateURL.Equals( value ) )
+ if (!this.UpdateURL.Equals(value))
{
this.updateUrl = value;
this.IsModified = true;
diff --git a/CAS.CodeProtect/Logo.ico b/CAS.CodeProtect/Logo.ico
new file mode 100644
index 00000000..9b8dcfce
Binary files /dev/null and b/CAS.CodeProtect/Logo.ico differ
diff --git a/CAS.CodeProtect/Logo64.PNG b/CAS.CodeProtect/Logo64.PNG
new file mode 100644
index 00000000..0a7bb96f
Binary files /dev/null and b/CAS.CodeProtect/Logo64.PNG differ
diff --git a/CAS.CodeProtect/Properties/Resources.resx b/CAS.CodeProtect/Properties/Resources.resx
index 17b95863..4800ea9f 100644
--- a/CAS.CodeProtect/Properties/Resources.resx
+++ b/CAS.CodeProtect/Properties/Resources.resx
@@ -112,10 +112,10 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
the license signature is wrong.
@@ -182,9 +182,7 @@
CAS.Lib.CodeProtect.CodeProtectLP.CodeProtectLP()
- This license does not allow you to execute the functionality:
-{0}.
-You may get an upgrade at: {1}
+ This license does not allow you to execute the functionality:
CAS.Lib.CodeProtect.LicenseDsc.Constraints.FunctionConstraint
@@ -281,7 +279,7 @@ Restart the application to activate it.
Hi,
I am interested in a new licence, below are my current licensing details:
-
+
keys.xml;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1250
@@ -296,10 +294,6 @@ I am interested in a new licence, below are my current licensing details:Shows the dialog Unlock key to enter
the key and unlock the software.
-
- ..\Resources\SecurityUnlock.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
- Icone used by the user dialog
-
CAS.CommonResources
CAS.Lib.CodeProtect.Controls.UlockKeyDialog
@@ -399,4 +393,10 @@ Please navigate to: {0} manually.
It is impossible for this environment to get source assembly and install license.
CAS.Lib.CodeProtect.LibInstaller
+
+ CAS.CodeProtect.TraceSource
+
+
+ You may get an upgrade at:
+
\ No newline at end of file
diff --git a/CAS.CodeProtect/Properties/Resources1.Designer.cs b/CAS.CodeProtect/Properties/Resources1.Designer.cs
index 0a3e6363..e022acaa 100644
--- a/CAS.CodeProtect/Properties/Resources1.Designer.cs
+++ b/CAS.CodeProtect/Properties/Resources1.Designer.cs
@@ -19,7 +19,7 @@ namespace CAS.Lib.CodeProtect.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
@@ -321,6 +321,15 @@ public static string FunctionConstraintName {
}
}
+ ///
+ /// Looks up a localized string similar to You may get an upgrade at: .
+ ///
+ public static string GetUpgrade {
+ get {
+ return ResourceManager.GetString("GetUpgrade", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to {\rtf1\ansi\ansicpg1250\uc1 \deff0\deflang1045\deflangfe1045{\fonttbl{\f0\froman\fcharset238\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fmodern\fcharset238\fprq1{\*\panose 02070309020205020404}Courier New;}
///{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f14\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}{\f27\fswiss\fcharset238\fprq2{\*\panose 020b0604030504040204}Tahoma;}
@@ -452,8 +461,7 @@ public static string LicMessageFunctionNoReason {
}
///
- /// Looks up a localized string similar to This license does not allow you to execute the functionality: {0}.
- /// You may get an upgrade at: {1}.
+ /// Looks up a localized string similar to This license does not allow you to execute the functionality:.
///
public static string LicMessageFunctionNotAllowed {
get {
@@ -489,16 +497,6 @@ public static string ProductUnlockCodeStringToRemove {
}
}
- ///
- /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
- ///
- public static System.Drawing.Icon SecurityUnlock {
- get {
- object obj = ResourceManager.GetObject("SecurityUnlock", resourceCulture);
- return ((System.Drawing.Icon)(obj));
- }
- }
-
///
/// Looks up a localized string similar to It is impossible for this environment to get source assembly and install license..
///
@@ -557,6 +555,15 @@ public static string SplashScreenWaitMessage {
}
}
+ ///
+ /// Looks up a localized string similar to CAS.CodeProtect.TraceSource.
+ ///
+ public static string TraceSourceName {
+ get {
+ return ResourceManager.GetString("TraceSourceName", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to License failure.
///
diff --git a/CAS.CodeProtect/Properties/Settings.Designer.cs b/CAS.CodeProtect/Properties/Settings.Designer.cs
deleted file mode 100644
index 88758b39..00000000
--- a/CAS.CodeProtect/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace CAS.Lib.CodeProtect.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
-
- [global::System.Configuration.ApplicationScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("CAS.CodeProtect.TraceSource")]
- public string TraceSourceName {
- get {
- return ((string)(this["TraceSourceName"]));
- }
- }
- }
-}
diff --git a/CAS.CodeProtect/Properties/Settings.settings b/CAS.CodeProtect/Properties/Settings.settings
deleted file mode 100644
index 59b72077..00000000
--- a/CAS.CodeProtect/Properties/Settings.settings
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
- CAS.CodeProtect.TraceSource
-
-
-
\ No newline at end of file
diff --git a/CAS.CodeProtect/app.config b/CAS.CodeProtect/app.config
deleted file mode 100644
index f048df12..00000000
--- a/CAS.CodeProtect/app.config
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- CAS.CodeProtect.TraceSource
-
-
-
-
\ No newline at end of file
diff --git a/CAS.CodeProtect/security.ico b/CAS.CodeProtect/security.ico
deleted file mode 100644
index 718212d3..00000000
Binary files a/CAS.CodeProtect/security.ico and /dev/null differ