Example #1
0
        private string Roslyn_FormCode(string gamedir)
        {
            string code = Properties.Resources.Roslyn_Form_Code;

            string size = "256";

            if (RectangularDesign)
            {
                size = "322";
            }

            code = code.Replace("%HEIGHT%", size);
            code = code.Replace("%WAITCHANGE%", SelectedEmu.WaitWindowChange.ToString().ToLower());
            code = code.Replace("%EMUNAME%", SelectedEmu.Name);
            code = code.Replace("%GAME%", Shortcutbox.Text);
            code = code.Replace("%EMULATOR%", SelectedEmu.Exe);
            code = code.Replace("%GAMEFILE%", gamedir);
            code = code.Replace("%ARGUMENTS%", SelectedEmu.Arguments(gamedir));

            Color color = ControlPaint.Dark(GetAverageColor(ICOpic.Image));

            code = code.Replace("%avgR%", color.R.ToString());
            code = code.Replace("%avgG%", color.G.ToString());
            code = code.Replace("%avgB%", color.B.ToString());

            return(code);
        }
Example #2
0
        private void GameBrow_Click(object sender, EventArgs e)
        {
            string GamesPath = "C:\\";

            if (Emulatorcb_HasSelectedItem)
            {
                if (SelectedEmu.TryGetGamesPath() != "" && SelectedEmu.GamesPath != null)
                {
                    GamesPath = SelectedEmu.GamesPath;
                }
                else if (!string.IsNullOrWhiteSpace(Gdirbox.Text) && Directory.Exists(Path.GetDirectoryName(Gdirbox.Text)))
                {
                    GamesPath = Path.GetDirectoryName(Gdirbox.Text);
                }
                else if (Edirbox.Text != "")
                {
                    GamesPath = Edirbox.Text;
                }

                var file = TempString != null ? TempString : FileDialog(GamesPath, SelectedEmu.Gamesfilters);
                TempString = null;

                if (file != null && File.Exists(file))
                {
                    Gdirbox.Text = file;
                }
            }
            else
            {
                MessageForm.Info("Emulator must be selected!");
            }

            Shortcutbox.Focus();
        }
Example #3
0
        private void Emulatorcb_SelectedIndexChanged(object sender, EventArgs e)
        {
            string tempedir = Edirbox.Text;

            Edirbox.Text     = null;
            label6.Text      = SelectedEmu.Description;
            label6.ForeColor = SelectedEmu.Cdesc;
            Edirbox.Text     = SelectedEmu.Path();
            if (tempedir != Edirbox.Text)
            {
                Gdirbox.Text = null;
            }

            if (!string.IsNullOrWhiteSpace(Edirbox.Text) && Directory.Exists(Edirbox.Text) && !Directory.Exists(Edirbox.Text + @"ShortCutes"))
            {
                Directory.CreateDirectory(Edirbox.Text + @"ShortCutes");
                MessageForm.Info("To avoid Anti-Virus problems with ShortCutes please exclude this path folder:\n\n" +
                                 Edirbox.Text + "ShortCutes\n\nDouble click on this text to copy path folder to clipboard", Edirbox.Text + "ShortCutes");
            }

            if (Directory.Exists(Edirbox.Text + "ShortCutes"))
            {
                OpenFolder.Show();
            }
            else
            {
                OpenFolder.Hide();
            }

            Shortcutbox.Focus();
        }