private void ClickAddHardApp(object sender, RoutedEventArgs e) { Models.Hardware hard = (sender as Button).DataContext as Models.Hardware; if (!hard.Apps.Contains(InHardApp.SelectedItem as Models.Application)) { hard.Apps.Add(InHardApp.SelectedItem as Models.Application); } InHardApp.SelectedItem = null; }
private void ClickAddHardDevice(object sender, RoutedEventArgs e) { Models.Hardware hard = (sender as Button).DataContext as Models.Hardware; hard.Devices.Add(new Models.Device()); }