示例#1
0
        private void delProfileButton_Click(object sender, EventArgs e)
        {
            if (selectedProfile.IsDefault)
            {
                Logger.LogDebug("Default profile cannot be deleted");
                return;
            }

            EmulatorProfile profile = selectedProfile;

            saveProfile     = false;
            selectedProfile = null;
            profile.Delete();

            int index = profileComboBox.SelectedIndex;

            profileComboBox.Items.Remove(profile);

            if (index > 0)
            {
                profileComboBox.SelectedIndex = index - 1;
            }
            else
            {
                profileComboBox.SelectedIndex = 0;
            }
        }
示例#2
0
        void delProfileButton_Click(object sender, EventArgs e)
        {
            savePCSettings = false;
            int index = pcProfileComboBox.SelectedIndex;

            if (index > -1)
            {
                EmulatorProfile profile = (EmulatorProfile)pcProfileComboBox.Items[index];
                if (profile.IsDefault)
                {
                    return;
                }
                pcProfileComboBox.Items.Remove(profile);
                if (index > 0)
                {
                    index = index - 1;
                }
                pcProfileComboBox.SelectedIndex = index;
                profile.Delete();
            }
            loadProfileDropdown(selectedGame);
        }