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(); }
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(); }
private void EmuBrow_Click(object sender, EventArgs e) { string EmuDir = "C:\\"; if (Edirbox.Text != "") { EmuDir = Edirbox.Text; } var file = TempString != null ? TempString : FileDialog(EmuDir, "Executable File (*.exe)|*.exe"); TempString = null; if (file != null) { bool exists = false; foreach (var emu in EmulatorsList) { if (emu.Exe.ToLower() == Path.GetFileName(file).ToLower()) { if (File.Exists(file)) { emu.Path(Path.GetDirectoryName(file) + @"\"); } emulatorcb.SelectedIndex = EmulatorsList.IndexOf(emu); Emulatorcb_SelectedIndexChanged(null, null); exists = true; break; } } if (exists == false) { MessageForm.Info("The emulator isn't supported yet. You can contribute to make it compatible on GitHub (Haruki1707/ShortCutes repo)" + "\n\n!!!This also may occur because you changed the emulator executable name." + "Make sure you are using the original emulator name!!!"); } } Shortcutbox.Focus(); }
private void ICOpic_MouseDoubleClick(object sender, MouseEventArgs e) { clicked = false; //Process click if (ICOpic.Image != null) { using (var CI = new CropImage_Tool()) { CI.ShowDialog(); if (CI.DialogResult1 == DialogResult.Yes) { ImagingHelper.ConvertToIcon(temppath + "temp.png", temppath + @"temp.ico"); ICOpic.Image = ImagingHelper.ICONbox; ICOpic.Image.Save(temppath + @"temp.png"); } } } else { MessageForm.Info("First select a picture to crop"); } }