コード例 #1
0
        /*
         * funzione creata da sviluppatori, gestore eventi bottoni Film
         * crea Form FilmSpec in base al bottone del film che viene premuto
         */

        private void filmButton_Store_click(object sender, EventArgs e)
        {
            try {
                Button btn      = sender as Button;
                Form   filmSpec = new FilmSpec(utenteAttuale, btn.Image, Convert.ToInt32(((Film)btn.Tag).id), ((Film)btn.Tag).titolo, ((Film)btn.Tag).descrizione, ((Film)btn.Tag).disponibile);
                filmSpec.Show();
            }
            catch (Exception ex)
            {
                Console.Write(ex.ToString());
                MessageBox.Show("ERRORE CARICAMENTO FILM");
            }
        }
コード例 #2
0
 //handler per i bottoni presenti nella libreria dell'utente
 private void filmButton_Library_click(object sender, EventArgs e)
 {
     try
     {
         Button btn      = sender as Button;
         Form   filmSpec = new FilmSpec(utenteAttuale, btn.Image, Convert.ToInt32(((Film)btn.Tag).id), ((Film)btn.Tag).titolo, ((Film)btn.Tag).descrizione);
         filmSpec.ShowDialog();
         this.LoadLibrary();
     }
     catch (Exception ex)
     {
         Console.Write(ex.ToString());
         MessageBox.Show("ERRORE CARICAMENTO LIBRERIA");
     }
 }