Пример #1
0
 internal static bool SetArmaOAKey(byte[] hexkey)
 {
     try
     {
         RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(Arma.strArmaOARegLocation[Arma.GetArch()], true);
         if (registryKey == null)
         {
             return(false);
         }
         registryKey.SetValue("KEY", (object)hexkey);
         registryKey.Close();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Пример #2
0
 internal static string GetArmaOAPath()
 {
     try
     {
         RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(Arma.strArmaOARegLocation[Arma.GetArch()]);
         if (registryKey != null)
         {
             return(registryKey.GetValue("MAIN").ToString());
         }
         else
         {
             return(null);
         }
     }
     catch
     {
         return(null);
     }
 }
Пример #3
0
 internal static byte[] GetArmaOAKey()
 {
     try
     {
         RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(Arma.strArmaOARegLocation[Arma.GetArch()]);
         if (registryKey != null)
         {
             return((byte[])registryKey.GetValue("KEY"));
         }
         else
         {
             return((byte[])null);
         }
     }
     catch
     {
         return((byte[])null);
     }
 }