private void buttonPlayStop_Click(object sender, EventArgs e) { if (buttonPlayStop.Text == "stopped") { GameBoyRevampedBLL.StartEmulation(); buttonPlayStop.Image = Resources.Stop; buttonPlayStop.Text = "running"; } else { GameBoyRevampedBLL.StopEmulation(); buttonPlayStop.Image = Resources.runbasic; buttonPlayStop.Text = "stopped"; } }
private void ouvrirToolStripMenuItem_Click(object sender, EventArgs e) { openFileDialogRom.FileName = ""; openFileDialogRom.InitialDirectory = Path.GetDirectoryName(Application.ExecutablePath); openFileDialogRom.Filter = "Game Boy game|*.gb;*.gbc"; if (openFileDialogRom.ShowDialog(this) == DialogResult.OK) { _romPath = openFileDialogRom.FileName; EnableTools(); ROM.SavePath = "saves\\" + Path.GetFileName(_romPath).Split('.')[0] + ".sav"; GameBoyRevampedBLL.LoadROM(_romPath); GameBoyRevampedBLL.StartEmulation(); } }