Esempio n. 1
0
        private void btnRemoveExcelInfo_Click(object sender, EventArgs e)
        {
            RWReg reg = new RWReg("CURRENT_USER");
            bool  ret = reg.SetRegValue(@"Software\Microsoft\Office\14.0\Excel\Security", "ExtensionHardening", "00000000", "DWORD");

            if (ret)
            {
                MessageBox.Show("Success to remove the information!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Fail to remove the information!", clsTranslate.TranslateString("Failure"), MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Esempio n. 2
0
        private void frmLogin_Load(object sender, EventArgs e)
        {
            clsTranslate.InitLanguage(this);
            FillControl.FillPeriodList(cboPeriodList);
            frmMain.bLogined = false;
            timer1_Tick(null, null);
            timer1.Enabled = true;
            //string strHostName = Dns.GetHostName();
            string strHostName = Environment.MachineName;

            if (strHostName.ToUpper() == "KAIFA0007" || strHostName.ToUpper() == "LUCJ" || strHostName.ToUpper() == "QUWEIQIN")
            {
                //if (strHostName.ToUpper() == "30-0001-14544")
                //    pictureBox1.Visible = false;
                txtUserId.Text = "SYSADMIN";
                txtPwd.Text    = "PPT123";
                txtPwd.Focus();
            }
            else
            {
                txtUserId.Text = ini.IniReadValue("login", "userid");
                if (string.IsNullOrEmpty(txtUserId.Text.Trim()))
                {
                    txtUserId.Focus();
                }
                else
                {
                    txtPwd.Focus();
                }
            }
            RWReg reg = new RWReg("LOCAL_MACHINE");
            bool  ret = reg.SetRegValue(@"SOFTWARE\ORACLE", "NLS_LANG", "SIMPLIFIED CHINESE_CHINA.ZHS16GBK", "STRING");

            dalUserList bll = new dalUserList();

            if (!bll.UpdateDatabaseObject(Application.StartupPath, out Util.emsg))
            {
                MessageBox.Show(Util.emsg, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }