DeployLX Software Protection System

TimeMonitor Class

Provides methods for interacting with expiration of a TimeLimit.

Syntax

Public NotInheritable Class TimeMonitor
public sealed class TimeMonitor

Examples

This example shows how to use the TimeMonitor.
Visual Basic
Imports Microsoft.VisualBasic
Imports System
Imports System.Windows.Forms
Imports DeployLX.Licensing.v5

Namespace VBProtectedDll
    Public Class TimeMonitorClass
        Private _license As SecureLicense
        Private _monitor As TimeMonitor

        Public Sub New()
            _license = SecureLicenseManager.Validate(Me, Nothing, Nothing)
            _monitor = _license.GetTimeMonitor()
            AddHandler _monitor.TimeExpired, AddressOf _monitor_TimeExpired
        End Sub

        Private Sub _monitor_TimeExpired(ByVal sender As Object, ByVal e As EventArgs)
            MessageBox.Show("Thank you for evaluating the software. Your time has expired. Please visit www.xheo.com to purchase the full version.", "Time Expired")
        End Sub
    End Class
End Namespace
C#
using System;
using System.Windows.Forms;
using DeployLX.Licensing.v5;

namespace CSharpProtectedDll
{
    public class TimeMonitorClass
    {
        private SecureLicense _license;
        private TimeMonitor _monitor;

        public TimeMonitorClass()
        {
            _license = SecureLicenseManager.Validate( this, null, null );
            _monitor = _license.GetTimeMonitor();
            _monitor.TimeExpired += new EventHandler( _monitor_TimeExpired );
        }

        void _monitor_TimeExpired( object sender, EventArgs e )
        {
            MessageBox.Show( "Thank you for evaluating the software. Your time has expired. Please visit www.xheo.com to purchase the full version.", "Time Expired" );
        }
    }
}

Inheritance Hierarchy

System..::..Object
  DeployLX.Licensing.v5..::..TimeMonitor

Assembly:  DeployLX.Licensing.v5 (in DeployLX.Licensing.v5.dll)

See Also