private void ButtonAddEuroCupCamp_Click(object sender, RoutedEventArgs e) { EuroCup2014.Camp newCamp = new EuroCup2014.Camp(); newCamp.Id = Properties.Resources.EUROCUP2014_FORWARD; CampEditor editor = new CampEditor(newCamp); if (editor.ShowDialog().Value) { m_euroCupModel.AddCamp(newCamp); } }
private void ButtonEuroCup2014EditCamp_Click(object sender, RoutedEventArgs e) { Control control = sender as Control; if (control != null && control.DataContext is EuroCup2014.Camp) { CampEditor editor = new CampEditor(control.DataContext as EuroCup2014.Camp); if (editor.ShowDialog().Value) { m_euroCupModel.EditCamp(editor.Camp); } } }