public string ReadMailRegistry()
 {
     RegistryKey check = Registry.LocalMachine.OpenSubKey("Software\\ManadgementApps");
     if (check != null)
     {
         LCryp lc = new LCryp();
         try
         {
             RegistryKey root = Registry.LocalMachine.OpenSubKey("Software\\ManadgementApps");
             return  lc.Decrypt(root.GetValue("MA").ToString());
         }
         catch
         {
             return String.Empty;
         }
     }
     else
         return String.Empty;
 }
        /// <summary>
        /// Buraya mac in dışındaki parametreleri de hesabı cem ederek değiştirilecek
        /// </summary>
        /// <returns></returns>
        private bool CheckLicense()
        {
            RegistryKey check = Registry.LocalMachine.OpenSubKey("Software\\ManadgementApps");
            try
            {
                LCryp lc = new LCryp();
                HardDrive hd = new HardDrive();
                HardDDInfo hi = new HardDDInfo();
                string data = String.Empty;

                string compE = lc.Decrypt(check.GetValue("EKey").ToString());
                string comp = check.GetValue("LKey").ToString();

                if (comp.Trim() == compE.Trim())
                {

                    try
                    {

                        ArrayList hdCollection = new ArrayList();
                        hdCollection = hi.GetDriveInfo();

                        if (hdCollection.Count == 1)
                        {
                            foreach (HardDrive item in hdCollection)
                            {
                                hd.SerialNo = item.SerialNo;
                                hd.Model = item.Model;
                                hd.Type = item.Type;
                            }
                        }
                        else
                        {
                            MessageBox.Show("Please Use Only One HDD");
                            Application.Exit();
                        }

                        data.Trim();
                        data = hd.SerialNo.ToUpper();
                        //data = data.Substring(0, 30);

                        if (compE == data)
                            return true;
                        else
                            return false;

                    }
                    catch
                    {

                        return false;
                    }

                }
                else
                    return false;
            }
            catch
            {
                return false;
            }
        }
 private string EncryptSerial()
 {
     LCryp lc = new LCryp();
     return lc.Encrypt(_key);
 }
 private void WriteEmail()
 {
     RegistryKey check = Registry.LocalMachine.OpenSubKey("Software\\ManadgementApps");
     if (check != null)
     {
         LCryp lc = new LCryp();
         RegistryKey root = Registry.LocalMachine.CreateSubKey("Software\\ManadgementApps");
         root.SetValue("MA",lc.Encrypt(mailTextBox.Text),RegistryValueKind.String);
     }
 }