示例#1
0
        private void setMashedVersion()
        {
            Version tmp = new VersionMFL();

            if (!tmp.EXE_EXISTS())
            {
                tmp = new VersionMashed();
                if (!tmp.EXE_EXISTS())
                {
                    tmp = new VersionMFL();
                }
            }
            Mashed.version = tmp;
        }
示例#2
0
        private void btnPath_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd    = new OpenFileDialog();
            Version        mfl    = new VersionMFL();
            Version        mashed = new VersionMashed();

            ofd.Filter          = mfl.EXE() + "/" + mashed.EXE() + "|" + mfl.EXE() + ";" + mashed.EXE();
            ofd.CheckFileExists = true;

            if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                txtPath.Text = ofd.FileName;
                setMashedVersion();
                Properties.Settings.Default.Path = txtPath.Text.Remove(txtPath.TextLength - System.IO.Path.GetFileName(ofd.FileName).Length);
                Properties.Settings.Default.Save();
                //loadICO();
                //setIntroState();
                Application.Restart();
            }
        }