private void Addbutton_Click(object sender, EventArgs e) { MovieClass Movie = new MovieClass(); Movie = Movies[ListOfMovies.SelectedIndices[0]]; Movie.Movie_Name = WorkerClass.AvailableFolderName(Movies[ListOfMovies.SelectedIndices[0]].MovieName); Movie.Update_Movie(); WorkerClass.WriteFile("Movies.txt", Movie.Movie_Name, true); Form4 form = new Form4(Movie); if (form.ShowDialog() == DialogResult.Cancel) WorkerClass.DeleteFolder(Movie.Movie_Name); else added = true; }
private void button1_Click(object sender, EventArgs e) { MovieClass movie = new MovieClass(); movie.Movie_Name = Title.Text; movie.Set_IMDB_Adress(link); Form4 form = new Form4(movie); form.ShowDialog(); if (form.DialogResult == DialogResult.Cancel) return; DataBaseManipulation.InsertMovie(movie); movie.Update_Movie(); updated = true; }
private void propertiesToolStripMenuItem_Click(object sender, EventArgs e) { try { MovieClass Movie = new MovieClass(); Movie = Movies[ListOfMovies.SelectedIndices[0]]; Movie.Update_Movie(); Movie.Movie_Name = Movies[ListOfMovies.SelectedIndices[0]].MovieName; Thread.Sleep(1000); MovieForm form = new MovieForm(Movie); form.ShowDialog(); form.Dispose(); WorkerClass.DeleteFolder(Movie.Movie_Name); } catch { } }