private void BtnAddTreader_OnClick(object sender, RoutedEventArgs e) { Treader treader = TreaderFactory.CreateTreader; var f = new FrmTreaderEditor(treader); if (f.ShowDialog() != true) { return; } TM.Add(treader); }
private void btnEditTreaderClick(object sender, RoutedEventArgs e) { var send = sender as FrameworkElement; var treader = send.DataContext as Treader; if (treader == null) { return; } var f = new FrmTreaderEditor(treader); f.ShowDialog(); OnPropertyChanged(nameof(TM)); }