コード例 #1
0
        private void btn_afegirContacte_Click(object sender, RoutedEventArgs e)
        {
            ContacteWindow contacteWindow = new ContacteWindow(
                context, client, new contacte(), modeControllerContacte.AFEGIR);

            contacteWindow.ShowDialog();
            actualitzaLlistaContactes();
        }
コード例 #2
0
 private void btn_modificarContacte_Click(object sender, RoutedEventArgs e)
 {
     if (listView_contactes.SelectedItems.Count == 1)
     {
         ContacteWindow contacteWindow = new ContacteWindow(
             context, client, listView_contactes.SelectedItem as contacte,
             modeControllerContacte.MODIFICAR);
         contacteWindow.ShowDialog();
         actualitzaLlistaContactes();
     }
     else
     {
         MessageBox.Show("Selecciona un contacte.", "Alerta", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }