/// <summary> /// Event handler for double clicking a search result, which opens a record card containing further /// information on the sample. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Row_DoubleClick(object sender, MouseButtonEventArgs e) { DataGridRow row = sender as DataGridRow; SearchResult search = (SearchResult)row.Item; //casts the row data back to a search result object recordWindow = new RecordWindow(search); recordWindow.ShowDialog(); }
/// <summary> /// Event handler for the "Add New Record" Button, opens empty RecordWindow /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button_Click(object sender, RoutedEventArgs e) { recordWindow = new RecordWindow(); recordWindow.Show(); }