private void Add_Enabled_Image(setdata elem) { rdata copy = new rdata { Name = elem.Name, Ind = elem.Ind }; if (MainWindow.enabled_images.Count == 0) { MainWindow.enabled_images.Add(copy); main.ImageChange(0); } else if (MainWindow.enabled_images.Last().Ind < elem.Ind) { MainWindow.enabled_images.Add(copy); } else { for (int i = 0; i < MainWindow.enabled_images.Count; i++) { if (MainWindow.enabled_images[i].Ind > elem.Ind) { MainWindow.enabled_images.Insert(i, copy); if (i <= main.current_image_pos) { main.current_image_pos++; } break; } } } main.RPM.allPics[elem.Ind].enabled = true; }
private void Add_Enabled_Song(setdata elem) { rdata copy = new rdata { Name = elem.Name, Ind = elem.Ind }; if (MainWindow.enabled_songs.Count == 0) { MainWindow.enabled_songs.Add(copy); } else if (MainWindow.enabled_songs.Last().Ind < elem.Ind) { MainWindow.enabled_songs.Add(copy); } else { for (int i = 0; i < MainWindow.enabled_songs.Count; i++) { if (MainWindow.enabled_songs[i].Ind > elem.Ind) { MainWindow.enabled_songs.Insert(i, copy); break; } } } main.RPM.allSongs[elem.Ind].enabled = true; }
private void Remove_Disabled_Song(setdata elem) { main.RPM.allSongs[elem.Ind].enabled = false; for (int i = 0; i < MainWindow.enabled_songs.Count; i++) { if (MainWindow.enabled_songs[i].Ind == elem.Ind) { MainWindow.enabled_songs.RemoveAt(i); break; } } }
private void Remove_Disabled_Image(setdata elem) { main.RPM.allPics[elem.Ind].enabled = false; for (int i = 0; i < MainWindow.enabled_images.Count; i++) { if (MainWindow.enabled_images[i].Ind == elem.Ind) { MainWindow.enabled_images.RemoveAt(i); if (MainWindow.enabled_images.Count == 0) { main.ImageChange(-1); } else if (i == main.current_image_pos) { main.ImageChange(i - 1); } else if (i < main.current_image_pos) { main.current_image_pos--; } break; } } }