コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: robert0825/Scutex
        public MainWindow()
        {
            InitializeComponent();

            LicensingManager licensingManager = new LicensingManager(null);
            ScutexLicense    license          = licensingManager.Validate(InteractionModes.Gui);


            bool wasPressed = license.InterfaceInteraction.TryButtonClicked;

            Console.WriteLine(Guid.NewGuid().ToString());
            Console.WriteLine("Test Product");
            Console.WriteLine();

            Console.WriteLine(String.Format("Is Product Licensed: {0}", license.IsLicensed));
            Console.WriteLine(String.Format("Is Trial Valid: {0}", license.IsTrialValid));
            Console.WriteLine(String.Format("Is Trial Expired: {0}", license.IsTrialExpired));
            Console.WriteLine(String.Format("Is Trial Fault Reason: {0}", license.TrialFaultReason));
            Console.WriteLine(String.Format("Is Trial Remaining: {0}", license.TrialRemaining));
            Console.WriteLine(String.Format("Is Trial Elapsed: {0}", license.TrialUsed));
            Console.WriteLine(String.Format("Is Trial First Run: {0}", license.WasTrialFristRun));

            Console.WriteLine();
            Console.WriteLine("Press ENTER to exit.");
            Console.ReadLine();
        }
コード例 #2
0
        public static void TestLicensingManagerWithOptions()
        {
            LicensingManagerOptions options = new LicensingManagerOptions
            {
                DataFileLocation = @"C:\Temp\Scutex\License.lic",
                PublicKey        = "31|32|36|32|30|34|33|37|31|35|34|35|34|36|36|34|37|32|37|39|39|36|31|35|33|32|36|34|39|36|37|30|38|34|36|30|38|31|32|34|31|36|34|31|30|35|33|39|31|31|38|32|34|30|32|36|37|32|37|37|35|32|31|31|31|33|33|32|33|34|34|31|30|36|36|31|38|39|39|34|31|35|32|38|33|38|30|31|39|33|39|32|37|38|38|30|39|38|30|31|30|34|38|38|30|35|31|38|32|38|35|37|31|31|31|34|32|35|33|33|37|32|30|32|37|30|32|37|35|35|31|32|39|36|37|39|35|34|35|30|37|39|34|39|30|30|35|35|35|35|37|36|39|35|39|34|34|36|39|39|38|36|36|31|30|31|31|30|31|38|32|39|32|37|35|36|37|34|31|39|36|37|32|36|35|32|35|34|37|31|38|31|38|33|38|34|34|39|39|35|34|30|34|36|34|30|36|39|35|30|34|35|35|37|31|39|37|31|37|32|34|37|30|32|33|37|37|33|39|32|36|33|7c|36|35|35|33|37",
                DllHash          = "43|44|2d|36|42|2d|31|45|2d|30|30|2d|42|43|2d|45|32|2d|41|33|2d|31|33|2d|31|33|2d|34|38|2d|39|35|2d|44|32|2d|46|44|2d|43|42|2d|33|45|2d|35|36|2d|38|34|2d|33|30|2d|42|32|2d|46|46",
                KillOnError      = false
            };

            LicensingManager LicensingManager = new LicensingManager(null, options);

            LicensingManager.Validate(InteractionModes.Gui);
        }
コード例 #3
0
        public void TestLicensingManager()
        {
            LicensingManager manager = new LicensingManager(this);

            manager.Validate(InteractionModes.Gui);
        }