Ejemplo n.º 1
0
        private void cmdOK_Click(object sender, EventArgs e)
        {
            String dir = txtFile.Text;
            String update;

            if (chkUpdate.Checked)
            {
                update = "1";
            }
            else
            {
                update = "0";
            }

            regedit.SubKey = AppController.APP_KEY;

            regedit.Write("UpdateDirectory", dir);
            regedit.Write("Update", update);

            regedit.SubKey = AppController.HKCU_RUN;

            if (chkStartup.Checked)
            {
                regedit.Write(Application.ProductName, Application.ExecutablePath);
            }
            else
            {
                regedit.DeleteKey(Application.ProductName);
            }
            this.Close();
        }
Ejemplo n.º 2
0
        private void configBFSX()
        {
            ModifyRegistry myRegistry = new ModifyRegistry();

            myRegistry.BaseRegistryKey = Microsoft.Win32.Registry.CurrentUser;

            // 允許運行BFServiceX的域名
            myRegistry.SubKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Ext\\Stats\\{8AFB38D0-67A4-49D3-8822-401755FC6573}\\iexplore\\AllowedDomains\\beanfun.com";
            myRegistry.CreateSubKey();
            myRegistry.SubKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Ext\\Stats\\{8AFB38D0-67A4-49D3-8822-401755FC6573}\\iexplore";
            myRegistry.DeleteKey("Blocked");
            myRegistry.DeleteKey("Flags");

            // 啟用BFServiceX元件
            myRegistry.SubKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Ext\\Settings\\{8AFB38D0-67A4-49D3-8822-401755FC6573}";
            myRegistry.DeleteSubKeyTree();

            // 相容性視圖的域名
            myRegistry.SubKey = "Software\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation\\PolicyList";
            myRegistry.Write("beanfun.com", "beanfun.com");
        }
Ejemplo n.º 3
0
        private void setHKBFEnvironment_Click(object sender, EventArgs e)
        {
            ModifyRegistry myRegistry = new ModifyRegistry();

            myRegistry.BaseRegistryKey = Registry.CurrentUser;

            // 允許運行BFServiceX的域名
            myRegistry.SubKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Ext\\Stats\\{8AFB38D0-67A4-49D3-8822-401755FC6573}\\iexplore\\AllowedDomains\\beanfun.com";
            myRegistry.CreateSubKey();
            myRegistry.SubKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Ext\\Stats\\{8AFB38D0-67A4-49D3-8822-401755FC6573}\\iexplore";
            myRegistry.DeleteKey("Blocked");
            myRegistry.DeleteKey("Flags");

            // 啟用BFServiceX元件
            myRegistry.SubKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Ext\\Settings\\{8AFB38D0-67A4-49D3-8822-401755FC6573}";
            myRegistry.DeleteSubKeyTree();

            // 相容性視圖的域名
            myRegistry.SubKey = "Software\\Policies\\Microsoft\\Internet Explorer\\BrowserEmulation\\PolicyList";
            myRegistry.Write("beanfun.com", "beanfun.com");

            MessageBox.Show("配置完成。");
        }
Ejemplo n.º 4
0
 public static bool RemoveCount()
 {
     m_myReg.SubKey = m_supKey;
     return(m_myReg.DeleteKey(m_Index));
 }