private void itemAdd_Click(object sender, RoutedEventArgs e) { DoorSocketDetailView view = new DoorSocketDetailView(EType.WindowMode.ADD_MODE, null, door.Id); if (view.ShowDialog() == true) { BindSocketToListItemView(); } }
private void itemEdit_Click(object sender, RoutedEventArgs e) { DTO_ScorpionAccess.ListViewItem item = (DTO_ScorpionAccess.ListViewItem)lbListSockets.SelectedItem; if (item == null) { return; } DTO_DoorSocket socket = door.Sockets.FirstOrDefault(s => s.Id == item.Key); DoorSocketDetailView view = new DoorSocketDetailView(EType.WindowMode.EDIT_MODE, socket, door.Id); if (view.ShowDialog() == true) { BindSocketToListItemView(); } }