Trial version functionality is implemented by
read from the registry the installed date and if the mode is Trial or Valid...
these classes can be use to read and write into and from the registry...
static string Regname = "Registryname";
public bool writeRegistryKey(string Key, string value)
{
try
{
Microsoft.Win32.RegistryKey key;
key = Microsoft.Win32.Registry.ClassesRoot.CreateSubKey(Regname);
key.SetValue(Key, value);
key.Close();
return true;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
return false;
}
}
public string readRegistryKey(string Value)
{
try
{
string keyValue = null;
Microsoft.Win32.RegistryKey key;
key = Microsoft.Win32.Registry.ClassesRoot.CreateSubKey(Regname);
keyValue = key.GetValue(id).ToString();
key.Close();
return keyValue;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
return null;
}
}