コード例 #1
0
        private void BtnNew_Click(object sender, RoutedEventArgs e)
        {
            NewCDWindow newWindow = new NewCDWindow(null);

            newWindow.ShowDialog();

            Repository repository = Repository.GetInstance();

            _cds = repository.GetAllCds();
            listBoxCds.ItemsSource = _cds;
        }
コード例 #2
0
        private void BtnEdit_Click(object sender, RoutedEventArgs e)
        {
            NewCDWindow editWindow = new NewCDWindow(listBoxCds.SelectedItem as Cd);

            editWindow.ShowDialog();

            Repository repository = Repository.GetInstance();

            _cds = repository.GetAllCds();
            listBoxCds.ItemsSource = _cds;
        }