public void Associate()
{
if (!string.IsNullOrEmpty(_x10) && (!this._isEditor || !this._isOpener))
{
RegistryKey x10RegKey = GetCreateSubKey(Registry.ClassesRoot, _x10, _x10AssociationKeyName);
_x10AssociationKeyName = x10RegKey.GetValue(string.Empty).ToString();
RegistryKey x10AssociationSubKey = GetCreateSubKey(Registry.ClassesRoot, _x10AssociationKeyName);
RegistryKey shell = GetCreateSubKey(x10AssociationSubKey, "shell");
if (!_isEditor)
{
RegistryKey edit = GetCreateSubKey(shell, "edit");
RegistryKey editCommand = GetCreateSubKey(edit, "command");
editCommand.SetValue(string.Empty, _assemblyCommand);
}
if (!_isOpener)
{
RegistryKey open = GetCreateSubKey(shell, "open");
RegistryKey openCommand = GetCreateSubKey(open, "command");
openCommand.SetValue(string.Empty, _assemblyCommand);
}
this.CheckStatus();
}
}
#endregion