Ejemplo n.º 1
0
        private void FormLauncher_Load(object sender, EventArgs e)
        {
            if (!TestDlg32Reg)
            {
                RegRun.RegLib("/s " + Application.StartupPath + "/lib/COMDLG32.OCX");
            }
            if (!TestComCTLReg)
            {
                RegRun.RegLib("/s " + Application.StartupPath + "/lib/MSCOMCTL.OCX");
            }

            try
            {
                RegUst.RegFile(utauFile, ".ust");
                RegUst.RegFile(utauFile, ".uar");
            }
            catch (Exception errorMsg)
            {
                MessageBox.Show(errorMsg.Message);
            }

            WindowState = FormWindowState.Minimized;

            ShowInTaskbar      = false;
            notifyIcon.Visible = true;

            runUTAU(utauFile);
            notifyIcon.ShowBalloonTip(1000);
        }
Ejemplo n.º 2
0
 private void btnReg_Click(object sender, EventArgs e)
 {
     if (FileName == null || FileName == "")
     {
         MessageBox.Show("请选择文件");
     }
     else
     {
         RegRun.RegLib(SystemFile + FileName);
     }
 }
        private void btnMSCOMCTL_Click(object sender, EventArgs e)
        {
            try
            {
                File.Copy(Source + "MSCOMCTL.OCX", SystemFile + "MSCOMCTL.OCX", false);
                MessageBox.Show("MSCOMCTL.OCX 写入成功");
            }
            catch (Exception errorMsg)
            {
                MessageBox.Show(errorMsg.Message + "\r\nMSCOMCTL.OCX 文件未写入");
            }

            RegRun.RegLib(SystemFile + "MSCOMCTL.OCX");
        }
Ejemplo n.º 4
0
        private void btnReg_Click(object sender, EventArgs e)
        {
            FileVersionInfo info     = FileVersionInfo.GetVersionInfo(libFile);
            String          FileName = info.OriginalFilename;

            try
            {
                File.Copy(libFile, SystemFile + FileName, false);
                MessageBox.Show(FileName + " 写入成功。");
            }
            catch (Exception errorMsg)
            {
                MessageBox.Show(errorMsg.Message + "\r\n" + FileName + " 文件未写入。");
            }

            RegRun.RegLib(SystemFile + FileName);
        }
        private void btnOneKey_Click(object sender, EventArgs e)
        {
            if (TestDlg32File == false)
            {
                try
                {
                    File.Copy(Source + "COMDLG32.OCX", SystemFile + "COMDLG32.OCX", false);
                    MessageBox.Show("缺失的COMDLG32.OCX 写入成功");
                }
                catch (Exception errorMsg)
                {
                    MessageBox.Show(errorMsg.Message + "\r\nCOMDLG32.OCX 文件未写入");
                }
            }
            if (TestDlg32Reg == false)
            {
                RegRun.RegLib(SystemFile + "COMDLG32.OCX");
            }
            else if (TestDlg32Reg == true && TestDlg32File == true)
            {
                MessageBox.Show("COMDLG32.OCX 无需修复");
            }

            if (TestComCTLFile == false)
            {
                try
                {
                    File.Copy(Source + "MSCOMCTL.OCX", SystemFile + "MSCOMCTL.OCX", false);
                    MessageBox.Show("MSCOMCTL.OCX 写入成功");
                }
                catch (Exception errorMsg)
                {
                    MessageBox.Show(errorMsg.Message + "\r\nMSCOMCTL.OCX 文件未写入");
                }
            }
            if (TestComCTLReg == false)
            {
                RegRun.RegLib(SystemFile + "MSCOMCTL.OCX");
            }
            else if (TestComCTLReg == true && TestComCTLFile == true)
            {
                MessageBox.Show("MSCOMCTL.OCX 无需修复");
            }
            testFileAndReg();
        }