Esempio n. 1
0
        private void DFoX_Load(object sender, EventArgs e)
        {
            string urlexe  = Properties.Settings.Default["urlexe"].ToString().Trim();
            string url1337 = Properties.Settings.Default["url1337"].ToString().Trim();

            cfileoffsett.Checked    = (bool)Properties.Settings.Default["fixoffset"];
            controlloBackup.Checked = (bool)Properties.Settings.Default["backup"];
            if (urlexe != "")
            {
                texe.Text = Ellipsis.Compact(Path.GetFileName(urlexe), texe, EllipsisFormat.Path);
                toolTip1.SetToolTip(texe, urlexe);
                exe = urlexe;
            }
            else
            {
                texe.Text = "Select the Exe/Dll to Patch...";
            }
            if (url1337 != "" && urlexe != "")
            {
                t1337.Text = Ellipsis.Compact(url1337, t1337, EllipsisFormat.Path);
                toolTip1.SetToolTip(t1337, url1337);
                f1337 = url1337;
            }
            else
            {
                t1337.Text = "Select a .1337 File...";
            }
        }
Esempio n. 2
0
        private void set()
        {
            t1337.Text = Ellipsis.Compact(f1337, t1337, EllipsisFormat.Path);
            toolTip1.SetToolTip(t1337, f1337);
            Properties.Settings.Default["url1337"] = f1337;
            Properties.Settings.Default.Save();
            string[] lines = File.ReadAllLines(f1337);
            if (!check_Symbol(lines[0]))
            {
                return;
            }
            string         unf = lines[0].Substring(1).ToLower().Trim();
            string         nf  = Path.GetFileName(unf);
            string         ext = Path.GetExtension(unf);
            OpenFileDialog apriDialogoFile1 = new OpenFileDialog();

            apriDialogoFile1.FileName    = nf;
            apriDialogoFile1.Filter      = "File " + ext + "|" + nf;
            apriDialogoFile1.FilterIndex = 0;
            apriDialogoFile1.Title       = "Select the file \"" + nf + "\" File...";

            if (apriDialogoFile1.ShowDialog() == DialogResult.OK)
            {
                exe       = apriDialogoFile1.FileName;
                texe.Text = Ellipsis.Compact(Path.GetFileName(exe), texe, EllipsisFormat.Path);
                toolTip1.SetToolTip(texe, exe);
                Properties.Settings.Default["urlexe"] = exe;
                Properties.Settings.Default.Save();
            }
            else
            {
                t1337.Text = "Select a .1337 File...";
                texe.Text  = "Select the Exe/Dll to Patch...";
                f1337      = String.Empty;
                exe        = String.Empty;
            }
        }