Exemplo n.º 1
0
 private void btnVediBrano_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Brano     brano    = (Brano)lstBrani.SelectedItem;
         VediBrano finestra = new VediBrano(brano);
         finestra.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
 private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Brano brano = (Brano)lstBraniCd.SelectedItem;
         _braniCd.Remove(brano);
         _brani.Add(brano);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 3
0
 private void btnConferma_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Brano brano = new Brano(txtTitolo.Text, txtAutore.Text, float.Parse(txtDurata.Text));
         _brani.Add(brano);
         MainWindow main = new MainWindow(_brani, _cd);
         main.Show();
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 4
0
 public VediBrano(Brano brano)
 {
     InitializeComponent();
     lblBrano.Content = brano.ToString();
 }