private void CardAddView_Click(object sender, RoutedEventArgs e) { CardAddView CAV = new CardAddView(); CAV.DataContext = DataContext; Close(); CAV.Show(); }
private void DisplayAddDialog() { var dialog = new CardAddView { Owner = Window.GetWindow(this) }; dialog.Closed += (s, e) => dialog.Owner.Focus(); dialog.Show(); }
private void ShowCard(Card card) { var dialog = new CardAddView(card.Id) { Owner = Window.GetWindow(this) }; dialog.Closed += (s, e) => dialog.Owner.Focus(); dialog.Show(); }
private void NumbersEdit_Click(object sender, RoutedEventArgs e) { if (DataEmployers.SelectedItem != null) { IsChildWindowClosed = false; CardAddView CAV = new CardAddView(); CAV.DataContext = DataContext; CAV.Show(); ChildWindow = CAV; } }
private void DisplayEditDialog() { var item = ViewModel.SelectedItem as Card; if (item != null) { var dialog = new CardAddView(item) { Owner = Window.GetWindow(this) }; dialog.Closed += (s, e) => dialog.Owner.Focus(); dialog.Show(); } }
private void OpenCard() { var item = ViewModel.SelectedItem as Unit; if (item == null) { return; } var stockUnit = item.StockUnit; if (stockUnit != null) { int cardId = stockUnit.Card.Id; var dialog = new CardAddView(cardId) { Owner = Window.GetWindow(this) }; dialog.Show(); } }