public bool enablePopup(ConnectPopupIDs popupID){
     bool bRet = false;
     RegistryKey registryKey1 = ((RegistryKey)null);
     try
     {
         registryKey1 = Registry.LocalMachine.CreateSubKey(this._sRegKey);
         registryKey1.DeleteValue("\"" + popupID.ToString() + "\"");
         registryKey1.Flush();
         registryKey1.Close();
         bRet = true;
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine("Exception enablePopup(): " + ex.Message); 
     }
     return bRet;
 }
 public bool disablePopup(ConnectPopupIDs popupID){
     bool bRet = false;
     RegistryKey registryKey1 = ((RegistryKey)null);
     try
     {
         registryKey1 = Registry.LocalMachine.CreateSubKey(this._sRegKey);
         //OpenSubKey(this._sRegKey, true);
         int iID = (int)popupID;
         //registryKey1.SetValue("\"" + iID.ToString() + "\"", 1, RegistryValueKind.DWord);
         registryKey1.SetValue(iID.ToString(), 1, RegistryValueKind.DWord); // use double quotes around number or not?
         bRet = true;
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine("Exception disablePopup(): " + ex.Message);
     }
     return bRet;
 }
Esempio n. 3
0
        public bool enablePopup(ConnectPopupIDs popupID)
        {
            bool        bRet         = false;
            RegistryKey registryKey1 = ((RegistryKey)null);

            try
            {
                registryKey1 = Registry.LocalMachine.CreateSubKey(this._sRegKey);
                registryKey1.DeleteValue("\"" + popupID.ToString() + "\"");
                registryKey1.Flush();
                registryKey1.Close();
                bRet = true;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("Exception enablePopup(): " + ex.Message);
            }
            return(bRet);
        }
Esempio n. 4
0
        public bool disablePopup(ConnectPopupIDs popupID)
        {
            bool        bRet         = false;
            RegistryKey registryKey1 = ((RegistryKey)null);

            try
            {
                registryKey1 = Registry.LocalMachine.CreateSubKey(this._sRegKey);
                //OpenSubKey(this._sRegKey, true);
                int iID = (int)popupID;
                //registryKey1.SetValue("\"" + iID.ToString() + "\"", 1, RegistryValueKind.DWord);
                registryKey1.SetValue(iID.ToString(), 1, RegistryValueKind.DWord); // use double quotes around number or not?
                bRet = true;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("Exception disablePopup(): " + ex.Message);
            }
            return(bRet);
        }