void clearPanel() { allowChangedEvents = false; idLabel.Text = ""; lblPath.Text = ""; txt_Title.Text = ""; txt_company.Text = ""; txt_description.Text = ""; txt_yearmade.Text = ""; txt_genre.Text = ""; gradeUpDown.Value = 0; txt_Manual.Text = ""; chk_Visible.Checked = false; chk_Favourite.Checked = false; videoTextBox.Text = ""; label14.Text = ""; playCountLabel.Text = ""; lastPlayLabel.Text = ""; profileComboBox.Items.Clear(); setGameArt(null); if (itemThumbs != null) { itemThumbs.Dispose(); itemThumbs = null; } discBindingSource.Clear(); allowChangedEvents = true; }
//Updates the panels with the selected Emulator's details. private void setEmulatorToPanel(ListViewItem listViewItem) { //reset status flags saveSelectedEmulator = false; saveThumbs = false; saveProfile = false; //get the selected Emulator Emulator dbEmu = listViewItem.Tag as Emulator; selectedEmulator = dbEmu; if (dbEmu == null) { return; } allowChangedEvents = false; int index = platformComboBox.FindStringExact(dbEmu.PlatformTitle); if (index < 0) { index = 0; } if (index < platformComboBox.Items.Count) { platformComboBox.SelectedItem = platformComboBox.Items[index]; } txt_Title.Text = dbEmu.Title; romDirTextBox.Text = dbEmu.PathToRoms; filterTextBox.Text = dbEmu.Filter; isArcadeCheckBox.Checked = dbEmu.IsArcade; txt_company.Text = dbEmu.Company; txt_yearmade.Text = dbEmu.Year.ToString(); txt_description.Text = dbEmu.Description; gradeUpDown.Value = dbEmu.Grade; EmuSettingsAutoFill.SetupAspectDropdown(thumbAspectComboBox, dbEmu.CaseAspect); videoTextBox.Text = dbEmu.VideoPreview; idLabel.Text = dbEmu.UID.ToString(); if (emuThumbs != null) { emuThumbs.Dispose(); } emuThumbs = new ThumbGroup(dbEmu); if (mainTabControl.SelectedTab == thumbsTabPage) { setGameArt(emuThumbs); thumbsLoaded = true; } else { setGameArt(null); thumbsLoaded = false; } txt_Manual.Text = emuThumbs.ManualPath; selectedProfile = null; profileComboBox.Items.Clear(); foreach (EmulatorProfile profile in DB.Instance.GetProfiles(selectedEmulator)) { profileComboBox.Items.Add(profile); if (profile.IsDefault) { profileComboBox.SelectedItem = profile; selectedProfile = profile; } } allowChangedEvents = true; profileComboBox_SelectedIndexChanged(profileComboBox, new EventArgs()); }