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(); }
public ShortCutes() { InitializeComponent(); foreach (var emu in EmulatorsList) { emulatorcb.Items.Add(emu.Name); } foreach (char ch in Path.GetInvalidFileNameChars()) { if (!char.IsWhiteSpace(ch) && !char.IsControl(ch)) { InvalidFileNameChars += ch + " "; } } if (!Directory.Exists(temppath.Remove(temppath.Length - 1))) { Directory.CreateDirectory(temppath.Remove(temppath.Length - 1)); } if (!Directory.Exists(appdata.Remove(appdata.Length - 1))) { Directory.CreateDirectory(appdata.Remove(appdata.Length - 1)); } if (File.Exists(appdata + @"squaredesign")) { RectangularDesign = false; } Properties.Resources.loading.Save(temppath + @"loading.gif"); Bitmap flag = new Bitmap(ICOpic.Width, ICOpic.Height); using (Graphics flagGraphics = Graphics.FromImage(flag)) { flagGraphics.DrawString("Click here to select an image", new Font("Bahnschrift SemiBold SemiConden", 18F), Brushes.White, 10, (ICOpic.Height / 2) - (35F)); flagGraphics.DrawString("(PNG, JPG, JPEG, BMP, TIFF)", new Font("Bahnschrift SemiBold SemiConden", 12F), Brushes.White, 55, (ICOpic.Height / 2) - (22F / 2)); flagGraphics.DrawString("Double click to crop selected image", new Font("Bahnschrift SemiBold SemiConden", 15F), Brushes.White, 10, (ICOpic.Height / 2) + (22F)); } ICOpic.BackgroundImage = flag; OpenFolder.Hide(); }